Go Down

Topic: My first project - Christmas Light Controller (Read 3121 times) previous topic - next topic

UnaClocker

I don't actually get my Arduino until Monday, but I'm ready to hit the ground running the second I do. I wired up the solid state relays and the high voltage side of things today. I have a bunch of pictures here:
http://www.neonsquirt.com/arduinoxmas

It's not going to be anything crazy, no dancing to music or anything. Simply the ability to have a couple different patterns.. I'll have some video by Tuesday.
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

bld

Quote
For the relays, I used 8 of these. They are solid state relays, good for about 100watts AC. They're nice and high impedance, and draw about 17ma, so I can run them directly off the CPU pins of the Arduino with no extra circuitry.

I can't see it on the picture, but do they have an internal diode, or did you put one on? There must be one to prevent the coil from slapping the arduino back.
captain-slow.dk | non contagious!

UnaClocker

They are solid state relays, meaning no coil. No need for a flyback diode.
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

bld

LOL you are right, didn't see that in the text.
captain-slow.dk | non contagious!

UnaClocker

http://www.youtube.com/watch?v=DJX6AcjbQqA  There's video of it in action, and I updated the page linked in my first post with the completed pictures, and a link to the sketch I have running on it. I had a bug in one of the modes (patterns) in the sketch I had on the Arduino when I shot the video, that's why it freezes at one point in the video. It's all better now.
I love this Arduino! :)
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

UnaClocker

If anyone takes a look at the source, and has any feedback, I'd welcome it. Like I said, this was my first project, and I'm just learning to program the thing, I'm open to advice and constructive criticism on my programming.. :)
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

retrolefty

Quote
I'm open to advice and constructive criticism on my programming..  


None called for. You have gotten off to a quick start, but I suspect that you have a little experience with electronics and programming.  ;)

I bet your son is having fun 'helping' you.

If you like blinky lights, have you searched around for those LED cube projects, they can be quite challenging to build and program interesting patterns. I built a 5x5x5 cube and enjoyed the experience a lot and it helped me learn a lot about using timer interrupts.

Good luck on your next project.

Lefty

UnaClocker

:) Thanks. Yeah, I've been playing with MegaSquirt ECM's, which are a DIY electronic kit in a lot of ways. Picked up much of my skills from that. The programming, I used to program in Turbo Pascal as a teenager.. Hadn't done any in about 13 years, but over the summer I worked my way through two or three "Learn Objective C" books, because I wanted to get rich writing iPhone apps.. haha, that never panned out.. But it turns out I feel pretty comfortable programming in C on the Arduino now. :)
I'm definitely looking forward to getting my two sons into programming and building things. They're a bit young at this point, so they just tag along to see what comes out when I get done building things. :)
As for a next blinky light project.. I was leaning more towards doing a spinning disc with a row of LED's on it. I saw one on YouTube that was displaying words "in the ether". Very neat trick using POV..
But my next couple projects are less blinky, and more useful.. Knock based doorlock controller for the sliding glass door on the front of my house. It doesn't have a keyhole, so it's always a PITA to lock the house up when I leave. Arduino would solve that nicely.
And just for fun mostly, I'd like to make my garbage can take itself to the curb each week, and put itself away after the garbage truck comes through.. hehehe.. :)
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

UnaClocker

Got my 7 segment LED and shift register in the mail today. Wired it up and it pretty much worked the way I expected. I had to change MSBFIRST to LSBFirst, I had a feeling I had it backwards. If I had soldered the pins in the other order, that would have worked as well. Also, the 7 segment LED module I got is freakin TINY, I wondered what they meant by .28" in the description.. I think that meant each segment is just over a quarter inch long.. heh..
I also had my numbers off a bit, I needed to subtract 1 from currentMode to get the correct number to display from my array (starts at 0, not 1), and one other minor change to keep the LED from displaying 6 when I'm in mode 1.. ;)
I'm looking forward to Christmas being over so I can move on to my next projects.. :)
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

UnaClocker

Looks like I'm done with this project for the year. I can only imagine what I'll do with the lights next year. I posted an updated video showing off the 7 segment LED, and a couple new modes I added. As well as the final revision of the sketch with all the modes working.
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

hotcarrier

I built it as you described with two channels of a cn4pc.com relay board and it worked just fine. Thanks.

UnaClocker

Hmm.. Well that's cool, I'm glad it worked out for you. :)
Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

Go Up