蓝猫淘气

Control NE555 to generate square wave through PC817 optocoupler

 
Overview

As we all know, NE555 is a timing IC that is often used to generate different duty cycles and frequencies. Some time ago, due to design needs, a microcontroller was used to control NE555 so that it could regularly output pulses with a duty cycle of 50%, 5Vpp, and 1KHz. frequency, so after consulting a large amount of information and simulation, we designed an optocoupler chip that can be controlled by the high and low output of the microcontroller IO port, thereby realizing the function of NE555 timing pulse generation.

The circuit simulation diagram is as follows. Among them, the switch can simulate the high and low signals (HIGH or LOW) given by the IO port of the microcontroller. When the switch is turned off (that is, when the IO port gives high level), the NE555 output port is high level; when the switch When closed (that is, when the IO port is given a low level), the NE555 output port is a square wave pulse with a duty cycle of 50% and a frequency of 1KHz, as follows (the lower part of the picture is an oscilloscope waveform, you can check its duty cycle and frequency) :

Now the PCB has been received and tested after power-on. When the IO port is given a low level, its output waveform is as follows:

 

 

It can be seen that the waveform display is good, but there is still a deviation between the frequency and the simulation result, mainly due to the deviation between the resistance value and the capacitance value. Weld the 10nF capacitor and test it with a multimeter. The capacitance value is about 13nF, and the resistance is about 1 % deviation, thus causing inconsistency with the simulation results. You can make slight changes when using the circuit.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 13:31:25
  • A newbie needs help with a question.
  • Beginner's Guide to PIC Microcontrollers
  • gogogo
  • Use GD32 to make a music spectrum to practice
  • Job seeking: Does anyone need a senior WINCE engineer? Only in Shenzhen area!
  • Testing of accelerometer and gyroscope

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号