Discussion in 'General Electronics Chat' started by scorca, Nov 3, 2008.
Does anyone know how to use an optocoupler in a circuit?
Is your task to use optocoupler, or you are trying to find how to use it?
it's my task. I measure an output of a solar panel and the data will be transfered to a microcontroller. the microcontroller needs to be isolated from the high voltage. Thats why I use optocoupler but I dont know how to integrate it.
Is the data digital or analog? Digital is easy, analog is more complex if it has to be accurate.
I'm thinking to transfer it in analog first and then convert it to digital right before microcontroller (or can be converted by the microcontroller also)
Optocoupler: Interface with HV devices to MCU
A commercially available optocoupler is MCT2E.The circuit diagram and implementation idea is explained below. From your question certain parameters are not specifiedOutput voltage from solar panel : ?Output current from the solar panel : ?According to this parameters you can design the value of R1.
One method of accomplishing the task of isolating an analog signal over an optocoupler is by using a voltage-to-frequency converter to convert the analog signal to a frequency. You can then pass the frequency through the opto-coupler and then use a frequency-to-voltage converter to reproduce the original analog signal.
If the data is going to a microcontroller, it's easier to leave it in the form of a frequency rather than converting back to analog. We know the processor will digitize it again anyway.
Of course there would need to be some electronics on the "hot" side of the system, but if the solar panel can't provide enough power to run the circuit, the microcontroller would just say "No input" anyway.
what is output of the optocoupler? If it is just an isolation, in my mind input would be the same as output. Is it true or false?
One of the standard uses for an optocoupler is to digitally couple two circuits that may not be able to be electrically coupled, it is a very good form of isolator. A SSR (Solid State Relay) is another form of optocoupler, it uses the LED on the drive side to turn on a TRIAC, driving high power AC circuits with lower power DC.
Optocoupler is usually a LED operating a transistor via light, so the output is making the transistor on.
Another type is LED-photoreistor, of which the output is change in the resistance of the photoresistor.
If you have the luxury of code space and sufficient processing time, I too would recommend you take the varying frequency from the voltage-to-frequency converter that has passed through the opto-coupler and feed it directly to the microcontroller. The result is the elimination of A-to-D converter and the frequency-to-voltage converter.
Thank you all for your helps. This morning the project leader wants me to transmit the data in digital so now I have to find out another thing.