Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Lots of I/O pins

Status
Not open for further replies.

MEMPHIS91

New Member
Hey Names Jake.
I been playing with microcontrollers lately and need some advice.

I trying to fire as many as possible different relays. I have built several relay boards but even with Arduino Mega, I can only push 50 Out signals to power the MOFSETS that power the relays.

So I either need a controller with TONS (200-500) I/O pins or find a way to cheat the programing, Maybe multiplexing but i don't understand it very well, and don't think it will work for this.

I have come up with ideas of using 2 pins to power one relay so that i can multiply my pins which works, but I'm not a fan of writing thousands of lines of uber confussing code everytime.

(This device is used as a fireworks controller, timed perfectly to music. I did it with 40 relays for the first, but the show is growing FAST)

I have a $1500 Budget, so... any ideas? Theres smoke coming out my ears.
 
pommine: This looks beautiful! Never knew any thing like this exist. but i dont think I understand how it works.
So I use 3 Pins of Mega and how many relays can i can control? and can i control more than one at a time?

4pyros: No, it was a hobby, but i jumping in! Started a company called Pyro-Illuminations. And Designing new controllers myself.
 
And Designing new controllers myself.
With relays?? Not such a good idea. Thare are no pro controlers on the market with relays for some vary good reasons. If you are just starting do it right and use soild state. Andy
 
Yeah soild state will work too, but with the power im running the relay work perfectly. Plus Im trying to make them cheaper for people that like this stuff just don't have 10 Grand for a system.

Either way, I still need to understand the 74HC595 And how is it works.
 
but with the power im running the relay work perfectly
That sounds dangerous what kind of power are you running? Using relays to fire explosives is dangerous enough! Are using class "C" or "B" fireworks? Andy
 
Its only 12 VDC. And Class B. Class A will be for next year.
And using relays is some safer. SSRs can be triggered on accident. Last system was totally safe. And Work beautifully. Just need to go bigger and better. =D
 
Since you are running many relays, why not use a row - column coincidence addressing scheme. Say you have 8rows and 8 columns (two 8bit PIC Ports). By addressing one of eight rows, and one of eight columns, that will pull in one of 64 relays.

If you used two 4 line to 16 line decoder ICs, you could extend it so a single 8 bit PIC port could address an 16 by 16 matrix of 256 relays.
You would need some row and column drivers, and two diodes (one for isolation, one as a snubber at each crosspoint.
 
Fancy!! I know most the stuff your talking about, but NO idea...

Would this be able to control 256 relays individually?
And how many I/O pins would it use?
 
Hi Jake,

I know a local guy that builds these systems same as you are designing, and supplies them world wide. (has for some time)
If you get stuck i could put you in contact with him.

One method i did discuss with him was using I2C data expanders that would allow a I2C module to be added as required and addressed in program.

The number of outputs per module is limited by the I2C chip used.

Each I2C module works on a 4 wire common bus system so it dont matter where it is plugged in as each module has its own address.

In short you would call the module address that was required and then fire the required outputs of that module, next module and same thing.
It would make no difference in what order the modules were addressed.

Pete.
 
Yeah I thought SOMEONE has to have these ideas. lol
I'm still playing with tons of these ideas, trying to find the cheapest and best way to do it before I go buy all the parts.

That does make sense. Ill add that idea to the research pile. And you can tell him any info would be awesome.

he can email me at poolsharkclem@msn.com
Thanks
 
Class A will be for next year
Thats not even fireworks!
And using relays is some safer.
How?
SSRs can be triggered on accident.
And you think relays cant?
What if a low brake falls on your relay box, thay all could go BOOM.
You will need more than a few hundred relays to do a professional pyromusical. Think thousands of outputs for a 20 to 30 minute show. Andy
 
Class A, B.... at one point i knew the difference. Right now i'm shooting 1.4g. Hopefully next year it will be 1.3g.

And that is true, but my boards are in a sealed case. So no relay should be going off. And if they all do fire at once, thats gonna be one heck of a happy ending. =D

One day yes, thousands of relayed outputs will be in my price range. But for now I'm a 19 year old with a goal of 150, and set to about 10-15 minutes of music, with lights and fog . I'm happy to learn how all this works, and come up with most of it on my own.

I can't be Disney World.... yet ;)
 
Ok I dont know what you are using for software, but you may want to look into some of the DIY Light show stuff. The holiday light community has come up with free software and controller designs. That run the lights to music. Start here **broken link removed**
Andy
 
See this page for how to cascade them, it's only switching LEDs but the principal is the same. To change the outputs you place the data on the SER line and pulse the SRCLK line. Once 16 bits (or however many you have) have been clocked out you pulse RCLK and all the outputs change at the same time. You can easily clock the shift registers at 1uS and so can update the whole thing in 16uS. It will probably be safer to clock it much slower (1mS) and put an RC filter on the uC output to help eliminate noise.

Edit, the serial lines will still be susceptible to noise and it would be better to use something like RS485 to control slave units.

Mike.
 
Last edited:
Fancy!! I know most the stuff your talking about, but NO idea...

Would this be able to control 256 relays individually?
And how many I/O pins would it use?


A 8x8 row-column cross point can address a single relay, pulse it momentarily for a few ms, and then move on to a different relay. It should only take a momentary pulse to fire any given pyro connected to each relay. Each PIC port (8 pins) could handle 256 relays. If you had multiple cross points, say four (using four PIC ports), then you could fire 4 pyros at the same time (within a few us).

At what point do you want to do this using a LapTop rather than a microcontroller?
 
A 8x8 row-column cross point can address a single relay, pulse it momentarily for a few ms, and then move on to a different relay. It should only take a momentary pulse to fire any given pyro connected to each relay. Each PIC port (8 pins) could handle 256 relays. If you had multiple cross points, say four (using four PIC ports), then you could fire 4 pyros at the same time (within a few us).

At what point do you want to do this using a LapTop rather than a microcontroller?

A matrix will have problems with multiple paths through it causing the wrong thing to fire (diodes could fix it). You will also have probems with the high side transistors as you can't get the base high enough to turn them off. Finally, an 8x8 matrix is 64 points, how do you manage 256?

Mike.
 
Last edited:
A matrix will have problems with multiple paths through it causing the wrong thing to fire (diodes could fix it).

If you had read my previous post, you would have noticed that it takes two diodes and a relay at each cross-point.

You will also have probems with the high side transistors as you can't get the base high enough to turn them off.
Depends on how you drive the columns. I know how to make a high side driver.

Finally, an 8x8 matrix is 64 points, how do you manage 256?
Typo, should have said 16x16 matrix. I discussed using a 4 line to 16 line decoder chip...
 
Last edited:
a simple method would be is to do a search computer Christmas lights.Several boards are availiable. And 5v relays could be used.
I have several boards that I use for my display. All 40,000 lights controlled by one computer. Each board has 8-74hc595's to equal 64 seperate channels. boards can be wired in series for most any combos.
A free downloadable program called VIXEN is programed on the computer w/ music. I am using a board refereded to as a 595 as well as a board called RENARD 64 which has 128 levels of brightness. Your system won't need brightness control so the 595 boards should be sufficient. All controled via an rs232 port.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top