Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Arduheater - open source intelligent heat strip controller (dew buster)

DIY imaging
  • Please log in to reply
115 replies to this topic

#1 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 03 August 2017 - 04:51 AM

Arduheater is a full open source intelligent heat strip controller for astronomy usage.
The source is still under heavy development so things move around a bit.
To access source code and detailed instructions visit the Github repository.

 

I hope someone may find this project useful.

I'll keep this thread updated as soon as I'm able to release the schematics and build instructions.

 
Motivation
I didn't want to carry more death weight, so I decided to optimize the battery life by having a more energy efficient dew buster.
 
Design Goals

  • Remotely controllable: This was a very important part of the design, most heat controllers, specially the DIY ones, rely on the PWM signal for each channel being manually adjusted by means of a potentiometer. This either requires the user to be near the device tweaking it or to set it to a temperature which is higher than the average needed temperature. Arduheater uses a serial connection so you can use any USB-Serial-TTL dongle to adjust it's settings either you're next to the thing or on the other side of the world.
  • Efficient energy usage: Manually adjusted heaters will either require the user to be constantly tweaking it or they will "let it run" thus wasting energy due to the general tendency to use a higher setpoint than it's really required; this is valid for any PWM or bang-bang style controllers. Arduheater uses a temperature sensor (DHT22) to measure basic environmental properties such as temperature and humidity, by knowing them both, the calculation of the dew point[1] is now possible. Arduheater also uses a temperature sensor (NTC) for each heating strip, allowing the micro-controller to have a rough estimation of the temperature the equipment is at; it will be a rough estimation because we are really interested on the lenses surface temperature but we are actually measuring the heat strip temperature, to mitigate this, Arduheater allows the user to set specific offsets per heating strip. Arduheater uses a PID controller[2] to efficiently manage the energy so only the required amount of energy to maintain a temperature setpoint is delivered to the heating strip. This is possible due the usage of a PWM signal while driving the outputs; the delta between the environmental dew point (plus offset, i.e. setpoint) and the heating strip temperature will make the micro-controller output a PID-calculated PWM signal until this delta reaches zero. In practical terms if a 12V heating strip full on consumes 12W of power (1A) it may be possible for it to use only 1W or even less to keep the equipment above dewpoint and the power usage will be automatically updated during the night as conditions vary, so the system will be always using the least amount of power to keep the dew away.
  • Builder friendly: Using off-the-shelf components such as the Arduino Nano and easily available parts Arduheater is aimed to be build by anyone with a soldering iron and some patience, no degree in electronics required.
  • Multiple independent outputs: Each of the four outputs have independent controls such as offset, min and max output power and of course the three main properties of the PID controller (Kp, Ki and Kd).

[1] Dew point is that dreadful threshold at which water condensation starts to happen on the lenses/equipment.

[2] A proportional–integral–derivative controller (PID controller) is a control loop feedback mechanism (controller) commonly used in industrial control systems.

 

 

Here are some shots of the bench prototype using a power resistor as the heating element and it's serial configuration interface:

 

JG1VFYKm.jpg k3eLnvom.jpg xVx06Tkm.jpg hVs1uyxm.jpg
  

 

 

The "field" prototype on it's box:

 

4T5YXV4m.jpg
 

 

The heating strips (more build info will be provided further ahead):

 

rPiKXpym.jpg WPiqDezm.jpg

 

 

And of course all of this would not be possible without the usage of the force. ;-)

 

zG0qFlom.jpg


Edited by jbrazio, 03 August 2017 - 10:07 AM.

  • mrowlands, Benach, brave_ulysses and 12 others like this

#2 Taosmath

Taosmath

    Apollo

  • *****
  • Posts: 1,041
  • Joined: 21 May 2014

Posted 03 August 2017 - 09:31 AM

Thanks for posting.

 

Looks like a nice neat build.  I'll be interested to see how it all works out, plus to get more details of the heater construction.



#3 LauraMS

LauraMS

    Ranger 4

  • -----
  • Posts: 324
  • Joined: 29 Mar 2011
  • Loc: Germany

Posted 03 August 2017 - 11:50 PM

Souns like an interesting project. In particular remote control capability would be interesting to me.

Good luck!

#4 Benach

Benach

    Vanguard

  • *****
  • Posts: 2,240
  • Joined: 24 Jan 2008

Posted 04 August 2017 - 03:17 AM

Looks like an interesting project. Will certainly follow this thread and if you need help, willing to help here. I have a few suggestions:

- Add also the capability to regulate vans in the system

- Make at least four different output gates

- Consider using Ethernet instead of USB. More reliable afaik.

- Make a nice GUI that works for Windows/Android/Apple 

 

Question: why are you using a DHT11 and not a SHT11?


Edited by Benach, 04 August 2017 - 04:45 AM.


#5 Arjan

Arjan

    Apollo

  • -----
  • Posts: 1,106
  • Joined: 21 Jan 2009
  • Loc: Netherlands

Posted 05 August 2017 - 05:49 AM

SMT vs pins?

#6 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 05 August 2017 - 08:04 AM

Thanks for the feedback.

As is it supports four heating outputs, I guess it would be possible to extend more two PWM outputs for fans and still use a 328p.

Do you have any suggestion for an Ethernet module which we don't have to care for the TCP stack ?

I used the DHT21 because it's a accurate, cheap and easy to interface device as it only requires an additional pull resistor. Nevertheless it should be fairly simple to add new sensors, it's a question of extending the sensor class and build the interfacing logic there.

#7 Benach

Benach

    Vanguard

  • *****
  • Posts: 2,240
  • Joined: 24 Jan 2008

Posted 05 August 2017 - 04:05 PM

jbrazio: perhaps an idea to use xbee?

#8 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 05 August 2017 - 05:18 PM

But that's not Ethernet, wifi is easy to interface. I would not go the xbee way because each module is like 50€, it would be cheaper to use an Wemos D1 (or any other ESP8266 based board) interfacing with arduheater either by I2C or as a serial gateway, this would cost between 2 to 5€.

I really like the Ethernet connection, it would be the most reliable solution for a remote observatory. For field usage maybe Bluetooth is more suitable ? No AP, no Adhoc connections etc.

#9 Arjan

Arjan

    Apollo

  • -----
  • Posts: 1,106
  • Joined: 21 Jan 2009
  • Loc: Netherlands

Posted 05 August 2017 - 06:44 PM

BT is nice, you could make an app on your phone to control focus. Interface is like a UART.

#10 hjd1964

hjd1964

    Ranger 4

  • *****
  • Posts: 348
  • Joined: 24 May 2012

Posted 08 August 2017 - 03:05 PM

The Arduino Ethernet Shield (R3) is cheap (<$10 on ebay) and generally well supported in Arduino land.



#11 jhayes_tucson

jhayes_tucson

    Fly Me to the Moon

  • *****
  • Posts: 7,388
  • Joined: 26 Aug 2012
  • Loc: Bend, OR

Posted 08 August 2017 - 06:57 PM

This looks fantastic!  It's just what I'm looking for to run my remote scope.  I've long wondered why dew controllers don't react to the actual dewpoint and temperature difference between a sensor exposed to the sky and the outside air temperature.   So it sounds to me like you are thinking about this in the right way.  I personally want USB control so that it can be connected to the USB data hub that I already have on my OTA.  I'll take schematics, a kit, or a finished product whenever you are ready so keep us informed.

 

John


  • Juicy6 likes this

#12 Benach

Benach

    Vanguard

  • *****
  • Posts: 2,240
  • Joined: 24 Jan 2008

Posted 09 August 2017 - 03:23 AM

Perhaps an idea to allow both?



#13 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 09 August 2017 - 04:33 AM

I hope I can find some time during the following week to finish the board schematic.

 

As-is Arduheater supports USB-Serial-TTL communication, meaning all features are exposed using a serial terminal.
Instead, it's also possible to connect a Bluetooth dongle to the 328p UART and use the serial terminal over the Bluetooth connection.

 

In the meanwhile I've ordered a couple of ENC28J60 and W5500 Ethernet based modules which seem to be the affordable options.



#14 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 29 October 2017 - 09:05 PM

Finally it's here !

I've updated the project page with the BOM, schematic and prototype board layout.

 

Visit the project's github page for the latest version of the files.

 

schematic-power_schem.jpgschematic-power_bb.jpg


  • N3p likes this

#15 BGRE

BGRE

    Mercury-Atlas

  • *****
  • Posts: 2,813
  • Joined: 21 Mar 2016
  • Loc: New Zealand

Posted 29 October 2017 - 09:39 PM

If the output npn transistors aren't darlingtons there really isn't enough base drive for guaranteed saturation for a heater load of much more than 40mA or so.



#16 steveastrouk

steveastrouk

    Apollo

  • *****
  • Vendors
  • Posts: 1,051
  • Joined: 01 Aug 2013
  • Loc: State College, Pa.

Posted 29 October 2017 - 09:55 PM

If the output npn transistors aren't darlingtons there really isn't enough base drive for guaranteed saturation for a heater load of much more than 40mA or so.

Hfe 1000



#17 BGRE

BGRE

    Mercury-Atlas

  • *****
  • Posts: 2,813
  • Joined: 21 Mar 2016
  • Loc: New Zealand

Posted 29 October 2017 - 10:14 PM

Yes, I thought as much, you really need to learn how to design a saturated switching stage properly. With a Darlington one typically designs for a forced hfe of around 100 or so, for a non Darlington stage a forced hfe of 10 or so is more typical. Its no good enough to have it work on the bench it has to work with worst case transistors over a reasonable temperature range (low temperature means low hfe). Using typical datasheet values for parameters is bad design practice especially if one wants a long operating lifetime (10-20 years or more).



#18 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 30 October 2017 - 05:21 AM

Thanks for the heads up.

Before publishing I had a couple nights on the field so I know it's working.. but from your comment it seems it's not on it's optimal stage, let's try to fix that ! :-)

 

TIP120 is a Darlington Transistor.

We will spec for a max of 2A per heat strip.

 

Ic = 2000 mA

Vbe = 1.60V @ 2A

Vce = 1.00V @ 2A

Hfe = 1300 @ 2A

 

Ib = 2000 / 1300

Ib = 1.54 mA

 

To make sure it gets saturated let's do a 5x gain on Ib.

1.54 * 5 = 7.7 mA

 

Rb = (5V - Vbe) / Ib

Rb = (5 - 1.60) / 0.0077 A

Rb = 441.5 R

 

Now solving for you suggested Hfe of 100,

 

Ib = 2000 / 100

Ib = 20 mA

 

I will not apply a 5 gain because at 20 mA Ib we are already at the ATmega max output current per pin.

 

Rb = (5V - Vbe) / Ib
Rb = (5 - 1.60) / 0.02 A
Rb = 170 R

 

-edit-

Power dissipation calculation:

 

P = Ic * Vce
P = 2 * 1.00 = 2W

-eof-

 

1) Is my math correct ?

2) Which one of the solutions (441.5R, 170R) is safer to use ?


Edited by jbrazio, 30 October 2017 - 09:55 AM.


#19 BGRE

BGRE

    Mercury-Atlas

  • *****
  • Posts: 2,813
  • Joined: 21 Mar 2016
  • Loc: New Zealand

Posted 30 October 2017 - 07:22 AM

Actually at 25C and 2A Onsemi datasheet indicates VCE sat = 1V

Power dissipation is thus 2W and junction temperature is 150C right on the limit.

Either use a heatsink or limit the current to well under 2A.

These are only typical values and worst case isn't specified.

Whatever happened to the designers datasheets in vogue in the 70's an 80's??

 

Vbe sat @2A Ic is 1.75V at 25C 

Recommended forced hfe is 250 or less ie 8mA or more for 2A.

 

One should never run the output current of a micorprocessor at its maximum if you want a long life. There's usually a maximum power supply pin current rating as well  to consider which may limit the current output achievable further. Since devices tend to get slower as they age (particularly at high junction temperatures) one design rule used was to derate maximum clock frequencies by around 20% to ensure a 40 year operating lifetime. 

 

Another issue is that there is virtually no load short circuit protection (accidents do happen and fuses are generally too slow to protect semiconductors).

The simplest solution is perhaps to use one of the many overcurrent overtemperature protected low side switches available instead of the darlington (eg NCV8403A- there are also lower current versions). These can be driven from 5V CMOS logic outputs. They also can have much lower on power dissipation. However most of these turn on relatively slowly (~50us).



#20 ProfEngr

ProfEngr

    Explorer 1

  • *****
  • Posts: 91
  • Joined: 12 Oct 2017
  • Loc: Chattanooga, TN

Posted 30 October 2017 - 08:04 AM

I'll throw this out for Bluetooth... Class 2 range is ~10M. This is the typical radio class found in most "gadgets." Class 1 dongles have a range of ~100M; longer with good antennas. Class 1 would be the preferred interface if you were going to add BT capability to the package. I don't foresee the need for wifi bandwidth so it would be a matter of personal preference/cost I guess. Neither one would turn me off.



#21 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 30 October 2017 - 11:07 AM

> Another issue is that there is virtually no load short circuit protection (accidents do happen and fuses are generally too slow to protect semiconductors).

 

Actually there is a fuse on the BOM.. I just forgot to add it to the schematic.

I will also update the schematic to go into the 400R range for the base resistor of the power transistor.

 

Your suggested part would make this bullet proof but for the price of one part we can buy 10 TIP120 which leaves us with a lot of spares for 4y..

 

 

Now the connectivity stuff..

 

I see three usage cases:

1) Using Arduheater on the field with a USB cable connected to the imaging computer.

2) Using Arduheater on the field with a Bluetooth connection either to the imaging computer or to a mobile device.

3) Using Arduheater on a remote observatory.

 

(If you know more scenarios don't hesitate to contribute.)

 

For #1 it's easy, we use the internal USB port of the Pro mini and we're good to go. It's even possible to write ASCOM drivers to make it controllable by the sequencing software.

 

For #2 it's also straight forward, it's a question of building a wiki how to connect to one of those Bluetooth TTL serial modules.

 

For #3, a remote observatory where you don't have easy access to, I strongly believe that cabling is the way to go mainly because of it's reliability vs. any kind of wireless connection, if on top we can add self-containment  i.e. the device does not rely on others to be controllable, then we would be golden. The problem I've found so far is that using an ethernet stack with a 328P uses a lot of resources, not only Flash but SRAM.. so that's why I've spoken about wifi, something in the lines of a WEMOS D1 Mini Pro.

 

@ProfEngr you're correct, bandwidth is not the driving force here.



#22 BGRE

BGRE

    Mercury-Atlas

  • *****
  • Posts: 2,813
  • Joined: 21 Mar 2016
  • Loc: New Zealand

Posted 30 October 2017 - 03:23 PM

How much do you pay for TIP120's?

Prices at Mouser for the overkill self protecting low side switch($US1.15) and TIP120's ($US0.62 for EOL parts) are not that disparate. The fact that TO220 packaged TIP120's are EOL for Onsemi should serve as a warning about their likely future availability. 

 

If you are considering remote operation a thermal fuse or similar protection is advisable to prevent damage should something go wrong. 


  • steveastrouk likes this

#23 jbrazio

jbrazio

    Explorer 1

  • -----
  • topic starter
  • Posts: 95
  • Joined: 22 Jul 2017
  • Loc: Portugal

Posted 30 October 2017 - 06:36 PM

I can't get nothing from Farnell or Mouser, I live near the end of the world and they charge you 20€ for a ten cent part. So usually I source stuff from ebay, aliexpress and alike. But you're correct, there is a price difference between the two parts but I was exaggerating a bit. :-)

 

How would the NCV8403A be driven in this context (TTL on gate switching 12V) ?

 

By a thermal fuse you mean a PTC ?



#24 BGRE

BGRE

    Mercury-Atlas

  • *****
  • Posts: 2,813
  • Joined: 21 Mar 2016
  • Loc: New Zealand

Posted 30 October 2017 - 06:54 PM

Try Farnell or RSComponents or other European Distributor. They should be able to be driven directly from a 5V logic signal ie the pin of a micro running with a 5V supply.

 

No, I actually meant a thermal fuse as a last resort perhaps located near the secondary heater.

eg:

http://pt.rs-online....739373630343626

 

If others located elsewhere than Portugal are to replicate this some idea of part sources should be indicated, particularly for those who aren't well versed in such matters.



#25 mvas

mvas

    Apollo

  • -----
  • Posts: 1,337
  • Joined: 27 May 2015
  • Loc: Eastern Ohio

Posted 30 October 2017 - 07:05 PM

Why are you using a power transistor?

Why not a TTL Level MOSFET?

 

Something like this ...

https://www.ebay.com/itm/301575487589


Edited by mvas, 30 October 2017 - 07:25 PM.



CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics







Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics