Today i am going to show you guys how to use RC controllers and decode their signals for any of your projects
As many of the you know that we can directly use servo motors with RC receivers since, servos use PPM(Pulse Position Modulation ) signals as inputs to operate ,so by decoding the signals we can use RC receivers and transmitters to create a variety of wireless projects ..
So to demonstrate this we shall use a 4 wheel drive (4WD) robot .. to drive the wheels we are using four DC motors ,and they are controlled using a motor driver which operates on PWM(Pulse Width Modulation) signals. We will discuses the difference between PWM and PPM in upcoming steps.
Following are the materials required :
Arduino uno (you can google it,there are plenty of places you can get it from )
RC Transmitter (i am using flysky fst6 transmitter and receiver you can get it at various RC hobby websites for about 50$)
RC receiver(i am using flysky r6b)
Motor driver (i am using MD30 dual channel motor driver,i got this driver form 2krobotics.com for testing purposes ,they actually works great !!!)
male to female jumpers
4 DC motors
1 Robot chassis (although not necessary -you can make one :) )
12 volt battery (we are using 3 cell li-po battery)
tools required
screw driver (flat head and Philips screw driver)
Prerequisite
This tutorial is assuming that you are familiar with arduino development platform
PWM and PPM are two common words used in the R/C industry. PWM stands for Pulse Width Modulation and PPM stands for Pulse Position Modulation. Some devices that use PWM for control are ESC's (electronic speed controls) and servos. PWM is a technique used to relay data in the form of a varying pulse width.
You may be already familiar with binary, 1's and 0's; where a 1 is represented as 'on' and a 0 as 'off'. An example of this would be a light switch. Turning the switch on would indicate a 1, off a 0. In the case of a PWM/PPM signal, a voltage applied indicates a 1 and vice versa. However, in the case of R/C electronics this 'on/off' data is not enough, this is where the pulse width comes in.
The way we relay data to a servo for instance is the time the pulse is on. In the case of R/C electronics this time is usually around 1-2 milliseconds. A servo or ESC will monitor this pulse and begin counting when the pulse is detected and stop counting when the pulse stops. The time the pulse is on will determine the servo position. For example, sending a servo a 1ms pulse will make the servo swing completely left while a 2ms pulse will swing the arm completely right.
Generally in R/C equipment an entire PWM pulse will last a total of 20ms. The entire pulse is called a frame. A complete frame will include both the time the pulse is high (1-2ms) and the time the pulse is low. The image below represents a typical PWM frame.
Aside from the gaining servo holding power, the reason for the 20ms frame is just having the ability to line up several PWM signals in the same frame. Like I said before, the time the pulse is on is what is important because we are able to strip out this relevant data from a PPM frame to re-generate a PWM frame. For example, if a radio only sent 1 PWM signal at a time, it would take 20ms per channel. If you have an 8 channel radio each update would take 160ms. The same data can be packed into a PPM frame and only take 20ms per update. Transmitters and receivers are the two most common R/C devices that use PPM.
The following are lists of common devices that use PPM and PWM.
Today i am going to show you guys how to use RC controllers and decode their signals for any of your projects
As many of the you know that we can directly use servo motors with RC receivers since, servos use PPM(Pulse Position Modulation ) signals as inputs to operate ,so by decoding the signals we can use RC receivers and transmitters to create a variety of wireless projects ..
So to demonstrate this we shall use a 4 wheel drive (4WD) robot .. to drive the wheels we are using four DC motors ,and they are controlled using a motor driver which operates on PWM(Pulse Width Modulation) signals. We will discuses the difference between PWM and PPM in upcoming steps.
Following are the materials required :
Arduino uno (you can google it,there are plenty of places you can get it from )
RC Transmitter (i am using flysky fst6 transmitter and receiver you can get it at various RC hobby websites for about 50$)
RC receiver(i am using flysky r6b)
Motor driver (i am using MD30 dual channel motor driver,i got this driver form 2krobotics.com for testing purposes ,they actually works great !!!)
male to female jumpers
4 DC motors
1 Robot chassis (although not necessary -you can make one :) )
12 volt battery (we are using 3 cell li-po battery)
tools required
screw driver (flat head and Philips screw driver)
Prerequisite
This tutorial is assuming that you are familiar with arduino development platform
PWM and PPM are two common words used in the R/C industry. PWM stands for Pulse Width Modulation and PPM stands for Pulse Position Modulation. Some devices that use PWM for control are ESC's (electronic speed controls) and servos. PWM is a technique used to relay data in the form of a varying pulse width.
You may be already familiar with binary, 1's and 0's; where a 1 is represented as 'on' and a 0 as 'off'. An example of this would be a light switch. Turning the switch on would indicate a 1, off a 0. In the case of a PWM/PPM signal, a voltage applied indicates a 1 and vice versa. However, in the case of R/C electronics this 'on/off' data is not enough, this is where the pulse width comes in.
The way we relay data to a servo for instance is the time the pulse is on. In the case of R/C electronics this time is usually around 1-2 milliseconds. A servo or ESC will monitor this pulse and begin counting when the pulse is detected and stop counting when the pulse stops. The time the pulse is on will determine the servo position. For example, sending a servo a 1ms pulse will make the servo swing completely left while a 2ms pulse will swing the arm completely right.
Generally in R/C equipment an entire PWM pulse will last a total of 20ms. The entire pulse is called a frame. A complete frame will include both the time the pulse is high (1-2ms) and the time the pulse is low. The image below represents a typical PWM frame.
Aside from the gaining servo holding power, the reason for the 20ms frame is just having the ability to line up several PWM signals in the same frame. Like I said before, the time the pulse is on is what is important because we are able to strip out this relevant data from a PPM frame to re-generate a PWM frame. For example, if a radio only sent 1 PWM signal at a time, it would take 20ms per channel. If you have an 8 channel radio each update would take 160ms. The same data can be packed into a PPM frame and only take 20ms per update. Transmitters and receivers are the two most common R/C devices that use PPM.
The following are lists of common devices that use PPM and PWM.
No comments:
Post a Comment