Jump to content


Robert Brown Arduino dew controller build, step by step


Recommended Posts

In my other thread on this subject, I said I'd consider writing a build thread for this as a guide for others who are considering a build, or perhaps who might like to build it but find the details on Sourceforge a bit confusing and aren't sure it's manageable.  Consider it considered, and this thread is it :)  There are a few optional bits of the build and the instructions aren't always clear what applies to which bit, so for clarity here I'm building the three-channel MOSFET-based system using a twenty row by four line LCD display with a DHT22 humidity sensor.  I didn't build in the Bluetooth interface and I also didn't bother with the additional switches to force the heaters full on because generally I'll be operating my kit remotely, even if it is only from the warm room.  I'll also be putting mine in a 3d-printed box that I've designed myself because I couldn't find anything I really wanted off the shelf.

As regards expertise required, I am not and nor have I ever been an electronics engineer.  I'm happy enough with a soldering iron that I know not to grab the hot end and I did do an AO Level (or whatever they were called) in Electronics in the mid-80s, though most of that was theory and we rarely got to play with components, nor even design anything very complicated.  I probably am reasonably practical when it comes to making stuff, but more often than people realise that's probably down to the triumph of confidence over ability :D  To be quite honest though this really isn't a complicated thing to build.  If you could manage Meccano or technical Lego then it probably isn't going to be too taxing -- it just comes with the added bonus of the opportunity to melt your fingerprints off.

If anything makes more skilled electron-wranglers wince when you read it, please do throw in your own ideas.  Or in fact if you've done the build yourself, perhaps a different way, by all means add your own experiences.  I'm quite happy not to be always hearing the sound of my own keyboard.

This is what my completed first build looks like (two-tone, because I ran out of white filament, though I quite like the look so I might do the rest that way deliberately :)


On the top are the three temperature sensor sockets, three dew heater sockets, three LED indicators for the headers, a fan speed indicator LED, on/off switch, power LED and fuse.  The long side has a fan and the USB socket and the short side has the 12V supply socket and DHT22 humidity sensor.  The other long side has ventilation holes in:


I imagine I'll be adding to this thread for a few weeks as I find time to do each bit or find stuff I've missed...


  • Like 5
Link to comment
Share on other sites

Since it's relatively easy, I'll start with the tools required.  I think this is pretty much everything I needed.


Covering the easy stuff first, obviously there's the soldering iron.  It would be nice to have a proper temperature-controlled iron, but I've had some of my tools since I was in my early teens and getting rid of them now is almost unconscionable :)  The one in the picture is 18W and has a standard tip about 2mm wide.  I did also use a very small tip for the temperature sensor sockets in my first build, but that may yet be avoidable in the future.

Other easy bits -- a hot-melt glue gun which my daughter normally uses for, err, making a sticky mess all over the front of a hot melt glue gun, wire cutters/strippers and a pair of side cutters, a couple of pairs of pliers, junior hacksaw and a multimeter (something else that's probably twice as old as my children).  If all goes well the multimeter really only gets used as a continuity tester or at most a resistance meter.

There's also a pair of Allen keys to fit the bolts I used -- 2mm and 2.5mm in this case, and a pair of drills(2.5mm and 3mm) to drill the holes out for the bolts because it was easier than trying to make them in the design for the case.

In the centre at the bottom is a sort of clamp with a built-in magnifier for holding parts whilst soldering them.  These days my eyesight needs a bit of help for the small stuff.  It, or a separate magnifying glass, is also handy for checking soldered connections to make sure there aren't any bridges between joints that shouldn't have them.  Above it is a tool for making up modular sockets.  It's probably one of the more esoteric items, but I have several lying about because I make up all my own network cables.  It's only used for crimping the RJ11 plugs onto the temperature sensors, so could probably be avoided altogether by using a different type of plug and socket (just needs three pins, really).

Above the crimping tool, a couple of blobs of blutak (showing discolouration due to heavy use, in this case).  It can be so handy for holding stuff in place whilst soldering :)  And above them, a little 3d-printed tool that really isn't necessary, but allows the likes of resistor leads to be bent at just the right point to go through the usual 1/10th inch spacing PCB holes.  Pliers mostly work just as well.

And finally, bottom right, and the only tool I actually bought specifically for this build because it actually came with some of the components I wanted anyhow, a crimping tool for making up the connectors for pin headers.  I'll come back to this one later.

I think the only out-of-the-ordinary thing I used that isn't in the photo is a hot air gun.  That's because in places I used some heatshrink sleeving to make sure joins were insulated.  It may not be required for future builds.

I did also use a small flat-bladed screwdriver (about 3mm wide).  It's handy for making sure the pins are pressed fully home on the pin header sockets (more of which later), but otherwise I only used it for adjusting the brightness of the LCD so the text showed up.  In fact, for the latter purpose a plastic screwdriver would be a better idea because you do need to be poking it in the general direction of live electrics, so removing the possibility of shorting anything out would be sensible.  I feel sure I have one, but I haven't been able to find it.

I think that's about it.  Next I'm going to try to put together a list of all the components I bought, any relevant information that occurs to me about them and if possible where I bought them.  That may take a few days to sort out properly.


Edited by JamesF
  • Like 1
Link to comment
Share on other sites

Before the main details of the components, a word or two about the circuit board...

The documentation provides a plan for building the controller on stripboard, which looks perfectly good (but you'll need to add a track cutting tool to the list of required tools).  I decided to go down the route of prefabricated PCBs, thinking without any real evidence that it would be simpler and more compact.  There appear to be a number of different links in the documentation to "recommended" PCB providers, but I ordered from Aisler.  They also offer a package for components, but ignore it.  It doesn't use the listed components and it isn't even remotely complete.  I assume someone must have started setting up a list and abandoned it fairly quickly because they couldn't find what they wanted.  My recollection is that the minimum order from Aisler is for three boards.  As it happened I wanted at least three anyhow so that worked out for me.  Otherwise you might need to a friend or two who also want to do the build so you can share costs.

A little later, in an exchange of emails with Robert Brown, I had the impression that he was surprised I wasn't using stripboard for the build and that he was expecting people would do it that way.  I may have misinterpreted what he was saying, but assuming I got it right that does add to the confusion given that the documentation already suggests two separate "recommended" sources for the bespoke PCB.

Had I known this to start with I'd probably have gone with the stripboard build and as I intend to build the focuser controller once the dew controller is done I will do exactly that for those, but as I had the three PCBs already ordered that's the way I went this time.  In the event that I want any more (I may build a fourth to use for my travel kit so I don't have to remove one from the observatory) I will go down the stripboard route.  If you would prefer to use a prefab PCB then I couldn't really fault the Aisler service to be fair.


  • Like 1
Link to comment
Share on other sites

Right then... Components...  This one is probably going to be a bit picture-heavy.  I've given links to the places I purchased parts from where they still exist or if I still have them, but a few things I already had.  I have no connection with any of the vendors.  I'm not suggesting anyone should buy from these specific vendors.  They're more for information and guidance.  The photos may not show the number of each component required -- I was buying to make at least three of these (and so the links to where I bought them might have more than you need, too.)

I've already covered the PCB, above.


Simple stuff first.  Resistors, twenty in all:

4 x 330 ohm
1 x 1 Kohm
3 x 1.2 Kohm
1 x 2.2 Kohm
4 x 4.7 Kohm
6 x 10 Kohm
1 x 1 Mohm


The documentation doesn't suggest power ratings or tolerance, but the PCB design appears to suit 0.25W resistors and those are what look to be used in the build photos, so that's what I went with.  I assumed 5% tolerance would be ok.

Most of these I had anyhow, but those I was missing I bought from here:


Capacitors.  Just the two.

1 x 0.1uF
1 x 0.33uF


Bought from https://www.ebay.co.uk/itm/Monolithic-Multilayer-Ceramic-Capacitors-10-Pack-Choose-PF-NF-UF-Free-P-P/231332330771



From https://www.ebay.co.uk/itm/1N5800-Series-Schottky-Diodes-1N5819-1N5822-Various-Pack-Sizes/152056021097 and https://www.ebay.co.uk/itm/5-x-10A10-Rectifier-Diode-10A-1000V/252434225368

All of these actually have leads that I'd consider over large and don't fit through standard PCB holes.  With stripboards you can probably just enlarge the hole slightly, but with a prefab PCB an alternative solution needs to be found.  For my first controller I bodged it, but this one I'm going to try to make a better job of it.  I'll return to this when I get that far.


1 x 5mm Multicolour RGB LED model KY-016



4 x 3mm 12V LED with resistor


For the rest of the LEDs the documentation shows blue LEDs whilst the PCB seems to suggest one of each of red, green and blue, as well as a fourth for the power indicator.  I just used red ones throughout.  I don't think anything is gained by using different colours really.  The documentation also suggests these should come with a bezel, but I couldn't find any so had to buy them separately.


Other ICs and similar

4 x FQP30N06L MOSFET  --  I didn't need to buy these.


1 x LM7808 8V voltage regulator (TO-220 package)


I got these from ebay, but the listing no longer exists

1 x DHT22 humidity sensor



1 x LCD2004 LCD module & I2C interface


3 x DS18B20 thermal probe sensor



1 x DS18B20 thermal sensor in TO-92 package


I already had some of these, but they should be easy enough to find on Amazon or Ebay

1 x Arduino Nano V3


And the other bits of hardware...

1 x USB B panel mount socket to mini USB plug


This is specified as a right-angle mini USB plug, but I couldn't find any so I bought one with a straight plug.  The case I designed has sufficient room for it, though it is possible to buy a right-angle converter (link also below).  It only saves a couple of millimetres however.



3 x RCA panel mount sockets


I had these already.  They're easy enough to find.  For example:


1 x panel mount power socket


This is specified as 5.5mm with a 2.5mm centre pin.  Pretty much all my other kit (mount, cameras etc.) uses a 5.5mm x 2.1mm socket though, so I used that size instead.  I actually bought it with the matching plug so I can make up my own power lead to the correct length.


1 x 5mm x 20mm panel mount fuse holder
1 x 6A 5mm x 20mm glass fuse


I already had the fuse holders.  The fuses came from here:


1 x 40mm 12V fan


It's claimed that you don't really need this for the MOSFET build, but I chose to fit one anyway, just in case.  The voltage regulator may well be happier for it anyhow.


5 x TO-220 heatsink (with screw)


Again, these may not be required for the MOSFETs, but I decided to fit them anyhow (though slight modifications were required that I'll talk about later).  It's probably a good idea to fit one to the voltage regulator regardless.


5 x mica insulator and bush washer for TO-220 heatsink


I got these from ebay, but the listing no longer exists.  The mica piece insulates the heatsink electrically from the component and the bush for the screw ensures the screw can't make electrical contact with the component either.

3 x 6P4C panel mount connector and plugs


Sometimes also called an RJ11 or RJ12 socket/plug.  In our case although it's a six position (6P) connector, not all the contacts are required so we can make do with four (4C).  6P6C would work just as well.  6P2C won't.  If you don't have the tool for crimping the plugs on and don't wish to buy it then some other type of socket and plug would probably do just as well -- perhaps a 3.5mm stereo jack plug and socket.  In fact, in terms of construction they're possibly far easier.  I stuck with the 6P4C choice because it matches my other 1-wire hardware, but actually I'm tempted to give up on the compatibility and try the 3.5mm jack this time around.


I also bought the sockets from Ebay, but the listing has now gone.

1 x SPDT mini toggle switch


I already had some of these, still in their Maplin packaging!  If you want to use the "Force heaters full on" feature, you'll actually need three of these.

1 x 5mm LED bezel
4 x 3mm LED bezel


You can probably get away without using these, but it does make things look neater.  The first set of 3mm ones I ordered (from elsewhere) were utter rubbish.  These are a little better.



2 x female 15 pin headers (for the Nano)


Using these means it's easy to replace the Nano if it fails, but I couldn't find any suitable 15-pin headers.  Instead I bought longer ones and cut them down to size with the junior hacksaw.  (It's the black single female strip connector on this listing.)


male pin headers


Quite a few of these are required for all the off-board connections and they can be bought from the link above -- two of the male 40-pin headers should be sufficient.  They can be cut to the right number of pins with a pair of side-cutters.  However, that leaves you needing to make up the plugs to go on them, so instead I bought this, which includes the crimping tool, pins and plug bodies.


If you don't fancy making them up yourself at all, the following will do the job for most connections.  I'd suggest you'd need six of the 20cm female to female strips.


But if you do go that route it may well be sensible to solder the power connector, power switch, fuse and dew strap wires direct to the PCB and not use pin headers at all.


I had some twin-core automotive wire that I think I bought from Amazon rated for 11A that I use to make up 12V power cables in the observatory.  I also used it for the power connections inside the controller (power supply to PCB, power switch, fuse connection and dew controller connections).  Where it was easier to have the two cores separate, I just stripped off the outer insulation to separate the wires.


I have heatshrink in various sizes that I used on some connections in my first build.  I may use it this time, but at the moment I don't know.

Nuts & bolts


4 x M3 stainless 16mm hex cap screws
8 x M3 stainless nyloc nuts

Just used for mounting the fan (four of the nuts are used for fixing the LCD display).  Nyloc may be overkill, but given that I was going to be using them on a fan I decided I'd err on the side of caution.



8 x M3 stainless 20mm button head hex screws

For fitting the display, and in my case screwing down the lid of the case.  I'd expect a purchased case to come with all the necessary screws for the lid.


2 x M3 stainless 10mm button head hex screws

For fitting the USB panel mount socket (mine were M3 threaded, though still a bit awkward to fit)



As I've already mentioned, I printed my own case.  The docs specify a case measuring 163 x 100 x 50mm, but I reckon that's really too small now.  The design in the documentation build photos doesn't have as many components as the current version and even so many of the switches and external connectors are really tight up against each other or even overlapping.  Slightly bigger would probably be better.

If you want to put the sensor and/or dew heater connectors on the end of the case rather than the top, having removable end sections might be useful to allow room for fingers and tools when fitting the sockets.  I think someone posted on SGL saying they'd used a case with a clear lid, meaning the LCD could be completely sealed inside the case and still be readable.

Also note that if you're going for the prefab PCB, it doesn't have any mounting holes, so the case needs to provide some mechanism for holding the PCB in place.  If you're using stripboard obviously holes can be made to suit.


Link to comment
Share on other sites

If you have the time & knowledge (I suspect you do, maybe not the time) then I'd suggest laying out ~ making your own PCB, to Robert's circuit design, using software like Autodesk's Eagle.

You can then use 'proper' connectors, instead of the header pins\sockets, laid out appropriately, minimising internal wiring, and adding any additional components etc.

Link to comment
Share on other sites

14 minutes ago, JamesF said:

Unfortunately I've never made a PCB in my entire life :(


Great fun, used to spend ages in "the good old days" drawing circuits, painting them by hand, etching them and drilling all the holes, no software in pre computer days.

Biggest triumph was a transistor radio board about a foot square that got speared on the hand brake lever when I crashed my old Bedford van, spent ages unsoldering and transferring components, luckily in pre SMD days.


Edited by Davey-T
Link to comment
Share on other sites

4 hours ago, Gina said:

I've made PCBs in the past but it's fiddly and messy so these days I just use stripboard (eg. VeroBoard).

In this case though, using stripboard probably wouldn't allow things like the board-mounted 6P4C sockets to be used, because the pin spacing is too small.  Were I going to design a new board I'd be seriously thinking about putting as many of the sockets as possible directly on the board because it would remove the need for so much of the wiring.  The board would almost certainly have to be a little bigger, but that wouldn't necessarily be a bad thing because it would make room for indexed sockets for the remaining off-board connections meaning fewer possible mistakes with polarity.

I'd probably quite enjoy designing the PCBs and etching them myself, but I'm still trying to get my head around Photoshop and FreeCAD and  that's quite enough to be going on with at the moment.


Link to comment
Share on other sites

Talking of sockets and returning to my earlier comments about the temperature sensors, today these arrived:


3 x 3.5mm stereo jack plugs and panel-mount sockets.

They sent a small pack of heatshrink too.  To use instead of the 6P4C plugs and sockets on the temperature sensors.  I will need to redesign my case lid, but that's hardly the end of the world and these should be considerably easier to install.  From:




Link to comment
Share on other sites

Time to start some actual construction!

Whilst the PCB was uncluttered I decided the first job would be to solder on the headers for the Arduino, so I used the junior hacksaw to cut a couple of 15-pin lengths from the headers.  I kept the blade up tight to the sixteenth pin so as to avoid exposing the fifteenth.  If the finished cut is a bit ragged, a couple of gentle strokes with fine sandpaper cleans it up.


I used a couple of the male pin headers to keep the headers in the correct positions whilst soldering and to balance the board when it was upside down.


Then flipped it over and soldered all the pins


I didn't notice at the time, but I need to clean up the two top right pins just a little when I next have the soldering iron hot.

And from the upper side of the board...


Next I'll get all the resistors done I think.


Edited by JamesF
  • Like 1
Link to comment
Share on other sites


Nice work and easy to follow.

Just a word about the 3p audio sockets/connectors. These were part of the original v2 controller. However, there are a number of issues.

1. If you make a mistake and remove/connect with power on you can easily blow the digital pin on the Arduino as well as other power issues. Remember that when you pull it out (or insert) pins can get shorted, so its not a good connector to use when you have 5V and GND on two of the pins with a high likelihood of a short

2. Even though the current is low, over time you can find that the pins and connectors "solder" themselves together due to the current flowing through them. And when you try to pull out a plug half of it ends up staying in the socket. The 3p audio connectors/sockets are not suitable for the current being drawn by the temperature probes.




  • Like 2
Link to comment
Share on other sites

Thank you for that information, Robert.  Much appreciated.  The possibility of incorrect connections being made when the connector was insert had sort of crossed my mind, but I think I'd not really focused on it because the documentation seems very clear that nothing should be plugged in/unplugged whilst power is applied.  I imagine that might still happen though, so perhaps a different solution would be better all round.

A possible alternative that occurs to me at the moment are GX12 "aviation" connectors, though they're a bit bulky and not cheap.  Mini-DIN connectors (like the ones used for PS/2 style mice and keyboards) might work, but don't seem to be so widely available these days.  Mini-XLR is not cheap either.

More thought required whilst I get on with the rest of the construction by the looks of it.


Link to comment
Share on other sites

I've used Mini-DIN connectors in the past but found them dreadful.  Standard DIN connectors are also dreadful.  Rarely see them these days so I guess that proves my point!  Cheap and nasty is not the way to go for astro!  Don't "spoil the ship for a hap'orth of tar"!!

I use GX12 "aviation" connectors and find them very good.  Better than XLR though they aren't bad.

Edited by Gina
  • Like 1
Link to comment
Share on other sites

Away from the worries about what sort of plugs and sockets to use, I have now soldered all the resistors and capacitors to the PCB:



My favoured method for dealing with the resistors is to put a group of them in place, bending the leads over underneath themselves to hold the resistors loosely in place, then gently press a bit of blutak over the top of the entire group to hold them on the PCB without moving.  Now they won't shift about it's a matter of seconds per lead to solder them using the magnifying glass to get a good view of what I'm doing.

The capacitors needed a little adjustment with the pliers to get the leads through the holes, but I didn't push them down to far to avoid damaging them.

Next I think I'll do all the pin headers, leaving the semi-conductor components until last so there's minimal handling once they're in place.


  • Like 3
Link to comment
Share on other sites

That's three of us. Old school, or solid engineering background then 😋

I could see myself making one of these, but atm I'm in love with the Pegasus UPB which has dew heater controls. (Can't really justify to buy it though.) If I do go the DIY route, I will probably replace the arduino with an ESP32 to get both Wifi and Bluetooth control.

Link to comment
Share on other sites

I prefer the GX12 as they are solid and plenty of contact area to handle current. But not always suitable as you have pointed out.

The issue with the recommended RJ connectors for the temperature probes comes down to crimping. Many uses find the wires of the temperature probe are difficult to insert to the crimp connector. This is true. But where there is a will there is a way.

I find that the recent temperature probes I have purchased tend to have thicker gauge wire, making it next to impossible. But as I said, there is more than one way to *kill a cat.

Another user gave me this tip - I take no credit for it - cut the temperature probe wires to the length of the crimp connector. Then strip about 5-7mm of bare wire. Lightly solder these to keep the thin strands of wire together, do not use much solder at all because you want this diameter to be smaller than that of the outer plastic sheath of the wire. Okay, so now you have small diameter which will slide through the connector and be able to be crimped. Just spread the wires out in correct orientation and insert into connector and crimp.








  • Like 1
Link to comment
Share on other sites

That's a handy tip.  Not one I've heard before.

In many ways I think the 6P4C plugs and sockets are ideal for this application.  1-wire systems are often put together with the same connectors so there's compatibility with those if the same connector pin-out is used.  Fortunately I'm used to making up the plugs and I have a couple of the crimping tools.  I could understand if the awkwardness of assembling them put other people off however.

In my case I've struggled to find any decent panel-mount sockets here in the UK, particularly ones with easy-to-use connectors for the internal wiring, which is why I've been trying to think of other options.  For my first build (the one pictured in the first post of this thread) I used board-mount sockets, soldered the wires directly onto the pins and then sleeved them with heatshrink, but it's an awkward job.  There are some small break-out boards available with solder pads for the wires placed behind the socket which would probably work quite neatly, but but the cost of those plus the socket and plug is probably more than a GX12 or mini-XLR at which point using one of those starts to look like the more attractive option.

I have found some keystone sockets on Amazon that might work better, but the product descriptions don't look very reliable to me so I'm not convinced about what I'd actually be getting.  And I'm not sure about the current rating of the punchdown connections.

In a brief fit of madness I even considered USB plugs and sockets, but actually there's not much choice of panel-mount sockets there either.

Still, I have time for further consideration before I must make a choice.


Link to comment
Share on other sites

6 hours ago, JamesF said:

For my first build (the one pictured in the first post of this thread) I used board-mount sockets, soldered the wires directly onto the pins and then sleeved them with heatshrink, but it's an awkward job.

If you only use 1 row of pins, you may be able to use v-board and make your own board mounted sockets. You could then even mount several next to each other on the same board. Just beware, some have pitch .07", others .1"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.