Finally got my PicoBorg all connected up to the wheels last night, and it works! However, it works too well - it is far too fast for what I want to do with it. The Pi is running from its own rechargeable battery, and the two wheel motors from 4 AA batteries. I'm no electronics expert, so I would like some advice to slow it down. Perhaps I could use a couple of resistors between the PicoBorg and the motors? I was thinking of some potentiometers so I can try and match the speed of the two motors so it goes in a straight line. Any advice?
The size of the additional resistance will control how much slower the wheels turn by lowering the voltage across the motors.
It does seem like potentiometers would be good, that way you can indeed tune the two motors so they run at the same speed (if they do not already), but also you can set him to run at different speeds depending on what you want to do with him.
I tried a couple of potentiometers, but they were to large, I think - the motors either worked or didn't.
So I wanted to try resistors. I tried 100ohm, which slowed the motors down quite a bit, but they became REALLY hot. I'm not sure what amps are drawn by the two motors from a 6v battery pack, but perhaps it's too large for my little 1/4w resistors?
As I mentioned above, I am VERY new to electronic circuits.
No worries, learning new things always take time and mistakes.
The separate battery pack is a good idea, it will mean the motors will not draw from the Raspberry Pi's power source, which it is very picky about!
In case you were still interested in your previous experiment:
In this case 1/4 W resistors are outside tolerance and they will get hot.
If we assume a worst case scenario (such as a stalled motor):
Motor resistance = 0 Ω
Resistor resistance = 100 Ω
Battery voltage = 6 V
Resistor voltage will be all 6 V (since the motor is providing no resistance)
V = I × R
I = V / R
I = 6 / 100
I = 0.06
Power across each resistor:
P = V × I
P = 6 × 0.06
P = 0.36
Therefore each resistor will be consuming ~ 1/3 W at the worst case, somewhat in excess of 1/4 W.
The problem is the smaller the resistance is, the more power they will consume.
A simpler reference equation for this would be:
P = V² / R
P = (6 * 6) / 100
P = 36 / 100
P = 0.36
A thought I had for my PiCarD - forward and reverse. There are 4 ports on the PicoBoard, so I was wondering whether I could use two for forward, and two for backward - connected to the same motors. I think I would need to have diodes on all the wires to stop feedback when the motors were turned on in one direction. Do you think that would work?
That looks like it would work, the way the input logic is connected it would seem like you could even operate it directly from the Raspberry Pi (i.e. no PicoBorg).
Having said that, without being able to see the schematic for the board we cannot guarantee what it is capable of, but our best guess is that it would behave as intended.
To give you a heads up, tomorrow we will be placing some Omron relays on the accessories page for people who wish to drive PicoBorg powered robots either forward / backward or with motors which require more power than PicoBorg is able to provide.
...but it won't do what I want. As all it does is switch a circuit on and off, so I would need 4 relays for just one motor - one pair for one way, one for the other. I have therefore purchased the relays from you which I can wire up just as I want.
Me and my friend are building a Rpi powered drinks robot. We are using small dc pumps from china and a picoborg. All of this should go together pretty easily as soon as we get Raspbian running on the Pi. Our question is how to connect two picoborgs to one raspberry pi. I have seen this done here (http://www.governor.co.uk/news-plus-views/2013/august/the-raspberry-pi-a...) so its possible. I mean there are plenty of gpio pins left, but i have no idea on what pins to use and so on. Is there a way to do this without having to do modifications to the boards? And what pins should we use? (apart from 4, 18, 8 and 7 which are already used by the picoborg. Any suggestions?
The easiest way to do this if you do not mind wiring would be to connect a second one to different GPIO pins on the Raspberry Pi, perhaps by soldering wires between the two PicoBorgs.
The main thing with picking pins will be to avoid any that you may want for other tasks and any in use with other boards.
If you are not using any other boards on the GPIO header we would suggest using GPIO 22, 23, 24, and 25 (pins 15, 16, 18, and 22).
If you are using other boards then they will use other pins themselves which you would need to avoid, for example LedBorg uses GPIO 22 so maybe use GPIO 10 (pin 19) instead.
You will want to add some new drive definitions as well, driven the same way the current four are if you use the script code we provide to drive the new GPIO pins for the second PicoBorg.
That sounds awesome! Thank you for the fast answer!
We don't plan on using the gpio pins for any other than the two borgs. The only thing i didn't quite understand was the part about connecting to gnd. We plan on connecting the two borgs with som female to male jumpers and just having the borg mounted to some plate next to the pi. By doing this i have to connect 5 jumpers connecting the borg to the pi, right? 4 gpio pins and 1 gnd?
GeekyTim
Thu, 06/27/2013 - 13:11
Permalink
It works!
Finally got my PicoBorg all connected up to the wheels last night, and it works! However, it works too well - it is far too fast for what I want to do with it. The Pi is running from its own rechargeable battery, and the two wheel motors from 4 AA batteries. I'm no electronics expert, so I would like some advice to slow it down. Perhaps I could use a couple of resistors between the PicoBorg and the motors? I was thinking of some potentiometers so I can try and match the speed of the two motors so it goes in a straight line. Any advice?
GeekyTim
Thu, 06/27/2013 - 21:25
Permalink
It's a little slower...
Using RemoteKeyBorg it's manageably slower. But it turns, so I think the potentiometers would be a good idea.
piborg
Fri, 06/28/2013 - 10:23
Permalink
Speed control
The size of the additional resistance will control how much slower the wheels turn by lowering the voltage across the motors.
It does seem like potentiometers would be good, that way you can indeed tune the two motors so they run at the same speed (if they do not already), but also you can set him to run at different speeds depending on what you want to do with him.
Great idea :)
GeekyTim
Sun, 06/30/2013 - 12:18
Permalink
Having problems slowing down
I tried a couple of potentiometers, but they were to large, I think - the motors either worked or didn't.
So I wanted to try resistors. I tried 100ohm, which slowed the motors down quite a bit, but they became REALLY hot. I'm not sure what amps are drawn by the two motors from a 6v battery pack, but perhaps it's too large for my little 1/4w resistors?
As I mentioned above, I am VERY new to electronic circuits.
GeekyTim
Sun, 06/30/2013 - 12:29
Permalink
KISS
Or, I could simply use a two AA battery pack! That works for me :-) Off to eBay!
piborg
Sun, 06/30/2013 - 12:46
Permalink
Always fun learning :)
No worries, learning new things always take time and mistakes.
The separate battery pack is a good idea, it will mean the motors will not draw from the Raspberry Pi's power source, which it is very picky about!
In case you were still interested in your previous experiment:
In this case 1/4 W resistors are outside tolerance and they will get hot.
If we assume a worst case scenario (such as a stalled motor):
Motor resistance = 0 Ω
Resistor resistance = 100 Ω
Battery voltage = 6 V
Resistor voltage will be all 6 V (since the motor is providing no resistance)
V = I × R
I = V / R
I = 6 / 100
I = 0.06
Power across each resistor:
P = V × I
P = 6 × 0.06
P = 0.36
Therefore each resistor will be consuming ~ 1/3 W at the worst case, somewhat in excess of 1/4 W.
The problem is the smaller the resistance is, the more power they will consume.
A simpler reference equation for this would be:
P = V² / R
P = (6 * 6) / 100
P = 36 / 100
P = 0.36
See here for more detail.
GeekyTim
Wed, 07/10/2013 - 16:13
Permalink
A thought I had for my PiCarD
A thought I had for my PiCarD - forward and reverse. There are 4 ports on the PicoBoard, so I was wondering whether I could use two for forward, and two for backward - connected to the same motors. I think I would need to have diodes on all the wires to stop feedback when the motors were turned on in one direction. Do you think that would work?
Tim (Noob to electronics)
piborg
Mon, 07/15/2013 - 13:09
Permalink
Forward and reverse
Hi Tim,
You can use two relays per motor with a picoBorg to get both directions.
Just make sure to use NC to ground on both sides, or when you restart the Pi, your motors will move!
A relay capable of providing 1-2 Amps or more should be fine.
GeekyTim
Mon, 07/15/2013 - 14:10
Permalink
Two way switch
To act like a two-way switch? And you wouldn't get any feedback to the PicoBoard as I would be using relays. Good idea.
GeekyTim
Tue, 07/16/2013 - 19:09
Permalink
Relay module
Would something like this do?
piborg
Wed, 07/17/2013 - 10:15
Permalink
Relay module
Did you mean to attach a link?
GeekyTim
Wed, 07/17/2013 - 10:27
Permalink
Oops! Yes, I did
http://www.ebay.co.uk/itm/New-4-Channel-5V-10A-Relay-Shield-Module-For-A...
piborg
Wed, 07/17/2013 - 10:46
Permalink
Relay module
That looks like it would work, the way the input logic is connected it would seem like you could even operate it directly from the Raspberry Pi (i.e. no PicoBorg).
Having said that, without being able to see the schematic for the board we cannot guarantee what it is capable of, but our best guess is that it would behave as intended.
piborg
Wed, 07/17/2013 - 11:15
Permalink
Relays
To give you a heads up, tomorrow we will be placing some Omron relays on the accessories page for people who wish to drive PicoBorg powered robots either forward / backward or with motors which require more power than PicoBorg is able to provide.
GeekyTim
Wed, 07/17/2013 - 11:18
Permalink
Looks like an order is going to come your way
For the Tri, XLo etc!
GeekyTim
Tue, 07/23/2013 - 22:18
Permalink
Got a relay board...
...but it won't do what I want. As all it does is switch a circuit on and off, so I would need 4 relays for just one motor - one pair for one way, one for the other. I have therefore purchased the relays from you which I can wire up just as I want.
Lasse94
Mon, 10/07/2013 - 09:56
Permalink
Drinks Robot and questions!
Hey guys!
Me and my friend are building a Rpi powered drinks robot. We are using small dc pumps from china and a picoborg. All of this should go together pretty easily as soon as we get Raspbian running on the Pi. Our question is how to connect two picoborgs to one raspberry pi. I have seen this done here (http://www.governor.co.uk/news-plus-views/2013/august/the-raspberry-pi-a...) so its possible. I mean there are plenty of gpio pins left, but i have no idea on what pins to use and so on. Is there a way to do this without having to do modifications to the boards? And what pins should we use? (apart from 4, 18, 8 and 7 which are already used by the picoborg. Any suggestions?
piborg
Mon, 10/07/2013 - 18:43
Permalink
MultiBorgs ^_^
The easiest way to do this if you do not mind wiring would be to connect a second one to different GPIO pins on the Raspberry Pi, perhaps by soldering wires between the two PicoBorgs.
The pins you would need to connect are one of the grounds (GND, pin 6 for example) between the two PicoBorgs, and GPIO 4, 18, 8, and 7 (pins 7, 12, 24, and 26) to four unused GPIO pins on the PicoBorg connected to the Raspberry Pi.
(see the schematic: http://piborg.org/images/picoborg/schematic.pdf, or eLinux: http://elinux.org/Rpi_Low-level_peripherals#General_Purpose_Input.2FOutp... for the GPIO header layout)
The main thing with picking pins will be to avoid any that you may want for other tasks and any in use with other boards.
If you are not using any other boards on the GPIO header we would suggest using GPIO 22, 23, 24, and 25 (pins 15, 16, 18, and 22).
If you are using other boards then they will use other pins themselves which you would need to avoid, for example LedBorg uses GPIO 22 so maybe use GPIO 10 (pin 19) instead.
You will want to add some new drive definitions as well, driven the same way the current four are if you use the script code we provide to drive the new GPIO pins for the second PicoBorg.
Lasse94
Mon, 10/07/2013 - 20:13
Permalink
MANYBORGS!
That sounds awesome! Thank you for the fast answer!
We don't plan on using the gpio pins for any other than the two borgs. The only thing i didn't quite understand was the part about connecting to gnd. We plan on connecting the two borgs with som female to male jumpers and just having the borg mounted to some plate next to the pi. By doing this i have to connect 5 jumpers connecting the borg to the pi, right? 4 gpio pins and 1 gnd?
piborg
Mon, 10/07/2013 - 23:02
Permalink
Connections
That sounds right, do not forget to connect the main V+ and GND connections on both PicoBorgs to the power supply :)