Opto-isolator

 By Chau To

Optoisolator is a component that transfers the signal between 2 isolated circuits. It consists of an LED and a phototransistor as shown in (Figure 1). When a signal is applied at anode (cathode is usually connected to ground), the LED will emit light that shines on the base of the phototransistor turning the transistor on. The optoisolator is used to isolate two parts of a circuit that has different power consumption such as between a micro controller and the DC motor.

Why Optoisolator?

Since the hexapod drives servos directly from the digital pins of the Arduino board, the Optoisolator will provide protection for the board by isolating the servo and Arduino. Since the servo consumes a large amount of current than the board, a power surge could happen and as a result the current from the servo could damage the Arduino. In addition, servo is a very noisy component; the noise could leak to the sensitive microprocessor.

How to connect?

figure 2

As demonstrated from the figure, the output from the PWM digital I/O pins of the Arduino connects the anode than the cathode is connected to ground. The Servo has 3 pins (or 3 wires). The Vdd wire connects to collector of the phototransistor; the other 2 wires connect like figure 2.

Operation: When the PWM is high, the LED lights up; the transistor will switch on. The servo control pin is high, and the servo shaft will rotate.

How to choose an optoisolator?

There are many types of optoisolator in the market. The two important parameters while choosing an optoisolator are the diode forward current and the switching time. The maximum forward current can be found in the data sheet; for the Ardunio the maximum rating forward current should be around 50 to 80mA. The switching time of the optoisolator determines how fast the phototransistor turn on, or what the delay is when the signal passes through the isolator. Nowadays, optoisolator has very fast switching time in micro-seconds.

The hexapod team will use a PS2501-4 Optoisolator 4-channel (4 Optoisolator in 1 IC) to operate the robot.

 Datasheet can be found at: https://www.sparkfun.com/products/784.

figure 3