User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

One wheel quicker/more powerful than the other

Thu Oct 17, 2013 4:43 pm

I am building The Raspberry Pi Car 2.0. It is very similar to my previous car, but it uses a pre-assembled H bridge rather than transistors on a breadboard. It also uses sonar so it can drive about autonomously without crashing (when there is an object <10 cm it only powers one wheel, therefore it turns). When there is no object in front of it, it powers both wheels. The wheels are both connected to the same H bridge, and therefore the same power supply. I don't use PWM, I just turn the appropriate inputs and enables to True. So both wheels should go at the same speed and the car should go straight. However this is no the case! It turns (slightly). My questions:

Why is one wheel getting more power/using power more efficiently? The motors are the same.
How can I make them equal?

I know I can use PWM on the quicker one to reduce the amount of power it gets until it matches the other wheel, but is there a better solution? Should I replace the quicker/slower motor? H bridge? Power supply?

BTW I use an L298n H bridge. I use a battery mobile phone charger with two usb outputs for power (5V 1A to the pi, 5V 2.1A to the H bridge).
Don't be mean, I'm only thirteen 8-)

User avatar
joan
Posts: 15046
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 4:51 pm

There will be minor variations in motor efficiency. They will probably be more noticeable in a low load situation like you have. PWM is probably the simplest solution.

Neat idea to switch one motor off. Be interested to see how that works in practice.

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 5:11 pm

joan wrote:There will be minor variations in motor efficiency. They will probably be more noticeable in a low load situation like you have. PWM is probably the simplest solution.

Neat idea to switch one motor off. Be interested to see how that works in practice.
It works pretty well. I will have to make my car narrower because I am only using one sonar module (NOT on a servo) so the corners have a tendency to get caught on things. The only problem with the car is straight lines at the moment. Once I've sorted that, I'll add a couple more sonar sensors. Then, I want to use some white LEDs and LDRs to detect a black line on the floor so my car can follow it. I will time how long it takes for a capacitor in series with an LDR on the left of the car takes to charge up to a point where it because a positive input to the GPIO. I will then compare that time with the same thing but in the middle of the car and on the left of the car. Whichever takes the longest must have the black line rather than white paper underneath it, so the car will turn or stay straight accordingly. I am in the process of soldering that circuit on a prototyping board. I hope to bring all of this to the December 7th Cambridge Jam.

I do have 5 of these motors so I could swap one of them (annoyingly I have already superglued them down), but none of them will be exactly the same so I am going to use PWM.
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 6:04 pm

ZacharyI123 wrote:
joan wrote:There will be minor variations in motor efficiency. They will probably be more noticeable in a low load situation like you have. PWM is probably the simplest solution.

Neat idea to switch one motor off. Be interested to see how that works in practice.
It works pretty well. I will have to make my car narrower because I am only using one sonar module (NOT on a servo) so the corners have a tendency to get caught on things. The only problem with the car is straight lines at the moment. Once I've sorted that, I'll add a couple more sonar sensors. Then, I want to use some white LEDs and LDRs to detect a black line on the floor so my car can follow it. I will time how long it takes for a capacitor in series with an LDR on the left of the car takes to charge up to a point where it because a positive input to the GPIO. I will then compare that time with the same thing but in the middle of the car and on the left of the car. Whichever takes the longest must have the black line rather than white paper underneath it, so the car will turn or stay straight accordingly. I am in the process of soldering that circuit on a prototyping board. I hope to bring all of this to the December 7th Cambridge Jam.
Most line followers I have seen use 2 or 3 Photodiodes for efficiency being able to have a narrow viewng angle so can detect line or off line accordingly. LDRs are good for general light levels, photodiodes are usally more responsive for picking up small variations in a narrow field.

Otherwise you will need a very flat surface so the tubes around the LDR that extend to ground level can detect the light, and not light of the room and reflections.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 7:44 pm

techpaul wrote:
ZacharyI123 wrote:
joan wrote:There will be minor variations in motor efficiency. They will probably be more noticeable in a low load situation like you have. PWM is probably the simplest solution.

Neat idea to switch one motor off. Be interested to see how that works in practice.
It works pretty well. I will have to make my car narrower because I am only using one sonar module (NOT on a servo) so the corners have a tendency to get caught on things. The only problem with the car is straight lines at the moment. Once I've sorted that, I'll add a couple more sonar sensors. Then, I want to use some white LEDs and LDRs to detect a black line on the floor so my car can follow it. I will time how long it takes for a capacitor in series with an LDR on the left of the car takes to charge up to a point where it because a positive input to the GPIO. I will then compare that time with the same thing but in the middle of the car and on the left of the car. Whichever takes the longest must have the black line rather than white paper underneath it, so the car will turn or stay straight accordingly. I am in the process of soldering that circuit on a prototyping board. I hope to bring all of this to the December 7th Cambridge Jam.
Most line followers I have seen use 2 or 3 Photodiodes for efficiency being able to have a narrow viewng angle so can detect line or off line accordingly. LDRs are good for general light levels, photodiodes are usally more responsive for picking up small variations in a narrow field.

Otherwise you will need a very flat surface so the tubes around the LDR that extend to ground level can detect the light, and not light of the room and reflections.
Thanks very much for the tip.

I have done some research on photodiodes and I think I have worked out what they do. Firstly, they're a diode so the current only flows in one direction- not a problem for my circuit. They measure light levels straight down, not from all angles- brilliant for my circuit. Depending on the light levels, they vary the current that goes through them- does that mean their resistance varies? If this is all true, then they're the best for my circuit.

For the time being, I will continue to use LDRs. But if once my project is complete, it isn't accurate enough (due to external light and sensitivity of the LDRs), I will migrate to photodiodes. I will not do this if I don't have to, they're a lot more expensive than LDRs unless I get the ones that are also sensitive to InfraRed. Would it be a problem if I used infrared and visible light sensitive ones?
Don't be mean, I'm only thirteen 8-)

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 7:51 pm

My current circuit is like so:

3.3 V -> 680 ohm resistor -> LDR -> 4.2 microfarrad capacitor -> GND
GPIO -> Positive of capacitor

I have now found out that photodiodes don't resist, they generate. How would I change my circuit to measure that?
Don't be mean, I'm only thirteen 8-)

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 7:54 pm

After seeing a solution to using a photodiode with a pi: http://www.raspberrypi.org/phpBB3/downl ... hp?id=1558

I think I'm going to stick with the LDRs!
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 8:10 pm

Why you only need half that circuit which seems excessive as normally I use an opamp, photodiode, cap and feedback resistor in Megaohms. Not that difficult
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 8:20 pm

techpaul wrote:Why you only need half that circuit which seems excessive as normally I use an opamp, photodiode, cap and feedback resistor in Megaohms. Not that difficult
Have you got a circuit diagram?
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 8:28 pm

Tomorrow I will dig out a cheap line follower with two photodiodes.

A toy KIT from a few years ago, and the circuit in that has NO computer just a few components.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 8:38 pm

techpaul wrote:Tomorrow I will dig out a cheap line follower with two photodiodes.

A toy KIT from a few years ago, and the circuit in that has NO computer just a few components.
Thanks very much! Are you going to draw a circuit diagram from that? Or are you going to send pictures of the circuit? Anything will be much obliged!
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 9:20 pm

Not found the line follower yet need to check the loft.

Here is a circuit from many years ago for a light level detector circuit that has been in use for many years.

C1 and C2 can be removed but were there for problems with nearby high voltage circuit inducing noise.
This cct can be driven from 3V3

Other alternatives have the photodiode to GND and feedback resistor to match photodiode, often around 10M.
Attachments
photodiode.gif
Photo diode amplifer cct
photodiode.gif (18.15 KiB) Viewed 2510 times
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 9:29 pm

If building a ciruit is a problem here is a photodiode and amplifier in one component

http://uk.farnell.com/sharp/is471fe/pho ... dp/9707840

BUT requires 5V

Check the datasheet
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Thu Oct 17, 2013 11:15 pm

Here is a couple of images of an old kit toy for a line follower includer circuit details from about 8 years ago. Actually uses a standard red LED to illuminate and two phototransistors, follows a black line approx 10mm wide.

I have a set of photos supply your email and I can send them via email
Attachments
tunderside.jpg
Underside of unit
tunderside.jpg (26.74 KiB) Viewed 2483 times
ttwopages.jpg
Circuit diagram from manual
ttwopages.jpg (48.46 KiB) Viewed 2483 times
tunit-on.jpg
Unit powered up
tunit-on.jpg (23.2 KiB) Viewed 2483 times
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 3:54 pm

techpaul wrote:If building a ciruit is a problem here is a photodiode and amplifier in one component

http://uk.farnell.com/sharp/is471fe/pho ... dp/9707840

BUT requires 5V

Check the datasheet
Thanks for the help!

I am very interested in buying a few of them for my car. Firstly, it doesn't specify what light they're sensitive to, I assume visible? Also, how would I use it with the pi? I assume GND would go to the Pi's GND and VCC goes to the Pi's 5v, but how can I get an analogue input from it? What do I do with the other two pins?
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 4:18 pm

ZacharyI123 wrote:
techpaul wrote:If building a ciruit is a problem here is a photodiode and amplifier in one component

http://uk.farnell.com/sharp/is471fe/pho ... dp/9707840

BUT requires 5V

Check the datasheet
Thanks for the help!

I am very interested in buying a few of them for my car. Firstly, it doesn't specify what light they're sensitive to, I assume visible? Also, how would I use it with the pi? I assume GND would go to the Pi's GND and VCC goes to the Pi's 5v, but how can I get an analogue input from it? What do I do with the other two pins?
By checking the datasheet Page 3 and 4 show typical connections and its peak response as in datasheet is 940nm which is in infrared (non visible)

Analogue signals are read either with an ADC or some other analogue reading metod. You need to determine how many times a second you need to read them, which determines how quickly you can process the readings and change the motors. Which gives you a response time.

I should imagine you really should read these about 100 times a second each (100Hz), filter signals and process.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 6:44 pm

techpaul wrote:
ZacharyI123 wrote:
techpaul wrote:If building a ciruit is a problem here is a photodiode and amplifier in one component

http://uk.farnell.com/sharp/is471fe/pho ... dp/9707840

BUT requires 5V

Check the datasheet
Thanks for the help!

I am very interested in buying a few of them for my car. Firstly, it doesn't specify what light they're sensitive to, I assume visible? Also, how would I use it with the pi? I assume GND would go to the Pi's GND and VCC goes to the Pi's 5v, but how can I get an analogue input from it? What do I do with the other two pins?
By checking the datasheet Page 3 and 4 show typical connections and its peak response as in datasheet is 940nm which is in infrared (non visible)

Analogue signals are read either with an ADC or some other analogue reading metod. You need to determine how many times a second you need to read them, which determines how quickly you can process the readings and change the motors. Which gives you a response time.

I should imagine you really should read these about 100 times a second each (100Hz), filter signals and process.
Thanks for the help. I don't understand the circuits in the tech sheet. I will connect VCC to the pi's 5v pin and gnd to the gnd on the pi. Is this correct? What do the other pins do/output? With the LDR, I time how long it takes for a capacitor (that's in series with the LDR) to charge up to the pinky that it triggers a GPIO to read positive. How can I adapt my circuit for this photodiode and integrated circuit? How will I measure with the Pi?
Don't be mean, I'm only thirteen 8-)

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 6:45 pm

I only really want to measure 10 Hz times a second.
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 7:06 pm

ZacharyI123 wrote:I only really want to measure 10 Hz times a second.
For motor control you will find that too slow unless your machines moves at 1m every 30 secs

At 10Hz you will notice jerky action, remember human reaction time is around 20ms on average 10ms for very fast, that mean 20ms = 50Hz always sample at least twice as fast as you need to average and use results slightly faster than you can observe.

LDR's are good for general room brightness or with focusing arrangements smaller areas.

Measuring analog with charging capacitor is good for rough approximations on SLOW signal changes. The faster your line follower travels the quicker you have to update for course corrections before you travel too far.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 7:13 pm

techpaul wrote:
ZacharyI123 wrote:I only really want to measure 10 Hz times a second.
For motor control you will find that too slow unless your machines moves at 1m every 30 secs

At 10Hz you will notice jerky action, remember human reaction time is around 20ms on average 10ms for very fast, that mean 20ms = 50Hz always sample at least twice as fast as you need to average and use results slightly faster than you can observe.

LDR's are good for general room brightness or with focusing arrangements smaller areas.

Measuring analog with charging capacitor is good for rough approximations on SLOW signal changes. The faster your line follower travels the quicker you have to update for course corrections before you travel too far.
Ok, but if I were to use the photodiode and integrated circuit that you recommended, how would I connect it up and get an analogue reading with the pi from it?
Don't be mean, I'm only thirteen 8-)

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 7:28 pm

Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 7:43 pm

ZacharyI123 wrote:
techpaul wrote:
ZacharyI123 wrote:I only really want to measure 10 Hz times a second.
For motor control you will find that too slow unless your machines moves at 1m every 30 secs

At 10Hz you will notice jerky action, remember human reaction time is around 20ms on average 10ms for very fast, that mean 20ms = 50Hz always sample at least twice as fast as you need to average and use results slightly faster than you can observe.

LDR's are good for general room brightness or with focusing arrangements smaller areas.

Measuring analog with charging capacitor is good for rough approximations on SLOW signal changes. The faster your line follower travels the quicker you have to update for course corrections before you travel too far.
Ok, but if I were to use the photodiode and integrated circuit that you recommended, how would I connect it up and get an analogue reading with the pi from it?
You use photodiode and amplifier OR the integrated circuit option (which is a photodiode and amplifier in one package) for each of at least two sensors to detect line with at least one matching LED for illumination.

To get the reading to the Pi neads some form of Analog to digital conversion, the charging capacitor method is limited to speed and accuracy. Alternatively you use an I2C or SPI ADC (Analogue to Digital Converter chip. Something like PCF8591 or others are available to give you an 8 bit value for how illuminated it is (values 0-255). From there you can work out how much adjustment to make to each wheel and how often.

If you want to do motor control digitally and in software you have to add things that are more than would be with a simple analogue system.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 8:01 pm

techpaul wrote:
ZacharyI123 wrote:
techpaul wrote: For motor control you will find that too slow unless your machines moves at 1m every 30 secs

At 10Hz you will notice jerky action, remember human reaction time is around 20ms on average 10ms for very fast, that mean 20ms = 50Hz always sample at least twice as fast as you need to average and use results slightly faster than you can observe.

LDR's are good for general room brightness or with focusing arrangements smaller areas.

Measuring analog with charging capacitor is good for rough approximations on SLOW signal changes. The faster your line follower travels the quicker you have to update for course corrections before you travel too far.
Ok, but if I were to use the photodiode and integrated circuit that you recommended, how would I connect it up and get an analogue reading with the pi from it?
You use photodiode and amplifier OR the integrated circuit option (which is a photodiode and amplifier in one package) for each of at least two sensors to detect line with at least one matching LED for illumination.

To get the reading to the Pi neads some form of Analog to digital conversion, the charging capacitor method is limited to speed and accuracy. Alternatively you use an I2C or SPI ADC (Analogue to Digital Converter chip. Something like PCF8591 or others are available to give you an 8 bit value for how illuminated it is (values 0-255). From there you can work out how much adjustment to make to each wheel and how often.

If you want to do motor control digitally and in software you have to add things that are more than would be with a simple analogue system.
Would I be able to use the capacitor with the integrated circuit? If so, how would I wire/connect it up?

If I decide after trying it with the capacitors, I need to measure at a higher frequency, I would probably use this: https://www.modmypi.com/quick2wire-rasp ... ogue-board
When using that, how would I connect that to my pi and to the integrated circuit?
I assume I would use code like this:

Code: Select all

import sys
from time import sleep
from quick2wire.parts.pcf8591 import *
from quick2wire.i2c import I2CMaster
with I2CMaster() as i2c:
    adc = PCF8591(i2c, FOUR_SINGLE_ENDED)
    left_photodiode = adc.single_ended_input(0)
    leftcentre_photodiode = adc.single_ended_input(1)
    right_photodiode = adc.single_ended_input(2)

    while True:
        if (left_photodiode.value<right_photodiode.value and left_photodiode.value<centre_photodiode.value):
            power right wheel
[b]Etc...[/b]
Don't be mean, I'm only thirteen 8-)

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 8:23 pm

ZacharyI123 wrote:
techpaul wrote:You use photodiode and amplifier OR the integrated circuit option (which is a photodiode and amplifier in one package) for each of at least two sensors to detect line with at least one matching LED for illumination.

To get the reading to the Pi neads some form of Analog to digital conversion, the charging capacitor method is limited to speed and accuracy. Alternatively you use an I2C or SPI ADC (Analogue to Digital Converter chip. Something like PCF8591 or others are available to give you an 8 bit value for how illuminated it is (values 0-255). From there you can work out how much adjustment to make to each wheel and how often.

If you want to do motor control digitally and in software you have to add things that are more than would be with a simple analogue system.
Would I be able to use the capacitor with the integrated circuit? If so, how would I wire/connect it up?

If I decide after trying it with the capacitors, I need to measure at a higher frequency, I would probably use this: https://www.modmypi.com/quick2wire-rasp ... ogue-board
When using that, how would I connect that to my pi and to the integrated circuit?
That board is one of many boards that use the PCF8591, its assembly guide shows you would need to do some soldering to make it. It has mistakes in its jumper selections, Setup PCF8591 to link GND connections, Set chip and reference to be 5V range, power each of the chips from 5V and take the output from the chip to one of the analog inputs. The I2C wires (SCL and SDA) go to the Pi GPIO connector and you also take 5V and GND from the Pi.
I assume I would use code like this:
Something like that, but needs more planning before coding, work out all conditions for your inputs and what you need software to do and what would be fault inputs and what to do like stop.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
ZacharyI123
Posts: 263
Joined: Sun Jun 17, 2012 1:09 pm
Location: Ilford, Essex
Contact: Website

Re: One wheel quicker/more powerful than the other

Fri Oct 18, 2013 8:56 pm

techpaul wrote:
ZacharyI123 wrote: Would I be able to use the capacitor with the integrated circuit? If so, how would I wire/connect it up?

If I decide after trying it with the capacitors, I need to measure at a higher frequency, I would probably use this: https://www.modmypi.com/quick2wire-rasp ... ogue-board
When using that, how would I connect that to my pi and to the integrated circuit?
That board is one of many boards that use the PCF8591, its assembly guide shows you would need to do some soldering to make it. It has mistakes in its jumper selections, Setup PCF8591 to link GND connections, Set chip and reference to be 5V range, power each of the chips from 5V and take the output from the chip to one of the analog inputs. The I2C wires (SCL and SDA) go to the Pi GPIO connector and you also take 5V and GND from the Pi.
I assume I would use code like this:
Something like that, but needs more planning before coding, work out all conditions for your inputs and what you need software to do and what would be fault inputs and what to do like stop.
The soldering is fine. What are the mistakes on the board? Do I need to change what/where I solder or connect it up?

Connections for the quick2wire

I will connect the 5v power pin to the Pi's 5v pin and the GND pin to the Pi's GND pin. Is this right? What do I connect the 3V3 to? Can you point out in the picture what I connect to the GPIO? Which GPIO pins in specific?

Connections to the integrated circuit:

The VCC goes to the Pi's 5v pin? The GND pin goes to the GND on the Pi? What do I do with the other two pins?
Don't be mean, I'm only thirteen 8-)

Return to “Automation, sensing and robotics”