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.

Race timer sensor help

Status
Not open for further replies.
Hi, can someone help me solve this puzzle? I'm using this very popular LM741 light/dark sensor but can't seem to make it work as it should be. The relay is always HI (on) regardless of the setting of the sensitivity. The only difference from the actual diagram is that I can't find 2N2222 here, so I'm using KSP2222A. Here's the design:


**broken link removed**

I also tried another design:

**broken link removed**

The LED shows that it works perfectly, the response is amazing and the sensitivity does work too. But replacing the LEDS with a relay, it has the same issue with the first design. I noticed that there is a minimum voltage on the LM741 output (pin 6), which could trigger a relay but not a LED.

Please help. I am also open to other designs as long as it drives an LDR, has a sensitivity POT and could drive a relay.

Thank you all!

P.S. ericgibbs maybe you could help me again my friend. Thanks.
 
Thanks for the reply spec . But if the 741 is not really suitable for that, then why is that design very popular? Anyway, is the LM358 a direct drop-in replacement? I could get one by traveling to another city but I would like to know if its an exact replacement.
 
Thanks for the reply

No sweat BBM, but let me apologize for such a short and unsubstantiated response to your opening post: I did it in a rush because of pending domestic duties.:)
Here is a fuller response:

is the LM358 a direct drop-in replacement [for the 741]?
The answer is no physically but yes functionally. The 741 and 358 are both available in an 8 pin plastic, dual-in-line (DIL) package. The 741 package only contains a single 741 operational amplifier (opamp) but the LM358 package contains two identical opamps (but different to the 741 opamps). So you would need to rewire the circuit to use one of the opamps in the 358 (see the data sheets below for pin functions). Almost without exception, you can use one of the LM358 opamps to replace a 741 in any circuit.

if the 741 is not really suitable for that, then why is that design very popular?
A good question. Firstly let me say that the circuit that you posted should work or could be made to work with a 741: I haven't analyzed it in detail.
Why is the 741 seen in circuits like that? There are many reasons but non have any technical merit.

When National Semiconductor introduced the µA741 in 1968 it caused a revolution in the analog (linear) design world: the first opamp with a good performance and easy to use. It it the best selling opamp of all time. But the 741 is only really happy with +- 15V supply lines and its input and output voltage ranges are limited, as is its output current. Also, the 741 is not happy in non linear applications, as in your circuit. It is for these reasons that the LM358 (dual opamp) and LM34 (quad opamp) were introduced.

Quite simply put, the 741, although an old friend, is now history. On the other hand, all hobbyists (and professionals) should always have a handful of LM358s and/or LM324s in their spares box. Although not 'perfect' by any means, the LM358/LM324 opamps are much more flexible. They are ubiquitous and as cheap as chips too.:)

Since the invention of the 741, and subsequently the LM358 and LM324, opamps have been improved beyond recognition, and the Texas instruments OPA192 family epitomize this. They are currently the closest thing on the market to a 'perfect' opamp.:cool:

spec

DATA SHEETS
LM741 (single): https://www.ti.com/lit/ds/symlink/lm741.pdf
LM1458 (dual 741): https://www.ti.com/lit/ds/symlink/lm1458.pdf
LM348 (quad 741): https://www.ti.com/lit/ds/symlink/lm148-n.pdf
(The opamps in the three integrated circuits above are identical, except that the LM741 has two offset inputs: the offset inputs are rarely used)

LM358 (dual): https://www.ti.com/lit/ds/symlink/lm158-n.pdf
LM324 (quad): https://www.ti.com/lit/ds/symlink/lm2902-n.pdf
(The opamps in the two integrated circuits above are identical)

OPA192 family: https://www.ti.com/lit/ds/sbos620e/sbos620e.pdf
OPA197 family (same as OPA192 but higher input offset voltage): https://www.ti.com/lit/ds/symlink/opa197.pdf
OPA171 family (same architecture as the OPA192 but low power and lower operating voltage limit, but input offset voltage only average): https://www.ti.com/lit/ds/symlink/opa171.pdf
 
Last edited:
Hi again BBM,

I will post some comments about your original circuit and include a recommended revised circuit here.

spec
 
OMG spec, thank you so much for that detailed information you posted.

If only I've known about OPA192's awesomeness, I wouldn't have thrown mine away when I moved in to my new home. I have salvaged a lot of parts from an electronic junk shop but only kept the capacitors, transistors, relays and some known OPA. There were even a few PIC MCU's. I threw away those who doesn't ring a bell or I didn't think I'd use ever, like the OPA192s, LOL.

I can't wait to see that modified circuit you were talking about. In fact I'll be checking every now and then for it. :D
 
OMG spec, thank you so much for that detailed information you posted.

If only I've known about OPA192's awesomeness, I wouldn't have thrown mine away when I moved in to my new home. I have salvaged a lot of parts from an electronic junk shop but only kept the capacitors, transistors, relays and some known OPA. There were even a few PIC MCU's. I threw away those who doesn't ring a bell or I didn't think I'd use ever, like the OPA192s, LOL.

I can't wait to see that modified circuit you were talking about. In fact I'll be checking every now and then for it. :D

My pleasure BBM,

As you may have guessed I am quite interested in opamps and the history of their development.

Quite by chance, I have been working on a similar application to your circuit: https://www.electro-tech-online.com/threads/bypass-ecu-radiator-fan-control-switch.149254/

Like you, I had a load of electronic bits and equipment which all got ditched when we moved into a smaller house with no garage.

But we have another house, currently being refurbished, which has a large garage/workshop so hopefully I should be back in action again in a year or so.:)

I will do your circuit today, providing missus does not have other plans.

spec
 
Hi spec ,

No pressure on the new circuit. I believe in the saying "happy wife, happy life" hehe.

BTW, I drew the whole project so that I could give you an idea on why I needed this. And also, maybe you could give me a better idea on long distance signal transmission (wireless is not an option).

Project: Car drag race timer

Figure 1: The old design works perfectly and we've been using it for quite some time already. The accuracy is quite impressive and everything is awesome even at 200 meters.
race timer.png

Figure 2: The design needs changing since we are going with the 400 meter race. The signal is now pretty faint and its not possible anymore. So what I planned is to make the LDR circuit drive a relay that would trigger a 12volt signal to be sent to the Arduino. On the Arduino end, I am using an Opto-coupler to sense that 12v (still good even if its only 10v due to the voltage drop). I did some testing and it was working. During the test, I was manually triggering the relays using a button and see if the Arduino could actually detect the signal, and it was all good. I used a 500meter UTP cable. I could not afford a high gauge wire that is 400 meters long that's why I thought of the 12v relay combo. The only problem is, that the LDR circuit is always triggering the relays.
race timer-new.png

Now, maybe, you have a better idea on how to transmit signals in a long distance situation using a UTP cable and I'm very much glad to try it. I also thought of using a MOSFET, but it's quite expensive here and difficult to get, let alone replace when it breaks. So I'm gonna use a relay as much as possible.

We've tried wireless, but drag cars amazingly emit a lot of noise that the delays are so great. Thank you in advance!
 
Are you distributing 12 V power to each sensor from a single power supply, or does each sensor have its own little power source?

ak
 
Are you distributing 12 V power to each sensor from a single power supply, or does each sensor have its own little power source?

ak
Good question AnalogKid , I forgot to mention it haha.

The sensors and the LASERs are individually powered using 18650 Li-ion (lasts for at least a day per charge). The battery has a DC-DC circuit so its providing 5V consistent. The arduino is also powered separately. 12V is isolated hence the opto-coupler on the receiving end. When a 12v signal is sent, a LED lights up in the opto-coupler circuit. And that LED is the only load.
 
Last edited:
Hi BBM,

Thanks for further information.

Drag racing, electronics, Philippines, (rock & roll?): would you like me to fly out to assist with the installation?:)

We have Santa Pod drag race track in the UK. Our neighbor goes for a week every summer, but I haven't been invited.:(

I have a mate who moved to the Philippines: he loves it there.

No pressure on the new circuit. I believe in the saying "happy wife, happy life" hehe.
Also unhappy wife and ... HELL is the opposite.:eek:

Missus has gone off visiting for the afternoon, so apart from various instructions about mowing the lawn etc, I am left to my own devices.:p

BTW, I drew the whole project so that I could give you an idea on why I needed this. And also, maybe you could give me a better idea on long distance signal transmission (wireless is not an option).
Thanks for further information- very interesting. Suggest first sort the light detector then we can have a look at the wider issues.

spec
 
Last edited:
Hi again BBM,

Although I recommended the LM358 dual opamp in place of a 741 in post #4 above, in view of the application, I would probably recommend the LM2309 (UPDATE should read, LM2903) (part of the LM339 family) dual comparator to do a proper job.

In case you aren't familiar with competitors, this is what they are all about:
(1) In general, comparators have two inputs, + and - , and an output, just like an opamp.
(2) If the + input is more positive than the - input, the comparator's output will be a high voltage
(3) If the + input is more negative than the - input the comparator's output will be a low voltage.

And, to a first order, that is all there is to comparators.

You may ask, why bother with comparators, when an opamp will perform the same function. That is true, but comparators simply do the job much better in all respects. And if you need high speeds (2nS say) only a comparator will hack it; an opamp won't even come close. In general, because a comparator is designed just for one job it does, err... comparisons very well.

Just as there is a couple of ubiquitous, flexible, and user friendly op amps, there are the LM393 (dual) and LM339 (quad) comparators. These are also components that an electronics person should have in their spare parts boxes.:) The only problem is that they are hellish expensive: you could pay as much as 30 pence UK for each package.:hilarious:

Unlike opamps, which inevitably have push pull outputs, many comparators, including the LM393/LM339, have open collector outputs. While this gives more flexibility in circuit design, it means that you need a pull-up resistor in order to get an output voltage.

DATA SHEETS
LM393 (dual): https://www.ti.com/lit/ds/symlink/lm2903-n.pdf
LM339 (quad): https://www.ti.com/lit/ds/symlink/lm2901.pdf
(all comparators in the two packages above are identical)
 
Last edited:
Drag racing, electronics, Philippines, (rock & roll?): would you like me to fly out to assist with the installation?:)

We have Santa Pod drag race track in the UK. Our neighbor goes for a week ever summer, but I haven't been invited.:(

I have a mate who moved to the Philippines: he loves it there.
Assuming its possible, then it would be a pleasure being helped personally by the "Most Helpful Member" of ETO. :D The problem with electronics and Philippines is parts. Especially in my location (the war torn Mindanao island), it is very difficult to get parts for amazing circuit designs but storm very rarely affect this island so races here flourishes. And yes, I'm a lead guitarist so rock & roll! :cool:

Maybe your neighbor didn't know you wanted to go to race days too haha. And I'm glad your mate loved it here, though there were some pretty sad stories about what happened to other foreigners, the weather and nature here is amazing.

Suggest first sort the light detector then we can have a look at the wider issues.
Thanks and I think this is the best thing to do. Since if the relay problem is sorted, it would be usable again. Then maybe after we could make it more efficient if not better.
 
Although I recommended the LM358 dual opamp in place of a 741 in post #4 above, in view of the application, I would probably recommend the LM2309 (part of the LM339 family) dual comparator to do a proper job.
I could not find a datasheet for LM2309, maybe it should be LM2903 base on the datasheet links you posted? I'm not really that good with OPAs and Comparators but before we start with LM2903, I need to check with the local electronic shop if its available and if not I'll travel to the other cities. I have really small options here when it comes to sourcing. I can order online but it won't make it in 2 weeks (race day on the 1st week of Nov).
 
Assuming its possible, then it would be a pleasure being helped personally by the "Most Helpful Member" of ETO. :D
I'm blushing- there are many helpful folk on ETO.:) I'm at Bristol airport now with my ticket in my hand.:joyful:

The problem with electronics and Philippines is parts. Especially in my location (the war torn Mindanao island), it is very difficult to get parts
This is a common problem in many parts of the world, but it is not an insurmountable problem. Your circuit could be designed just using transistors if necessary, or even the dreaded 741 if essential.

And yes, I'm a lead guitarist so rock & roll! :cool:
WOW, this gets better and better. I have a Strat copy and a steel string Yamaha acoustic. Also a practice amp, but can't play.

Maybe your neighbor didn't know you wanted to go to race days too haha.
I could think of another reason.:D

And I'm glad your mate loved it here, though there were some pretty sad stories about what happened to other foreigners,
He has had his ups and downs, but mainly with female persons and, of course, with the UK pension service.

the weather and nature here is amazing.
So I hear.

Thanks and I think this is the best thing to do. Since if the relay problem is sorted, it would be usable again. Then maybe after we could make it more efficient if not better.
Be an interesting exercise.:) What order of timing resolution are you after?

spec
 
I could not find a datasheet for LM2309, maybe it should be LM2903 base on the datasheet links you posted? I'm not really that good with OPAs and Comparators but before we start with LM2903, I need to check with the local electronic shop if its available and if not I'll travel to the other cities. I have really small options here when it comes to sourcing. I can order online but it won't make it in 2 weeks (race day on the 1st week of Nov).
Oops, yes LM2903. In view of your tight schedule and lack of components, it would probably be best to get the 741 circuit working for the time being. I will do an analysis and get back.

spec
 
**broken link removed**

Right off the bat, this circuit has major problems

spec
 
Hi again BBM,

Can you post details of the LDR you are using: part number would be ideal so I can get the data sheet.

Alternatively can you measure the resistance when the LDR is in the dark and also when it is illuminated by the laser beam.

Also can you post the relay details: coil voltage, coil resistance. Or better still the relay part number

spec
 
Last edited:
Hi spec,

Looks like I got it working already. I just got the LM358, looked at the datasheet, compared it to LM741 pins for adjustment and tested.

LDR_Driver-BETTER-LM358.png
I modified the original circuit a bit (yeah i just photoshoped the original image LOL), and got it working. BTW, on the image the Collector on the transistor (BC548) should be (+) positive and negative on the relay side, also there should be a trace cut between the 220uf cap and emitter trace, forgot to photoshop those.
Here's a video:

The green LED is switched by the relay. Is it looking good? Thanks!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top