Friday, October 28, 2011

An LED clock and using GitHub

Fresh from Ponoko, it all fits!
I have completed an LED clock and have a repository for it at GitHub. As I learn more about git the more I love it. My repository at GitHub has code, notes, svg files for the laser cut parts and even a blender file for the 3D layout. Open Source rules...

I wanted to make something practical, colourful and easily shown off to anyone coming through my door and portable enough to take places. I settled on using 12 RGB LEDs to tell the time with colour and brightness.

Getting good pixs of LEDs is hard
How does my clock tell time? The current hour is Magenta. All other hours are a background Green, except those that tell current Minutes and Seconds. Minutes move through green-yellow-RED-yellow-green. The bright RED occurs at each exact 5 minute interval. Seconds move from green -> cyan -> BLUE -> cyan ->green. The bright BLUE occurs at each 5 second interval. Fairly easy to get the hang of it. Not so easy to describe. Here is an example showing the time as 9:05:24.

Blender render of the partial clock assembly.

I learned to use Blender to create 3D renders of my clock assembly. I imported the same Inkscape .svg files that I created for the laser cut parts and modified them for 3D. A bit of a learning curve but possible for guy who turns 70 next week.

I also have a repository for my updated Solar Monitor Project which is being done in collaboration with Anthony.

The current version of the Solar Monitor uses an 1.8" 18-bit color TFT LCD display with microSD card breakout and a DS1307 Real Time Clock breakout board kit, both sourced from Adafruit.

1.8' TFT  display

The TFT LCD, a sample screenshot shown here, displays (top to bottom):
  • (text): battery voltage and current
  • (graph): battery current for the last 100 seconds (positive and negative)
  • (graph): integrated current for the last few hours (positive and negative)
  • (text): date and time
  • (bar graph): battery "percent charged" for the last few days

The monitor also logs the battery current and voltage, integrated for one second, on a micro SD card. Over time a power profile will develop which can used to determine patterns of appliance usage and specific appliance power consumption.  All this from one current sensor with a timestamp I hope. A Bayes network looms.

Tuesday, June 21, 2011

Finally the schematic I promised and some notes

Here is the schematic of how the Current Sensor interfaces to my Solar Batteries and the Arduino monitor. It is very simple, just an 8 volt DC supply for the Current Sensor and a limiting resistor in series with the output to the Arduino inputs.

The current sensor is a hall effect device with an output of about 32 mv per Amp. As both positive and negative current is sensed the output sensor voltage is about in the middle of the current sensor supply voltage with zero amps.   I will use an Op amp in the future to optimize the output range and sensitivity. Zero amps to/from the battery is about 4volts. As my solar panels will only output about 30 amps to the batteries on a sunny day (32 x .03~ 1volt) the Arduino analog input will be right at FS or 5volts. The battery discharge is max at about -60amps. Arduino input about 2volts. The Current Sensor saturates at +- 72 amps.

I have now added a SDdata logger shield to the Arduino solar monitor  and will soon add a second current sensor for the 240 inverter power usage. This will enable me to track/log all power for the whole system. Solar power in, the battery stored energy and all power out (household and other DC).  I can log most household items electrical usage just by inspecting the current monitors and their derivatives. more on this later.