Designing a Circuit that when a force sensor is at a specific value and LED is turned on using a comparator

Thread Starter

zose259

Joined Jul 8, 2024
3
Hi, I have been spending ages trying to get this circuit to work and to be quite honest I am new to electronics. I have made the circuit work with a variable resistor but not using a force sensor. I would love some help in how to create this circuit.

I am using a 741 OP AMP and 2N is my required force to turn the LED on. The resistance of the force sensor at 2N is 3.67kohm
 

LowQCab

Joined Nov 6, 2012
5,101
You don't need an Op-Amp.
What are your available options for a Power-Supply ?
You need to supply us with a Spec-Sheet for the Sensor, and for the LED.
.
.
.
 

dl324

Joined Mar 30, 2015
18,216
Welcome to AAC!
I am using a 741 OP AMP and 2N is my required force to turn the LED on. The resistance of the force sensor at 2N is 3.67kohm
Using an LM741 as a comparator is usually a bad idea. The 741 was designed to operate from +/-15V supplies and the inputs/outputs still needed to stay several volts away from the power supplies. If you were planning to use a single supply, LM741 definitely won't work.

LM393 is an inexpensive dual comparator. Old design, so the output is open collector.

Before we can help you, we need more information, like power supply voltage.
 

WBahn

Joined Mar 31, 2012
32,702
Why are you using a 741 opamp? Is it a requirement of the assignment?

Is the force sensor purely resistive? Does the resistance increase or decrease with force applied?

Do you need the LED to be on when the force is at least 2 N? Or no more than 2 N?

What accuracy do you need for the trip point? (How many newtons, give or take, as acceptable)?

What is the sensitivity of your force sensor (how much does the resistance change per change in force applied)?

What current do you need for the LED?

What is the forward voltage drop across the LED?

What is the supply voltage for your circuit?
 

Thread Starter

zose259

Joined Jul 8, 2024
3
Why are you using a 741 opamp? Is it a requirement of the assignment?

Is the force sensor purely resistive? Does the resistance increase or decrease with force applied?

Do you need the LED to be on when the force is at least 2 N? Or no more than 2 N?

What accuracy do you need for the trip point? (How many newtons, give or take, as acceptable)?

What is the sensitivity of your force sensor (how much does the resistance change per change in force applied)?

What current do you need for the LED?

What is the forward voltage drop across the LED?

What is the supply voltage for your circuit?

We have mainly been using this as a op amp although yes i have seen a lot of people using other types.

I am building this in TinkerCAD, When the force is larger than 2N the Led should be on and when less than 2N the led should be off.

The accuracy will be something to mess around with im guessing but does not need to be incredibly accurate.

I will post the table of Newtons vs Resistance for you below

The supply voltage I have been using is 5v but this can change to the parameters of the circuit.IMG_5165.jpg
 

WBahn

Joined Mar 31, 2012
32,702
We have mainly been using this as a op amp although yes i have seen a lot of people using other types.

I am building this in TinkerCAD, When the force is larger than 2N the Led should be on and when less than 2N the led should be off.

The accuracy will be something to mess around with im guessing but does not need to be incredibly accurate.

I will post the table of Newtons vs Resistance for you below

The supply voltage I have been using is 5v but this can change to the parameters of the circuit.
Since your are interested in triggering at 2 N, you might want to get more data closer to 2 N. Notice that the response is highly nonlinear. In going from ~1.5 N to 2 N, the resistance changed by 800 Ω, but a further change of over 1.5 N only decreased it by another 1200 Ω. Of greater concern is how repeatable the sensor is -- if you apply 2 N to it ten different times, what is the spread of readings -- and how much hysteresis there is -- if you increase the load to 2 N versus decrease the load to 2 N, how close are the readings. But we can set that aside for now.

You say that you have a circuit that works with a potentiometer. What is that circuit? We can't really help you figure out why your circuit isn't working with the sensor in place of the pot when we have absolutely no idea what the circuit is to begin with.

When you say that you are building it in TinkerCAD, does that mean that your circuit that is working with the pot is not a physical circuit, but rather just a circuit in some simulation software? If so, then the problem likely lies in the model you are using for your force sensor.
 

LowQCab

Joined Nov 6, 2012
5,101
Stop, and start over with a different approach.
Older Comparitor designs may get fussy when the Supply-Voltage gets that low.
The below Schematic is the idea You need to start with,
although only having a 5-Volt-Supply is cutting things close,
and ~10-Volts would be much more comfortable,
never the less it will be stable and predictable, and take up less board-space.
Like any other measuring Circuit,
this Circuit will not maintain it's calibration without a Regulated-Power-Supply.
.
.
.
Pressure LED .png
.
 

Attachments

Last edited:

Thread Starter

zose259

Joined Jul 8, 2024
3
Okay so to answer a lot of questions I have made a circuit that works. I dont know if it is the most efficient circuit but it does the job. If any of you have suggestions to make this better feel free but this is not going to be made into a real circuit. So a lot of problems experienced with real components do not matter thankfully.Picture3.pngPicture2.png
 

sghioto

Joined Dec 31, 2017
8,633
What you have made is a simple comparator. When the voltage on pin2 is higher then pin3 the LED is OFF.
If it works for you it's good with me.
Here is the schematic of that circuit:
1720924491876.png
 
Last edited:

WBahn

Joined Mar 31, 2012
32,702
Okay so to answer a lot of questions I have made a circuit that works. I dont know if it is the most efficient circuit but it does the job. If any of you have suggestions to make this better feel free but this is not going to be made into a real circuit. So a lot of problems experienced with real components do not matter thankfully.View attachment 326867View attachment 326868
It rather regrettable that you don't care whether it has much of a chance of actually working.

For the record, it probably won't work well at all, as you are violating more than one of the opamp's specifications by quite a bit.
 

sghioto

Joined Dec 31, 2017
8,633
For the record, it probably won't work well at all, as you are violating more than one of the opamp's specifications by quite a bit.
Respectfully it does work as shown but can be improved with some hysteresis added through R5.
There is a 1.25 volt offset on the output when the LED is OFF but below the LED threshold.
1720905873653.png
 

WBahn

Joined Mar 31, 2012
32,702
Respectfully it does work as shown but can be improved with some hysteresis added through R5.
There is a 1.25 volt offset on the output when the LED is OFF but below the LED threshold.
View attachment 326899
The minimum recommended supply voltage for the 741 is 20 V (±10 V) and, with a 2 kΩ load, is only spec'ed to be able to get within 5 V of either supply rail.

If this thing did manage to get to 5 V output, and assuming a 2 V LED forward voltage, it would be asking the 741 to deliver 30 mA when it's short-circuit output (of the LM741A) is spec'ed at a minimum of only 10 mA.

Asking it to deliver even 10 mA to a 2 V LED is requiring it to get within 2 V of the supply rail, when it typically can do that only when it is delivering about 6.5 mA.

Now, certainly most parts out of the bin outperform their spec'ed limits -- it has to be that way, otherwise the manufacturer's yield would be unacceptable. But if you happen to get a part that works when exceeding several of the specs this significantly, you are being lucky and there is certainly no guarantee that the next part you get will work.

It's a bad design for that choice of opamp (actually, it's just a bad choice of opamp, period). If the TS can't use a more suitable opamp, they would probably be better off using discrete transistors.
 
Top