
JS1
I'm a newbie when it comes to electronics, so perhaps (definitely) a stupid question here .. I have installed the 2.5 motor controller/H-bridge with speed control. Added the PWM controller in the project and can modify PWM between 0 and 100.
Now the question .. when setting PWM to 100, will the + and - going to the DC motor be exactly the same as when connecting the motor directly to the 7.2V battery ?
The reason I ask is that when I connect the motor to the battery directly, it runs, when when I connect it to the motor controller with PWM=100 it doesn't run (I set also the forward/reserve digital signal). I have an amp meter from my father (which I don't understand really how it works ), but I see the needle swinging to the right when connecting it to the motor controller (exactly the same as connecting it to the battery). Setting PWM=50, the needle swings half way as I would expect.
Thanks and regards
Johan
http://www.ez-robot.com/Community/Forum/Thread?threadId=4096
Alan
I followed Rich's manual to the letter. Using the EZB4 with H-bridge and speed control. Pressed the white button so the red light switches on. Is the motor controller sending 5vdc to the engine at PWM=100 ? If so, that might be not enough and I need to hook up another external battery to the H-bridge like discussed here :
https://www.ez-robot.com/Community/Forum/Thread?threadId=5703&page=2
Thx for yr help
Johan
Alan
For instance, if you supply Vcc with 7.2v directly from the battery and it's ground then, provided the correct logic is applied to the In1, In2, In3, In4, EnA and EnB, this is what your motors will get.
EnA and EnB use the PWM to vary the voltage on Out 1 to Out 4. If EnA for instance is set to a PWM of 50 in ARC it will apply half of Vcc to Out 1 and Out 2 (depending on the logic of In1 and In2), in yout case 7.2 / 2 = 3.6v. If set to 75 it will apply 75% etc.
If it's not working then it's most likely that you have not set the PWM or the logic of In1 to In4 is incorrect. You must always set the PWM on EnA and EnB to something before attempting to move a motor otherwise it will act as if EnA and EnB receive a low signal or PWM of 0 even if it is a high signal.
An init script to set PWM to 100, or in some cases it may be better to set to 99 then sleep for 100ms then set to 100 may help.
Code:
Where it's assumed D0 is EnA and D1 is EnB
I think everything is as it should. My setup
NiMH accupack 7.2 V 4600 mAh
I only have one DC engine (Voltage unknown)
EZB4
H-Bridge
H-bridge connections:
D19 signal (white) to ENA (for speed control)
Plus battery to VCC
D19 ground (black) to GND
Nothing connected to H-bridge 5V
D15 signal (white) to IN1
D16 signal (white) to IN2
ENB, IN3, IN4 not connected
OUT1/OUT2 will go the the engine
here the three signal cables:
The connections of D19, D15, D16 at the EZB4
On boeard regulators are active (pressing the small button)
All the scripts are in place. I also tried the following
PWM(D19,99)
Sleep(100)
PWM(D19,100)
Now the strange thing. Here I show the Voltage (?) output from the H-bridge to the engine when PWM=100. I would have expected 7.2V, but perhaps the device is not working correctly.
Here I show the Voltage (?) output from the H-bridge to the engine when PWM=0. Nothing is shown; When I use PWM=50, the needle goes in the half position.
Here is the Voltage measured at the output of the battery (it is the same as the output of the H-bridge when PWM:=100)
So I would have expected it should work, but it does not. When I connect the motor directly to the battery, it runs. When I connect the motor to the output of the H-bridge is does not run.
I'm completely in the dark ...
kind regards
Johan
the little whit button chould be puched in.
yes it is switched on and the red light shows. If I don't push it, no output goes to the motor I noticed
The 5v is for the main control chip, as it only is able to use 5v. The battery power is moderated by this chip, and it sends the power required for what setting you set, by pwm.
If In1 is high and In2 is low with PWM of 100 on EnA Out 1 to Out 2 should be the same as VIn. If both In1 and In2 are low with any PWM Out 1 to Out 2 will be 0.
servo(D4, 37) #servo used to either go forward, left or right
PWM(D19,99)
sleep(100)
PWM(D19,100)
set(D15,off) #reverse off
set(D16,on) #forward on
When I run the script, I get voltage on Out1/Out2 as I would expect.
When running the above script, the H-bridge brings a voltage to the +/- of the motor (I can measure with with my analog device). Then, I connect one end of the motor to out 1 .. no change. Then, I connect the second wire of the motor to Out2. The moment I do that, the voltage output from the H-bridge drops to zero.
The motor runs when I connect it directly to the 7.2V battery
What am I doing wrong ?
thanks and regards
Johan
Alan
Alan
i only have one battery. Ground goes to EZB and D19 ground to H-bridge.
I'm using a small 7.2V DC motor from a Tamiya 1/16 scale Remote control tank. But I do not have a spec of it, so I don't know the amp is will draw.
Thanks for your help
Johan