DIY Hood for 12 gallon with moving moonlights, sunrise/sunsets, and cooling

The friendliest place on the web for anyone with an interest in aquariums or fish keeping!
If you have answers, please help by responding to the unanswered posts.
What exactly do you need to program the microcontrollers? Is it a socket that plugs into the computer? I'd love to learn to program them myself. I don't know C, but I learned to code in MATLAB in college and I taught myself to use VBA this past year at work. The principles are the same, I'd just have to learn the syntax. I do appreciate the offer for the programmed chip.

As long as you didn't let the magic smoke out of the circuit, there's still hope. Why use a pot when you need a constant resistance?
 
:uhoh: you guys might want to be careful when talking about your pots and magic smoke...

Im really interested in all of this, i need to go back over everything more carefully. If you guys do any private communication regarding this, could one of you type up a summary for the rest of us to look at for later use?
 
What exactly do you need to program the microcontrollers? Is it a socket that plugs into the computer? I'd love to learn to program them myself. I don't know C, but I learned to code in MATLAB in college and I taught myself to use VBA this past year at work. The principles are the same, I'd just have to learn the syntax. I do appreciate the offer for the programmed chip.

As long as you didn't let the magic smoke out of the circuit, there's still hope. Why use a pot when you need a constant resistance?


Here's the programmer I use.

USBtinyISP - Inexpensive USB AVR Programmer

It's cheap, and you can solder it yourself to get some experience. (Or you can buy one presoldered, but if you can't solder this, you shouldn't be doin this project.)

Also download AVR Studio. I have version 4.13, I don't know if there are newer ones, but this version works with the programmer I showed you above. You could always buy a brand name programmer, but they are anywhere from $50 to $100, and I figured, "Why spend the money when I can buy one for $20 that does the same thing? There are also some programs you need to make the programmer work correctly with AVR studio, but they're really easy. It's on the site, and it walks you through it. If you get those things, you'll be able to program any chip. (Well, any Amtel chip at least, I haven't tried adurinos)

Also, I order everything from DigiKey.com It's a (I think) wholesale distributor. I think they're used to very large orders, but I make small orders just fine. Great shipping too. It's really hard to find the correct things though, cause there is like 5 slightly different versions of everything. You REALLY have to know what you're looking for. But, I have all of the part numbers I used, so if you want to make sure you're getting the right stuff, I can look it over for you. Also, I'll type up a parts list when I'm done.

Anyway, start lookin up C programming. It's actually pretty easy. (Of course I say that, I know it lol) Like you said, once you know how to program, it's all syntax.

Ok, on to the business at hand. I finished my little "project box". The ones at Radio Shack didn't fit right, either too big or to small, so I made one. I put a small computer fan on the end so that the regulators don't get too hot. One thing I did forget to do was actually program the delays into the MCU, so that it takes 12ish hours to go through the whole cycle. But I still have the programming part set up on the breadboard, so it'll be done in a few. I'm going to install everything tonight, so I don't bug the fish by turning the light off in the middle of the day. Hopefully the day after tomorrow I'll have some time lapse video of the moonlights and stuff in action.

EDIT: Oh and on the use of the POT, I believe with the use of the variable voltage regulator, the calculation isn't exactly correct, so the POT helps you get the exact voltage you want. I could guess and stick a bunch of different resistors in there, but it's just easier this way.
 
Im really interested in all of this, i need to go back over everything more carefully. If you guys do any private communication regarding this, could one of you type up a summary for the rest of us to look at for later use?

If Corrado is ok with it, I'd be happy to share anything I can.

Corrado, thanks for the info. I'm always a fan of cheap work-arounds. So I build this programmer and the microcontroller plugs in directly, correct?
 
If Corrado is ok with it, I'd be happy to share anything I can.

Corrado, thanks for the info. I'm always a fan of cheap work-arounds. So I build this programmer and the microcontroller plugs in directly, correct?

Not exactly. You basically have to make a programming "socket" for the chip. It's just 6 wires, but the programmer is built to work with any chip, not just the one I'm using, but because of that you have to make your own. I suggest buying a solderless breadboard. You basically need one for circuit prototyping anyway. With that breadboard, you can program any chip that will fit into the holes. EDIT: You can buy breadboards from digikey as well. EDIT2: Many people include the programming wires on their actual board they make, so they can actually program the chip without removing it. (I probably should have done this)

I'll take a picture of mine. It only takes a few seconds to wire the programmer to the chip. You just gotta know where to put the wires lol. Again, I'll write a complete writeup when I get everything working right. Right now, my "sensor" isn't working right. It needs to be adjusted.
 
I'm going to test everything tonight, while the lights are out. (I don't like to bug the fish.) So HOPEFULLY tomorrow night will be the first full blown thing. Right now when I plug it in it automatically goes to the moonlights I think? I don't know, cause I put major delays in to slow everything down. I'm going to delete the delays and test everything before I put them back in. (Dumb move on my part putting them in before it was fully working)

Oh and when the one moonlight did come on yesterday, it looked REALLY cool. The purple LEDs are more of a spotlight than a wide angle light, so it kinda just looks like a purple beam is shining down from the heavens. I actually love the look. It kinda looked like aliens had come to abduct my fish. lol And the light bounced around enough to let me see the rest of the tank, although JUST barely. Also, I think I could see the spotlight cause my water isn't really polished. There are tiny pieces of stuff floating around. Normally you'd never notice, but when it's dark, and there is a single light, you notice.
 
I bit the price bullet and bought some UV/purple ones from radioshack. I was too impatient to order cheap ones.
 
I was looking for some good ones for mine, do you have a link i could check out? Or just the brand and model number?
 
5mm High-Brightness Ultraviolet LED (2-Pack) - RadioShack.com

Those are the ones I bought, but I've also had luck with these blue ones...

4-Pin High Brightness Blue Power LED - RadioShack.com

I really suggest buying LEDs online, as they're MUCH cheaper, I was just lazy, but if you haven't started the project yet, it's a perfect time.

Also, it seems like my fans might be messing with the rest of my circuit, I might have to wire them up some other way. For now I'm just going to remove them out of the circuit so I can get the moonlighting working.
 
Na, I don't NEED the fans. They were an afterthought. Anyway, after struggling with the LED "sensor" for the past 6 hours... I've decided it's not going to work. I don't know why I put myself through misery to try to make something do what it wasn't made to do. I just ordered a freaking phototransistor (it detects light) to tell whether the light is on or off. Who knows when it'll be here, but I'm not going to try to use the LED anymore. There are just too many variables, and it's just not precise enough. For example, I had the sunset working PERFECTLY for about an hour and a half. I bumped the LED, and it didn't work anymore. I just placed the order for the phototransistors, so hopefully they'll be here next week. But until then, I'm taking a break. I'd be glad to answer any questions you guys have though.

Of course, don't let this put any of you off this project. If I were to do this again, I'd simply incorporate what's called a RTC, or "real time clock". Basically, it tells time, then you could tell your lights when to go on and off, instead of basing things off of when the normal lights go off. I probably could have ordered that instead, but I've never used one, and I didn't feel like figuring it out right now. I will eventually though.
 
Do you have any pictures of the blues in contast with the UV ones? I'm really interested, but im not sure what i want yet. Also am i reading this right that they pull 3.2-3.8v?
 
I'll get some pics for you whenever it starts workin Jimbo. Although it's REALLY hard to take pics of the purple because the camera doesn't like those wavelengths of light. (It looks blue through the lens) Maybe it'll look more natural on video camera. I dunno, give me a few days.
 
all the complex electronics are a nice contrast to the hand cut dovetail.
 
Alrighty guys, the parts came today. I'll hook them up tonight!
 
Eagerly awaiting the results! :multi:

Ugh programming is a pain.... I still have to work the timing out, so it won't be "finished" until I get that right, however long that takes, but I'll have a timelapse vid up on sunday. The only thing that could be wrong is the timing, meaning the sunrise lights could come on hours before the actual lights come on, but after one night, I'll be able to do some calculations and make pretty educated guesses on what the delays should be changed to.

I did, however, see the sunrise lights come on when I was testing earlier, they look.... AWESOME!!! I was SO excited when I saw it. The three LEDs I used light the tank up fully, but not extremely brightly, it's perfect. But you guys will just have to wait until sunday :)

EDIT: Oh and the phototransistors I bought... work perfectly. It's so much easier when you use something the way it was supposed to be used. lol
 
Back
Top Bottom