Decade Counter!

I wanted a way to have a “rotatable” counter to indicate that the LCC was still looping properly.  I finally found something! A decade counter (as noted in an earlier post)!

Now instead of pulsing one led I have a “spinner” type of effect. I don’t have to keep track of where the “count” is….I just pulse it. Coding this would have been a nightmare. Of course wiring 10 LEDs is a mess but it’s a cool one.

decade counter mess
decade counter mess

LED Spinner!

So I want to add some kind of visual indication that my main arduino loop is still well, looping. I decided on an LED “spinner”, kind of like on web pages and applications. but how to do it?

After a lot of searching I found something neat. A decade counter.

Seems this nice little IC (4017) has 10 outputs that go high in a sequence when given a pulse. The perfect thing to do when you want LEDs to “chase” or spin.

I hope to add this to the new LCC. Should help indicate that the main loop is still looping!

Detailed info on a similar “chaser” project here.

 

The Next Lizard Climate Control…

I’ve started on LCC 2nd Gen or LCC2 or LCC II. I don’t know what to call it. BUT I do know it’ll be killer.

This one is going to be everything LCC 1 was not.

So far I have:

  • Ethernet
  • 64 GPIOs
  • A better RTC
  • 2 OLED displays
  • The RTC can be updated via serial — no need to upload code to the Arduino, update the clock and then reupload the LCC code!
  • More cool factor….

So check this out- I2C rocks! The awesome Centipede Shield from macetech.com is HUGELY awesome. Via the I2C 2 wire interface you now have access to 64 Digital ports. In any combination of In or Out. This is the cornerstone of the new LCC hardware. Especially since the Ethernet takes a lot of digital ports. This thing is way cool. If you need more digital ports get one asap.

The OLED displays are really neat. I got 5 from a Kickstarter project and they’re now generally available from Sabernetics Tech. They’re tiny and bright! Since you now have 64 ports you can have as many of these displays as you want. Just put each on its own port to select which one to write to…If you don’t you’ll write to them all at once! Gotta love bus networks (I2C).

I hope to make the LCC’s ability to control lights and heat sources more generic. Since the IO is so plentiful I can make the code generic enough to handle fans, heat mats, uv lights etc in different combinations.

Keep checking the site as I post updates about this project!

Using a Transistor to Control an LED or anything

For my LCC project I decided to use a 2N4401 NPN transistor to control status LEDs and AC Switches. I did this so that the power draw from the Arduino chip would be as low as possible.

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”

Real Time Clock

For the LCC project I had to add a real time clock (RTC) so that it could manage the light schedule independently of a PC. I added a fairly generic RTC shield. I could have used this one or this one. They both use the I2C bus and the DS1307 RTC chip.

The example from LadyAda didn’t allow me to manipulate the date/time components well enough so I went with a library that pulls the date/time in BCD format.  The issue was that I needed those preceding zeros on numbers less than 10. 8:8:8 is not as easy to read as 08:08:08 to me. The library I used allowed me to prepend the zero when necessary.

The library is from the Arduino Playground and also has lots of time related functions that work with any DS1307 chip.

 

 

TMP36 Analog Temperature Sensor

The TMP36 was my first sensor and is pretty simple. 3 pins, 1 analog port.

Available from SparkFun.

It’s a low voltage temperature sensor. It provides a voltage output that is linearly proportional to the Celsius temperature. It also doesn’t require any external calibration to provide a typical accuracy of ±1°C at +25°C and ±2°C over the −40°C to +125°C temperature range. Give the it a ground and 2.7 to 5.5 VDC and read the voltage on the Vout pin. The output voltage can be converted to temperature easily using the scale factor of 10 mV/°C. For Example:

Continue reading “TMP36 Analog Temperature Sensor”