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.

Pressure detection project(Using straing gauge sensors)

Status
Not open for further replies.

shmup

New Member
Hello everyone.So I got tasked with a project of creating a circuit , that will use 8 sensors placed in persons shoes, to find the most pressured sensor(spot) and turn on one of 8 LEDs to signal wich sensor that is. Sensors are strain gauge linear sensors with 18kΩ at F=0 with 2kΩ per kg. To create a signal for LEDs professor said I should only use comparators and differential op-amplifiers which will compare 2 voltages with 0 and turn on 1 if voltage V<0 and turn 0 if voltage is V>0. Now I'm wondering what kind of source should I use, and should I look for the smallest voltage since ressistance is going up with every kg?

I tried doing something with comparators but I don't know if this will work since this is my frist time dealing with "real" electronics outside of theory.I don't really know what and how to start this since I've never done this, so any help would be amazing.
Screenshot_2.png
 
An Arduino Nano would handle this easily, but using discrete comparators one
uses, if comparing voltages hovering around 0 volts, a split supply. Thats not
really needed. Compare a V from a divider to ground with fixed R to + supply,
other side the sensor to ground, and junction connected to a comparator. A Vref
for the comparator to compare the Vx just a divider from + supply to set it at desired
V. Note the inputs must not exceed Vsupply -2 V for them to work properly, so Vref
must be less than that, and sensor divider design such that its V does not exceed that.

The LM339 has an open collector output, perfect for driving an LED with a series R to
limit its current.

That way all you need is 1 comparator for each sensor.

You might want to consider using hysterisis around the comparator so they do not
oscillate.

**broken link removed**


**broken link removed**

Regards, Dana.
 
Just for future reference here is code, block language, mBlock, to implement
same solution -

1622674193634.png


mBlock takes your block structure and generates the C code to program into the Arduino
Nano board. You can look at the code if you are new to C to get a "feel" for what it looks
like.

You would connect a series R and LED to each of 8 digital pins, and a R to Vcc in series with
sensor to each of 8 analog pins.

mBlock is free, a Nano board ~ $ 1 hamburger / 2. Lots of fun.

Regards, Dana.
 
Last edited:
Lashup, 1 channel, just add the other R's and sensors to do remaining channels.

1622677011564.png


Regards, Dana.
 

Attachments

  • 1622676821078.png
    1622676821078.png
    80.4 KB · Views: 346
Another approach, future reference, is use of a more capable mixed signal
part. This is a single chip approach with a lot of analog and digital capabilities.
Cypress PSOC.

Here the SAR has a precise internal Vref, and a current source drives the sensor
to yield a linear curve of force to Voltage via use on onchip IDAC. Unlike prior
approach where force sensor used as 1 leg of a V divider.

Most of chip not used, available for other stuff. For example would be easy to
implement dimming of the LEDs to show force versus led brightness. Easy to
add COM to send data out to other gear. As well LCD drive....

1622717549778.png



Regards, Dana.
 
Last edited:
Thank you Dana, this is a lot of help to me and it means a lot, but I'm not supposed to use Arduino because I need to create my own logic for this circuit. Now I had an idea to use voltage divider for my FSR(to increase voltage when ressitance is increased)
Screenshot_13.png
(R2 is Froce Sensitive Ressitor in this case)
and get the Vout signal to go out to
Screenshot_15.png

and when I find highest voltage I could maybe use ADC to find which sensor is giving off most voltage and then turn on the LED, but I'm a bit low with knowledge of digital circuits.
 
The block language can be easily modified to yield the highest V,
although I thought each LED was to be examoned for turn on based
on its V irrelevant of the others. But thats a simple change to the block
code.

But those examples were just for future reference so you could see how
easy and simple designs with a UP are these days.

If you have to use discrete parts and find the force sensor with the most
force then using an A/D certainly appropriate. But then you have to mux
the A/D, more logic, counter to generate address for mux, and then use
an encoder to select LED to light. Along with this a digital comparator for
finding highest V sensor and memory, or flip flops, to set when higher V
is found, and clear the rest. Substantial logic and parts.....

Or you could use a DAC and a mux, and ramp the DAC and do tests, again
saving in some sort of memory the DAC val that tripped off LED, and saving it
and LED # to be examined by another scan thru memory to find the max
DAC value found and which LED it is. Then more logic to turn on that LED.

So only one led on at a time, the one with max force, or any/all turned on if
each F sensor exceeds the reference value ?

I added code to find Vmax, a new variable, but did not do anything yet to
leds pending on your answer to above question.

1622740972911.png



Do you have a written description of the problem you are to solve ?

Regards, Dana.
 
Last edited:
Hello everyone.So I got tasked with a project of creating a circuit , that will use 8 sensors placed in persons shoes, to find the most pressured sensor(spot) and turn on one of 8 LEDs to signal wich sensor that is. Sensors are strain gauge linear sensors with 18kΩ at F=0 with 2kΩ per kg. To create a signal for LEDs professor said I should only use comparators and differential op-amplifiers which will compare 2 voltages with 0 and turn on 1 if voltage V<0 and turn 0 if voltage is V>0. Now I'm wondering what kind of source should I use, and should I look for the smallest voltage since ressistance is going up with every kg?

I tried doing something with comparators but I don't know if this will work since this is my frist time dealing with "real" electronics outside of theory.I don't really know what and how to start this since I've never done this, so any help would be amazing.
View attachment 131698

The comparators will not work that way to find highest V, they only produce a digital
output, not an analog one. And the tree is not consistent with input polarities.

Regards, Dana.
 
The block language can be easily modified to yield the highest V,
although I thought each LED was to be examoned for turn on based
on its V irrelevant of the others. But thats a simple change to the block
code.

But those examples were just for future reference so you could see how
easy and simple designs with a UP are these days.

If you have to use discrete parts and find the force sensor with the most
force then using an A/D certainly appropriate. But then you have to mux
the A/D, more logic, counter to generate address for mux, and then use
an encoder to select LED to light. Along with this a digital comparator for
finding highest V sensor and memory, or flip flops, to set when higher V
is found, and clear the rest. Substantial logic and parts.....

Or you could use a DAC and a mux, and ramp the DAC and do tests, again
saving in some sort of memory the DAC val that tripped off LED, and saving it
and LED # to be examined by another scan thru memory to find the max
DAC value found and which LED it is. Then more logic to turn on that LED.

So only one led on at a time, the one with max force, or any/all turned on if
each F sensor exceeds the reference value ?

I added code to find Vmax, a new variable, but did not do anything yet to
leds pending on your answer to above question.

View attachment 131746


Do you have a written description of the problem you are to solve ?

Regards, Dana.
Only 1 LED or 2(if they have the same pressure) are ever turned on.

Here is the complete problem I got:
Design a device for correcting the patient's gait.
The pressure that the foot exerts on the surface is measured using 8 sensors that are arranged in the insole of the shoe
so that they measure the pressure that the foot exerts on the front, back, left and right part of the shoe and the intermediate positions.
There is also a button that is activated when the patient leans on the leg on which the measurements are performed.
When the button in the shoe is activated measured the pressure on all eight sensors should be measured. The sensors are resistant, linear and identical,
resistance of 18 kΩ when unloaded and with a positive slope of 2 kΩ / kg load. Based
pressure differences should turn on one LED of eight, which shows the approximate position of the foot,
that is, which sensor loaded the patient the most. If the load on the two sensors is equal (in
limits +/- 10%), two LEDs should be switched on. Make a signal to turn on the LEDs
using differential amplifiers and comparators that compare the difference of two voltages with zero, and if
is the difference less than zero, turns on one, and if it is greater than zero, turns on the other LED.
 
The comparators will not work that way to find highest V, they only produce a digital
output, not an analog one. And the tree is not consistent with input polarities.

Regards, Dana.
That's what I thought initially but I don't have any resources for better understanding of this and I have been going over many defenitions of not-ideal op-amps and comparators and I guess one of them might have said that it outputs the higher voltage when supplied with 2.
 
What is stumping me is the implied intelligence that has to exist to
find not only the highest but the next highest, testing if its +/- 10%.
And only using comparators and OpAmps. No logic allowed, no A/D,
no nothing else.

Again this is trivial using a processor with an A/D.

First cut, I am not sure if this helps. A flash A/D looks like this -

1622765758960.png


https://en.wikipedia.org/wiki/Flash_ADC Description discusses using OpAmps and comparators.

So maybe thats a possible solution, but violating use of logic or processor or A/D.
You have to ID the Fmax and its next closest sensor, then do a test if it meets +/-
10 % and take action to light that LED as well. Also logic to not light not more than
2 leds max if I read project conditions accurately. Sure smacks of a state machine.
And memory elements to hold the state of the led(s) until evaluation repeats.
Or a gigantic brute force approach, using Comparators as logic elements as well.

Looks like I should not have graduated from school.....:(.


Regards, Dana.
 
Last edited:
Well I think I can use A/D later on since we did cover it in this course, but I sent an email to my professor and he said that he doesn't know if sensor like this one exsists and is just for the purpose of this project, and that I should try using constant current source so that the force and voltage are proportionate.I guess I'll have to find the highest voltage using analog circuits and then either compare it to the sensors voltage then to ADC or I will have to find highest voltage and then convert it to digital and somehow figure out how to find which one is the most pressured sensor.

I honestly thought this would be easier since we shouldn't have an projects yet, and we have no resources or any practical knowledge because we didn't have any Labs since COVID-19 started.
 
You could use a S/H circuit, triggered by comparator, and a mux. Look at
channel and if it is higher than S/H output turn on S/H and acquire that V.
Stepping thru 8 channels like that you would wind up with max V on S/H.
The last trigger is the max V channel.

But then in order to satisfy the LED drive you have to have stored the channel
you found the V on. And then there is light up led and then find the next closest
one to light second led. That has intelligence written all over it, a processor, which
with onboard A/D would handle everything.

I just dont get the constraint here doing the whole thing with this and that, and not
much of either.

Note the PSOC approach supplied a constant current to the sensor to get the linear
V = f( F ) relationship you want.

Good luck, maybe some one else here has a better idea....

Regards, Dana.
 
I just dont get the constraint here doing the whole thing with this and that, and not
much of either.

Presumably, from what he's said, it's school work - if you don't do your assignment as it was set, you're going to fail. I don't care how wonderful a solution might be, if it doesn't meet the criteria you're going to fail.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top