Let's Make Robots!

LM324 question...

So, playing with oddbots distance sensor, the subject of using an op-amp to beef-up the signal was raised... I got a lm324 and did a little looking over the data sheets and quickly found there are about 4000 different applications for this little guy. Does anyone want to suggest a schematic that would be best to amp-up a signal coming from a IR photo-transistor?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

non inverting amp

Hello CTC

Q1 is your IR Phototransistor, I don't know which one you are using, R3, I put as 10K but you should select this based on the performance of the Phototransistor. R2 and R1 form the feed back for the OPAMP the Gain will be G = 1 + R1/R2, I put a pot as R1 so you can adjust your gain to suite. If you are just feeding a I/O port on the micro R4 serves as a load reistor.

 that shoud do the trick for you.

If you want to set it up so that the opam is high if the voltage goes over a certain point this is known as a comparitor, let me know and I will send a dreawing for that.

 all the best

Hello CTC,

in the LM324 you have 4 Opamps, if you are using IR for detecting walls, one thing to consider is environmental noise, Fluros generate a suprising amount of IR, lots of things around the house do. The most common technique to combate this is to modulate the IR Transmitter (most use 38-40Khz) and then only responde to received signals with that modulation.

A number of IR transmitter/detectors have this built in.

Opamps can be used to filtre out signals, you can build high pass/low pass/band pass filtres to get rid of the stuff you don't want.The addition of a few resistors and capacitors is all that is required (the trick is of course the right ones)

Also to save your self some greif, put a power on self test in your robot, a routine which runs at start time, part of what this routine needs to do is calibrate the sensors. Sensors themselves are inherently noisy, you should also look at Kalman type filters although simplier techniques sufice for little robots.

 all the best

Hey Chris, you think your new Frits-o-scope can detect 38 kHz noise?
I dunno, rik... I am using Adobe Auditon as recording software which is wicked professional and expencive and shows a timeline down to (i think) 4, if not 5 decimal places. In theory, I could measure the wave based on the time stamp for each track but man, to be honest I don't think I even know how many decimal places a millisecond is! Second, a regular tweeter (speaker) usally tops out at about 25khz and I would assume there has to be some kinda ceiling in the software where it just isn't required to go above. I.e. if speakers can't play it, or humans can't hear it, why display it. I guess what I am saying is, there has to be a point where I just can't zoom in any farther and 38,000hz is going to be pretty scrunched together. I do like "Frits-o-scope" though.

And I think the real limitation is in the capabilities of your hardware. Your soundcard. With a sampling rate at 44 kHz it would be hard to record a 38 Khz noise. You need at least twice that.

Stay away from modulation Chris, or you might as well put the Sharps back in.

Any decent multimeter could detect the 38khz freq if thats all ctc needs to do.

Hello CTC,

 Just a thought for you, you have replaced the Sharps which are a packaged IR LED/Phototransistor pair(s) with individual IR LED Phototransistor pair(s); basically the plastic changed; where has the issue gone?

If you look at the shape of the signal from the RX you will see that even with the Sharps out, it is NOT a great signal, it has a overlaid AM and each of the Squarewaves show an RC decay, which is not good, I would suggest that with the sharps out it is only just working. Does the RX have a digital out and an Analog out? Some of the 435MHz boards give you both the Analog (demodulated) and a Digital version of the signal.

Next the processor you are using, does it require pull up or pull down resistors.

I think you might be changing the wrong things, the problem will potentially emerge again.

c ya