|
|
Arduino Controller BoxFrom $1Table of contents
IntroductionThis details the steps I've taken to build the controller box that houses the Arduino and supporting circuits/wires used for our Solar Hot Water system. Note 1: I am not an electrical engineer. I've gotten the following to work by asking electrical engineers, searching the Internet, and trial-and-error. If you can recommend improvements, please let me know! Either leave a comment on this page (preferred; must have an account), or send me an e-mail. Note 2: This is still in its R&D phase, so if the pictures or techniques still look raw/messy/unprofessional, there's a reason for it. Layout & Overview of ComponentsI am currently using an 8x6x3" project enclosure from Radioshack, but can probably make it smaller in time (look a little neater, and costs less). Going down to the 7x5x3" should be no problem, and I have a 6x4x2" in front of me that I'll try eventually once I'm more comfortable with the build process. Interior
Circuits:*RC Circuit. Here's the diagram for the RC circuit that works. I don't know why it works (outside of my field of expertise), only that it does. The LM34 is the temperature sensor (explained later on).
**Voltage Divition Circuit. A couple of hours into reading my Teach Yourself Electricity and Electronics book revealed this circuit. In a nutshell, you need to match your split voltage (E1) to supply voltage (E) ratio with the R1:R ratio (where R1 is the resistor on the ground side, and R is the total circuit resistance). The E1:E ratio is 9:12, or .75. The resistors that I had on hand that came the closest to this ratio were 220 ohm and 75 ohm. The R1:R ratio comes out to 220:295, or .746. Taking a volt-meter to this circuit gives me a split voltage of 8.95. Close enough!
Wiring the Relays. A picture of the relays with its wiring for four separate circuits (relay power, Arduino trigger, LED control, and relay control to outside the box) would be too messy, and probably not too informative, so below is a schematic sketch of the wiring. Making it all look neat is a different matter (still working on that myself).
To prevent shorts, use shrink tubing or other methods whenever possible. Arduino HookupAs shown in the 'Wiring the Relay' diagram above, use 22 gauge solid wire to connect the positive triggers of the relays to the digital outputs of the Arduino. Once the software has been uploaded to the Arduino and everything tests out OK, use a little bit of hot-glue where the wires connect to the Arduino to prevent the wires from pulling out during field installation/vibrations. Connect the 5V Arduino pin to the Vin terminal on the RC circuit, the GND Arduino pin to the GND RC circuit terminal, and the Analog In 1 Arduino pin to the Vout RC circuit terminal. Once the software has been uploaded to the Arduino and everything tests out OK, use a little bit of hot-glue where the wires connect to the Arduino to prevent the wires from pulling out during field installation/vibrations. ExteriorTo help keep the interior of the project box weather proof, I use 2-position and 3-position barrier terminal blocks. This also has the benefit of allowing easy field installation, as all you'll need is a wire stipper and a screw-driver. If you have to open up the box or solder in the field, something is wrong. Power & Sensor InputsOn one side of the project box, attach a 2-position and a 3-position terminal block. To attach the terminal blocks, I drilled 1/8" holes, and used #6-32 x 3/4" screws and nuts. Drill a 3/16" hole underneath each terminal block to feed 22 gauge wire though. Drill a 1/4" hole next to the power block for an LED. Label everything. Relay InputsOn one side of the project box, attach three 2-position terminal blocks. Drill a 1/4" hole underneath each terminal block to feed 16 gauge wire through. Drill another 1/4" hole further underneath each terminal block for the LEDs. Label everything. WeatherproofingUse hot-glue, silicone, epoxy, etc. to waterproof all wire openings. Also waterproof the underside of the LEDs, as this also helps keep the LED holders in place. USB HookupExtend the Arduino's USB port to the outside of the case using a B-to-B female USB cable. This will allow easy field firmware upgrades and troubleshooting (real-time log printouts) without having to open up the box. Temperature SensorThe Arduino is programmed to use an LM34 temperature sensor. These are inexpensive, but you do have to wire them yourself. The data sheet for this sensor is here, but the relevant part related to wiring it is this:
I use the following color scheme when wiring the temperature sensor: +Vs (Vin) = Red, Vout = Black, GND = Green. This temperature sensor will be spending its life measuring water temperature in a solar collector, so once you've finished soldering on the leads, make sure to waterproof all exposed metal. The length of wire to solder onto the temperature sensor should be about 2'. This is enough length to mount to the collector, leaving enough slack to attach to the collector's bottom. In the field, a longer length of cable will then be used to connect this 2' length to where ever the Arduino controller box is located. Other Components:
Tags:
|
My suggestion: try running the circuit without the 9V splitter. While 12V is the recommended maximum (and where the battery voltage is going to spend most of its time anyway), the Arduino is fine to handle voltages up to 20V, as long as you aren't adding a significant load (which you aren't). This will shave about half a watt off of the circuit's power draw; and any power saving methods in a solar electric system is a good thing. edited 01:43, 18 Jun 2010