Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Motorcycle Charging Light using LM393 Comparator

Status
Not open for further replies.

Ben1974

New Member
Hi All,

I'm new to the forum and would be very grateful for some help and advice with a project I'm working on. It is to provide a charging indicator light on my classic motorbike. The idea is the light will come on when the alternator is not charging the battery and extinguish once it is producing sufficient voltage to provide a positive current flow and charge the battery.

The attached diagram shows the circuit I have built so far.

**broken link removed**

There is a 0.01 Ohm shunt resistor on the output from the alternator (regulated and rectified) which measures the current flowing into the system (all loads including the battery)

The 2k resistors are precision items to give a close tolerance input to the LM393 comparator. The current flow from alternator will vary between zero and +ve 25 amps but will never go negative due to the diodes in the rectifier.

It works but I have the the following problems that I am hoping someone can give me some help with:

1: I need to "offset" the inputs in someway so that under zero current flow conditions the + input to the comparator is biased high by say 5mV so that the charge light is ON. When current flows the voltage drop across the shunt should pull this low and extinguish the light.

2: I did manage to introduce some offset by selecting resistors for the potential divider on the input. However there seems to be some sort of latching going on so even it doesn't reliably come back on even when the current drops to zero.

3: Is some sort of feedback from the output desirable to improve the circuit. Perhaps when it is on feedback could be used to further bias the + input higher so it is only once a significant output from the alternator overcomes this (say 5 amps) and pulls the output of the comparator low to remove the feedback.

4: Protection!! I managed to blow one of the LM393 comparators by running without the battery connected. It seems that the alternator may produce voltage spikes if not damped by the load of a battery. This shouldn't happen in practice but the battery is protected by a fuse on the bike and if the fuse blows........ changing a fuse is one thing but changing a IC on a 1950s machine in a layby may raise a few eyebrows!

Any help very gratefully recieved!

Ben
 
Hi Ben,

This thread, over at the other site, just had a discussion of a similar circuit. Basically how to light a LED when Voltage is above a trip point, and/or how to light a LED when a voltage goes below a trip point. Look it over. I think it can be adapted to what you need to do.

I use a similar approach as an "alternator off-line" alarm in an aircraft, where you would like a warning that your battery is discharging long before you run out of juice...
 
Hi Mike,

Thanks for the reply and I've had a interesting time reading through the thread and also some other fascinating stuff about the operation of the TL431 and it's history.

I'll let the information settle down a little but I can't see at the moment how I could use this to improve my application. I did try an early circuit monitoring battery voltage but it doesn't really work in my application; The main reason is that I am trying to replicate the operation of charging light on this particular bike that was previously operated by a mechanical regulator and dynamo. In this case a set of contacts in the regulator only close to connect the dynamo to the system when the output voltage exceeds a threshold. The charging light was simply connected across the contacts so that when the output of the dynamo was too low and the contacts where open the PD would illuminate the light. When the contacts close this PD disappears and the light goes out.

What I'm trying to implement is a measurement of current flow rather then monitoring a threshold voltage. I suppose what I need is a precision(ish) ammeter but without the digital readout! Just a simply light to indicate if the current flow is above a threshold.

My starting point for the circuit was to look at circuits for current shunt monitors and implement using a comparator but it seems there are some subtleties I'm struggling with.

Kind Regards

Ben
 
You may be better off using a small micro and measure the voltage drop across your resistor with onboard A2D. You can program in sufficient hysterisis and a behaviour more akin to what you originally had on the bike :)
 
I am puzzled by what you are comparing to what? I dont see that you need to determine current direction.

If, in an automotive charging system, the 6-cell lead-acid battery terminal voltage is below ~12.8V, then the battery is not being charged; it is just that simple. This could be because the electrical load is too high for a given RPM (idling at a traffic light), or because the charging system has failed.

The "not-charging" idiot lamp (as I call it) that was used with mechanical generator and alternator regulators is still basically comes down to light the lamp if the voltage at the battery is less than X. The only difference with doing it with the lamp vs using a voltage reference and a comparator driving a LED is the sharpness of the knee where the visual indication begins.

There is no difference in operation between a circuit using discrete parts: (Zener + LM393) or using the TL431, except parts count.

If you want a softer knee to make it more like the OEM lamp, then we can devise a circuit that uses a lamp, transistor and a Zener instead of a LED driven by a comparator with a Zener Reference.

Measuring the current in/out of the battery using a shunt is not required unless you want to put a zero-center ammeter in the circuit like my airplanes have...
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top