Wednesday, June 12, 2013

Sump Pump Monitor Project

This is my first attempt at monitoring my sump pump activity
I had an Arduino Mega and a TFT display so I thought I would give it a try
I wanted to record activity on SD card with correct date/time and duration
Version 1
I used a current sense transformer rather than a shunt resistor (Triad Magnetics #CSE187L)
A full wave bridge rectifier was used to convert AC to DC for an Arduino analog input
Schottky diodes were used to reduce voltage loss in bridge rectifier

This setup was a little pricey to be tied up in a dedicated application like this
Tried to run on an Arduino UNO but ran into what I thought were problems due to memory limitations 
The SD library uses a lot of memory and thought I would need a larger processor
Also had problems with screen getting garbled after a time and sometimes would hang

Decided to make the following changes for version 2
  • Switch to on a ATMega1284p processor for additional memory (that proved not necessary later)
  • Nokia 5110 LCD, a lot cheeper and adequate room for output
  • DS1307 Real Time Clock kit from Adafruit rather than more expensive Chronodot
  • Get ISP programmer to be able to load programs with Arduino IDE
  • Switched to a SD card library that recorded the date/time stamp on the file
After reviewing the 1284P Arduino support, I went with maniacbug/mighty-1284 because I liked the pin mapping better
Version 2
This setup worked well but still had problems with garbled screen and system hangs

Thought I would try one more time to get it to work on the ATMega368 on Arduino UNO
Changes with Version 3
  • Change to 20x4 LCD display to improve readability, hopefully get rid of garbled text and eliminate need for level shifter needed for 5110 display
  • Added 3 buttons to be able to change date and time when needed
  • Switched to a simpler SD card library
Version 3
 During testing I found some programming techniques I was using were causing the problem with garbled text and occasional system hangs
I used a technique to put date in file name so date/time stamp wasn't needed on file
This version was the first reliable version so far

Version 4 - will try to get every thing in a closed up box...

Friday, June 17, 2011

My Development Setup


When I got my Arduino Mega 2560, breadboard, and 2.8” TFT display, I realized I needed to come up with a more organized area to work on projects.  I found that when the Arduino board is laying flat, it is hard to see the markings so that I was plugging into the proper pin.


I started to lay out the basic parts where I wanted them for easy access and visibility.  I then made paper cut outs and cut up some corrugated cardboard to see what works.  After a few prototypes I settled on this configuration








I settled on a width of 8½”. 
The front flat area is 5 x 8½ so it would hold 2 full sized breadboards if I needed it. This is where the work is done.  It also has room for an ½  breadboard on the right to handle basic input like push buttons, joystick, keypad, etc.

The angled vertical area is 6 x 8½ to hold Arduino Mega and 2.8 display plugged into an ½ size breadboard.  This area is intended to be static. It will provide visual output, audio output, power, and the microcontroller board.  I added a piece of Styrofoam to hold miscellaneous parts for easy access. 


 













The rigid base and angled support are made from some pegboard I had laying around.  The base piece of pegboard is 8 ½ x12 and the angled piece is at a 45 degree angle.  This angle and size of the angled surface was low enough to still see my computer monitors.  The cardboard box in the back is a plan for a microATX power supply to provide +5V, +3.3V, & +12V power for projects.  Not sure how to present power on the front panel yet.. I am thinking about cutting a small breadboard in half and adding terminal blocks to connect the power supply wires.



I covered the flat and angled area with foam board so I can swap them out.  Both foam boards are just held in place with tape.  Hopefully this will make it easier to swap between projects without having to break down and rewire.  The breadboards and microcontroller board are attached with Velcro for making adjustments and changes.



How about those resistors from my EE lab in the 70’s!!  At least I don’t have to worry about power rating..