Help!! Need to read the output from a Futaba receiver.
DavidNyman
Posts: 52
I've built a quadrotor helicopter and I'd like to use a BS2 to handle the flight controls.
I'm using 4 Rimfire Brushless motors with a brushless controller on each corner.· Each corner has the pitch controlled by a small servo mounted directly under the brushless motor.· There's a piezo gyro controlling each servo.·
The BS2 will handle some mixing duties between all four servos.· I'd like to read the pulse output 1-1.5-2 ms output (standard servo stuff) with the BS2 and program the outputs to output a mixed number to each servo.
I can handle the mixing duties I just need a few simple lines of code to read the output from the receiver.
I've attached a picture to show what I'm doing.
Any help would be greatly appreciated.
Thanks!
I'm using 4 Rimfire Brushless motors with a brushless controller on each corner.· Each corner has the pitch controlled by a small servo mounted directly under the brushless motor.· There's a piezo gyro controlling each servo.·
The BS2 will handle some mixing duties between all four servos.· I'd like to read the pulse output 1-1.5-2 ms output (standard servo stuff) with the BS2 and program the outputs to output a mixed number to each servo.
I can handle the mixing duties I just need a few simple lines of code to read the output from the receiver.
I've attached a picture to show what I'm doing.
Any help would be greatly appreciated.
Thanks!
Comments
· I know you wanted a short example...but the guts of what you need happens in the first 29 lines of code.
The remainder is for all the left-turn choices.
· I was limited to 3 speeds on each motor, but in both forward and reverse in order to steer. This program
only uses 2 channels; by the time the project was done, all 6 or 7 channels had a job.
· Cheers,
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
Post Edited (stamptrol) : 11/28/2009 1:16:31 AM GMT
I'm guessing the following is for reading the receivers pulse output at inputs 6 and 7 of the BS2:
PULSIN 6,0,ch1
PULSIN 7,0,ch2
I'll give it a try!
Thanks again!
I'm trying to get started reading the input on ch1 and ch2 and then outputing the results on P0 to a servo.
I can't seem to make the servo work.
Can anyone help?
Try "PULSIN 6, 1, ch1"
Also, reading four channels and then controlling four ESCs plus four servos is going to be way too much for the Basic Stamp, it just isn't anywhere near fast enough. Each one of those things happen at 50 times a second - that would be 4 inputs and 8 outputs, plus whatever calculations need to occur with only 20mS of time to get it done.
The Propeller could do it easily.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
The ESCs will be controlled directly from the radio on channel 5. I'm only controlling the ESCs with one channel as the speed on each motor will remain constant and the pitch on the prop will be the only thing that changes.
I've used the V-Pitch props before. What I noticed is that they are not precise. Meaning that subtle changes in pitch, like what you need in a VTOL, were not possible. It could be the way I had it set up, but I think you may find when under power that the pitch movement is "notchy". I hope you have more success than I did.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.