ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

#1  

I found an English PDF file on this series of pressure transducers here. Looks like all you have to do is add a resistor and a voltage source then connect the junction of the resistor and the transducer to an ADC port. What size resistor you will need will depend on the range of force that will be applied to the transducer, I would suggest experimenting with it before hooking it up to the EZ-B.

Apparently the transducer has an amazing resistance change range, 1 mega ohm down to < 3K ohms. Though the PDF file seems to indicate more like 10 mega ohms. Here's how you would hook it up for testing. Get a resistor, about 100 K ohms could be good to start with. Attach one end to the negative lead from a power supply or battery source. Using two AA cells in series would be good since that would give you 3VDC and the pins on the EZ-B are 3.3VDC. Attatch the other end of the resistor to one end of the transducer. Then attach the other end of the transducer to the positive lead of the power. Hook a voltmeter across the 100 K ohm resistor (negative to the negative of the power source and positive to the junction of the resistor and the transducer. The meter will read some small voltage (about one tenth of the applied voltage, assuming 1 M-ohm unloaded). Apply force to the transducer and you should see the voltage go up on the meter.

To hook it up to an ADC port on the EZ-B you will need to attatch it like I described above, but to the pins of the ADC instead. The pin with the black colored plastic beneath it is the negative and the pin with the red plastic below it is the positive voltage. The other pin goes to the junction of the resistor and the transducer.

As far as programming goes, you can use the GetADC () Script instruction. For example: $CurrVoltage = GetADC($ADCPortNumber). Then you can compare this value with some value between 0 and 3.3 to use as a "trigger" for whatever action you want to happen. For instance:


$CurrVoltage = GetADC($ADCPortNumber)
IF ($CurrVoltage &gt;= $MaxValue)
  DoSomething
EndIF

$MaxVaue being a voltage between 0 and 3.3V. What the value is that you will use depends on the output of the transducer for a certain amount of force applied to it. You will have to see what the value is with no force applied to the transducer. Then apply some force and see what that value is. You can use the ADC Value Control from the ADC Controls section to see the voltage in ARC. If you can't get enough voltage for a given force applied to the transducer, you can try a higher value of resistor.

Hope that helps.

#2  

Hello WBS00001,

thanx for you cool and huge Help,

I understand slowly how it works.

Do you maybe can post an electric plan for installtion to the EZB.

I know it easy to do this installtion, but to go shure a pic can say more then thousand words.

Thanx you so much!

Boris

United Kingdom
#3  

@rentaprinta.

The following link, in post #29, may be of use to you. I connected up some flex sensors recently which are very similar to the pressure sensors you are using...

Flex sensors

Hope that helps.

#4  

Hello Boris;

Yes, I can create a picture for you to help, but all it will be is showing is an extension cable with one end cut off, wires stripped, and the resistor and the transducer, along with an image of the EZ-B showing a typical connection point (and ADC 2-pin connection). Is that what you are looking for?

Also, I looked into the use of this transducer more and limitations of it. There are things to keep in mind.

1)This is NOT a strain gauge, load cell, or pressure transducer. Trying to use it to actually measure force applied can be very difficult. Also, the only actual sensing part (sensor) is the round section. The long, rectangular part is only for connecting to the sensor area. That part is meant to be bendable. Not the round part. So do not think that you will get a reading by bending the rectangular part. That being said, you may get a change in reading when you bend the rectangular part, but that will only be because it is physically connected to the sensor part. Bending the rectangular part could cause some distortion of the round part, causing a change in resistance. My point is, that if you were getting the one with the long rectangular part because you thought that would give you a long part to bend to get results over a long area, that is not going to work out. You probably don't really need that particular unit.There is a version with just the round part and connection pins if you need something more compact.

  1. It is sensitive to humidity. Long exposure to high humidity can change the resistance characteristics. That usually should not be a problem for the most part. Never allow it to be placed in water, especially hot water. The adhesive holding it together can be damaged doing that.

3)As I mentioned in point 1, it is difficult to get repeatable results from it because so many things can effect the change in resistance with a specific force applied. For instance it must be mounted to a flat, smooth surface (no bends) with no air bubbles beneath it. Again, I'm talking about the round (sensor) part of it. The long rectangular part can mount to a curved surface. They recommend using thin double sided tape like Scotch brand double-sided laminating adhesives. The type that is like regular tape but has glue on both sides. Be sure to cover the entire area of the transducer with the tape. It's not going to work very well if applied to something like the palm of the robot's hand, for example, to measure the force being applied by the robot when it grips something. Also, do not use cyanoacrylate adhesives (e.g. what we call Super Glue or Krazy Glue) or solder flux-removing agents to any portion of it, top or bottom.

4)Never let sharp objects come in contact with it. In fact it is best to cover it with something rather than letting things contact the surface directly. Soft rubber is recommended.

5)Do not solder to the connection pins or the silver traces going to them (the long, rectangular part). You must use a connection device such as a zero insertion force (ZIF) connector or an AMP type connector. We call them "flea clips." Basically, only use something you can plug them into. It's best to cover those points with shrink wrap tubing or electrical tape as well.

There are other things, but that covers the major ones.

#5  

Hi Steve,

Hi WBS00001,

so i made a little installation,

User-inserted image

Update: It´s a 10K ohm

and made a new project with ADC Meter:

User-inserted image

Like you see i got only 0,88 to 0,90 Volts on the ADC Meter.

I can push my pressure sensor so much i can, but no changes.

I check with a Multimeter my Pressure Senors and it ok!

So something wrong with the wires?

Boris

United Kingdom
#6  

Correct me if I'm wrong anyone, but shouldn't the resistor be connected between the yellow signal and black ground or red Vcc wires, and not between the black ground and red Vcc wires as in the photo?

That's how I did it with my "Flex" sensors...

User-inserted image

#7  

From your picture the resistor is between ground and +3.3v.... it should be either between ground and yellow signal (pull down) or between +3.3 and yellow signal (PullUp)

#8  

Hello again Boris;

Unfortunately the picture doesn't show the connections of the sensor but I am assuming the white wire is connected to the white wire on the connector block and the red wire is going to the red wire on the connector block. When I say "connector block" I mean the white and clear blocks shown in the picture. Also when I say "plug" (below) I mean the black connector shown in the picture.

Anyway, If my assumptions are correct about how the sensor is connected, you need to make the following change:

The yellow wire on the plug should be going to the ADC input. Move the resistor from where it is in the picture to the yellow wire on the plug. Just swap it from the connection block it is in now to the other connection block, connected to the yellow wire. The other end of the resistor is fine as it is.

To make it a bit more uniform, you might want to also swap the red and white wire coming from the sensor (where they go into the connector blocks) so that you have red going to red on at least that one. It will work either way but that just makes the color code of the wires make more sense.

Plug the black connector into the ADC port, being careful to make sure the black wire goes to the pin with the black plastic under it. Try again.:)

#9  

Hi Guys,

sorry it was my mistake!

User-inserted image

Now it works, but gives a possibility that range is higher?

Now i can check between 1 V and 0,8 Volt

User-inserted image

User-inserted image

Or its the maximum of the range i can check?

Or i must change the 10k ohm?

Boris

#10  

Yes, try a larger resistor. Like 100K. If you have a large value potentiometer (1 M-ohm or more) you could try putting that in so you can vary the resistance to see what value would be good. Hook it up between the middle connection and either end. Be aware, however, that the larger the resistor the more likelihood you will get noise in on the ADC input point. There is an alternate form of hookup of the voltage divider and the sensor which could reduce the noise, but I won't go into that as yet.

EDIT Also the maximum range you can get is 0-3.3 volts, regardless of the circuit used. If the 100K gives you too much output, try something like 33K or so. What you will want will depend on the range of output you want for a given range of applied force.

#11  

Hi,

if i put a 30K ohm the Volt is 0,84 in standard mode.

If i push the pressure sensor the volt goes higher to 1,04 volt.

Strange complete diffrent.

Update not 300k i wrote wrong i use 30k!

Update 2: forget the diffrense of the Volt... change cable everything is good.

But still if i use a 60k ohm the range is the same!

Maybe less ohm? Use a 5k?

#12  

@rentaprinta The problem I have on my end is that I don't know what change in resistance the sensor is doing for changes in the force applied. Without knowing that it's hard to advise you on what size resistor to use. Do you have an ohmmeter? If so if you could connect it to that and measure the resistance from the sensor with no load and with various pressures it would help a lot. The unloaded resistance is either 1 M-ohm 0r 10M-ohm, I'm not sure which, so you will have to use a high ohm range initially.

#13  

Hi i got it!

With a 90k ist works perfect!

My Script for this:

:loop
$CurrVoltage = GetADC(ADC7)
if ($CurrVoltage &lt;= 15)
  SayEZBWait(&quot;Aua das tut ganz sch&#246;n weh&quot;) 
endif
sleep (300)
if ($CurrVoltage &lt;= 85)
  SayEZBWait(&quot;Du dr&#252;ckst mich&quot;) 
endif
sleep (300)
if ($CurrVoltage &lt;= 205)
  SayEZBWait(&quot;Das f&#252;hlt sich sch&#246;n an&quot;) 
endif
sleep (300)
goto (loop)

How i can make it like with the Script with the UltraSonic

IF($proxsense > $proxclose and $proxsense< $proxclose2)

Now the script play anything if the voltage is @ 14 , but the script only must play this

if ($CurrVoltage <= 15) SayEZBWait("Aua das tut ganz schön weh")

So how i can change it?

#14  

Hold on. I deleted my last post because I may have misunderstood what you actually wanted. Do you want it to only say a given phrase if the reading is below (or equal to) that value only?

Like This? Say "Aua das tut ganz schön weh" if the reading is <= 15 Say "Du drückst mich" if the reading is >15 but <=85 Say "Das fühlt sich schön an" if the reading is >85 but <=205

#15  

HI,

this sounds good.

In the end its for the finger sensor for my Inmoov.

If the Hand will grab something, i want :

if reading between 200 and 85 = the servo will drive slower if reading between 85 and 15 = the servo drive really slow if reading under 15 = the servo stops

#16  

Ok, good. This should work then.


:loop
$CurrVoltage = GetADC(ADC7) 
if ($CurrVoltage &lt;= 15)
  SayEZBWait(&quot;Aua das tut ganz sch&#246;n weh&quot;) 
  sleep (300)
Elseif ($CurrVoltage &lt;= 85)
  SayEZBWait(&quot;Du dr&#252;ckst mich&quot;) 
  sleep (300)
Elseif ($CurrVoltage &lt;= 205)
  SayEZBWait(&quot;Das f&#252;hlt sich sch&#246;n an&quot;) 
endif
sleep (300)

Examples: If the reading is 0, it will say "Aua das tut ganz schön weh" If the reading is 12, it will say "Aua das tut ganz schön weh" If the reading is 15, it will say "Aua das tut ganz schön weh" If the reading is 16, it will say "Du drückst mich" If the reading is 50, it will say "Du drückst mich" If the reading is 84, it will say "Du drückst mich" If the reading is 85, it will say "Du drückst mich" If the reading is 86, it will say "Das fühlt sich schön an" If the reading is 200, it will say "Das fühlt sich schön an" If the reading is 205, it will say "Das fühlt sich schön an" If the reading is 206 or more it will not say anything

Remember though it will say the phrase every time it goes through the loop. Even when the robot is not gripping anything.

Glad to hear it's working! At least the resistor was close to my original estimate of 100K.:D

Also good to see you are using the readings in a general sense and not for precise readings of pressure applied. That is the best way to apply it. Best of luck!

United Kingdom
#17  

Great solve @WBS. Nice job.:)

And I'm pleased you got the sensor working now @rentaprinta. Have fun continuing with your build.

#18  

Perfect!

Elseif..... this is what i was searching for!

No it work 100%

And don´t be worry... the "saying" is only a test

Later like i told the finger will stop (the servo) if the pressure its to much.

this will be witout sound.

@Steve

thanx slowly the inmoov become bigger ;-)

Boris