Over my head... - Page 1
Forum section: electronics / beginners

author: Airsniper
author_rank: Newbie
timestamp: February 01, 2023, 06:41:05 am
content: I have a project I am working on.I need to have optoisoltors / optocouplers in the project.What I built for a game site my son plays at is a couple of team counters.I am upgrading them to add remote control on 433 Mhz, some 4 channel units.The transmitter I have set up so it operates just below the maximum voltage of 12 volts (10.9 volts) using a DC-DC CC-CV buck boost converter.The receiver has to be on 5 Volts.I need to use some PC123 optocouplers I have and the data sheet says voltage for the LED is 1.2 volts (1.4 max) and a 10uA current.How to I calculate the resistor needed to drop the voltage and current?Am I right in saying that its (5v - 1.2v) / (10 / 1,000,000) = 380,000 ohms = 380K ?

author: Swainster
author_rank: Frequent Contributor
timestamp: February 01, 2023, 06:58:56 am
content: Hi Airsniper,10uA is the reverse current i.e. the current which flows when the transmitter LED is reverse biased - this is probably not relevant to your application. To drive this LED you should aim for a forward current of about 5mA i.e. you need a current limiting resistor of approximately 760 ohms. 1K should also be fine.

author: tooki
author_rank: Super Contributor
timestamp: February 01, 2023, 07:33:32 am
content: Given that 5mA is on the low side of the de-facto operating range (given that numerous other specs are given at If=20mA), I wouldn’t go below 5mA, so I’d probably use 680 ohms, or even 470 ohms, not 1k.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 01, 2023, 07:41:57 am
content: Correct. The datasheet mentions a typical forward voltage of 1.2V at 20mA forward current.You mention both 10.9V and 5V and wonder at which one you connect the optocoupler LED. Your calculation shows 5V and then the calculation of Swainster is correct, but you will have to match the resistance with what is available within a given range.Quite common would be to use 470 ohm in this case depending on what is connected to the other side. The mentioned 1K ohm should indeed also do the job.

author: Airsniper
author_rank: Newbie
timestamp: February 01, 2023, 03:32:46 pm
content: There are two voltage rails on the receiver unit, 5V and 8 volts, is the receiver unit, a separate unit which is in its own enclosure. I have read the comments about the receiver and the voltage is strict, above 5 volts and the unit lets out the magic smoke.10.9V is the transmitter as 5v on the transmitter by all accounts gives a couple of meters range and I need to have max range of about 20 meters which is 10+ volts.The PC123 optocouplers (x2) will be needed on the receiver unit as its output will form one of two functions, to help pulse a pin input on a unit that has an 8 volt supply to power and pulse the pin, the reset pins are simply shorted together. So this only needs the optocoupler arranged as a device that bridges the pins when activated.I don't have any way of showing a wiring diagram, I can however show you via these links the units I am using.The counterhttps://www.amazon.co.uk/dp/B016U4J2RGis a unit that is used as a tachometer or as a counter up and down.The Tx / Rx unitshttps://www.amazon.co.uk/gp/product/B08ZMN4PMJis a set of 433 Mhz units with 4 channelsThe optocouplers are needed x2 for the isolation of the higher voltage rail from the lower voltage rail as the counter is operating on its lowest voltage setting.So what I need is to drop the 5volt rail on the low voltage rail down so that the input voltage is 1.2v.In this data sheethttps://media.digikey.com/pdf/data%20sheets/sharp%20pdfs/pc123%20series.pdfpage 5, it shows a table. If I am reading this right,Looking up resistor voltage dropping, ( input volts - unit vots ) / milliamps is what I need to use. I think I got the wrong scale earlier as milliamps is 1/1000 making 20mA 0.02amps.So 5v = 1.2v = 3.8v 3.8v / 20uA or 3.8v / 0.02 = 190 ohmsThe closest I can get to that figure is 195 ohm (120 ohm + 75 ohm inline)

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 01, 2023, 04:26:41 pm
content: The receiver module you are using can't output 20mA according to the specs on amazon.QuoteIt states 10mA, but to be sure you should try to get the datasheet for the used chip.Also for the optocoupler it does not need the 20mA per se. The specs also show a graph for If = 5mA, but the simplest way to see if it works is to test it with a 680 ohms resistor or even a 1K ohm one.Since you are driving the counter inputs there is not much load on the transistor of the optocoupler, so I think it will work fine with even the 1K ohm resistor. But you also need a resistor of say 4K7 ohm on the transistor side from the collector to the 8V supply and the emitter needs to be connected to the ground. The counter is connected to the collector.

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 01, 2023, 04:45:56 pm
content: Another option would be to use a couple of small mosfet's like the 2n7000, if the counter module supply can be connected with the ground to the ground of the receiver.See the attached picture for how it can be done.

author: BillyO
author_rank: Super Contributor
timestamp: February 01, 2023, 04:46:20 pm
content: I find in using opto-isolators that it is best to drive them as close to the peak in the current transfer ratio as you can. For this device the peak is @ ~7 mA. That's what I'd aim for. Also try to keep the collector current as low as you can (under 5 mA) to get the best response time.

author: Airsniper
author_rank: Newbie
timestamp: February 02, 2023, 04:15:20 am
content: I have had to revise my plan as I won't get the upgrade finished in time.I have instead opted to outfit a new wiring loom that will facilitate a plug in of the Rx unit in the counters at a later date.I have been looking around for software that I can use to draw the circuit but find nothing offers what I need, I found easyEDA and its horrible to work with, has very limited options for components and I canned it after spending 20 minutes working out how to do simple things in it.I don't need anything fancy I just need to draw things on a page that shows connectors, switches, LED's etc.Any suggestions?

author: BillyO
author_rank: Super Contributor
timestamp: February 02, 2023, 01:44:24 pm
content: Quote from: Airsniper on February 02, 2023, 04:15:20 amHave you looked at Dip Trace? They have a free (but limited) version.

author: Airsniper
author_rank: Newbie
timestamp: February 02, 2023, 02:31:11 pm
content: I will try it, I don't have my windows machine hooked up to the internet as its only for music and video production.So I will grab the binary and look at it later.