In this DIY electronics project, we will use the PS21867-AP, an opto-isolator, to design a simple light-dimming system. The PS21867-AP is an important component for isolating sensitive electronic circuits from higher voltages, making it ideal for controlling AC loads such as lamps, motors, or other household devices. In this project, we’ll use the opto-isolator to control the brightness of a light bulb, adjusting it based on the input from a simple dimmer switch.
The project will give you insight into how opto-isolators function, and it will also show how to use them safely in AC circuits while providing you with a functional dimming system.
Materials Needed:
● PS21867-AP opto-isolator
● Triac (e.g., BTA16-600V)
● Resistors (for current limiting)
● AC Light Bulb (60W or lower)
● AC Power Source (110V or 220V depending on your region)
● Dimmer Potentiometer (10kΩ)
● Heat Sink (for Triac)
● Breadboard (for prototyping)
● Optocoupler-compatible PCB (optional for more permanent setups)
● AC Socket
● Jumper Wires
● Multimeter (for testing and debugging)
● Screwdriver (for assembly)
Step 1: Understanding the PS21867-AP
The PS21867-AP is an opto-isolator with a phototransistor output. Opto-isolators (also known as optocouplers) are commonly used in circuits to transmit electrical signals between different sections of a system while keeping them electrically isolated. This isolation helps protect sensitive circuits from high voltages or electrical noise that may come from AC mains or other powerful sources.
The PS21867-AP has an LED inside that, when energized, emits light to activate a phototransistor. When the LED side of the PS21867-AP is powered, the phototransistor on the other side turns on, allowing current to flow between two external terminals. This simple opto-isolator action makes it ideal for use in applications like controlling high-voltage AC loads from a low-voltage, low-current circuit, like a microcontroller or a simple dimmer circuit.
Step 2: Basic Components of the Light-Dimming System
For our light-dimming project, we need the following components:
● The Triac (BTA16-600V): The Triac is used to control the AC power to the light bulb. It acts like a switch that turns the bulb on or off, depending on the signal it receives from the PS21867-AP.
● Dimmer Potentiometer: This allows you to manually adjust the brightness of the light by controlling the signal that will trigger the Triac through the PS21867-AP opto-isolator.
● PS21867-AP: This opto-isolator will control the gate of the Triac. By adjusting the signal from the dimmer potentiometer, the opto-isolator will either allow or block current from reaching the Triac, effectively dimming the light bulb.
● AC Light Bulb: The light will be dimmed depending on the signal sent through the Triac.
● Resistors: Used for current limiting to ensure safe operation of the components.
● Heat Sink: The Triac may get hot, especially when used to control higher-wattage loads, so a heat sink will help dissipate the heat and prevent damage to the component.
Step 3: Wiring the Circuit
1. Connect the Dimmer Potentiometer
Start by connecting the dimmer potentiometer to the low-voltage side of the circuit. This will allow you to control the brightness of the light by varying the resistance. The potentiometer should have three terminals:
● One end terminal goes to a positive DC voltage (such as 5V from your power supply).
● The other end terminal goes to ground (GND).
● The middle terminal (the wiper) will provide a variable voltage depending on the resistance set by turning the potentiometer.
2. Connect the PS21867-AP
The PS21867-AP has a typical 4-pin configuration. The LED side of the opto-isolator is powered by the potentiometer's wiper output, and the phototransistor side controls the Triac.
● Pin 1 (Anode of LED) is connected to the variable voltage output from the potentiometer.
● Pin 2 (Cathode of LED) is connected to ground through a current-limiting resistor.
● Pin 3 (Collector of Phototransistor) connects to the gate of the Triac (the control terminal).
● Pin 4 (Emitter of Phototransistor) connects to ground.
3. Connect the Triac
The Triac will act as the switch for the AC circuit. Connect the MT2 terminal of the Triac to one of the terminals of the light bulb. The other terminal of the light bulb should be connected to the AC live wire.
● The MT1 terminal of the Triac connects to the neutral AC line.
● The gate (G) of the Triac is controlled by the PS21867-AP opto-isolator.
4. AC Mains Connections
Finally, connect the AC live wire to the light bulb and the neutral AC wire to the Triac as described. Make sure you use an insulated enclosure to handle AC connections safely. Do not attempt to handle or wire any AC components without proper knowledge and safety precautions.
5. Current Limiting Resistors
Place resistors in the appropriate places to limit the current going through both the LED in the PS21867-AP and the Triac gate. This will protect the components from excessive current that could damage them.
Step 4: How the Dimming System Works
Once everything is wired up, the system should work as follows:
● When you turn the potentiometer, it adjusts the input voltage to the PS21867-AP's LED side.
● As the LED is powered, it activates the phototransistor side of the PS21867-AP, which triggers the gate of the Triac.
● The Triac, depending on the strength of the signal from the opto-isolator, will either conduct or block current to the light bulb.
● The greater the voltage from the potentiometer, the more likely the Triac is to conduct, which results in the light being brighter. Lower voltages will cause the Triac to remain off for a greater portion of the AC cycle, dimming the light.
Step 5: Testing the Circuit
Once the wiring is complete, it’s time to test the circuit. Here’s how you can proceed:
● Check all connections: Before applying AC power, double-check all connections to ensure that everything is securely wired.
● Set the potentiometer to the lowest setting: Turn the potentiometer to its minimum resistance, which should dim the light.
● Apply power: Plug the circuit into the AC power source. Slowly turn the potentiometer to observe the change in light intensity. The light should gradually increase or decrease in brightness as you adjust the potentiometer.
If the light is not dimming correctly, recheck the connections, especially the wiring to the Triac gate and the PS21867-AP. Also, ensure that the Triac you’re using is rated for the power requirements of the light bulb.
Step 6: Safety Considerations
Working with AC power can be hazardous if proper precautions aren’t taken. Here are a few safety tips:
● Always work with the power turned off when making or adjusting connections.
● Use insulated wires and tools when working with AC components.
● Make sure your components (especially the Triac) are rated for the AC voltage and current that you are switching.
● If you are unfamiliar with AC circuits, it’s best to seek assistance from someone experienced or to use a pre-made dimmer module for educational purposes.
Conclusion
This DIY project using the PS21867-AP opto-isolator provides a simple, effective way to create a light-dimming system. By using an opto-isolator to control a Triac, you can safely regulate the power to an AC light bulb, adjusting its brightness without directly interfacing with high-voltage components.
The project demonstrates the key concepts of isolation, control, and dimming in AC circuits while offering a practical application. Once you’ve successfully built this system, you can expand it to include more complex features such as remote control, automated lighting systems, or even integrate it into a smart home setup. Whether for a hobby project or for practical home automation, understanding how to safely control high-power devices is a valuable skill in electronics.
Comments
participate in discussions
Please login ? to participate in the comments
New customer Start here.