Sheik98
Posts: 3
Joined: Fri Nov 30, 2018 5:50 pm

How can I connect 5 flex sensors to raspberry pi 3

Fri Nov 30, 2018 5:59 pm

Hi! Im doing a robotic hand
How can I connect 5 flex sensores? I know that is a analog and all porta from the raspberry are digitals...
I see a lot to do that like hx710B, DAC0808, mcp 3008 and ACD804 what is the better and how i do the connection?
Later I need program that with python, some have that code?
Thanks for read me.
Pd: sorry my natal lenguage is not the english correct me pls if I write some bad

User avatar
MrYsLab
Posts: 179
Joined: Mon Dec 15, 2014 7:14 pm
Location: Noo Joysey, USA

Re: How can I connect 5 flex sensors to raspberry pi 3

Fri Nov 30, 2018 7:23 pm

I have used a PCF8591 https://www.amazon.com/SMAKN%C2%AE-PCF8 ... ds=PCF8591 with the pigpio library. Here is the example code: http://abyz.me.uk/rpi/pigpio/code/PCF8591.zip

This device has 4 analog inputs accessed via i2c. You can chain 2 together on the same i2c bus, but make sure the device you purchase allows you to select the i2c address, since it must be unique for each device on the bus. The device I linked to above allows you to select the address.

Sheik98
Posts: 3
Joined: Fri Nov 30, 2018 5:50 pm

Re: How can I connect 5 flex sensors to raspberry pi 3

Sat Dec 01, 2018 6:07 am

MrYsLab wrote:
Fri Nov 30, 2018 7:23 pm
I have used a PCF8591 https://www.amazon.com/SMAKN%C2%AE-PCF8 ... ds=PCF8591 with the pigpio library. Here is the example code: http://abyz.me.uk/rpi/pigpio/code/PCF8591.zip

This device has 4 analog inputs accessed via i2c. You can chain 2 together on the same i2c bus, but make sure the device you purchase allows you to select the i2c address, since it must be unique for each device on the bus. The device I linked to above allows you to select the address.
But to connect I need 3 PCF? The true is I do the flex sensors with paper, aluminium paper, and graphite.
I can buy right now the HX710B or DAC0808
But I dont know how connect that... I never work with that. If you know how do it pls help

User avatar
MrYsLab
Posts: 179
Joined: Mon Dec 15, 2014 7:14 pm
Location: Noo Joysey, USA

Re: How can I connect 5 flex sensors to raspberry pi 3

Sat Dec 01, 2018 11:32 pm

The DAC0808 appears to be a digital to analog converter, so I don't think that is what you are looking for.
The hx710b is used with load cells. Here is an article about load cells https://learn.sparkfun.com/tutorials/ge ... load-cells, but I am not sure if that is what you built for your sensors.

Adafruit has an article on interfacing the mcp 3008 to the Raspberry Pi and it can be found here: https://learn.adafruit.com/raspberry-pi ... rs/mcp3008.

Here is a Python pigpio library to control the hx711 which I think is similar to the hx710: http://abyz.me.uk/rpi/pigpio/code/HX711_py.zip

Sheik98
Posts: 3
Joined: Fri Nov 30, 2018 5:50 pm

Re: How can I connect 5 flex sensors to raspberry pi 3

Wed Dec 05, 2018 4:45 am

MrYsLab wrote:
Sat Dec 01, 2018 11:32 pm
The DAC0808 appears to be a digital to analog converter, so I don't think that is what you are looking for.
The hx710b is used with load cells. Here is an article about load cells https://learn.sparkfun.com/tutorials/ge ... load-cells, but I am not sure if that is what you built for your sensors.

Adafruit has an article on interfacing the mcp 3008 to the Raspberry Pi and it can be found here: https://learn.adafruit.com/raspberry-pi ... rs/mcp3008.

Here is a Python pigpio library to control the hx711 which I think is similar to the hx710: http://abyz.me.uk/rpi/pigpio/code/HX711_py.zip
I can use the ADC0809 to do that? I see the mcp3008, its fine to that, but in my country is some expensive because I need pay shipping.
but a friend have the adc809

Brandon92
Posts: 623
Joined: Wed Jul 25, 2018 9:29 pm
Location: Netherlands

Re: How can I connect 5 flex sensors to raspberry pi 3

Wed Dec 05, 2018 6:50 am

You could use that ADC, however you need to use a lot more GPIO pins of the Rpi to talk to that device. In comparison with the other one. But it is possible.
Also the resolution of your measured is with that device 8 bit (256 steps) in comparison to 10bit (1024 step).

There are a lot other ADC that you could use with the Rpi. But I don't know your regular supplier. So, it is hard to give you a example.

User avatar
MrYsLab
Posts: 179
Joined: Mon Dec 15, 2014 7:14 pm
Location: Noo Joysey, USA

Re: How can I connect 5 flex sensors to raspberry pi 3

Wed Dec 05, 2018 7:15 am

Here is an article for connecting the adc0808 to the RPi. It has the same pinout as the adc0809 https://piduinoxbee.wordpress.com/2016/ ... h-adc0808/

Return to “Automation, sensing and robotics”