ABCD analog

How many sensors are you interested in using? Do you have an 8 pin servo control bank on the ssc-32 that is currently unused?

Hello zoomcat

I would like to use 8 sensors if possible.

Yes I have actually 16 thru 31 available, what do you have in mind ?
Wayne

If you can live with a ~.7v loss to the analog input, then you could supply the + to the 8 sensors from the 8 available servo pins. You would use these pins in the byte mode so each could individually be set high at +5v to supply the desired sensor. Between each sensor output to the analog input pin, you would use a diode to prevent back feeding thru the other sensors. A cheap signal diode from Radio Shack has a .7v voltage drop across it, so you would only be able to measure from 0 to ~4.3v, which may or may not be an issue for what you want to do. You can get ~.1v voltage drop diodes, but not at RS. You connect the output of all the diodes to a single analog input pin. When you want to measure the pressure on a sensor, you set the associated servo pin high (with the others set low), and then read the analog input pin to get a pressure value from the sensor.

zoomcat thank-you

Unfortunately I am not a hardware guy so this procedure with the diode while easy for you and others with electronics experience, is very intimidating and probably beyond me at this point. Perhaps 3-4 months down the road, I could attempt this.

As to doubling up the fsr’s, I was able to attach 4 pressure sensors to the ssc and they worked great.

I am now reading up on the ABB for additional sensors.

Thanks to all who helped.
Wayne

I’m not sure about the cost of the ABB, but it is probably more than the $1.39 10-pack of diodes from RS that might solve your problem.

Hi zoomcat
Ok you have convinced me, I will see about getting diodes this week and give it a try. In retrospect this would really make the ssc32 quite flexible.

A couple questions if I may:

What serial command do I send the servo to query it ?

For the pressure fsr is the diode before or after the resistor in the wire going to the analog input pin ?

So if I understand this for eight of the 3-wire fsr’s…

  1. Supply the + to the 8 sensors from the 8 servo pins.
  2. The - to the 8 sensors from the 8 servo pins
  3. Connect the output of all the diodes to a single analog input such as A

Wayne

Powering up and down sensors is not really a good idea as many sensors require several milliseconds to startup and even then the first read value is usually to be thrown away.

ZC is on the right track though. use the port to control a multiplex analogue switch. A 4 to 1 analogue switch would only require the use of 2 bits of a port. The sensors could be powered on continuously and switched and read as required via the analogue switch.

Theoretically, you could run up to 256 different sensors from one eight bit port and one analogue input. Not so good in practice but do-able.

Thanks Paul (PS: also zoomcat)

You have me intrigued now !
Where would I buy such a switch and what description would I look for to know the correct switch to purchase ?

somewhere like farnell or rs components in the uk, radioshack or maplins

just search for “analogue multiplex” on rs components

heres an example

docs-europe.electrocomponents.co … 77fe4d.pdf

its a 4 or 8 way and requires either 2 or 3 bits to control.

They’re used in telephony and modems a lot

Below are the part numbers for the RS diodes. As a first test using your current setup, place a diode between the fs output wire and the analog input pin, with the banded end of the diode going to the analog pin. Run your force test on the sensor and see if the pressure on the fs still produces a useable output. The output should be different (voltage to the pin should be ~.7v lower), but you should be able to detect pressure changes on the fs. Bottom is from the ssc-32 user manual on how to use the byte mode on the servo control pins. For this setup, you would send 1, 2, 4, 8, 16, 32, 64, or 128 to activate the desired pin. As for a multiplexing chip, I like the 74HCT259 chips. RS use to carry these, but no longer. You can get them from the usual electronic suppliers for ~$.50 each.

276-1122 10-pack $1.39
276-1620 50-pack $2.59

Byte Output:

:

=(0 = Pins 0-7, 1 = Pins 8-15, 2 = Pins 16-23, 3 = Pins 24-31.)
=Decimal value to output to the selected bank (0-255). Bit 0 = LSB of bank.
This command allows 8 bits of binary data to be written at once. All pins of the bank are
updated simultaneously. The banks will be updated within 20mS of receiving the CR.
Bank Output Example: "#3:123 "
This example will output the value 123 (decimal) to bank 3. 123 (dec) = 01111011 (bin),
and bank 3 is pins 24-31. So this command will output a “0” to pins 26 and 31, and will
output a “1” to all other pins.

ok thank-you zc

I really like a detailed response and I appreciate that you gave your time to help out.

This is enough info so that I can adjust my code accordingly and I will look for the diodes this week.

Paul
I am also going to try to obtain an analogue multiplex to see how that appproach works.

Thank-you both
Wayne

If you go to some other place other than RS to get the parts, then get a Schottky type of diode like the 1N5818. It only has a .1v voltage drop across it. Below are Jameco prices for various components. The 4066 switch chip combined with the 259 chip might be a cheaper setup than the 7501 multiplex chip by itself. Just as a point of interest, when the force sensor is connected to the analog port and has no force on it, is the reported value closer to 0 or 255?

ad7501 1 for $12.69

Schottky 1N5818 10 for $.70
74hct259 10 for $2.27
74hct4066 10 for $1.67

Hi zoomcat

0

If the value starts out at 0 and increases as pressure is applied, then the Schottky type of diode should have the least affect on the readings. In the past I’ve tinkered with the 74hct259 chips and the parallel port. The below has a schematic at the bottom of the page. The 74hct259 is also an addressable latch chip, so the individual outputs can be turned on/off and they will remain in the state until changed again. As best as I remember, one should be able to individually control up to ~120 lines from 8 controllable outputs (parallel port data pins or probably a ssc-32 servo bank) using 17 74hct259 chips.

geocities.com/zoomkat/output.htm

The 259 is just a latch and isnt needed, the outputs of the SSC are already latched when you set them.

Just connect bits 0,1 & 2 of your spare port to A0,A1 & A2 of whichever MUX you choose and if required connect A3 to ENABLE. The COMMON or OUT is connected to your VA input.

These are ESD sensitive so make sure you are earthed out properly before handling them

The 74hc259 is also your MUX. :wink:

semiconductors.philips.com/a … _CNV_2.pdf

It is a DIGITAL LINE MUX, you can’t switch an analogue voltage with it. You would just get high or low out of it. The SSC uses 74HC595 registers to act as a MUX that would control an analogue switch. The 7501/2/3 Analog switches can be controlled directly from the SSC output pins and switch the sensor voltages directly to the Atmega AD convertor. No additional hardware would be required.

Just to add a little more electronic insight, one 74hct259 chip can control two 74hct4066 chips, duplicating the 7501 at a significantly lower cost. For a cost of $3.69 (for ten 74hct259 chips and ten 74hct4066 chips), one can use six 74hct259 chips to control ten 74hct4066 chips so forty force sensors could be monitored (with four 74hct259 chips still available for other projects). Monitoring forty force sensors (if one had a desire to do so) using the 7501chips would cost $63.45.

Not to perpetuate the discussion but if cost is the issue

I agree the 4066 would work, there are others as cheap but the 259 is redundant. Just drive it straight off the SSC registers… you dont need to seperately latch the outputs as they are already latched.

That halves the price again…

No doubt that the 4066 chips can be driven directly from the ssc-32 pins. My point was to show that the suggested ad7501 MUX switch chip at $12.69 each, with three inputs and eight outputs, could be easily duplicated by a DIY type of person using the equivelant of $.57 in parts. The added bonus using a 259 chip is that more than eight sensors can be used without using more than the available eight pins on the ssc-32.