Isolated Inputs and Outputs for Marble run

HI

I am building a small controller (Based on Arduino Pro Mini) for a signage/advertisement display which is basically a large marble run.

as the marble goes through the run it will pass over a few beam break sensors and micro switches
these will in turn trigger a few flashing lights (and stepper motors but these are not what need help with)

attached is three schematics showing how i was intending to do the two different inputs (switch and Beam Break ) and the FET output.

I have used Opto-isolators so that my triggering voltage can be 24V (or 12V) thus lensing the chance of interference and to provide protection to the Micro controller incase of wiring mistakes during install

currently the FET outputs will just flash however if possible i might implement PWM dimming

the break line shows where the field wiring is (5m ish from the case to the sensors, buttons)

Optos are http://newzealand.rs-online.com/web/...ucts/667-5073/
Fets are http://newzealand.rs-online.com/web/...ucts/325-7580/
Beam break switch http://newzealand.rs-online.com/web/...ucts/642-4301/

my questions are

do i need the resistors labels r1,r2 and r2?

if R1 is needed should it be in the case or should it be with the sensor (purple arrow)

for my inputs i am switching the Positive (common ground) both at the 24V side and the 5v arduino side, i have seen a lot of circuits where pins are switched low (thus have pull up resistors )
is either way better then the other when you have the choice (with the output of course i do not have the choice as i im using N-Channel Fets)

i assume i need a capacitor inline with the 24v for the fet output stages, how do i calculate what this should be? and work out what type it should be?

can anyone seen any potential problems with the over all design of these input and output stages?

are the Optos on the outputs over kill?

any help/ advice would be very much appreciated

Hi, This looks basically OK. Question about outputs, though:

You MAY want to think through what happens at Power-On time. BEFORE your startup code runs.

Can any Bad Stuff happen before you set the initial output states??

Maybe look at the example in the http://arduinoinfo.info wiki here: http://goo.gl/TPpMN (This uses active-low relay boards in a way that guarantees no improper activations at startup.

Maybe not as important for you as for the Fireworks-Shooter guys :slight_smile: but worth considering...

Hey Terry, you back Stateside again?

Maybe not as important for you as for the Fireworks-Shooter guys but worth considering...

Even the pros #uck-up sometimes. You hear about that big fire works display in San Diego this last 4th of July? Seems like every single rocket launched off at the same time when they hit start rather then follow of programmed sequence. I blame the software guy, I'm sure it was his/her fault. :wink:

Lefty

Thanks,

I had not thought of what happens at start up with the outputs, this is not a big deal as worst case the motors or lights blink for a split second. however to prevent this would i be better changing my output Optos to work on an active low state? i assumed that when the micro was turned on the pins would be low untill changed.

also regarding the resistors r1-r3 what are your thoughts? do i need them? my reasoning for r1 and r2 on the inputs are so that the led of the opto is pulled to ground and not left floating, however when i activate an input switch it is going to give a slight voltage divide, should i re calculate the current limiting resistor for the opto to account for this or can i simply remove R1 and R2 and leave the inputs floating? as i dont think there could be enough interference on the 24v side to light up the opto (however i maybe wrong)

Hey Terry, you back Stateside again?

Yes! Happily in our Log Cabin in rural Vermont...

It was a wild ride; met some great people who were (like they say in Vermont), Not From Around Here!

Hi So i have made the circuits and they seam to work as expected (i did not do the sensor as it is no longer needed)
however

i removed R2 from the output stage as it seams to not be needed, I also had to add a pull down (10R) onto the gate of the fets as some of them would not turn off.

I put a LED in series with the Optos on the input stage for visual feedback

I lowered the voltage of the circuit to 12v so that i could use the raw input into the arduino for its power supply.

the one part i am still not sure on is R2 on the input stage

i have yet to install this as i can not decide if it is needed,
the circuit is working and it takes 3.3V before the opto begins to conduct current,
however i am wondering if i should install this pull down resistor to stop the input pin from floating or not, my main concern is external interference causing the opto to light and trigger the input.

the circuit is working atm however once the project is complete it will be moved out of the workshop and installed onsite so i need to be sure the conditions on site are not going to cause false triggers.

can anyone advise me on this?

i am wondering if i should install this pull down resistor to stop the input pin from floating or not, my main concern is external interference causing the opto to light and trigger the input.

It is not needed, as the Optoisolator has a current threshold that's high enough to be safe.

BUT, if that wire is long, and it's unshielded, and there is significant electrical interference/noise in the environment (Say the security guard's walkie-talkie etc) THEN you may want to have a filter/bypass capacitor (say 1000pf) right across the Optoisolator input LED. Just in case.

Post / Point to Photos of this thing!!! We want to see...

thanks,

the wire is not to long only about 500mm, it is unshielded, there may or may not be external interference as this unit is going in public space (inside a bus shelter)

i do have some small 0.1uf ceramic caps on hand that would physically fit if you think this would be advisable?

Photos etc i can do but not until after it goes live on the 16th.