delabs Circuits

Saturday, February 11, 2017

Battery Management and Supply Design

As you have have pointed out, my circuit is not driving any motor or such loads...but it is driving a Wireless Module which draws about 165mA to 240mA from my circuit during transmission [for 4 sec] and normally it takes upto 114mA. After a time-out of 1min, I put my uC P89V51RD2 to powerdown mode [200uA in this state].

Read articles in the link you provided, thanks for that! - Continued from uC Board is Misbehaving on Brown Out.

My other problem is that my batteries get supercharged upto 5.8V, and as per spec's of most IC' they are bound to operate faithfully upto 5.25[max 5.5v], so how do I solve this issue? I want that my boards get only 5.25v even if my battery is having voltages 5.25+, without increasing my existing current consumption to noticeable value.

Moreover I'm in need of a cutt-off circuit which will take away the load from my batteries when my battery has reached 4.00V, & the charger charges my battery independently. Do you have any thing which will suite my purpose?

Mail from MO

Have two supplies, the one for uC can be a small Ni-Cad battery charged by a diode by the bigger battery which supplies the 200mA for RF drivers.

So when the big battery is loaded and the supply dips the shock is not felt by uC. or isolate it by SMPS and isolate the grounds. The ground return current of RF module 200mA must be lifting the ground of uC or some Logic.

Start by trying to locate the problem, first power RF and uC boards with isolated lines from two lab-test 10A power supplies. If both are in same board, cut tracks and power them separately. The grounds should meet at point the two sections interface.

If that works without problem, you know it is related to supply, now step-by-step go back to the battery and charger you have built keeping isolation intact. Look for spikes-glitches on power lines of uF when RF module active. Check if that is close to or leaking RF to uC circuits.

The battery charger circuit should limit voltage and current to battery specs. If you are not using a charger chip then while testing make sure the charger has a regulator or use LM317 to clamp voltage to 5.6 or 5.5 as per your design.

There are charger chips from maxim, national for battery charge management. If you have a need for extra voltage the you have to use SMPS boost switcher. which may take the low battery 4 to 8 which can be regulated to 5 using 7805.

This may be getting bit complex, first try to find what is the problem, it may be just the board design.

Battery Management and Supply Design

You can also use a Single Maxim Chip for all these functions. ...

Supervisor ICs Monitor Battery-Powered Equipment

A feature-laden µP supervisor (IC1), with the help of the µP itself, performs a variety of functions in this typical application circuit. You can get these functions all together or in various combinations, by selecting one of the many available microprocessor (µP) supervisor IC....

delabs


Wednesday, February 08, 2017

RS Latch Erroneously setting by Itself

I am having trouble preventing my rs latch from erroneously setting. The circuit is a voltage threshold detection circuit with a nand gate whose output is tied to a SR latch.

I have capacitors across the VDC and ground for the chips and I verified the power supply's input is fairly stable. As further troubleshooting I probed with a oscilloscope at the SR latch's input and looked for anything above 1 V. The voltage never moved above 1V, but the latch still set.

I was able to place a .3 uF capacitor from the SR latch's input to ground and this seemed to fix the problem. However, it does not explain what is causing the latch to set. Any ideas or suggestions would be much appreciated. Thanks.

Some info:
Nand gate: SN74LS30
SR Latch: CD4043B
Supply to ic's is 5V from a LM7805 (with .1uF cap's across input/output)
Voltage threshold detection coming from LM339 comparator

Basic idea:
Vin ----------> |LM339 pin 4| -> |nand gate| -> |SR latch| -> |(relay driver circuit)|
Vthreshold -> |LM339 pin 5|

Mail from SM

If the power supply is stable and you do not have ground loops then that is not the problem.

If a relay or LED or some output is being driven, the current pulse may be triggering the circuit. Isolate Grounds of Loads even LEDs and Relays, Ensure EMI-RFI immunity.

RS Latch Erroneously setting by Itself

Flip-flop (electronics)

Use a 400MHz Scope and set timebase to uS-nS and see if a Spike is causing the trigger. Set the brightness level a bit high and look as close as you can.

Even a IC consuming a little extra power for a mS can set up a spike in the rail. Keep power and signal circuits on different PCBs when designing.

Check the environment and mains wiring, It could be a Laser Printer sharing the mains. If a Loose contact is present in mains box then your test circuit links with printer. Finally a good earth or ground is a must, if the unit is to operate on mains.

In the LM339 comparator use a Hysteresis Resistor feedback of 10M or 1M, Also a small cap can be placed across 10M, like 10nF if the system is a slow response one. Ensure you do not put a cap in a way to cause oscillations. A RC at input of LM339 may help.

Finally a LM339 output may have to go thru a schmitt nand buffer like 4093. to Clean the signal. Interface from a LM339 may be good with CMOS and not TTL, so a Scmitt can be tried. Nand gate: SN74LS30 and SR Latch: CD4043B seem to be different families. Use the 74HCT30 and 74HCT4043, use any one single family in Logic.

delabs

One thing i left out, The power on Start of the circuits must be defined. So a power on Set or Reset Cap with a pullup has to be provided if it is triggered by a Low. If you use a Latch which triggers by a Positive Edge then A pull down R and a Pull up Cap is required. - delabs

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:

delabs