Lifelong Learning Knowledge should be uncompromisingly sought after and freely given away.

30Sep/090

ATTINY13A Automated Dog Stairs

ATTINY13A Motion Dectector Dog Stairs 

So I finally got my next shipment of PCB boards from BatchPCB.com. The boards were perfect, not one mfg issue (I suspect this is mostly thanks to what I learned from SparkFun.com). It's fantastically rewarding to see your ideas come to life, I posted here originally about the Arduino controlled dog stairs I had built but I wasn't satisfied. I wanted to free up the Arduino, it's not what a development board is for anyhow. I have since crossed the hurdle of building my own code in C using AVRStudio. I decided upon the ATTINY13A chip because it was small and really had just enough functionality to make this project work as I had wanted it to. The Arduino was overkill; an ATMEGA328 is WAY overkill for this project. I've learned so much about AVR programming I can't even believe how far I've come. I've posted the AVR source code, high resolution pictures and the eagle files so you can build your own. I figure I've got no more than $10 invested in this not including the stairs!

ATTINY13A Dog Stairs

And here are the boards I got from BatchPCB.com the other day.

BatchPCB.com Boards

Images and AVR Code
Title: AVRDogStairsSmall (541 clicks)
Caption: Images and AVR Code
Filename: avrdogstairssmall.zip
Size: 220 KB

Images and AVR Code
Title: AVRDogStairsSmall (541 clicks)
Caption: Images and AVR Code
Filename: avrdogstairssmall.zip
Size: 220 KB

Tagged as: No Comments
21Sep/090

LED Fire For This Year’s Jack-O-Latern

Anyone who knows my wife knows that she loves to "fall-ify" as much as she loves to decorate for Halloween! This year I found an example using LEDs toSimulated Fire With LEDs and ATTINY13A simulate a flickering fire. I decided this would be perfect to put inside our jack-o-latern and as soon as I got home today from work, I whipped up a working version for myself. I've attached a ZIP file which contains a few high-res pictures and the embedded C code you can use to program any AVR. I've used an ATTINY13A for this as I have a bunch laying around and they work perfectly for this project. They are also very cheap, I got mine from DigiKey for .87 each. The whole project cost me about $3.50 excluding the batteries. I think I may expand on this design a bit to include a photo-transistor and a small solar panel to only turn the circuit on at night and recharge the batteries during the day...Once I get the updated version, I'll update this post. Check out the video below of the LED Fire in action!

 

 

 

[youtube]OhWhZjwBKAQ[/youtube]

LED Fire
Title: LEDFire (646 clicks)
Caption: LED Fire
Filename: ledfire.zip
Size: 809 KB

LED Fire
Title: LEDFire (646 clicks)
Caption: LED Fire
Filename: ledfire.zip
Size: 809 KB

12Sep/090

Using EEPROM Chips…

I've been spending time researching options for additional memory capacity for an embedded AVR project and found that there are many storage optionsUsing EEPROMs available. My problem is that I wanted to consume as few I/O pins as possible as my project was already using most of the pins on my AVR. This is when I decided I would try out a few of the 24LC256 chips from digikey.com. The great things about these chips is that you can put 8 of them on the same bus (2 pins from the AVR). I just wired up a quick demo using two of them and put together a sketch to read and write from both. You can check out more example code here on the Arduino playground. I've included a demo sketch, high-res pictures as well. I think Fritzing is going to add lots of value to the community as I'll be included schematics from thier software in future postings.

EEProm Example
Title: EEProm (880 clicks)
Caption: EEProm Example
Filename: eeprom.zip
Size: 2 MB

Tagged as: No Comments
12Sep/090

Arduino Powered Dog Stairs!

Arduino Powered Dog Stairs

Yes, you read that right! I've talked briefly about my dog stairs project in my first post and finally got around to taking lots of high resolution pictures and thought I'd share the project with everyone. You can find all the pictures and code in the attached ZIP file. Here's basically what I did:

1. I purchased a Parallax PIR motion detector from Radio Shack.

2. A photo cell I had lying around, it doesn't matter what resistance, just modify the value in the code to reflect your photocell's darkness value.

3. Project box (enclosure) from Radio Shack.

4. Two white 20ma LEDs.

5. Wire, plenty of wire (you'll see in the pictures, I used a bit much)!

I've hooked up the photocell to the analog pin 0 of the Arduino. The code loops checking for the pre-configured value for darkness, when the value is read from the photocell and it's at or below that value we increment a counter and delay 1 second. We repeat this process until the counter equals the number of seconds of darkness required to activate the PIR. We do this to prevent momentary darkness/lightness from switching the state of the PIR. We of course perform the exact opposite logic for light (this helps if for example you flip on the light and then flip it back off).

Once the state has changed and the PIR is activated we enable power on Arduino pin 7 and give the PIR a pre-configured 30 seconds to calibrate. This is per the datasheet. Once calibration is over we monitor pin 3 on the Arduino for motion (which is triggered by a logical HIGH on pin 3). When motion is detected we turn on the LEDs by setting pin 13 to logical HIGH for the pre-configured 15 seconds. This motion detection sequence repeats until it's light outside and we shut down the PIR. I power the whole thing with a 9V 500MA wall wart.

Simple huh? This project went together quite nicely and fairly quickly. If you have questions or comments, please feel free to ask.

DogStairs
Title: DogStairs (667 clicks)
Caption:
Filename: dogstairs.zip
Size: 8 MB

DogStairs
Title: DogStairs (667 clicks)
Caption:
Filename: dogstairs.zip
Size: 8 MB

Tagged as: No Comments
12Sep/090

My First PCB, WOOT!

My First PCBThis past week I received my first order from BatchPCB.com! I had built a 5V regulated 5v power supply. I figured I'd start small and simple to ensure I understood the pincipals of PCB layout and what the fab houses expected. I can say that without a doubt the information I found online from the community and the guys over at SparkFun.com helped tremendously. I have (4) new PCBs and none of them have any issues. I've only assembled one so far, it only took me a few minutes to assemble them and I think I actually did a jig when I plugged it up and it worked exactly as I expected! I've since built numerous boards and will be placing an order next week to get them manufactured as well. Very excited stuff to see your ideas developed with such a professional appearance.

  My First PCB

Filed under: Electronics No Comments
30Aug/090

Laying Out a Custom PCB

Basic Arduino Board

Ever since I started playing with the Arduino I knew I wanted to get futher into how they worked and even start forging ahead with my own designs. Fortunately there is a fantastic community of folks out there who are more than willing to share their knowledge and even blog about it. I owe the community a great deal of thanks in helping me get up-to-speed so quickly on designing and laying out boards for my projects. I have been working feverishly on a new project which I'll dedicate a whole category on here for later. It's really going to be a neat project and I think it's a great way to give back to the community by relasing all my work for anyone to use. Anyhow, more on that later.

EaglePCB, how can I say it. It's freaking amazing. Who could ask for much more with a freeware PCB board layout program? I'm actually in the process of purchasing the Non-Profit version so I can build bigger boards. That being said, the freeware version will do everything the paid version can do but is limited to double-sided boards and limited board size. It really is a neat program and definitely helps people get started with PCB layout cheaply.

For now I wanted to share with the community just one of the boards I've finished and am awaiting arrival of the fabricated board. I released it to get feedback and hopefully help somone else out. It's taken from the Boarduino concept from AdaFuit.com. Basically it's a very basic USB powered Arduino board which can be integrated easily into other projects. I'll be using this board on my new project. I'll warn you of this, I haven't received the fabricated boards from BatchPCB.com yet and tested them throughly so you've been warned. You'll find the board and schematic in the attached ZIP file. I've used parts for the SparkFun.com library. None of this would be possible without those fantastic guys!

Please, I encourage feedback on this design!

BasicArduino
Title: BasicArduino (394 clicks)
Caption:
Filename: basicarduino.zip
Size: 90 KB