View Full Version here: : Picaxe based multi channel Dew controller
alistairsam
10-06-2012, 05:10 AM
I needed a low cost 3/4 channel dew controller and after going through various diy circuits I built this simple picaxe microcontroller based dew controller that uses just one mcu but can control multiple heaters independently.
Thanks to Fred (Bassnut) for his simple 08m circuit and code that I based this on.
http://www.iceinspace.com.au/forum/showpost.php?p=816861&postcount=48
http://www.iceinspace.com.au/forum/showpost.php?p=816881&postcount=51
Total cost should be under $40 for 4 channel.
Rather than pwm, I went with simple on/off method as above, so frequency is around 2 to 4 Hz at the most I'm not sure if that can generate rfi.
Advantage of an mcu over a 555 circuit or pwm motor speed controller is fewer components for the same output.
since the mcu is a single core, it isn't parallel tasking to control each channel independently (which the m2 variants are pseudo capable of), but uses the simple method of keeping all channels synced for their "off" states.
Each channel has its own pot and FET and can have different "on" periods during the time taken for one loop, thus independent amount of heat.
I've tried to depict the pulse width below.
"t" is the duration of the loop at the end of which all outputs go low and the sequence starts again. So each channel can remain "on" for different periods but go off simultaneously.
The "on" time is based on the ADC value of individual potentiometers, and the mcu output switches an FET to which the heaters are connected.
|<---t-->|<---t-->|<---t-->|
|----|___|----|___|----|___| Heater A
|--|_____|--|_____|--|_____| Heater B
I will upload a circuit shortly, but parts list for the two channel controller are
1)Picaxe 14M (recommend using 20x2/20m2 as they have additional ADC inputs)
2)7805 Regulator - Same 12V heater supply is used for the picaxe (as its 5v)
3)0.1mfd and 22mfd cap
4)10k Pot x 2
5)N channel FET x 2
6_Heatsink x 2
7)10k resistors x 3
8)22k x 1
9)Stereo Plug and socket (for programming)
LED's are optional, but I added them at the output of the FET as visual indicators which is very handy
LED x 2
4.7k resistor x 2
General purpose PCB
To add more channels, just use a 20m2 chip (costs $3 more than 14m2 or 18m2) with as many pots as ADC inputs. You could add on additional FET's on each channel.
FET's I used are "N" channel at this stage, but I will change it to "P" Channel to reduce risks as raised by wasyoungonce(Brendan)
Nice work :thumbsup:
Btw, what you describe is PWM. I'm guessing you mean you haven't used the PIC's hardware PWM, nor the PWM macro of the 'axe?
Again, nice work. When you put all that effort into the hardware and code and it works, it feels good doesn't it? :D
alistairsam
10-06-2012, 03:54 PM
yes, I meant I wasn't using hardware pwm.
since its fairly compact, I'll enclose it in one box along with a usb Hub and qhy8 power supply and fasten it to my OTA or dovetail so I'll have only one power and usb going to the mount.
picaxe code attached.
I will be using this P channel FET if available.
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00002632.pdf
Making two heater straps out of nichrome as well. need to coax the wife to help with the stitching.
All in all, I should end up saving a decent amount by building it myself. That's one of the rewards of DIY.
Since I'll use a 20m2 I can add temp sensors later on, that's the big advantage with mcu's, very versatile.
Bassnut
10-06-2012, 07:07 PM
hehe, glad I was of some use ;-). Nice work, it doesnt get simpler or cheaper than that. Check out the DS18B20 one wire temp sensor ($5.20), picaxe has built in one word drivers for it.
I found I didnt need a heat sink at all for the heater FET, have you tried it without a heatsink?.
alistairsam
10-06-2012, 11:55 PM
it sure does Simon. The joys of DIY
Fred, yes I noticed the fet's don't get hot at all. I've only tested with a 3" heater strip though. Will leave them there anyway.
I will check out those temp sensors, thanks.
alistairsam
01-07-2012, 12:51 PM
Just changed the dew controller to a 4 channel with a 20m2 picaxe.
None of the FET's seemed to be getting warm, so did away with the heatsinks.
I added my qhy8 power supply and the dew controller to a jiffy box and got a 3metre 4 core wire from jaycar. One end on the jiffy box and the other in a container that has all the power adaptors.
one pair of the 4 core is for the qhy and the other for the dew controller.
I mount the box onto the scope along with a usb hub, that way just one usb and one power lead runs from the scope.
I'm using a 5m USB extension cable and a passive hub for the qhy5 and qhy8 as well as gpusb.
I added a cisco access point in the adaptor box with a crossover lead to a laptop I got on ebay for $70 (centrino duo 1.8G, 2G RAM, 100G HDD).
Stellarium scope runs on the toshiba using a fixed ip and I use another laptop that runs stellarium using the ip address of the toshiba, so I have scope control wirelessly.
I use RDP to connect to the toshiba and image using maxim.
Only bit left is to add a focusser stepper controller to the jiffy box.
This is also using a picaxe with ascom serial commands over RF.
Bassnut
01-07-2012, 04:18 PM
ASCOM commands with a Picaxe over RF sounds VERY cool, you slipped that one in quietly ;). Do you mean with RS232 Rf transceiver modules?.
alistairsam
01-07-2012, 04:38 PM
That's right. The m2's have built in manchester encoding for rf and I got the picaxes to interpret a few commands but still need to finish testing. Will post results once I get it working. I can use the same supply for the dew heater so shouldn't be tough to add into the jiffy box.
Bassnut
01-07-2012, 04:46 PM
That's very interesting, I've used full bottle RS232 modules on a few projects, but have wondered if the much cheaper straight Rf modules with Picaxe Manchester coding would be as robust. I'll be interested to see how you go with that.
alistairsam
02-07-2012, 10:40 AM
The cheaper RF modules that I'm testing with are one-way and I could get away with it at the start if I don't want position feedback since focusmax can work with the lx200 focuser driver.
Its relatively easy to implement the lx200 protocol set, but the robofocus protocol set is a bit more involved.
:fT# LX200GPS – Return Optical Tube Assembly Temperature
:F+# Start Focuser moving inward (toward objective)
:F-# Start Focuser moving outward (away from objective)
:FQ# Halt Focuser Motion
:FF# Set Focus speed to fastest setting
:FS# Set Focus speed to slowest setting
with the above commands, I can get the picaxe to set the step interval to low or high so I can get low and high speed, move in and move out.
I haven't tried this with focusmax though.
I used a virtual loopback software to capture serial data from maxim DL using the lx200 ascom focuser driver and above were the only commands used.
the m2 rfout and rfin work very well. will post some results once I get it working with maxim.
Which rs232 transceiver did you use? I will have to use duplex if I want position feedback.
Bassnut
02-07-2012, 05:27 PM
These (http://www.microzed.com.au/index.php?main_page=product_info&cPath=42_61&products_id=177) from Microzed. They act as invisible duplex modems, shove serial data in, read it out, no set up. Check out the mesh (http://www.microzed.com.au/index.php?main_page=index&cPath=42_66) modules too, a bit like zigbee only far easier to use, everythings automatic, insanely powerfull for mutiple unit coms.
ppl often complain how complicated and hard to use ASCOM is but yr example looks very resonable.
alistairsam
02-07-2012, 05:48 PM
Thanks. I'll have a look at both.
I've got the standard 433Mhz transmitter and receiver pair, so will try with that first.
since the programming cable for the picaxe can be used for serial comms from a PC, I'll use one chip at the base station to interpret the ascom commands from maxim and send a pseudo command via rfout.
The receiving unit listens for these pseudo commands and controls the stepper controller.
eg. base station receives ":F-", it'll send "O" via rf, receiving picaxe has a subroutine for "O" that sets the dir bit, sends pulses to the stepper ctrlr till it receives "Q" which makes it exit that routine and keep listening for rfin.
will try it out tonight if possible.
AndrewJ
02-07-2012, 08:25 PM
Gday Alistair
Just for info, the Meade protocols also include a "pulse mode"
set of focusser commands ":FPsDDDDDD#"
( used in the RCX, but also used in the LX200s )
Im not sure if ASCOM deign to allow for them
in their std interface tho????
These allow for a set offset move to be catered for,
which could be easily mapped to a stepper controlled focusser.
( The RCXs use a DC motor with encoder and DDD is an absolute value,
whereas the LX200s just fake it by using DDD as millisecs,
but the function is available. )
Andrew
alistairsam
02-07-2012, 09:08 PM
Thanks Andrew,
I've tried the LX200GPS/R as well as the Meade Classic and Autostar 1 ascom drivers, it shows up as a relative focuser in maxim so these may not have the absolute positioning option. but will have a look.
the picaxes can keep track of number of steps, but I'll have to get the home position routine to work.
just getting basic software control to work first.
autofocus will be the final objective.
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.