3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Automatic, Biorhythm LED Aquarium Light

Step 5The Electronics

The Electronics
«
  • IMG_8480.JPG
  • IMG_8478.JPG
I've been holding off on posting this instructable because I wanted to provide a proper schematic, but I don't really have any software that makes that step very easy. To be honest, half of the hardware I installed below isn't necessary, and it was used while I was developing the circuit.

Since using an AVR microcontroller is out of the scope of this instructable anyway, and you would need existing experience, I'm hoping that providing the firmware (attached as 'main.c' below) will be enough to get you going. Of course, if there are any questions, please ask and I'll help as much as possible.

Suffice it to say, the signal for controlling the LED array is connected to pin 12 (PD6), the 'temporary off' switch is connected to pin 4 (PD2), and the LDR is connected through a voltage divider to analog pin 23 (PC0). I set up internal PWM, and simply change the PWM value based on the LDR analog reading. It's probably pretty messy, but it was my first real project with the AVR by itself. Any suggestions for improving the code would be welcome!
main.c2 KB
« Previous StepDownload PDFView All StepsNext Step »
4 comments
Oct 13, 2009. 2:44 PMnavyredman says:
Sorry, I'm new to this site and didn't see anywhere that I could edit my comment, but I have a question now. What is it that you pointed out that you left on the PCB but don't use anymore? Is it an AC or DC plug?

Also, I may be missing something completely, but you have the firmware included, but is there no place to see how this curcuit is wired? I mean, I can see you have a switch and a resistor, maybe two, looks like maybe an IC, a jumper and a few other things, but I'm just not getting how it's wired. I know you said you have no place to create a schematic, so I gave you the link to that freeware(it works really well by the way), but as somebody esle pointed out if you could just throw a drawing on a piece of paper that would be awesome. I am really interested in doing this.

Also, the LED's you ended up using you said were put together in series, so when you took them apart you didn't have to re-solder them right? All you did was put the LED's you already had in series and then put those in paralel correct?

Another  thing. Since I don't know how this is wired  or anything, do you think it would be possible to add in moonlight that would gradually increase and then decrease just like the daytime lighting?

Sorry for all the questions, I'm just really interested ini this. 
Oct 15, 2009. 12:09 PMnavyredman says:
Where did you find that stinkin LED flood light. I've spent two daystrying to find one. Looks like if I want to complete this project I'mgonna have to dig into my bulk bought LED's 

I'm not sure how this site works, but I'm planning on making a fewchanges to your design for safety and usability. For one I have touse insulated wire to put the LED's on. I have been designing andmanufacturing electronics for some time now and looking at that makes mecringe lol  I'm gonna use a single core copper wire it will beanywere from 14 to 22 AWG and insulated. I'm also going to cover thoseflat nuts and bolts that you have on the side of the lid so I don'tshock myself. Just an idea for ya
Oct 13, 2009. 2:13 PMnavyredman says:
If you'd like to publish a schematic or a drawing or a breadboard model try this  fritzing.org/    that may do what you want
Jul 12, 2009. 2:36 PMpeninbrant says:
I agree, great article. Looking to build a "reef capable" LED based lighting system. Any help of course much appreciated. But again way to go!
May 8, 2009. 12:41 PMluptakt says:
Hi, this is great article but would be even greater if you could publish the schematics. ;) Just try to draw it yourself to a piece of paper and scan it. Should be good enough.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
6
Followers
1
Author:paryl