Scohen's Arduino Lights and sound build

I started my pack in 2013, but insisted on using an Arduino instead of going the more sane route of buying the pre-made light kits. For all those that have gone this route, I think I’ve discovered a better way than plugging in directly to the arduino. Plugging in lto the arduino’s outputs limits the number of LEDs that you can put on your pack, makes the wiring more complex and means the lights can only be on and off.

My build is slightly different. I use a custom PCB and TLC5940 chips to power the pack. I’m using a single arduino uno and am only taking up 5 of the outputs.

Here’s the pack running. Notice how the cyclotron lights fade in and out rather than just turn on and off.

This is the wand powering up. I made a little sequence where the lights drop from the top, because it’s cool although not particularly accurate.

I’ve created a custom PCB to house the TLC chip which vastly simplifies wiring. I can post the schematics so you can have the same PCBs made. Also, I’ve created a library for the arduino that helps you control your lights. I’ve noticed how quickly the code for the arduino packs can get out of hand, so hopefully this will help. It’s hosted on github so you can download and play with it as you see fit.

I’ll be posting updates as the build progresses, I’m excited to hear what you guys think.

-Steve

Wow! This looks really great. I’d be very interested in implementing something like this in my own pack. I would be interested in the schematic too, since I’d prefer to have pcbs instead of having to customize perfboards to suit my needs.

Really looking forward to seeing how this project progresses.

Oops. Disregard: double posted.

Could you help me with the wiring for the shift registers, switches and lights using your code?

I have a ton of the shift regs to use and I have a arduino mega and a uno kicking around to use.

I followed the previous tutorial and got that working but your right about all the wires and resistors that need to be used using that method with out the shift regs.

Anyway you could draw up a simple wiring diagram for me showing how to connect the chips, leds and switches?

Thanks in advance

Hello,

I found this and I am very interested.

Are there any schematics, etc. available ??

Thanks,

efbe

Could you help me with the wiring for the shift registers, switches and lights using your code?

Sorry it took so long, but yes.

There are actually no shift registers in my pack, just several TLCs. The switches are pretty simple as well. They’re just wired to a 10k pull-down resistor and to a non-pwm input. The inputs are configured when you initialize the library.

This site has a wiring diagram for the TLC

https://code.google.com/p/tlc5940arduino/

Your lighting looks great and this what I am hoping to eventually do for my lighting as well. Have you integrated sound yet? Any other details on how you wired/programmed everything up would be greatly appreciated.

Edit: Just saw your github link I missed that before. I will have to dig into that some more.

My pack does have sound, but I did it differently than most arduino builds. I used Cris’s sound module and triggered it via a relay module which isn’t arduino specific, it’s just four relays on a board. Each realay controls toggling between two sounds. The relays keep the sound circuits and amplifier electrically isolated from the arduino. I still get a slight sound when the pack is on though. Not really sure about that, but it sounds like it’s the Arduino cycling, it could be generating interference with the amplifier. I don’t really know, it kinda sounds cool.

Everything else is simple wiring. I have two ethernet cables that run from the pack to the wand. One carries the signal for my TLC modules in the wand (7 wires) and the other is for the switches (1 common ground, 4 wires). If you’ve seen the arduino switch tutorial, you know how I wired my switches ;).

My pack library controls everything, both lights and sound.

Here’s a video of the completed pack.

https://www.youtube.com/watch?v=99kTmfhrPxk

Ah I see. i am assuming it’s something like this http://www.miniinthebox.com/4-channel-relay-module-with-optocoupler-5v_p903429.html?currency=USD&litb_from=paid_adwords_shopping&gclid=COWf5JriusUCFUJrfgodw78A0g

I have been trying to figure out a decent cheap way to add lights and sounds and while I don’t have any Arduino experience I would love a reason to get into it. Just watched the video and your pack looks and sounds great!

That’s exactly the board I’m using. I’d recommend one with five relays if possible, as I’m maxed out and can’t play the ghostbusters song or anything.

I want to warn you that this way isn’t particularly cheap, nor is it a good route for keeping your sanity unless you’re electronically gifted. I spent many nights wanting to throw my electronics out the nearest window. I only have a multimeter, and I didn’t have a lot of visibility into what was going on in the pack.

That said, I’ve made enough mistakes and discoveries such that things might go easier for you guys. For example, the PCBs that I made were an absolute godsend and saved me literally two hours of work per PCB.

What you gain is customizability. I really like my pack and wand’s startup sequence, and I really really like the fade-in fade-out dance of the cyclotron lights much more than the on-off on most other packs. That said, I don’t think I’d go the arduino route if I had to do it over again, but I’m glad I did.

Yeah I don’t think there is any dirt cheap way of doing both sound and lights. But a complete off the shelf setup is $150+ this route seems maybe half that price? I am also not afraid of learning and have done a fair amount of soldering in the past.

Arduino also seems super cool and have been looking for a good excuse to get into it. I already have a backup plan for super cheap very non screen accurate lights so if it comes down to I will execute that plan.

I didnt see you PCBs in your link (or i just dont know what to look for) are they something like these?SparkFun LED Driver Breakout - TLC5940 (16 Channel) - SparkFun Electronics

No, my PCBs were custom made, which is where some of the cost comes in. I can send you the files required to get them made, and you can send those files to http://www.oshpark.com and have them made. I recommend getting at least 10 of them. Each order has minimums, so the PCBs will cost $40 --check out the pricing.

Then there’s the extraneous parts that you have to add to the PCBs in order to connect them to your arduino. And you need some specialized crimping tools for the wires so you can connect them to the PCB headers. If you don’t want to make your own PCBs, you’ll have to solder prototype boards, which is time consuming and error prone --and they’re much larger.

Like I said, it’s not terribly cheap, and what you make up for in cost you’ll more than spend in time.

It is fun though, and if you have the time, go for it!

Anything you are willing to share would be great. I am thinking that this is a pretty good way to go and while I don’t have all the time in the world I always enjoy the journey more than the destination with this sort of stuff.

I looked around last night and I think most of it makes sense I am probably going to breadboard everything up first. The part that I am not sure about is that I see people adding resistors to the TLC5940 for controlling output to the leds but it doesn’t look like each led get a resistor just 1 for the whole chip? Maybe your pcb schematic will help me make sense of that.

I’m a big fan of sharing.

These are the CadSoft Eagle files for the PCB that I had made:

Eagle Files for PCB

You can have the above boards made at https://www.oshpark.com

Here’s a parts list for the PCBs above. The first thing is the DigiKey part number, then description, then the quantity I ordered.

  • 455-1165-ND - 2 pin JST housing 30

455-2147-1-ND - JST Crimp terminal 800

455-1722-ND - JST 5 position header 30

455-1719-ND - JST 2 position header 30

455-1718-ND - JST 16 position header 30

455-1152-ND - JST 16 position housing 30

455-1163-ND - JST 5 position housing 30

ED90054-ND - 28 pin IC socket (for the TLC5940) 15

And again, for good measure, a link to my code in github:

https://github.com/scohen/photons/

My schematic does help a bit with that, but I’ll go ahead and just tell you. The TLC for arduino site is helpful, and where I got most of the information that I’ve used. They have some diagrams on there for both a single TLC and several TLCs daisy-chained. The first chip in a daisy-chain has two resistors on it and the rest of the chips in the chain have one. You always have a resistor to the iRef pin of the chip, which provides a reference current --the current that all the LEDs have. The other one (on the first chip) is on the blank pin and turns off all your leds on power-up.

Hope that helps.

Hey scohen I finally got all the parts for the arduino board and got your libraries imported. I am using your sample code from the read me but I am getting an error when I hit verify (see below). I don’t mean to be a bother but any idea what might be going wrong? I did get my soundchip programmed and wired up a breadboard with the TLC chips so that has been fun.

Proton_2.ino: In function ‘void setup()’:

Proton_2:42: error: no matching function for call to ‘ProtonPack::addComponent(Toggler&)’

Proton_2.ino:42:28: note: candidate is:

In file included from Proton_2.ino:1:0:

C:\Program Files (x86)\Arduino\libraries\photons-master/ProtonPack.h:116:10: note: void ProtonPack::addComponent(PackComponent*)

 void addComponent(PackComponent *component);

      ^

C:\Program Files (x86)\Arduino\libraries\photons-master/ProtonPack.h:116:10: note: no known conversion for argument 1 from ‘Toggler’ to ‘PackComponent*’

no matching function for call to ‘ProtonPack::addComponent(Toggler&)’

Hey Scohen,

I handed the arduino off to my friend who has been working with me on the proton packs. He has gotten the sample code working and is now pouring over your proton pack libraries. I was rewatching your video and you pack looks sweet, is there any way you would be willing to share the final sequence programming? If not I understand it’s just a very nice setup.

Of course I will.

This is my sketch in its entirety.

https://github.com/scohen/proton_pack

Thanks Scohen! I will make sure my friend sees this and I just got a another arduino so I will start working on bread-boarding that up too.

Edit: We have blinky flashy! It’s a bit of a mess but it works and for my first arduino project that’s something. I have another bread board on order so I can mount the arduino, soundchip and wire up actual switches. Super exciting to have something work out well hopefully things will continue in that direction this weekend with my vacuum forming. Thanks again.

image