Wichit Sirichote, kswichit@kmitl.ac.th
Simple project board with In System Programmable Flash based microcontroller, 89S52 and 2-channel 12-bit ADC.
The 89S52 project board was designed for easy microcontroller project development. The board has two channel 12-bit ADC, 4-digit seven segment LED , text LCD connector, four tact switches, and the ISP loader.
![]()
Figure 1: The 89S52 Project Board with ISP loader and thermsitor sensor.
The hardware block diagram is shown in Fig. 2. The MCU is 89S52, 8kB flash microcontroller.
![]()
Figure 2: Block diagram of the 89S52 Project Board.
Hardware Schematic
The complete hardware schematic is shown in Fig 3.
Figure 3: Hardware schematic and BOM.ISP Loader
The ISP loader cable can be built easily using DB25 connector and 6-pin SIP socket. The wire lenght should be less than 50 cm. The hardware is compatible with Asim's ISP software. You can also use this loader for programming the 89S52..
![]()
Figure 4: wiring diagram of the ISP Loader.
Download
Schematic and BOM schematic.pdf C source code thermistor.c Orcad Schematic File N/A Intel-Hex file thermo.hex Simple Power Meter
The project shows how to use an analog AC clamp meter and the 89S52 project board for displaying active power in Watt unit. The 89S52 project board has a 12-bit ADC with 0 to +5VDC input. The AC clamp meter provides output current 100uA per 30A. We can use LM324 opamp to convert input current to voltage. The program computes active power by simply multiplying the RMS voltage to the RMS current. My plan is to hook the circuit to the load center of my house and to provide remote display with RS422.
![]()
Figure 5: Block diagram of a simple power meter.
The current-to-voltage converter using LM324 provides short circuit input for the current source. The 50k resistance gives +5V output for 100uA input. C1 is added to filter 100Hz ripple from AC clamp meter.
![]()
Figure 6: Current-to-voltage converter, 0-100uA to +5VDC.
Test at AC outlet LM324 board at ADC connector AC Clamp meter 725W display LM324 board
Figure 7: Test with a 725W iron (click to enlarge).
Download
C source code power.c Intel-Hex file power.hex
17 April 2007