Showing posts with label uC-Timer-Clocks. Show all posts
Showing posts with label uC-Timer-Clocks. Show all posts

Sunday, February 05, 2017

Isolated RS232 interface to Microcontroller

I've seen on the net the schematics for RS232 with Opto-Isolation. The supply on the PC side is from the PC. The supply from the line side is external? I've seen the 3 connectors (RX, TX & GND) together with 2 connectors 5V. One of them is connected to the device. How about the other? Needs additional power source?

Could you send me the PCB and component layout, as well as the component list, I'm afraid to get mistaken

mail from CS

The the circuit you are referring to is... RS232 with Opto-Isolation
The Blue line indicates the Optical Isolation, no wires or cooper should cross this line. Yes the PC Powers the left side, The supply to the right side is the Microcontroller supply. The Microcontroller will have a +5 and GND use this for the right side of opto. I have no PCB for this. You can make your own PCB using eagle cad. I made this circuit as i could not risk my PC and had no other components. I had to make a high voltage measurement with the PC, so this caution.
Also use the Max232 if you do no need 1KV Optical Isolation.

Here is a interface from RE Smith Inc, the one below is not isolated. They have Isolated versions too.

The RS422S is a fast Async bi-directional RS232 to RS422 interface converter that will operate at data rates up to 115.2Kbps. The unit has jumpers termination, RS232 DTE/DCE selection and, TTL/CMOS operation. The unit has two RJ11/12 connectors an a pin header for power, common TTL/CMOS TX data and RX data.

Discover Circuits - Opto-Isolator Coupler Circuits
RS232 to RS232 Port Powered Optical Isolator: Brochure with schematic in PDF format / (added 7/02). RS232C Circuit has Galvanic Isolation:


Tuesday, October 11, 2016

Isolated RS-232 Serial Port Interface to SBC

Subject: Help! - Date: Thursday, December 16, 2010, 4:40 PM
Hello delabs
I have question about one your project . The question is about the project RS232 with Opto-Isolation on I need this very much . Do i need to use max 232 or something else on uC side , or i connect directly on uc rxd/txd pins .I need this answer so much , im new in this . please help

Best Regards
Mail from SS (CC) - Russia

This was done when MAX232 was not invented yet. This interfaces with PC well. If you want to make a PC based datalogger with 80C31, then this gives a safe PC to 80C51 SBC Serial Link.

Suppose a Temperature sensor or a Heater Open up. If the High Voltage reaches the A/D and SBC. The PC will be next Victim.

The Affordability and Product Safety Aspects, Including Fire Hazards; made me use this, as any other solution would make product expensive. An Opto-coupler and well designed PCB can give more than 2 KV isolation.

The MAX232 does not have isolation, but look here Isolated RS-232 Transceivers. The MAX232 also generates a Higher Voltage level, like 10V for proper RS232.


The MAX3250 is a 3.0V to 5.5V powered, ±50V isolated EIA/TIA-232 and V.28/V.24 communications interface with high data-rate capabilities.

The circuit i have made is very old and you can interface any serial uC with PC. No other chip is needed. It is cumbersome to build it and get it working for many. I suggest use one of these chips from Maxim unless you want to Adventure like me.


Friday, May 15, 2015

uC Board is Misbehaving on Brown Out

I'm working on a project which involves battery  Ni-Mh 4x1.2v, 2100mAh], which power-ups the boards. The current consumption is about 150mA. Now what I wish to do is disconect the load when my battery voltage falls down to 4v or so

Because now when my battery reaches this voltage the instrument misbehaves & fails to work, sometimes my program gets corrupted. And battery reaches a critical voltage level like 1-1.2(summation of all 4 batt). what else can I do so prevent this?

Mail from MO

Depending on your budget you can solve this, a watchdog and power management chip from maxim may work for these types of problems.

You can even build your own watchdog and power management with logic and comparators.

When the uP malfunctions it has to be reset by a watchdog timer which monitors if the uP or uC is pulsing in the way expected.

Battery Backup for SRAM or Microcontroller

And when the power goes down slowly like a Brown out, you have to save all RAM on a Flash chip and shutdown system and wait. Or have another backup for RAM and use a low power RAM. Make sure that you write a start sequence and shutdown code in your program.

When you start start with a clear ram ( if not batt backed up) then load values from flash. Make sure power up, power down resets are ok.

Digital to Analog Converter with uC Watchdog

Internal comparators implement undervoltage/overvoltage warnings and windowed-reset functions.

Supervisory Circuits Keep Your Microprocessor Under Control

Supervisory Circuits Keep Your Microprocessor Under Control


"Understand the value of a ┬ÁP supervisor to ensure proper system operation during power-up, power-down, and brownout situations (undervoltage monitoring). In addition, provides information about overvoltage and windowed monitoring. Describes additional features such as manual reset, watchdog timer, battery backup, and chip enable gating. Discusses the need for multi-voltage monitoring."

In an industrial environment your card it may malfunction due to EMI RFI. If your Board controls a huge Motor, when motor starts your Board could hang or Boot. You have to study and work out a solution.

The circuit or code is not everything, it is the Engineering that matters.


Monday, February 04, 2008

8254 Programmable Interval Timer Counter

I am doing final year, i am doing project on 8254 controller. please can u give me information about it.
thanks in advance.

from SA