Hi guys! Help me please to find a solution. I am using a fez cerbuino bee and l298 motor driver (connected to 3rd socket of mainboard). I am trying to run two dc motors but with no success. My scenario of connection is:
1)Fez cerbuino bee mainboard connected to PC with USB
2)Visual studio 2012 runs on NET micro framework v4.3
3)Maineboard updated with the last bootloader and firmware v4.3
4)Two DC motors are connected to the L298 motor driver (M1 and M2 pins). Full charged 9v battery also connected to the driver module
5)In Visual Studio i run the folowing code under “debug” mode
6)The code compiles and transfers to mainboard successfuly
7)But the motors doesn,t run at all
8)When i connect 9v battery directly to motors they works perfect.
/// <summary>
/// Used to set a motor's speed.
/// <param name="_motorSide">The motor <see cref="Motor"/> you are setting the speed for.</param>
/// <param name="_newSpeed"> The new speed that you want to set the current motor to.</param>
/// </summary>
public void MoveMotor(Motor _motorSide, int _newSpeed)
{
// Make sure the speed is within an acceptable range.
if (_newSpeed > 100 || _newSpeed < -100)
new ArgumentException("New motor speed outside the acceptable range (-100-100)", "_newSpeed");
You are completely right. Sorry for messing things up. Looked in some downloaded driver files from before 4.3 release, which had the 4.3 label on them…:whistle:
Your code should work fine as I see it. Can you take a picture of the setup with clear wiring, so we can study the connections…?
I really apreciate your help and your time!!! I wil upload the pictures in a couple of minutes.
P.S.
I read the specifications on the official thread of this module is says:
[quote]Introduction
This motor driver module controls the speed and direction on 2 DC motors with a rating up to 40V 3A. The module itself is powered and controlled from a Gadgeteer mainboard but the motors are powered from a separate power source. Make sure to properly connect a power source to the green connector on the board so that the motors can receive power.
The motors are marked M1 and M2 on the pcb, and the enum MotorControllerL298.Motor is matched to the pcb. Make sure to match your wiring and code to get the desired result.[/quote]
Doest it mean that i have to supply power source not only to driver module itself, but to motors too??? I will do a picture and everything would be clear…
When i swap the poles for battery the red light of power is not active - poles is good.
I3 pin is active (Green light)
Visual studio run the code, transfer it to device, and tells everything is ok
I have already tried. I tried M1, tried M2 separately, but no success.
I even try a multimetr stuff… and it seems like something goes wrong. When i measure power supply input it shows 9v, then i measure motor outputs without the motors wireds and it seems like the code works perfect (the almost 9 v on two outputs), but when i put the motor’s wires on one or another output, motors will not start… the red light of input power supply getting smoother and i try the outs with multimetr and it’s a miracle (something like a 1,5 v on output only). Maybe some GND problem???
Question is still opened! I’ve tried to downgrade to 4.2 version… the same thing.
I dont belive that module is dead… i hope somebody help me with my problem…
Official information from ghi site tells that this module can control 2 dc motors up to 40v 3A, but specification of module tells that power limit is 5v (see attached picture). Which info is true?