# How Can I Invert and Amplify the Output of a Rangefinder for Robotics?

• BigSteve
In summary, the circuit will take an analog input of 5V to 0V and will output a 0V to 12V voltage. The voltage will change depending on the distance of the object being measured. A dual op-amp can be used to achieve this, however the resistor divider is only necessary if 5V is not available as the reference.
BigSteve
Hi folks.
I am ME/AE by profession but I love robotics and I tinker. I have pretty much zero EE experience so this question probably has a simple answer, I just don't know where to look.
Basically i will have a rangefinder with an analog output. I want to invert and multiply that output. So that farther readings will result in higher voltage to a motor. Also, the multiplication will be very small, like 5V to 12V.
Thanks.

BigSteve said:
Hi folks.
I am ME/AE by profession but I love robotics and I tinker. I have pretty much zero EE experience so this question probably has a simple answer, I just don't know where to look.
Basically i will have a rangefinder with an analog output. I want to invert and multiply that output. So that farther readings will result in higher voltage to a motor. Also, the multiplication will be very small, like 5V to 12V.
Thanks.

Is multiply mean gain to you? Is the input 0 to +5V and you want the output 0 to -12V?

What speed is the voltage change? What is the driving requirement of the motor that the circuit has to drive? What I mean is how much current you need to drive the motor.

Usually all you need is a simple op-amp inverting configuration with a gain of -12/5 = -2.4 if that is what you meant but multiply.

Yeah, I probably didn't explain that quite right.
My sensor will output a voltage based on distance. For farther distances it will output a lower positive voltage, but I need a high (still positive) voltage to the motor. Close objects will out put a higher voltage, but I will want a lower(still positive) voltage to the motor. So a close object will approach 5v and the motor voltage should approach 0v, then a far object will approach 0v and the motor voltage will approach 12v (or whatever max motor voltage ends up being).
I don't know about motor current because I haven't purchased a motor yet. I was trying to get the design more concrete before I did. I was thinking of a 12vdc scooter motor or something similar.
Voltage change doesn't need to be anything particularly quick.

This is one way to do this:

Input from 5V to 0V will give output of 0V to 12V. This is my understanding.

Use a dual op-amp. If you can find a rail to rail input and output op-amp, you need only a single +12V power supply. But if you have +/-15V supply, then any dual op-amp like TLO82 etc will work.

You can do it with a single op-amp, but the resistors are going to be harder to match and op-amps are cheap. I called for 5V reference driving the resistor divider just for convience. I need a +2.5V at the +ve input of the first op-amp, however which way you want to get it is up to you.

yungman said:
This is one way to do this:

Input from 5V to 0V will give output of 0V to 12V. This is my understanding.

Use a dual op-amp. If you can find a rail to rail input and output op-amp, you need only a single +12V power supply. But if you have +/-15V supply, then any dual op-amp like TLO82 etc will work.

You can do it with a single op-amp, but the resistors are going to be harder to match and op-amps are cheap. I called for 5V reference driving the resistor divider just for convience. I need a +2.5V at the +ve input of the first op-amp, however which way you want to get it is up to you.
Thank you for the detailed answer. I probably could have never gotten that far on my own.

BigSteve said:
Thank you for the detailed answer. I probably could have never gotten that far on my own.

You are welcome. If you have further question, I'll be happy to help.

## 1. What is EE?

EE stands for electrical engineering. It is a field of engineering that deals with the study and application of electricity, electronics, and electromagnetism.

## 2. What is the difference between EE and other engineering fields?

EE focuses specifically on the generation, distribution, and use of electricity, while other engineering fields may have a broader focus such as mechanical engineering, civil engineering, or chemical engineering.

## 3. What are some common applications of EE?

EE is used in a wide variety of industries and applications, such as power generation, telecommunications, control systems, computer hardware, and consumer electronics.

## 4. What skills are required to become an EE?

Some essential skills for an EE include strong problem-solving abilities, critical thinking, math and analytical skills, attention to detail, and a solid understanding of physics and electrical principles.

## 5. What types of jobs are available for EEs?

EEs can work in a range of fields such as power systems, telecommunications, electronics design, computer engineering, and renewable energy. Job titles may include electrical engineer, electronics engineer, systems engineer, or design engineer.

• Electrical Engineering
Replies
6
Views
924
• Electrical Engineering
Replies
6
Views
843
• Electrical Engineering
Replies
55
Views
3K
• Electrical Engineering
Replies
8
Views
897
• Electrical Engineering
Replies
15
Views
2K
• Electrical Engineering
Replies
37
Views
3K
• Electrical Engineering
Replies
10
Views
2K
• Electrical Engineering
Replies
12
Views
2K
• Electrical Engineering
Replies
14
Views
2K
• Electrical Engineering
Replies
4
Views
3K