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.

PLZ HELP. MAP VOLTAGE to 0V - 5 V

Status
Not open for further replies.
R4, R5 and C3 create a clean 2.5V reference (derived off the Arduino 5V).

C1 blocks the senor's dc component.

R1 and R7 create a voltage divider which drops the peak input by 1/3.

Since the right end of R7 is tied to 2.5V, the opamp's output is centered on 2.5V.

X1 determines the gain of the OpAmp. The left end of the pot is grounded through the capacitor to minimize offset from the 2.5V reference voltage.

The lowest opamp gain that the pot will set is 1, so the overall gain ranges from 1/3 (that is why the R1/R7 divider), to a much higher value as the wiper is moved left.

The frequency response is flat from ~10Hz to an upper cutoff determined by the opamp.

'The frequency response is flat from ~10Hz to an upper cutoff determined by the opamp' Is there a specific op-amp that I have to use for this circuit?
 
'The frequency response is flat from ~10Hz to an upper cutoff determined by the opamp' Is there a specific op-amp that I have to use for this circuit?

U1 is a rail-to-rail 5V OpAmp, like a TLC2272CP, which still available in a DIP. Since your sensor works in the audio range, opamp speed is not a factor.
 
I'm still not clear why you need the signal processed into the 0-5V range. If the sensor signal amplitude is significant then the amplification will lose the absolute amplitude information, so the ADC won't measure true amplitude unless the amplifier gain is accurately known. If it's the sensor frequency which is significant then the micro only needs to count/time zero crossings of the waveform, so the amplitude is not important.
 
Hi mike,

In the schematic, the X1 100k pot has 3 pins. Does that middle pin go to the negative sign side of the opamp? Bc it looks like the three pins are being directed to certain points. I just wanted to be sure.
Thanks
 
Yes, the middle pin is the "wiper". You can interchange the two end pins so that CW or CCW increases the trip point voltage.
 
Yes, the middle pin is the "wiper". You can interchange the two end pins so that CW or CCW increases the trip point voltage.

Hi Mike,

Thank you for your time. I've tested the circuit and it works! I've also used the wiper to make the sensor more sensitive, so to speak, so I can detect the frequency even at 945 mVpp low. I am currently making the PCB eagle version of this circuit.

Also, I was wondering if you can help me with another thing. It's rather simple and it would require little time. I have a 12V source and I wanted to create a voltage divider using that one source (12V) to supply power to my sensor (also requires 12V) and my controller (9V). How can I do so by limiting the amount of amps being drawn from the supply if I use a voltage divider? I was thinking about using a zener diode and a few resistors;however, I was hoping you could show me what I can do to accomplish this task.
 
I'm not sure I understand. The main supply is 12V dc. Is it regulated? Is it wired directly to the sensor? What is it's current rating?

How much current does it take to operate the sensor?

When you say "controller", do you mean the Arduino? Does it regulate 9V to make 5V internally? How much current does it take to run the "controller"?

You are powering the opamp from the 5V from the Arduino?
 
I'm not sure I understand. The main supply is 12V dc. Is it regulated? Is it wired directly to the sensor? What is it's current rating?

How much current does it take to operate the sensor?

When you say "controller", do you mean the Arduino? Does it regulate 9V to make 5V internally? How much current does it take to run the "controller"?

You are powering the opamp from the 5V from the Arduino?

The sensor can operate at 9v-12v butid rather have the sensor powered by 12v. Im not sure how much current the sensor needs to operate but im using a regular dc adaptor as my 12v power supply. I was planning to strip the end of that adaptor connection and make a voltage adaptor to power the sensor and the controller (arduino) which does take in 9v and internal 5v to operate. However it is recommended that the arduino be powered by 7v-12v. also yes i will be using the arduino to supply the 5v for the op amp.
 
A. Look up the data sheet for the sensor. It should say how much current it requires (at 12V input).

B. Look up the data for the Arduino pcb. It should say how much current it requires.

Add A to B. That should be less than the A rating on your 12V wall-wart.

Try running the Arduino on 12V dc. Let it run for 15min. Feel the heatsink. If it blisters your fingers, then you need a means of reducing the 12V supply to something the Arduino will tolerate...
 
A. Look up the data sheet for the sensor. It should say how much current it requires (at 12V input).

B. Look up the data for the Arduino pcb. It should say how much current it requires.

Add A to B. That should be less than the A rating on your 12V wall-wart.

Try running the Arduino on 12V dc. Let it run for 15min. Feel the inheatsink. If it blisters your fingers, then you need a means of reducing the 12V supply to something the Arduino will tolerate...

A. 50mA
B. 40mA
The arduino can tolerate 6v-20v. It operate on 5v. Recommended at 7v-12v. I usually use a 12vdc adaptor as well to power the arduino uno and its gine even for long periods of time.
 
Then assuming that the rating on the 12V dc wall-wart is greater than 90mA, and it has a plug that mates with the jack on the Arduino, I would solder two wires to the back of the power jack at the Arduino, twist them together, and route them to the sensor.

What do you need the 9V for?
 
Then assuming that the rating on the 12V dc wall-wart is greater than 90mA, and it has a plug that mates with the jack on the Arduino, I would solder two wires to the back of the power jack at the Arduino, twist them together, and route them to the sensor.

What do you need the 9V for?

So I can use the 12v adaptor and strip its end and use it to power both the Arduino and sensor?
 
Yes, but why butcher the wall-wart cord? I would do it the way I said above. Besides, you already have the sensor signal and ground wires running from Arduino to the Sensor anyway.
 
Yes, but why butcher the wall-wart cord? I would do it the way I said above. Besides, you already have the sensor signal and ground wires running from Arduino to the Sensor anyway.

I guess im not sure what u mean by taking two wires and connecting to the power jack of the Arduino amd twisting them? Why twist it when I need a positive and ground to power the sensor. Also, the 9v would have been for the Arduino. I was planning to use the power adaptor of the sensor and use that to power both the sensor and arduino.

So if I take the power adaptor, strip its end and make two separate conmections for the sensor amd arduino, that would still work? Simce the amps of the adaptor is significamtly greater than the amps requires to run the arduino and sensor that would be okay?
 
Yep.




(to make the message long enough)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top