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.

Level Sensor Circuit

Status
Not open for further replies.

gjscott

New Member
Hi,

I have a circuit that turns a lamp on and off dependent of fuel level.

IMG_2596r.jpg

I removed the caps for better viewing:

IMG_2601r.jpg

Superimposed the back of the board in RED:

Circuit+Board+Top.jpg

My attempt at a layout and details of components:

Circuit+Diagram.jpg

The switch is a reed switch with a float and magnet acting on it, when the switch closes the low fuel lamp on the dash should light up.

The fault is the fuel level low light didn't work, I disassembled the sensor, dug out the board that had been fully potted.

Action taken:

Replaced the 2B transistor with a 2FZ because I pulled the 2B off when cleaning the board. I was assured the 2FZ would be comparable.
Replaced the two electrolytic capacitors which smelled of gasoline.
Replaced the LM393 comparator chip.

Now the low fuel light is always on and will not go off regardless of the fuel level switch state.

The markings came off a couple of the components, hence the ?'s

On another forum a member made a circuit diagram (below) and suggested the following before the thread was closed due to AAC forum rules:

I believe one or both of your capacitors' polarities are reversed. If you measure the trace where you connected to the negative side of your caps with the +12 using an ohm meter, what is the resistance you get?

The 2B transistor is an PNP equivalent to 2n2907 so is 2F(z). But the Base of the transistor should not be connected to the input of the comparator (P3). I redraw your circuit with proteus and I guess it is much easier to understand.


circuit+help+gjscot.PNG

Here is a photograph of the board after I dug it out from the potting and it looks like the electrolytic caps are the same polarity as i connected the replacements and put on my diagram:

IMG_2469r.jpg

I didn't fully understand the statement "If you measure the trace where you connected to the negative side of your caps with the +12 using an ohm meter, what is the resistance you get?" Can anyone tell me where to measure the resistance physically ie one probe on the -ve of the caps, where for the other probe ?

Thanks
 
Last edited:
Measure resistance between 2 points

Can you please measure the resistance between the 2 red arrows ?
Make sure the power is OFF.

Allen
 

Attachments

  • gjscot2.JPG
    gjscot2.JPG
    189 KB · Views: 481
Hi Allen

0 Ohms - which as you say is bizzare as the -ve of the caps is there.

As the Vcc of the LM393 is also connected to the same place that would suggest that that cap are as you say connected in reverse.

After I dug out the circuit that had never been molested, the caps were connected that way that you can see in the last photo above. However the circuit never worked as long as I've had the bike so I guess it could have never worked from the factory.

Graeme
 
Last edited:
Your circuit doesn't make sense

Are you sure the polarity of your battery + and - entering the circuit is correct?

Is P8 of op-amp connect to +ive and P4 connect to -ive? if the op-amp connection is true then the capacitors are connected reversed. Did you trace where the Base of the transistor 2B is connected? From your diagram that connectio is weird. Could you use an ohm meter to trace that as well?

Allen
 
P4 is connected to the +ve and P8 is connected to the -ve through the lamp as you can see in this image:

Clipboard03.jpg

If I had installed the LM393 in reverse and reversed the DC polarity would the circuit work ?

Circuit+Diagram.jpg

This is the original photograph from when I first opened the circuit. The white wire which connects to the 12v (B/Bk wire on the harness side) is still showing connected to the correct side of the circuit.

IMG_2469.JPG

Here's the bike wiring diagram with the relevant wires highlighted.

FUEL+LEVEL+WIRING+DIAGRAM.jpg
 
Last edited:
In your diagram, there is a diode connected in series with +12v and the lamp. That can't be right.
 
There are several problems with the circuit in your diagram:
The Vee connection of the IC is in series with the lamp, so the IC supply reduces dramatically if the lamp tries to light.
When the transistor conducts it shorts out the IC supply.
The polarity of the two caps is wrong (as pointed out above).
Pin 3 of the IC has a pull-down resistor but nothing to pull it up.
D1 does nothing useful.
 
This circuit came off a 2001 Ducati Monster motorcycle which probably means it's a crappy design to start with. But presumably it did work form the factory, so unless one of you kind gentlemen is willing to design something to replace it, I'm stuck with trying to repair it.
A replacement is over $250 and apparently still unreliable.
 
I replaced the LM393, does the circuit make more sense if I installed it in reverse and changed the supply polarity ?

Reversed.jpg
 
Last edited:
The base of the transistor is going to P3 like my diagram.

How about if I'd installed the LM393 the wrong way and had somehow reversed the supply polarity (diagram below), does it make sense then ?

Reversed.jpg
 
Last edited:
From looking at your photo where the board is freshly removed from the potting compound, it looks as if the caps are the same way round as your replacements, suggesting that the supply is reversed. The circuit makes a lot more sense in your "reversed" diagram.

You can see one half of the lm393 senses inputs from the switch as the bike bounces along the road (well, in Britain it would bounce anyway because our roads are knackered), C2 builds up a charge as fuel sloshes about in the tank until it's high enough to flip the state of the second half of the lm393, which turns on the transistor and drives the lamp on. This means you get a steadily on lamp instead of it flashing when the fuel is getting near the low point. C1 presumably provides a supply to the op-amp and the base of the transistor whilst the lamp is stealing away the supply voltage - when it drops too low to run the op-amp (<2v) it will re-charge far too quick for you to notice so the lamp appears to be continuously on.

D1 should have protected the circuit from Bad Things Happening whilst you tested it in the reversed state, by conducting the supply straight to the lamp, which was why it stayed on.

Clever little design, that.

It's a shame you don't have a better photo of the board from before you started pulling components, from which it would be possible to deduce the original orientation of the chip, but I think I can see where you might have gone wrong. There is a circular mark visible on the chip - I am guessing that you saw this as the pin 1 designator? It could be just be a moulding mark with no intended meaning. Pesky things they are, confusing.

Have you still got the old chip so we can have a look at a photo of it? This may clear up the confusion.

I think there's an object lesson for us all here - never go blindly replacing components when something doesn't work!
 
How about if I'd installed the LM393 the wrong way and had somehow reversed the supply polarity (diagram below), does it make sense then ?
No, it still wouldn't make sense.
What is the circuit supposed to do when fuel is low? Flash the lamp or light it continuously?
Is the lamp a filament type or a LED?
What is the lamp rating?
 
Last edited:
alec_t - it's highly unlikely the bike would have anything other than filament bulbs for it's indicators. If an LED was involved there would be a limiting resistor. It wouldn't be designed to flash because this could distract the driver. Wouldn't like to speculate on the lamp rating, but for dashboard I would think it would be similar to a torch bulb.

It does make sense in the version with the chip turned round and the wires swapped, really :)

Circuits designed for automotive use can look strange because they do things in ways that only make sense in a vehicle, where there are a lot of mechanical considerations. For example, I was completely bamboozled by the door switches on my 1978 Fiat (sadly no more), until I studied the schematic for the car - and that was just switches!
 
alec_t - it's highly unlikely the bike would have anything other than filament bulbs for it's indicators.
That's what I assumed, but wanted to check.
It does make sense in the version with the chip turned round and the wires swapped, really
I'll go along with that, but LTSpice doesn't agree :).
Circuits designed for automotive use can look strange
They look strange in all the car schematics I've seen :D
 
I do have the old IC and the dimple for pin 1 was in the top right corner as my photo is oriented. My electronics trouble shooting skills are limited but I've been building boards since I was a little kid for my father who was as electronics engineer so am well aware of how to connect components and IC's, that's why it's bizarre to me that the polarity and IC may be reversed.
However, this sensor has never worked since I've had the bike since 2011 and I can't confirm if it ever worked. And having owned several Lancias in my life I know how bad Italian automotive electrical systems can be, maybe the circuit was built wrong in the factory and it never worked.

So, shall I reverse the LM393 and the supply polarity and give that a go ?
 
Last edited:
No, it still wouldn't make sense.
What is the circuit supposed to do when fuel is low? Flash the lamp or light it continuously?
Is the lamp a filament type or a LED?
What is the lamp rating?

Hi Alec,

When the fuel is low, the magnetic float goes down and reed switch closes, this turns on a filament lamp at the dash. It's a standard automotive dash lamp, 12v probably about 2w. This circuit is to 'latch' the lamp to stop the lamp flashing when the fuel is sloshing about.

You can see the wiring schematic below with the relevant wires highlighted:

FUEL+LEVEL+WIRING+DIAGRAM.jpg
 
Right. Here's what I think the circuit was intended to be:
FuelLowWarning.gif
In my view a much simpler circuit (not much more than 1xR, 1xC, 1x MOSFET) would have done the same job more cheaply :)

Edit:
Here's the cheapo version
FuelLowWarning2.gif
 
Last edited:
Right. Here's what I think the circuit was intended to be:
View attachment 72121
In my view a much simpler circuit (not much more than 1xR, 1xC, 1x MOSFET) would have done the same job more cheaply :)

Edit:
Here's the cheapo version
View attachment 72123

I've met many engineers who would never pick a simple solution when an absurdly complicated and expensive solution was available.

Let me see if I can use your 'intended' circuit diagram to fix my circuit board.

Thanks
 
Alec, is the 'intended' circuit how you think my circuit board should be ?

If yes, can you please summarise what I need to do to make my circuit like that ?

I'm a mechanical engineer and a little slow when it comes to electronics. :confused:
 
I've met many engineers who would never pick a simple solution when an absurdly complicated and expensive solution was available.
That's how they justify their fees and how auto manufacturers justify the rip-off prices for vehicle spares/parts :)
Alec, is the 'intended' circuit how you think my circuit board should be ?
Well, it's one possible way of using the component values from your circuit. I wouldn't say it's definitely what the original designer would have done.
The changes from your drawing essentially are (I think):
1) swap the + and - power lines,
2) rotate the IC through 180°,
3) check the transistor pin-out and re-orient as needed,
4) 2k2 goes between transistor base and comparator output.
5) connect lamp between transistor collector and ground,
6) supply - = circuit ground.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top