Hi all, not sure this is a correct place to ask about the cross over platform (FPGA+Arduino Shield) question or not. Basically I am building a miniature mobile robot by using FPGA + Tamiya motors + Arduino Motor Shield (to cut off my time to build the motor driver). The motor driver is as the link below, I purchased it online from cytron :
http://www.dfrobot.com/wiki/index.php?title=Arduino_Motor_Shield_(L298N)_(SKU:DRI0009)
I understand that the shield is an H Bridge motor driver to allow user to control dual channels with direction control over the motor. I manage to generate a PWM from FPGA and able to run the motor. However, I am somewhat confused with the usermanual from dfrobot, screen captured as below:
According to my current configuration, I am running a single channel test only, I connected my PWM signal to Pin 5 (E1) of the shield and Pin 4 (M1) is connected to 5V (High). Such setup give me a motor (Motor 1) turning in CCW direction. According to the control signal truth table as in the dfrobot manual, it is indicating that whenever I am providing PWM signal to E1, M1 should be a dont care signal. Therefore, I am assuming although I provide 0V to M1, the PWM speed control should be still available. Here comes to my questions and problem:
1)When I connect M1 to 0V (tried 3.3v which is supposed to be high signal according to dfrobot manual) the motor no longer run anymore. Any idea about this?
Control signal level:
High:2.3V≤Vin≤5V
Low:-0.3V≤Vin≤1.5V
2)2nd question, as in the III Pin Allocation above, under PWM Mode, Digital Pin 4 is used to control the motor direction, I can see from the shield PCB silkscreen, the Pin 4 is actually the pin M1, here comes to my second doubt, I am assuming the motor direction is controlled by a high (CW) and low (CCW) signal or vice versa, but when I do that, it loop back to my 1st question again. Also can anyone correct me is the Pin Allocation table above is correct or not? As you can see in the table, Digital 4 & 5 is used to control Motor 2 but in my case, I manage to turn a motor but it is Motor 1 instead of Motor 2.
This is my first post Dont shoot me ya , correct me if my assumptions are wrong. Anyway, I am building this robot for personal hobby and for fun Going to put on a camera module (terasic 5MP Camera) one it can navigate