I have designed up an optocoupler circuit to work with a 24v photoeye. Basically I am using the optocoupler to reduce the 24 volts that is supplied from the photoeye (24V when nothing in front of photoeye and 0 v when something is in front of it). The 5V side is basically shorted when when there is 24 volts from the photoeye. I would like to post a schematic so that is easier to understand what I am saying. Is there a good preferably free progam to draw up quick schemaitcs in that I can post on ehre for people to see?
Thanks,
Optocoupler Circuit Using arduino
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 9
- Joined: Fri Dec 07, 2012 3:38 pm
Re: Optocoupler Circuit Using arduino
I guess I never really asked a question there. What I am trying to get at is that my 5V signal is not switching to 0 when the voltage from the photoeye is 24V. Therefore I am thinking that my schematic is wrong or my optocoupler is not working properly. Once I post the schematic it will be easier to see if I have a mistake in the wiring.
Thanks,
Thanks,
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Optocoupler Circuit Using arduino
Hi. I moved this topic to General Project Help since it is not really Arduino specific. If you can post a wiring diagram someone might be able to help.
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: Optocoupler Circuit Using arduino
There are probably several ways to post a schematic. The simplest is probably to draw it and take a picture of it. You can use LT Spice which is free. There are other free PCB programs you can use also, such as Eagle PCB.
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: Optocoupler Circuit Using arduino
I can explain how to hook up the opto coupler. The input Led is just a LED. It has a Vf of about 1.5v. You will need a current limiting resistor of around 3 to 5k.
On the output connect the emitter to ground and the collector to your CPU input. Also put a 10k pullup on the collector to 5v.
That should do it.
On the output connect the emitter to ground and the collector to your CPU input. Also put a 10k pullup on the collector to 5v.
That should do it.
-
- Posts: 9
- Joined: Fri Dec 07, 2012 3:38 pm
Re: Optocoupler Circuit Using arduino
Where would the current limiting resistor be placed? I currently have the same setup as you are explaining I am just using 3.3K for the current resistor and for the pull up resistor. I have the 3.3K resistor connecting the + side to the anode. Is this the correct setup?
Thanks,
Thanks,
- Attachments
-
- photo.JPG (83.84 KiB) Viewed 2996 times
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: Optocoupler Circuit Using arduino
That should work fine. Looks perfect to me. Not working?
-
- Posts: 9
- Joined: Fri Dec 07, 2012 3:38 pm
Re: Optocoupler Circuit Using arduino
I got it to work. I had the photoeye wired to the schematic incorrectly and it was messing up my system.
Thanks for the help.
Thanks for the help.
-
- Posts: 1
- Joined: Mon Feb 11, 2013 12:40 pm
Re: Optocoupler Circuit Using arduino
Meissnerb44,
Could you specify what optocoupler you are using and what you did on the sensor side to get it to work? I am doing the same thing, trying to take 24v inputs into the arduino.
Could you specify what optocoupler you are using and what you did on the sensor side to get it to work? I am doing the same thing, trying to take 24v inputs into the arduino.
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: Optocoupler Circuit Using arduino
Not trying to be a buttinski but any optocoupler should work.
Please be positive and constructive with your questions and comments.