Below is a diagram of how this works. I used a 2N4401 NPN transistor that “turns on” when the gate goes high or positive. This essentially allows it to switch the negative or ground leg of the circuit. I did this because the Arduino can’t turn a digital IO line to ground- just 0v or 5v. Continue reading “Using a Transistor to Control an LED or anything”
The goal of the Lizard Climate Control (LCC) software is to control the climate of my lizard’s enclosure using the Arduino and other hardware components. It can operate independently of a PC. However it is capable of supplying diagnostic data via the serial port to an attached PC if needed. Continue reading “Lizard Climate Control Software Operation Description”
The PowerSwitch Tail II is a great and VERY simple way to have the Arduino control AC powered devices. I’ve used these in my LCC project. The Arduino can control these directly from a digital IO port, BUT you’re better off using a transistor to drive them, just in case…
You can get them at SparkFun.
Below the break is revision 4. Read the comments in the code. I’ll post a formal description of the software’s behavior soon.
I haven’t published my code for this project yet. Mainly because it’s dangerous and not totally tested. Here’s what I mean:
This software controls the environment of a living thing. Failure of the software can cause death. I’m not ok with that. For example- last night I had an over heat condition. Because of a badly written IF statement, the corrective actions never executed. Thankfully I was home!
I am in the process of re-writing the code to simplify the corrective actions and to provide more debug information. Arduino doesn’t provide ANY error trapping/reporting so testing has been more difficult than I’d prefer.
I hope to have a viable and tested code base to publish this weekend.
I just hope my lizard doesn’t mind the flashing lights while I’m testing…. 😉
Nice little gallery of pictures as things have come along:
Below is the breadboard circuit diagram. It’s pretty final. I hope to clean it up a bit when the project is final.
The major additions in this rev is that I’m using transistors against the Arduino digital outs to control the AC relays and a corresponding LED indicator. The on/off switches in those circuits provide a bypass to turn on the AC switches if necessary.