netduino controlled toy car
#1
Posted 26 January 2011 - 07:32 PM
I'll make it much more interesting over time.
Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/
#2
Posted 26 January 2011 - 07:49 PM
Here is the first drive of my netduino controlled ex-remote controlled toy car. Nothing fancy, it just drives in straight line until it detects an obstacle in front - it stops softly. I am using Sharp infrared sensor for obstacle detection, a L293D H-bridge, a protoshield and a small breadboard.
I'll make it much more interesting over time.
Do you generate PPM pulses? How?
#3
Posted 26 January 2011 - 10:12 PM
Do you generate PPM pulses? How?
You mean PWM? Netduino has 4 PWM ports: D5, D6, D9 and D10. Currently I am using only D5 and D6 to control a single motor.
Here is the code snippet:
PWM pwm = new PWM(Pins.GPIO_PIN_D6); pwm.SetPulse(100, 40); // 100 is period, 40 is duration
Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/
#4
Posted 27 January 2011 - 06:44 AM
#5
Posted 27 January 2011 - 06:50 AM
#6
Posted 27 January 2011 - 07:17 AM
Ah, you control motors directly... and no servo.
No, I don't mean PWN, PPM is close, but different, pulse width change each pulse.
Right, I control them directly through an H-bridge and those are DC motors, not servos.
Miha Markic, Microsoft MVP C#
Righthand .net consulting and software development
http://blog.rthand.com/
#7
Posted 27 January 2011 - 07:39 AM
#8
Posted 27 January 2011 - 08:48 AM
#9
Posted 27 January 2011 - 01:26 PM
A real Hobby grade ESC will require a PPM wave.
...really? Do you have an example of that. My understanding was that ESCs were no different than servos, as old speed controllers used to be servos. And on gas/nitro vehicles, they still are, as throttle is still servo controlled.
Or am i missing something?
#10
Posted 27 January 2011 - 04:50 PM
...really? Do you have an example of that. My understanding was that ESCs were no different than servos, as old speed controllers used to be servos. And on gas/nitro vehicles, they still are, as throttle is still servo controlled.
Or am i missing something?
Servos also require PPM waves, you can use an ESC and a servo interchangeably.
@CW: Yes, I'd like support for PPM, although the wave is quite easy to generate. See: http://www.fezzer.co...1/servo-driver/
#11
Posted 27 January 2011 - 05:36 PM
Servos also require PPM waves, you can use an ESC and a servo interchangeably.
@CW: Yes, I'd like support for PPM, although the wave is quite easy to generate. See: http://www.fezzer.co...1/servo-driver/
..but that example uses PWM? I thought servos were controlled by sending a 1-2ms pulse within something like a 25ms frame? I thought ppm was used for multiplexing on the radio side?
#12
Posted 27 January 2011 - 05:41 PM
#13
Posted 27 January 2011 - 06:04 PM
#14
Posted 27 January 2011 - 08:28 PM
PWM damages servos
This makes my head hurt
PPM is a type of PWM. You are still controlling the width of the pulse.
The signals sent to the servo can be called PPM or PWM, however one must note that it's not a typical PWM signal due to the existence of the special frame size, as well as the specialized high period timings.
And yes, you can destroy a servo with an over/under loaded PPM wave just as you can destroy an airplane by pulling the throttle out, then dropping the flaps/gear and yanking the elevator full back.
The point is, you can destroy just about anything by using normal controls in the wrong way.
#15
Posted 28 January 2011 - 04:42 PM
Is there interest in PPM support? That's another thing that could be added through the FIQ feature and native code (with a nice C# wrapper). Not sure about all the timing requirements, but it would be cool to investigate.
Chris
PPM to drive a single servo / ESC can be done right now with SetPulse, because the pulses are repetitive.
My special interest, why I bought Netduino, is to have a class able to generate on a GPIO the whole 8/9 channels frame, as output by a RC Tx, where each pulse has a different width than the previous, and a microsecond accuracy is required (1-2msec pulse width range should be available as a 10 bit value).
#16
Posted 28 January 2011 - 06:38 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users