Hi guys,
Im building a fairly basic ultrasonic sensor and using the Arduino nano as my micro controller. I have a question about interrupts on the nano. Im using the nano to sense the reflected echo signal which is amplified using an op-amp. The problem is the op-amp is biased at 2.5V so the Arduino pin change interrupt will not work as my pin will always be high at "2.5V"? Am I right in thinking this?
Yes, you're right - actually not "always high" but in an unpredictable state. Why is the op amp biased at 2.5V? Can you show us a schematic?
Here's my op-amp schematic, Ive taken it from the LM324n data sheet. The reasons its biased at 2.5V it is because I only have access to a single supply (5V). Please correct me if I'm going completely wrong. Thanks
Have you taken the time to measure the actual high and low voltage levels at the op amp circuit output? I'm assuming that at this level of experimentation, you have access to a DMM.
Sorry I'm not sure what you mean by the actual high and low? I have the circuit in front of me with my oscilloscope and volt meter right now.
callumr97:
Sorry I'm not sure what you mean by the actual high and low? I have the circuit in front of me with my oscilloscope and volt meter right now.
I mean readings that you actually took vs. guesswork about how the op amp biasing might influence the output. You need to measure the output voltages in the high and low state.
I thought I had to have the lm324n biased at 2.5V in order for it to work? The low value on my oscilloscope is at 2.5V (so ultrasonic echo picked up).
What do you mean, "biased at 2.5V"? You mean VCC/2? That should have almost no bearing on the digital output level. Did you build this circuit? Maybe you made some mistake. Where are you taking the output? What is the purpose of R6?
This circuit appears to be no more than a voltage amplifier with a gain of 100.
I got the circuit for the LM324N data sheet. The gain is 10 set by the 10k and 100k resistors. By biasing I meant the 2.5V supplied by the voltage divider.
You are wrong. The gain is not 10. There are two gain stages.
Did you build this circuit? Where are you taking the output? What is the purpose of R6? What was the result of the measurements I asked you to make?
Will the ultrasonic transducer work well into a 10k ohm load?
Ive built the circuit, R6 and R7 are taken from the attached circuit (on my last post) on the data sheet. The output is being taken from pin 7. Im not sure how to figure out if the ultrasonic transducer will work well with 10k?
callumr97:
Im not sure how to figure out if the ultrasonic transducer will work well with 10k?
You could tell us what it is... a data sheet or link to specifications would be great.
You created another question... the op amp page shows only one amp... your project has two. Please explain.
Sorry I should of linked them originally, https://docs.rs-online.com/8ada/0900766b816c0808.pdf
My circuit contains two stages of application
callumr97:
The output is being taken from pin 7.
In the diagram, the scope is connected to pin 1. Explain.
Now the $1,000,000 question! With ultrasonic sound present at the receiver, your circuit all powered up and happy, what do you see on the scope at the output? Square wave signal? What levels?
In the schematic the reading being taken from the first op amp because I didn't change it before I screen shotted it. On the oscilloscope the received ultrasonic signal in a sine wave.
callumr97:
In the schematic the reading being taken from the first op amp because I didn't change it before I screen shotted it. On the oscilloscope the received ultrasonic signal in a sine wave.
You see, we need to know things like that in order to help. We're looking for mistakes and everything like that becomes a red herring.
A sine wave there means you don't have enough gain. In order to properly drive a digital input, your signal has to be overdriven, so that the op amp saturates with a voltage close to the supply when positive, and close to ground when negative.
How will you interpret the digital input when there is no signal? The input will be in an undefined state. It may be high, low, or banging back and forth high and low... what is the "complete system plan" for this?
You say theres not enough gain, so by that do you mean change the resistor values in order to increase the gain? My hope was to build the Rx circuit so that when no ultrasonic signal is present the output is at 0V and when there is a signal present the receiver circuit amplifies this in order for the nano to sense it?
Yes, try increasing the 100k resistor values. If you want it to "sit" at zero when idle, you have to introduce some bias.