HOw to control DC motor in the same way with using RC and 4 - in1 receiver?
huynh
Posts: 16
Hi all memeber,
I had made the circuit for controlling of DC motor by PWM and Hbridge. I use Hbridge L293D and hex converting 74HC/HT14. the circuit looks like in site http://members.tripod.com/~ArtooDetoo/schemx.html. but I did connect enable pin of L293 to +5V instead of BSStamp.
I try to supply voltage and feed PWM to the logic input, then measure the output of pin 1Y and 2Y of Hbrigde (which use as input Pin for DC motor). The measurement give me some observation as:
- The voltage of 1Y 2Y pin willl change when I vary the lenght of PWM ( I start with pulse length of 0.5ms): volatge on one pin will decrease (pin 2Y), while voltage from Pin 1Y is increase. As a result, the voltage different between pin 1Y and 2Y will increase. But, these results are not as I expect.
In my project, I would like to replace the receiver and Radio transmitter of a helicopter by a micro controller Unit (MCU) (BX24 or BSstamp). One of importance step I need to deal with is generation of the input for DC motor by means of MCU. These inputs must to have same features as from Receiver.
Back to my testing. As I feed the PWM with the same rise time as in Radio to my board, the measured voltage from the 1Y and 2Y pin is smaller than in the volage produced by Receiver.
I would like to receive the suggestion about how to produce the input for DC motor which is same as input generated from a 4-in 1 Receiver.
Thank for your time,
Pthien
I had made the circuit for controlling of DC motor by PWM and Hbridge. I use Hbridge L293D and hex converting 74HC/HT14. the circuit looks like in site http://members.tripod.com/~ArtooDetoo/schemx.html. but I did connect enable pin of L293 to +5V instead of BSStamp.
I try to supply voltage and feed PWM to the logic input, then measure the output of pin 1Y and 2Y of Hbrigde (which use as input Pin for DC motor). The measurement give me some observation as:
- The voltage of 1Y 2Y pin willl change when I vary the lenght of PWM ( I start with pulse length of 0.5ms): volatge on one pin will decrease (pin 2Y), while voltage from Pin 1Y is increase. As a result, the voltage different between pin 1Y and 2Y will increase. But, these results are not as I expect.
In my project, I would like to replace the receiver and Radio transmitter of a helicopter by a micro controller Unit (MCU) (BX24 or BSstamp). One of importance step I need to deal with is generation of the input for DC motor by means of MCU. These inputs must to have same features as from Receiver.
Back to my testing. As I feed the PWM with the same rise time as in Radio to my board, the measured voltage from the 1Y and 2Y pin is smaller than in the volage produced by Receiver.
I would like to receive the suggestion about how to produce the input for DC motor which is same as input generated from a 4-in 1 Receiver.
Thank for your time,
Pthien
Comments
ch1 var word 'pitch
ch2 var word 'roll
ch3 var word 'ESC "throttle
ch4 var word 'rudder
rc:
pulsin 1,1,ch1
pulsin 2,1,ch2
pulsin 3,1,ch3
pulsin 4,1,ch4
pulsout 5,ch1
pulsout 6,ch2
pulsout 7,ch3
pulsout 8,ch4
pause 10
goto rc
I found some ESC such as GWS 400. unfortunately, It can control only 1 motor.
About your above code, I understand that pulsout 1,1, ch1 will generate high voltage in ch1 ms, and pin1 will connect to PWM pin of servo. How about pulsin? where should we connect these Pins to?.What is the function of this command in the code?
Thanks,
Pthien,