Your EasyEDA usage duration is brief. In order to avoid advertising information, this action is not supported at present. Please extend your EasyEDA usage duration and try again.
Editor Version×
recommended
Pro Edition
Brand new interactions and interfaces
Smooth support for design sizes of over 3W
devices or 10W pads
More rigorous design constraints, more
standardized processes
For enterprises, more professional users
Std Edition
Easy to use and quick to get started
The process supports design scales of 300
devices or 1000 pads
Supports simple circuit simulation
For students, teachers, creators
Ongoing
STD
Electricity monitor control module
Electricity monitor control module
Project tags
License
License:
Mode:
Mode
Editors' pick
Editors' pick
2.1k
0
0
2
Update time:
2021-04-10 18:34:41
Creation time:
2015-11-20 11:39:59
Description
Description
## Electricity monitor control module ##
16 commercial power monitoring module, input use optocoupler PC817 isolation and prevent city electrical interference into the acquisition system, 220V direct access, do not need to buck and saves the cost of the circuit. The use of two 74HC245 circuit work cycle, by a pin to control the 74HC245 chip microcontroller, control. MAX813 to achieve the watchdog control, to prevent the external environment to interfere with the microcontroller, microcontroller timing to the MAX813 pulse, in the microcontroller does not work or the emergence of the death cycle, MAX813 generates a reset signal, microcontroller reset. Collected data through the serial port, the use of the 485 communication mode.
![enter image description here][1]
![enter image description here][2]
## AT89S52 low power microcontroller ##
AT89S52 is a low power, high performance CMOS 8 bit microcontroller, with 8K system programmable Flash memory. High density nonvolatile memory technology is manufactured using Atmel's high density, fully compatible with industrial 80C51 product instructions and pins. The on-chip Flash allows the program memory to be reprogrammed in system, also suitable for conventional programming. On one chip, 8 bit CPU and Flash are available in the system, which makes the AT89S52 widely used in many embedded control applications.
AT89S52 has the function of the following criteria: 8K bytes of flash, 256 bytes of ram, 32 I / O lines, watchdog timer, two data pointers, three 16 bit timer / counter, a six vector two-level interrupt structure, a full duplex serial port, on-chip crystal oscillator, and a clock circuit. In addition, the AT89S52 can be reduced to 0Hz static logic operation, supports 2 software selectable power saving modes. In idle mode, the CPU stops working, allowing the RAM, timer / timer, serial port and interrupt to continue to work. Power down protection mode, the RAM content is saved, the oscillator is frozen, the microcontroller all work to stop, until the next interrupt or hardware reset.
![enter image description here][3]
Serial communication parameter interface type RS-485
The baud rate is 9600
Data bit 8
Parity check None
Stop bit 1
Flow control None
Communication protocol RTU Modbus
Serial port protection ESD 1.5KV
Serial lightning protection 600W
Over current, over voltage is less than 240V, less than 80mA
Power supply parameters 9-24VDC (recommended 12VDC)
Current 12VDC 100mA
Surge protection 1.5kW
Power over voltage, over current 500mA, 60V
Power consumption is less than 2W
**program**
#include
sbit CSCTL0 = P2^5;
sbit CSCTL1 = P2^4;
sbit CSCTL2 = P2^3;
sbit CTL485 = P2^6;
sbit WTCHDOG = P2^7;
sbit LED = P1^2;
#define send 1
#define recieve 0
unsigned char digitaldata0 = 0;
unsigned char digitaldata1 = 0;
unsigned char digitaldata = 0;
/*void delay100(unsigned int time);
void delay1000(unsigned int time);
void serialcomm_init( void );
void time0_initial ();
void send_char_com( unsigned char ch);*/
[1]: https://easyeda.com/normal/doc-iuoiAS93J.png
[2]: https://easyeda.com/normal/doc-Dd7DVd7pG.png
[3]: /editor/20151121/565069ab867a4.jpg
Forked project will be set private in personal workspace. Do you continue?
Clone
Project
The Pro editor is about to be opened to save as. Do you want to continue?
private message
Send message to winter2015
Delete
Comment
Are you sure to delete the comment?
Report
Electricity monitor control module
No Profile
Announcer: winter2015
Creation time: 2015-11-20 11:39:59
Published time:
2021-04-10 18:34:41
*
Report type:
Please select report type
*
Report reason:
Please fill in the reason for your report and the content is 2-1000
words
*
Upload image:
+
Upload image
*
Email address:
Please fill in your email address
Report
*
Report type:
Please select report type
*
Report reason:
Please fill in the reason for your report and the content is 2-1000
words
*
Upload image:
+
Upload image
*
Email address:
Please fill in your email address
Report
Submitted successfully! The review result can be viewed in the personal
center, review notification.
Kind tips
Your EasyEDA usage duration is brief. In order to avoid advertising information, this action is
not supported at present. Please extend your EasyEDA usage duration and try again.
Share
Project
Copy
Copy
Scan the QR code and open it on the mobile terminal