The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
So I ordered a DF Robot kit and got some help to put it together.
I want to control the wheels with my netduino.
What I want to do is simple. Press the netduino's button, and start the 4 wheels in the same direction, full power.
When I try to make it run with one wheel pluged in my breadboard, it works, the wheel move.
But when I add a second wheel, nothing appens. It seems that I dont have enough power to make the wheels move.
The netduino is powered by a 9volt battery. When I press the button, the net duino let the big power source ( 5 AA batteries , as suggested in the kit) flow in the motors. (this is how I see it correct me if i'm wrong.)
I can't see anything obviously wrong with the layout you show in the picture, might be helpful to also show the circuit diagram and the code you are using.
I have the same buggy - it works really well. It can drive on hard floor, carpet and rugs!
The code I'm using is very simple and I'm pretty sure it's not the problem.
As I said, it looks like I dont have enough power ....
The circuit I'm using is basically the same you can see in the jpeg, but I pluged 4 positive wires instead of just one, and also 4 negative wires, ( the motors wires) all in the same column.
The motors negative wires are all lined up in the #5 pin of the 4n35 transistor.
The 4 positive wires are all lined up with the positive power source positive wire. (5 new AA batteries)
Just in case... here's the code.... but as I said, I can get one wheel to spin, no problem.
I think the problem is the transistor in the opto-isolator is not able to pass enough current.
The data sheet says the maximum collector current is 100mA.
The DFROBOT web page for the buggy says:
No-load current(3V):60mA
No-load current(6V):71mA
Stall current(3V):260mA
Stall current(6V):470mA
So with 5 AA batteries you are using 6V to 7.5V.
The transistor is not even going to be able to handle the no load current.
Sorry, but you are going to need a bigger transistor - there are plenty to chose from, I usually use a "darlington" which is a pair of tranistors in one package. Others will recomend FETs.
Often the choice just comes down to what you can obtain quickest and cheapest
The transistor is not even going to be able to handle the no load current.
Hope this helps - Paul
I think you nailed it. My transistor sucks. Im going to buy another one that can support >= 500 mA. ([color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;font-size:14px;]darlington if possible)[/color]
I'll try to get one from some shop around here today and I'll keep you updated!
Thanks
edit: so i realised i have a NPN BC547B at home.I'm not sure how to read the data sheet... so for one million dollar.... i'd say that it can handle only 100 mA. .... so it wont do the job. right ?
Sorry, you are right. It is a medium power transistor - not designed for high currents like motors.
So I went to the electronic shop around here, and asked for a darlington transistor that can support 500 mA. The dude says he has to order it and it will be 15$+tx. It was something like a 247 or 249 darlington (TO3) . That price is way to high, I'd prefer to order a motor shield.....
On your blog you talk about the [color=rgb(51,51,51);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;]BDX33C, and it seems like it is cheap and it could do the job for me ?[/color]
So I went to the electronic shop around here, and asked for a darlington transistor that can support 500 mA. The dude says he has to order it and it will be 15$+tx. It was something like a 247 or 249 darlington (TO3) . That price is way to high, I'd prefer to order a motor shield.....
On your blog you talk about the [color=rgb(51,51,51);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;]BDX33C, and it seems like it is cheap and it could do the job for me ?[/color]
And if I decide to go and buy this shield, do I need something else to get it to work ? like another power source or something.
IMHO - $15 is about $13 dollars too much. I agree, its time to get a shield if that's your only option!
The BDX33C can handle 10Amps (with heat sinking etc), I did my tetsing of the BDX33C using on of the DFRobot motors - so no problems there if you can get one.
No I don't think that shield is a good choice - it can only drive one motor in forward or reverse. So you won't be able to steer. You need a shield that can control two (or four) motors independantly.
My one only controls two motors, so I have connected them in pairs.
I am not completely happy to recomend the shield I bought because the PWM pins were in the wrong place for the Netduino. However if you are happy soldering, then it may be OK for you. There was a link on the page you posted: http://www.robotshop...uino-sfe-4.html I think its the same one as mine, a bit hard to tell because its all in French!
I power the robot (with motor shield) using 5 AA NiMh batteries in the supplied battery box. I use a separate battery pack to power the Netduino. (I found the Netduino was unrelaible sharing the same battery as the motors.)
I am not completely happy to recomend the shield I bought because the PWM pins were in the wrong place for the Netduino. However if you are happy soldering, then it may be OK for you.
Which one will be easier to get to work for my netduino plus 2 ?
On the wiki you say the ardumoto's pwm will most likely fit my netduino 2 ?
Is it safer to buy the DFRobot instead ?
Easier will be the DFRobot shield, I understand from the Netduino Wiki page, that you can just plug it in and there is Netduino driver code on the DFRobot wiki.
I am assuming that it comes with connectors all pre-soldered. (The Ardumoto does not have connectors pre-soldered.)
I have just had a look at the US RobotShop website, the DFrobot one is listed at USD$17 and the Ardumoto at USD$24.
So the DFRobot one is cheaper too.
But, I can't see the DFRobot one on the Canadian RobotShop (you linked to ealier in the thread) so you may have to shop around.
I have connected my motors in parallel (two pairs of motors).
This means that both motors in each pair can see the full voltage available from the shield.
I am using the external power connector rather than VIN, and I have broken the VIN link between my shield and the Netduino. This was to stop the Netduino using the same supply as the motors.
I think the shield says 7.5 to 12V because that is the VIN voltage range. Without the link to VIN, the limits are those of the L298P driver chip: 2.5V to 46V.
My battery pack is 5x AA NiMh cells, these are around 1.2V each, so the nominal battery voltage is about 6V (a bit more when recently charged, but not for long).
The shield uses pairs of "BJT" (npn and pnp) transistors to supply current to the motors, these form the "H" bridge.
To make a motor turn, two transistors have to be turned ON, e.g. the motor current has to flow through a series circuit of two transistors and a motor. Transistors are not perfect so there will be some voltage lost in each transistor (wasted power). This will vary with the exact current flowing, but assume it will be 0.3V per transistor or more.
That leaves a bit more than 5V for the motors.
Thats about it, the motors are 3 to 6V, the shield will drive them at about 5V.
I can't offer any help with those libraries, I just wrote my own test code that setup two PWMs (for speed) and two GPIOs (for direction).
I don't see a power LED on the shield's circuit diagram - you will only see an LED light up when the motors are being driven.
Probably good to check your setup. Looking at the motor shiled Wiki, there are pictures showing the jumpers.
Looks like you need to have four jumpers in the PWM positions, this sets up GPIO 5 & 6 as PWM inputs, and GPIO 4 & 7 as direction inputs. (Inputs to the shield)
Also you need to select the power input with two more jumpers, you have a choice of the external screw terminals or Vin from the Netduino. (I prefer external) If you have selected Vin, you need to supply power on the Netduino's barrel connector.
Try it without motors first.
You should be able to get the LEDs to light by setting all the GPIOs 4 to 7 as outputs and just set them all high.
Then try setting 4 and/or 7 low (leave 5 and 6 high) and the LEDs should change colour.