Introduction: Ultimate Sensor Box W/LCD Display and Web Interface

About: Hey my name is Chris, welcome to my instructors page. I'm happily married with a wonderful son, he makes the best workshop assistant ever. Plus I find a 7 year old has much more creative ideas than me. I work…

Some friends and I bought some incredibly high end i7's and wanted to see what we could get out of a dual processor setup with submersion cooling. We went a little overboard and bought a gallon of 3M Novec 7000 cooling fluid for $300 dollars. It's crazy non-toxic stuff that is non-conductive and boils at 36 Celsius. You can use mineral oil for a less expensive setup just make sure it's very pure. We realized we wanted to monitor temperatures of everything as we increased power, we also needed a condenser due to the low boiling point and the high cost of the fluid. We used cold water through copper pipes as a condenser, I'll make an instructable on our cooling box at a later time. This instructable is about the sensor box used for all the readings. Our box consists of 4 waterproof temperature sensors to check temps at several points throughout the case, two additional high accuracy thermistors for the copper cooling blocks attached to the processors, we wanted to disperse the area of heat transfer. and one flow sensor for the cold water in on the condenser. I hope you enjoy and can make use of this sensor box. It outputs data via local LCD, Ethernet and Serial.

Step 1: Gathering Parts Needed

I'm going to be honest here if you buy the parts from the links I've provided
and don't shop around you'll spend a pretty penny but most makers will have the majority of this stuff hiding out in a shop somewhere like I did. All I had to spend was about $15 on sensors I picked most of them up at Radio Shack. Add in the project box, resistors, and Arduino you could easily spend $140. Compared to the processors and cooling fluid we used that's pennies but for some people it could be significant. A couple things I might do different, a slightly larger project box, a pic for more interrupts so the buttons could be more responsive, and more precise cutting but this was a little rough and slipshod.

1 x Project Box

1 x Arduino

1 x Ethernet Shield

3 x 10k Resistor

1 x 1k Resistor

1 x 4.7k Resistor

2 x Buttons

1 x LCD

4 x Waterprrof Temperature Sensors

2 x CPU Sensors

1 x Flow Sensor

2 x Male Female 4 Pin Connectors

Tools:

Rotary Tool / Dremel

Soldering Iron

Wires

Solder

Shrink tubing or electrical tape

Step 2: The Real Step One, Cutting.

First things first you're going to want to cut your project box to fit the components snugly. Carefully measure where you want the components to lie on the inside, or do what I did, grab an exacto knife and cut lines in the plastic around what you’re fitting and make rougher cuts. After you know where you want to cut your box grab out the Dremel and a cutting wheel. For the wire connectors I used drill bits and for the Ethernet and Arduino I used a grinding stone tip. I probably would have grabbed a larger box next time, this one required some cuts into the pillars for the screw on lid and I had to cut a little extra along the top of the box where the lid came out because the LCD was identical width to the box and would not fit internally. Finally drill some holes for the buttons and LED, I used a Dremel for this as well. Test fit everything and make sure it looks good, sand or file the edges to make smaller changes. When you're confident you have a good fit you may want to super glue the led in like I did.

Step 3: Attaching the Wires to the Arduino

Sorry if there's a bit of a rat's nest in there, fortunately
I'll let you know the appropriate pin out. First I worked on the LCD, I found a fan with a 4 pin connecter I could steal to go the the back of the LCD, if you don't have one carefully solder a lead wire to each pin of the LCD. I recommend a connector for easy removal. I setup all the electronics on connectors for easy separation and replacement. You're going to want to connect the SDA pin on the LCD to the SDA pin on the Arduino and the SCL pin to the SCL on the Arduino. For now it's easiest to leave the VCC and GND lose. Next solder a 1k resistor (Note with most LED's a 300 ohm up to a 2k will work) to the negative lead on the LED there should a be a shorter pin, with a flat side. If you look inside the LED the negative lead or the (Electrode) is larger than the positive (Anode). Run a lead from the other side of the resistor to one side of one of the buttons and solder it, run a wire from that connection to one side of the other button and solder, leave a lead off the end to go to ground. Now run a lead wire from the positive led side, let it hang lose to be connected later. Run separate positive leads for each button, do not run them in sequence. Next add in your four wire connectors on the side of the project box or alternatively a serial connector is nice with its 9-pin connector and no crossover. I used 2 four-pins, primarily because I wanted to be able to move things around easily. Take two wires from one 4 pin connector, solder a wire and a 4.7k resistor to one wire and a wire and 10k resistor to the other. Make sure the wire is closer to the connector then the resistor and then solder the opposite sides of both resistors together. On the other connector solder two wires and two 10k resistors onto two of the leads in the same way we did the last step and solder the resistors together on the other end. We are now ready to connect everything, let’s work with the positive leads first since there's only one 5v output on the Arduino but there's 3 grounds. Take the 4.7k resistor that's attached to the 10k, the positive lead from the LED, the wire to the VCC on the LCD and one unused wire from each of the 4pin connectors and attach solder them together, attach another wire and run it to 5v positive. Then take the other two lose 10k resistors and attach them to one the grounds on the Arduino. Next take the ground lead from the LED resistor the ground from the push buttons and the ground from LCD and solder them to a wire, run that wire into a ground on the Arduino. Take the two final lose wires from the 4 pin connectors and attach them to the last ground. Take the wire from the 4.7k that is attached closer to the connector and run that to pin 3 on the Arduino this is for the one-wire temp sensors. The 10k resistor attached to the 4.7k has an unused wire as well run that wire to pin 2, this is for the flow sensor. Next take the two lose wire's from the two 10k's attached to ground and run them to A0 and A1 these are for the thermistors. The Very last thing in this step is to attach the wires from the pushbuttons to pins 5 and 6. Viola all the wires are attached to the Arduino, Attach the LCD to the 4 pin fan connector if you used one and if you want to you can close up the case. I would leave it open in case one of the sensors is not reading. It probably means something is crossed. I wrap all my connections in electrical tape to prevent shorts.

Step By Step Re-iteration (Less Detailed)

Step 1. If you have a 4 pin fan connector use for LCD, or solder 4 leads to LCD connect SDA and SCL leave VCC and GND free for now

Step 2. Solder 1k resistor to negative lead on LED

Step 3. Solder Ground to one lead on each button, Solder those together and Solder LED resistor to those same leads.

Step 4. Take two wires from one 4 pin connector, solder a wire and a 4.7k resistor to one wire and a wire and 10k resistor to the other. Solder the opposite side of each resistor together. You should have 3 lose ends from the two connecter, one wire between the connector pin and the resistor on each of the two pins and one lose end of the two soldered together resistors. See the eagle sketch for clarification.

Step 5. On the other connector solder two wires and two 10k resistors onto two of the leads in the same way we did the last step and solder the resistors together on the other end. You should now have two connectors each with two pins left untouched and two pins used.

Step 6. Take the 4.7k resistor that's attached to the 10k, the positive lead from the LED, the wire to the VCC on the LCD and one unused wire from each of the 4pin connectors and attach solder them together, attach another wire and run it to 5v positive. If you left all your leads long now is the time to minimize that to leave room in your case instead of a rats nest like me. I added a lot of things in after first making the box, initially I just had 4 temp sensors.

Step 7. Take the other two lose 10k resistors and attach them to one the grounds on the Arduino.

Step 8. Take the ground lead from the LED resistor the ground from the push buttons and the ground from LCD and solder them to a wire, run that wire into a ground on the Arduino.

Step 9. The Very last thing in this step is to attach the wires from the pushbuttons to pins 5 and 6. Viola all the wires are attached to the Arduino, Attach the LCD to the 4 pin fan connector if you used one and if you want to you can close up the case.

Step 4: Breadboarding and Code, Final Step.

If you have a bread board this is an easier way to test everything, if not you can just solder directly. Attach your data cables to your 4 pin connectors. Take the ground and positive leads from one of your connectors and run them to the ground and positive connections on your bread board both connectors have their own power but we only need one source for bread-boarding. Take the lead attached to the 4.7k resistor attach it to the bread board and leave room one row on either side of the wire. Now attach the data pin on the one wire temp sensors to the same row as the 4.7k. They can all share one bus thanks to addressing. Now attach ground wire from temp sensors to a row on one side and run one wire from that row to ground. Then attach the positive to a row on the other side and run a wire from the row to positive. Next take the wire with a 10k resistor going to positive and run that to the bread board with a row on each side for positive and negative. Attach the data pin on the flow sensor to the 10k wire and respectively ground and positive lead to ground and positive. Now take the two 10k's from the other 4 pin connector with one row available on either side. Attach one side of the thermistor to the 10k and the other to positive, do this for both thermistors. As simple as that and all of your sensors are setup and ready to test or calibrate. Now for the libraries and code. You are going to need to attach all of these libraries to Arduino IDE, One Wire, Dallas Temperature, and Liquid-Crystal_i2c. Then load the one-wire-address-finder into the Arduino sketchbook and run it to find the address's for your temp sensors. Copy those addresses. Open up the temp_disp_ser_web file in sketchbook, this is my code. Add the addresses found in the one wire address finder to lines 45-48 of my temp_disp_ser_web file and upload the code. You should now have a working Temperature, CPU and Water Flow sensor box. I took it all of the Bread board and ran long lead wires to put the sensors where I wanted. Congratulations. Feel free to ask any questions.

Short Simple Step by Step

If you have a bread board this is an easier way to test everything, if
not you can just solder directly. Attach your data cables to your 4 pin connectors

Step 1. Take the ground and positive leads from one of your connectors and run
them to the ground and positive connections on your bread board both connectors have their own power but we only need one source for bread-boarding.

Step 2. Take the lead attached to the 4.7k resistor attach it to the bread board and leave room one row on either side of the wire

Step 3. Now attach the data pin on the one wire temp sensors to the same row as
the 4.7k. They can all share one bus thanks to addressing.

Step 4. Now attach ground wire from temp sensors to a row on one side and run
one wire from that row to ground. Then attach the positive to a row on the other side and run a wire from the row to positive.

Step 5. Next take the wire with a 10k resistor going to positive and run that to the bread board with a row on each side for positive and negative

Step 6. Attach the data pin on the flow sensor to the 10k wire and respectively ground and positive lead to ground and positive.

Step 7. Now take the two 10k's from the other 4 pin connector with one row available on either side. Attach one side of the thermistor to the 10k and the other to positive, do this for both thermistors.

Step 8. Upload and run One Wire Address Finder using the Arduino IDE to find the addresses of your sensor, run serial at 9600. Copy the addresses down.

Step 9. Open temp_disp_ser_web in Arduino IDE and copy your addresses into line 45-48.

Step 10. Upload temp_disp_ser_web using Arduino IDE and all of your sensors should be running and working.

Epilog Challenge VI

Participated in the
Epilog Challenge VI

Sensors Contest

Participated in the
Sensors Contest