Right. Found/fixed that issue now:
hbg3.ino.txt
looks good so far. I will continue testing asap
Martin
Posted 29 December 2023 - 01:57 PM
Right. Found/fixed that issue now:
hbg3.ino.txt
looks good so far. I will continue testing asap
Martin
Posted 29 December 2023 - 02:16 PM
Mark - good to know that the mosfet doesn't heat too much.
Re. the frequency, maybe I remember wrongly but the dissipated heat for a mosfet depends from the switching frequency, aka "switching dissipation".
Edited by Zoroastro, 29 December 2023 - 02:17 PM.
Posted 29 December 2023 - 02:48 PM
.. the dissipated heat for a mosfet depends from the switching frequency, aka "switching dissipation".
Ah, that could be true. I had set it to 8192Hz so that most people wouldn't hear it. But setting it really really low should also be inaudible, so perhaps I will try that out.
EDIT: Yup, seems to be fine at 4Hz. I'll make that change for the v8.31 firmware.
Cheers
Edited by mlord, 30 December 2023 - 09:06 AM.
Posted 30 December 2023 - 09:33 AM
Firmware version v8.31 of the Arduino ESP32 source code for this project is now available:
hbg3.ino.v8.31.txt 295.04KB
32 downloads
Sources and binaries for the HBG3/HBG3-Relay and AIO (All-In-One) projects are now available in all of the usual places.
Cheers
Posted 30 December 2023 - 01:37 PM
It is attached to the mosfet. The radiator comes with the IRF520 board, you attach it with a small screw over a thermal pad.
For the rest of the assembly, I soldered the diode and resistors directly along the wires and covered all joints with thermoretractable sleeves. The volume of the wires can be reduced by shortening them, at any rate I managed to close the box quite easily.
Edited by Zoroastro, 30 December 2023 - 01:41 PM.
Posted 30 December 2023 - 01:48 PM
It is attached to the mosfet. The radiator comes with the IRF520 board, you attach it with a small screw over a thermal pad.
For the rest of the assembly, I soldered the diode and resistors directly along the wires and covered all joints with thermoretractable sleeves. The volume of the wires can be reduced by shortening them, at any rate I managed to close the box quite easily.
Interesting. The units I got from Amazon.ca didn't have the radiator.
https://www.amazon.c...e?ie=UTF8&psc=1
Is it really essential?
Also - what kind of connectors did you use for the Thermistor and Temp\Hum sensor? Can you tell me the source?
Thanks.
Edited by dlwmacgregor, 30 December 2023 - 01:51 PM.
Posted 30 December 2023 - 02:26 PM
Interesting. The units I got from Amazon.ca didn't have the radiator.
Measure how hot it gets and decide from that. I have the same ones (no heatsink from the vendor), but I did add a heatsink to it before encasing it in the little project box. In free air it should be fine though.
Posted 30 December 2023 - 02:45 PM
Measure how hot it gets and decide from that. I have the same ones (no heatsink from the vendor), but I did add a heatsink to it before encasing it in the little project box. In free air it should be fine though.
Thanks Mark.
I'll be putting mine in Zoroastro's case.
How did you attach it?
Edited by dlwmacgregor, 30 December 2023 - 02:49 PM.
Posted 30 December 2023 - 03:31 PM
Thanks Mark.
I'll be putting mine in Zoroastro's case.
How did you attach it?
There are some photos of mine in the appropriate thread, the one about HomeBrew Smart Dew Control, here:
https://www.cloudyni...2#entry12698130
Posted 30 December 2023 - 04:29 PM
Mark,
I received the unit, but I’m away from my mount for a few weeks.
Connecting to a USB power bank boots the unit.
The GPS unit saw 9-14 satellites but could not connect and find the coordinates.
I assume it’s because I powered the unit over USB port and not over the mount’s 12V rail.
The SkyPortal app refuses to connect to the unit without a mount.
My question:
Can the firmware be upgraded without connecting to a mount?
I can directly connect to its WiFi from my laptop via telnet, I verified it.
I need to switch the unit to WiFi Access Point mode, connect it to my home WiFi, and then do a firmware upgrade.
Is it all possible with telnet commands?
Thank you!
Serge
Edited by nikaboo, 30 December 2023 - 04:30 PM.
Posted 30 December 2023 - 04:41 PM
Yes that is all possible, and all explained multiple times in multiple places earlier in this discussion thread.
Eg. Here: https://www.cloudyni...post&p=12939791
(found by searching Thread for "OTA Firmware")
Edited by mlord, 30 December 2023 - 04:53 PM.
Posted 30 December 2023 - 05:24 PM
Also - what kind of connectors did you use for the Thermistor and Temp\Hum sensor? Can you tell me the source?
Sure, Amazon. Being both 3.5mm (I couldn't find a good 2.5 female mm connector) I added the big embossed labels to avoid mixups.
Posted 30 December 2023 - 05:40 PM
My question:
Can the firmware be upgraded without connecting to a mount?
Yes it can. The ESP32 can even be updated before it is even soldered and that is recommended by Mark to confirm it is a good board.
I can directly connect to its WiFi from my laptop via telnet, I verified it.
I need to switch the unit to WiFi Access Point mode, connect it to my home WiFi, and then do a firmware upgrade.Have you configured the HBG3 to connect to your home WiFi and obtain an Internet connection? This is needed to use the ota_update option. Maybe try https://serial.huhn.me/ to connect.
Is it all possible with telnet commands? Connect by Telnet and send the command ota_update
if you have an OLED and button to toggle the display, it is easiest to use that.
Edited by Astro Andy, 30 December 2023 - 06:02 PM.
Posted 30 December 2023 - 05:53 PM
Can the C button on the Nunchuck also be set to toggle the OLED display if a focus motor is not detected? As well as having the toggle button.
Also disabling the 'hold both Nunchuck buttons to switch to focus only mode' if no focus motor is detected? So it stays on Slew only. An OLED page with the status of the Nunchuck would be cool.
I've updated to v8.31 and have an odd issue with DirectConnect showing DirectConnect* with the switch high. I ripped the switch off as I wasn't that happy and just shorted it but it stays on 1.2.3.4 but jumps between DirectConnect when shorted. The settings were wiped. Like new!
Edited by Astro Andy, 30 December 2023 - 06:51 PM.
Posted 30 December 2023 - 06:04 PM
Mark - good to know that the mosfet doesn't heat too much.
Re. the frequency, maybe I remember wrongly but the dissipated heat for a mosfet depends from the switching frequency, aka "switching dissipation".
This is only partly true. It is correct that MOSFETS, while switching, generate heat, but there are two primary sources of heat in a MOSFET used as a power switch.
The first is the fact that a MOSFET is an imperfect device. All act as variable resistors, with the maximum resistance being (essentially) infinite. However, the minimum resistance is a decidedly non-zero value.
In the case of the IRF520, with adequate gate drive, the typical drain to source resistance is .27 ohms. Run at it's maximum .. 9 amps .. you can expect an IRF520 to generate 2.4 watts of heat just from this internal resistance alone. That figure is above its safe free air dissipation rating and so you should certainly heatsink this part if you intend it to pass 9 amps at greater than 50% duty cycle or so. (1.2 watts is a reasonable best case upper limit for free air dissipation of a TO-220 package. Personally, I get nervous at 1/4 that.)
The key here is adequate gate drive, which in the case of the IRF520 is about 10 volts. Below 10 volts, the resistance goes up (as does the heat generated) and at 4 volts or so, it stops working entirely.
The second source of heat is also due to the fact that a MOSFET is an imperfect device in another (inter-related) way than that described above.
We broadly think of MOSFETs as being controlled by voltage (only), but this is not entirely correct. The gate - source junction of a MOSFET is in fact a capacitor, and when turned off, appears to the driving source (e.g., a CPU pin or discrete transistor driver) as a near short circuit. It's not a big capacitor, but it's there, and the driving source must supply electrons .. current .. to charge up that cap.
During this "charge up" time, the transistor is operating in the linear region, where its drain to source resistance is much (much) higher than its ideal fully on resistance and is therefore generating much (much) more heat than in a fully on state.
A circuit designer will want to supply as much current as he can from the driving source to reduce time in the linear region, thereby reducing the heat generated. But as the gate-source junction is a short circuit, he has to be mindful of this fact so as not to stress the driver. The easiest "fix" is to use a resistor from the driver to the gate. This will reduce the maximum current to a (hopefully) safe value for the driving source. However, a resistor will slow the charging rate of the gate-source capacitor, leaving the part in the linear region longer, generating more heat. So the designer picks the smallest resistor he can to maximize turn-on time without overtaxing the current capability of the driving device.
The key is, both these effects create heat in a MOSFET used as a switch.
When used as a simple ON switch, the primary source of heat is the first described, the fully-on drain to source resistance. The second source of heat, the "linear region gate charge up" effect is still there, but it happens just once .. at turn-on .. and so can be ignored.
When used in a PWM mode though, both effects contribute significantly. Heat is generated when the MOSFET is fully on, and is also generated each time it's turned on.
Lowering the switching frequency in PWM mode is certainly one way to reduce the second source of heat, as is optimizing (maximizing) the drive current.
But maybe the best way is to simply use a modern part. The IRF520 is described as a "third generation" part, which sounds good, until you realize we're probably using 26th generation parts now. That's an exaggeration of course, but there are much better choices for MOSFETs in applications like this, even other "third generation" parts.
For example, the cheap like borsch IRL520 has an on resistance roughly 1/4 that of the IRF520, so even as a simple On-Off switch, swapping an IRL520 for an IRF520 will reduce the steady state power by a factor of four. However, it reaches its fully-on status at a much lower gate voltage, so there is potentially an additional significant gain in heat when used in a PWM circuit.
Sadly, there's no free lunch. The gate-source capacitance of an IRL520 is a bit higher than that of an IRF520, so when used in PWM mode at moderate switching frequencies, just swapping "F" for "L" for the other has less improvement than one might expect. It's still a whole lot better, just not as much better as one might initially expect. Here, lowering the switching frequency shows an improvement in heat performance.
My current solution is to use a truly modern part, spending all of a buck and a half on them. Last buy was for IRFB7437. This is a part good for 200 amps! and has a worst case drain to source resistance of two milliohms. That's more than two orders of magnitude better than an IRF520. Again, with this very low Rds (on) comes a big gate-source cap, so when used in a PWM mode, I'll often use a bipolar transistor driver to minimize time in the linear region. But used as a switch, I'll use a very conservative gate drive resistor and won't even think about adding a heat sink until I'm passing more than 20 amps or so.
Hope this novella was useful.
Posted 30 December 2023 - 06:41 PM
The Celestron dew heater ring for the C11 absorbs a maximum of 2.5 A at 12V, so we are in the region of 0.6W max with the IRF520. Even in a box that seems OK to me. Else, I have a couple IRL540 around.
Edited by Zoroastro, 30 December 2023 - 06:43 PM.
Posted 30 December 2023 - 07:15 PM
The Celestron dew heater ring for the C11 absorbs a maximum of 2.5 A at 12V, so we are in the region of 0.6W max with the IRF520. Even in a box that seems OK to me. Else, I have a couple IRL540 around.
The IRF 520 seems to my (advanced amateur hacker's) eye to be a spectacularly bad choice for this application. The spec sheet lists a turn on voltage of 2 volts best case, 4 volts worst case. So the 3.3 volts out of the ESP32 might not turn it on at all.
Let's assume that it does turn on, fully even, and Rds is best case, .27 ohms. Ohms law says power is equal to the current squared multiplied by the resistance. 2.5 x 2.5 x .27 = 1.6 watts; heat sink surely required.
The other concern is the temperature resulting from this heat. Yes, there's a heat sink on the transistor, which will remove the heat from the transistor and send it to .. the small volume of air inside the plastic box. Since plastic is a decent insulator, you would expect the temperature inside the box to just rise and rise. If nothing else, I'd drill some holes in the case.
Posted 30 December 2023 - 08:17 PM
The IRF 520 seems to my (advanced amateur hacker's) eye to be a spectacularly bad choice for this application.
Yes, that has long been discussed extensively here before: https://www.cloudyni...9#entry12831456
The reason people (myself included) are using the IRF520 here, is that prefab modules incorporating it are readily available and easy to work with. The "best" part to use isn't always the one with the best datasheet.
In the earlier discussions, a MUCH better dual-channel part was identified (Si9926CDY), at a cost of about $0.50. But it is an SMD, so difficult to work with outside of having PCBs manufactured with it pre-populated. I have a dream of perhaps someday doing that. But an even more desirable dream is that someone else here will beat me to it!
Edited by mlord, 31 December 2023 - 08:29 AM.
Posted 31 December 2023 - 05:53 AM
Is the HBG3 Smart Dew Control thread still active? It would be a shame if the information posted here, in the HBG3 development/issues/feature requests thread, were missed from there.
I intend to use the heater thread to assemble a heater based on the Celestron ring heater and like many others I'm sure, don't have an extensive background in electronics. Making it simple and more importantly safe to follow construction instructions will open up to a wider audience.
https://www.cloudyni...heater-control/
Happy New Year all.
Posted 31 December 2023 - 01:00 PM
Mark,
I received the unit, but I’m away from my mount for a few weeks.
Connecting to a USB power bank boots the unit.
The GPS unit saw 9-14 satellites but could not connect and find the coordinates.
I assume it’s because I powered the unit over USB port and not over the mount’s 12V rail.The SkyPortal app refuses to connect to the unit without a mount.
My question:
Can the firmware be upgraded without connecting to a mount?
I can directly connect to its WiFi from my laptop via telnet, I verified it.
I need to switch the unit to WiFi Access Point mode, connect it to my home WiFi, and then do a firmware upgrade.
Is it all possible with telnet commands?
Thank you!
Serge
I connected it via USB this morning and did an OTA update no problem.
It found my Home WIFI right away because I always keep it in Access Point mode.
It also found 6 GPS satellites in short order.
Edited by dlwmacgregor, 31 December 2023 - 01:03 PM.
Posted 31 December 2023 - 01:46 PM
One thing I would like to someday figure out, is why running the I2C at 400KHz causes WiFi/Bluetooth to stop working.. Right now, we just lock the bus at 100KHz for everything, but it's starting to get busier there with all of this STUFF!
So I just now had another look at the I2C speeds, and the issue doesn't seem to be there any longer -- there have been updates to the Arduino ESP32 support since I last tried it, so perhaps it has been fixed now?
Let's find out! There are now test binaries available for both the HBG3 and AIO projects, using (much) faster I2C speeds for the OLED and FRAM modules. I've left the Nunchuck and SHT3x sensor at the original 100KHz speed because of their long cabling.
To help us all and try out the test release, change one setting on the HBG3:
set ota.update.path /hbg3/testing.bin
save
reset
ota_update
Or on the AIO, use this instead:
set ota.update.path /hbg3/aio-testing.bin
save
reset
ota_update
Please give it a whirl and post your findings here. And don't forget to restore the original update path afterwards:
set ota.update.path
save
Edited by mlord, 31 December 2023 - 02:06 PM.
![]() Cloudy Nights LLC Cloudy Nights Sponsor: Astronomics |