View Full Version : Discussion NEED Help RC circuit UAVP
vip57@windstre
Mar 19, 2008, 08:15 AM
I have purchased a Walkera UFO, and it currently uses 4 brushed motor to fly. It takes a standard 6 ch FM RC radio system. I need to know how to convert the Mixed Output from the uC that would normally be controlling each of the 4 motor FET's, into a signal that an ESC can read and use to perform as the brushed motor once did.
There are 5 Input channels that control 4 axis. THR, RUD, ELE, AIL, and PIT.
All these signals are mixed in the uC with the Gyros output, and the axis is kept level.
Transmitter is normal 6 channel RC radio. The uC controls the 4 motors in unison as well as semi independently, to allow this to move around, spin, Lift and descend. If the gyros sense an unexpected tilt while in flight, the uC tells the appropriate motor to speed up bringing it level again. Radio input tells it to lift, move left or right, back or foreword, spin right or left, and up and down.
Currently the uC 4 output signals have been converted into a pulsed signal that can be fed to the gate's of the 4 FET's that currently control the Brushed motors it uses for flight.
What I need is a way to take each gate signal, and convert it back into a signal that an ESC can read. I need to do this, so the mixing from the uC can continue to control the Brushless motors the way it did the Brushed motors.
The output to each gate starts at 0 v, and the signal starts off as a pulsed spike, the same as you would expect any pulsed DC power switch to operate. The gate starts at zero, then as the signal increases, the gate gets pulsed more and more till it's final state is Always on at 4 volts
That may be the answer. I need something that can translate a variably pulsed DC signal, into a PWM signal to match the radio typical output.
I will try to get some better signal readings today. The Radio output is a typical output signal from an FM RC 6 channel control system.
The receiver's output to the uC, is also typical of a common RC receivers output to any servo that would be plugged into it.
The ESC accepts that typical output, as if it were a standard servo. Basically it is an electrical servo, that controls the speed of a 3 phase brushless motor.
If I connected any of the ESC's directly to the Rx, they would function. However, I need the signal from the uC, because that is the Mixed signal that tells the motors how and when to speed up or slow down, so the Gyro's can hold it level in the air.
Any help would be Greatly Appreciated.
Dan Baldwin
Mar 19, 2008, 11:20 AM
There are two ways to go about this. One would be to use a microcontroller to measure the on time and the off time of the PWM signal, convert this to duty cycle, and output a 1 ms to 2 ms pulse to the ESCs that corresponds. The other method would be to use a low pass filter (series resistor, and parallel capacitor) to convert the PWM signal to smooth DC, measure that DC voltage, and put out a pulse that corresponds to that voltage. You could use a microcontroller for that, or it might be possible to come up with discrete component voltage controlled pulse generator. If the PWM is at a fairly low frequency, the first approach would be best, while a the second approach would work better at a higher PWM frequency.
Dan
Arthur P.
Mar 19, 2008, 12:21 PM
Why not simply upgrade to a better flight controler such as the X-UFO-3D, Mikrokopter, UAVP, or QuadroControl II. In particular the latter shouldn't break the bank and do what you want and still improve on the X-UFO. I.e. the latter has 3 piezo gyro's instead of the UFO's mechanical one, and you can connect brushless or brushed controlers using various approaches. You may have to learn some German or do some Google tranlation. You could also go for the Draganflyer controler (see the 1000mm quadrocopter thread under multirotor helis).
Here are some relevant sites:
QuadroControl II: http://www.tt-tronic.de/
Mikrokopter (also sells the QC II through their shop): http://www.mikrokopter.de/
UAVP: http://www.uavp.de/ (of note there is now a US distributor, just do a search to find the right thread)
X-3D: http://www.x-ufo.de/
vip57@windstre
Mar 19, 2008, 12:21 PM
There are two ways to go about this. One would be to use a microcontroller to measure the on time and the off time of the PWM signal, convert this to duty cycle, and output a 1 ms to 2 ms pulse to the ESCs that corresponds. The other method would be to use a low pass filter (series resistor, and parallel capacitor) to convert the PWM signal to smooth DC, measure that DC voltage, and put out a pulse that corresponds to that voltage. You could use a microcontroller for that, or it might be possible to come up with discrete component voltage controlled pulse generator. If the PWM is at a fairly low frequency, the first approach would be best, while a the second approach would work better at a higher PWM frequency.
Dan
Thanks Dan, I will try the filter approach first, and if that fails, I guess I will have to try the PIC aproach
vip57@windstre
Mar 19, 2008, 12:25 PM
Why not simply upgrade to a better flight controler such as the X-UFO-3D, Mikrokopter, UAVP, or QuadroControl II. In particular the latter shouldn't break the bank and do what you want and still improve on the X-UFO. I.e. the latter has 3 piezo gyro's instead of the UFO's mechanical one, and you can connect brushless or brushed controlers using various approaches. You may have to learn some German or do some Google tranlation. You could also go for the Draganflyer controler (see the 1000mm quadrocopter thread under multirotor helis).
Here are some relevant sites:
QuadroControl II: http://www.tt-tronic.de/
Mikrokopter (also sells the QC II through their shop): http://www.mikrokopter.de/
UAVP: http://www.uavp.de/ (of note there is now a US distributor, just do a search to find the right thread)
X-3D: http://www.x-ufo.de/
Thanks. I was looking at that, but never could learn German well enough to figure it out. Also, the board I'm trying to Hack is a Walkera board, not the Silverlite. The walkera board has 3 peizo gyros as well. That is why I was trying to hack it. I can get a complete board with 72mHz Rx and gyros for $40 USD, and I don't know how much the Quadro board is.
But if all else fails, I guess I will have no choice but Learn German.
jeffs555
Mar 19, 2008, 01:45 PM
If you wanted a non-micro solution, a triangle wave oscillator running at 50Hz followed by a quad comparator would take the four filtered motor rate PWMs and convert them to the servo rate PWM.
vip57@windstre
Mar 19, 2008, 02:50 PM
If you wanted a non-micro solution, a triangle wave oscillator running at 50Hz followed by a quad comparator would take the four filtered motor rate PWMs and convert them to the servo rate PWM.
That sounds doable. I don't supose you could help with the parts assy by telling me what parts I would need for the triangle wave oscillator?
Will a 555 or 556 do this? Can you lead me in the right direction?
quax
Mar 19, 2008, 03:04 PM
Converting the 4 PWMs to ESC-pulse is not all you need. The main board expects, that the PWM response of the motor comes immediately. The ESCs have an update rate of normally 20ms and don't give an instant response. That's not fast enough.
Ages ago ;) we tested such a solution with the Silverlit X-Ufo and it results in a new BL-ESC program, where the PWM was connected directly to the ESC input. Additionally the power change capability of the ESC was increased.
cul
quax
vip57@windstre
Mar 19, 2008, 03:18 PM
Converting the 4 PWMs to ESC-pulse is not all you need. The main board expects, that the PWM response of the motor comes immediately. The ESCs have an update rate of normally 20ms and don't give an instant response. That's not fast enough.
Ages ago ;) we tested such a solution with the Silverlit X-Ufo and it results in a new BL-ESC program, where the PWM was connected directly to the ESC input. Additionally the power change capability of the ESC was increased.
cul
quax
OK, so, Is there a Solution?
jeffs555
Mar 19, 2008, 03:39 PM
The cheapest and easiest is probably the LM3900 op amp. This app note has a triangle generator. http://www.national.com/an/AN/AN-72.pdf
For the quad comparator, the LM339 is cheap and available. http://www.national.com/an/AN/AN-74.pdf
Feed the triangle into the inverting input. For the non-inverting input, I would try the center of a 3 resistor divider with a cap to ground as a filter. Feed the motor pwm thru one resistor and have one resistor to ground and one to +5v. By adjusting the resistors, you should be able to scale and level shift the input to clip at the right spot on the triangle wave to get the 1mS to 2ms output.
Radio Shack has the LM339 and they also have an LM324 which should work the same as the LM3900.
jeffs555
Mar 19, 2008, 03:48 PM
I am not familiar with the quad-rotors, but would believe Quax that the 50Hz servo rate was not fast enough. I have read that some brushless ESC's will accept a higher frame rate input, but don't know. The only real solution is probably like Quax said, modify the code in the brushless ESC to work from the motor PWM directly. That or buy one of the packaged solutions mentioned earlier.
vip57@windstre
Mar 19, 2008, 04:04 PM
I am not familiar with the quad-rotors, but would believe Quax that the 50Hz servo rate was not fast enough. I have read that some brushless ESC's will accept a higher frame rate input, but don't know. The only real solution is probably like Quax said, modify the code in the brushless ESC to work from the motor PWM directly. That or buy one of the packaged solutions mentioned earlier.
I may just have to go with a ready made solution, but I need to learn German first. That site is German to me, and I don't want to buy something unless I know what I'm getting.
I tried to translate the page, but kept getting an error. I sent them an email asking for info in English, but they may have the same problem as myself, and all stand around scratching their heads wondering what the heck I said. :confused:
jeffs555
Mar 19, 2008, 04:27 PM
This page is in English, and is about converting TowerPro ESC's to accept I2C from the Mikrokopter controller. http://www.mikrokopter.de/ucwiki/en/TowerPro25A2Regler?highlight=%28KategorieEnglish%2 9#head-d0cfe4b963f8f9560486c728db622c17acc15afd
They have links to the source code for the conversion, so it could probably be modified to directly accept the motor PWM from your board.
PS. I see that Quax was involved in generating this code. I wonder if the Tower Pro ESC's are chinese knockoffs of his ESC designs?
quax
Mar 19, 2008, 05:05 PM
....
PS. I see that Quax was involved in generating this code. I wonder if the Tower Pro ESC's are chinese knockoffs of his ESC designs?
Yes, it's my reengineering of the schematic and my software. It's more easy and cheaper to take one of these ESC and manipulate them, as to solder a DIY PCB. For the PWM direct input you need to know the PWM frequency range, to optimize the evaluation. There is not so much time for that job. But it worked great with the X-Ufo. The last PWM2BLMC implemtation a single Lipo cell circuit for the Walkera 4#3. It is under test. For coax use I designed a separate PWM2PPM 2-channel converter, that works well in my coax heli with standard cheap china BL-ESC.
You see - it's my passion :D
cul
quax
vip57@windstre
Mar 19, 2008, 05:38 PM
Thanks for all the advice. I have several directions I can go from here, now all I have to do is start buying parts
vip57@windstre
Mar 20, 2008, 10:50 AM
I would like to Thank all of you for your help. Jim, Quax, Jeff, and Arthur. Thanks for taking the time to offer solutions to this problem.
I see that there are No easy answers, and Lots of R&D as well as Money are needed to attempt this project. I was hoping there was an easy answer, but there is none.
So I guess to keep dumping Huge piles of cash down this rabbit hole, I will just upgrade the FET's on the boards I have, and install larger duty Brushed motors, or Learn to read German, and buy a board that has already been made to do the job.
So again, Thanks Guys for All your help.
Vic
vip57@windstre
Mar 21, 2008, 05:45 AM
Hi Dan, I tried a quick Lo Pass filter, and that didn't do mich for it. I believe the micro controller idea is about the best approach. On another thread, someone told me that the output signal could be turned into a triangle wave, then converted into the PWM from there using an Op amp. I checked into it, and it seems do be a good solution, but for the money, it's not a better solution then just buying the populated controller board from Mikrocopter.
I sent Micro an email asking them which one would be best for my needs, and haven't heard from them yet.
Dan Baldwin
Mar 21, 2008, 12:43 PM
Hi Dan, I tried a quick Lo Pass filter, and that didn't do mich for it. I believe the micro controller idea is about the best approach. On another thread, someone told me that the output signal could be turned into a triangle wave, then converted into the PWM from there using an Op amp. I checked into it, and it seems do be a good solution, but for the money, it's not a better solution then just buying the populated controller board from Mikrocopter.
I sent Micro an email asking them which one would be best for my needs, and haven't heard from them yet.
Any idea what frequency the PWM is? You can come up with an RC low pass circuit that will give you nice smooth DC, but is would add a significant delay, and if Quax is right, you can't tolerate any delay at all.
Dan
vip57@windstre
Mar 21, 2008, 01:27 PM
I have got a few other project that need doing first, but when I have some free time, I will measure it to see what freq it is.
vip57@windstre
Mar 25, 2008, 10:22 AM
I haven't measured the frequency yet, but it has the same output as the other stock 72 mhz radios. Maybe I misspoke about PWM. Not being all that familiar with the mechanics of RC radios, I'm not really sure what signal is called what. Maybe if one of you Smart guys would post some Scope pictures to show what signal is called PPM, PWM, and PCM, would make it easier for me to figure out.
I know what PWM is, and each of the output channels of the Rx all have such a signal, but I'm not sure if it would be called that.
On another note, I have somewhat ended my tinkering with the walkera UFO, and paid for a UAVP board with sensors. Man, that board cost as much as the Walkera UFO did. But it will be worth it to be able to use Brushless motors.
I see a possible hope in the 3 axis gyro board on the walkera as being a possible substitute for the 3 High Dollar gyros needed for the UAVP board. I'm going to trace down the outputs and see if it will work. If so, $40 for a 3 axis gyro sure beats $180 for the 3 separate gyro boards needed for the UAVP.
jesolins
Mar 25, 2008, 02:17 PM
http://en.wikipedia.org/wiki/Pulse-position_modulation
http://en.wikipedia.org/wiki/Pulse-code_modulation
http://en.wikipedia.org/wiki/Pulse-width_modulation
Cheers,
Jim
[QUOTE=vip57@windstre]I haven't measured the frequency yet, but it has the same output as the other stock 72 mhz radios. Maybe I misspoke about PWM. Not being all that familiar with the mechanics of RC radios, I'm not really sure what signal is called what. Maybe if one of you Smart guys would post some Scope pictures to show what signal is called PPM, PWM, and PCM, would make it easier for me to figure out.
I know what PWM is, and each of the output channels of the Rx all have such a signal, but I'm not sure if it would be called that.
QUOTE]
vip57@windstre
Mar 25, 2008, 05:45 PM
http://en.wikipedia.org/wiki/Pulse-position_modulation
http://en.wikipedia.org/wiki/Pulse-code_modulation
http://en.wikipedia.org/wiki/Pulse-width_modulation
Cheers,
Jim
[QUOTE=vip57@windstre]I haven't measured the frequency yet, but it has the same output as the other stock 72 mhz radios. Maybe I misspoke about PWM. Not being all that familiar with the mechanics of RC radios, I'm not really sure what signal is called what. Maybe if one of you Smart guys would post some Scope pictures to show what signal is called PPM, PWM, and PCM, would make it easier for me to figure out.
I know what PWM is, and each of the output channels of the Rx all have such a signal, but I'm not sure if it would be called that.
QUOTE]
I wish that WIKI gave scope pictures to see.
Here is a basic picture of what the UAVP board needs, as well as what my DX6 radio is doing.
http://www.geocities.com/vectorup/Signal.GIF
Arthur P.
Mar 25, 2008, 06:37 PM
Just mixing with diodes won't do the trick if you want to mutliplex channels back together. Better have a look here http://www.rcgroups.com/forums/showthread.php?t=714299 or here http://www.rc-cam.com/forum/index.php?showtopic=2064 if you want to get back to an acceptable PPM signal.
rouis
Mar 25, 2008, 06:38 PM
Hello,
I started developing a drone, but by lack of time i give up the project.
I sell new parts:
-- Central inertial: ADIS16350AMLZ
-- Pitot tube
-- Pressure sensors MPXV2010DP
-- GPS: uBlox TIM-4S-0-000
If you are interested you can make me an offer at rouiswfr@yahoo.fr .
BR,
W. ROUIS
vip57@windstre
Mar 29, 2008, 08:45 PM
I seem to be having a problem with my new UAVP uC. It will not ARM with either of 2 radios. A Spectrum DX6/AR6000, and a Futaba 7CAP/CHP and an R168DF receiver.
The Futaba is New, and I would like to set it up with the UAVP.
I have the UAVPset program, and a bunch of HEX files, I have tried a few of them, but it still will not arm the controller regardless if the serial cable is connected or not. The LED's are constantly Yellow and RED.
I have tried the HEX files, and when I press the BURN button, it says the PIC16F876 is not supported, but it will let me load a HEX file.
Does anyone know the correct HEX file for a 7 channel Futaba radio?
My board has 3 ADX300 gyro's, and an Accelerometer.
ANY HELP WOULD BE GREATLY APPRECIATED.
Thanks
Vic
vip57@windstre
Apr 02, 2008, 12:05 PM
After many long hours of searching for the right devices to use on this walkera Board to convert it to Brushless motors, I have learned that Old Man Mike has the right idea.
I haven't used his idea yet, and I'm still waiting for all the parts I ordered, but I have decided to try a different approach.
The 5 pictures below are pictures of the parts I'm using, and pretty much what I have tested so far that works really well, and has almost as much power as the brushless setup. The Heat sink on the bottom of the Walkera board are for these Monster FET's, but after running one full speed for almost a minute without a heat sink, the FET was only Warm to the touch. So with a heat sink on it, they should be able to sustain extended flight with the Brushed motor setup. I got the Brushed motors real cheal from bphobbies.com
http://www.geocities.com/vectorup/WalkeraMod1.JPG
http://www.geocities.com/vectorup/WalkeraMod2.JPG
http://www.geocities.com/vectorup/WalkeraMod3.JPG
http://www.geocities.com/vectorup/WalkeraMod4.JPG
http://www.geocities.com/vectorup/WalkeraMod5.JPG
I found a beefy FET that could handle the load of the larger DC motor with an 8 inch prop. And the Walkera UFO board runs them very well with the factory radio and Rx. An after market FM radio can also be used. It takes a 6 channel radio.
After I get a new frame made I will post some pic's.
jesolins
Apr 02, 2008, 01:13 PM
My post to the Wakera UFO thread from DEC 16, 2007: http://www.rcgroups.com/forums/showpost.php?p=8745700&postcount=44
AFT...;)
That is quite a hefty looking heatsink on those MOSFETs. No heatsink is needed with the OMM BL conversion. Let me know when you get those boards and if they are what they claim to be.
Cheers,
Jim
After many long hours of searching for the right devices to use on this walkera Board to convert it to Brushless motors, I have learned that Old Man Mike has the right idea.
vip57@windstre
Apr 02, 2008, 01:36 PM
My post to the Wakera UFO thread from DEC 16, 2007: http://www.rcgroups.com/forums/showpost.php?p=8745700&postcount=44
AFT...;)
That is quite a hefty looking heatsink on those MOSFETs. No heatsink is needed with the OMM BL conversion. Let me know when you get those boards and if they are what they claim to be.
Cheers,
Jim
Yea, I know the sink is pretty big, but all combined makes a solid platform for the controller, and those FET's can handle up to a 400, maybe a 450 Brushes motor. Those are rebuildable.
I had parts on hand to experiment with, so I tried the idea, and it worked Very Well, so as an Alternative to the Opto system and Brushless motor, if supply is limited, this works in a pinch, till your other parts arive.
vip57@windstre
Apr 04, 2008, 06:09 AM
My post to the Wakera UFO thread from DEC 16, 2007: http://www.rcgroups.com/forums/showpost.php?p=8745700&postcount=44
AFT...;)
That is quite a hefty looking heatsink on those MOSFETs. No heatsink is needed with the OMM BL conversion. Let me know when you get those boards and if they are what they claim to be.
Cheers,
Jim
They must have someone walking to China to get those boards.
sthudium
May 21, 2008, 01:09 PM
This page is in English, and is about converting TowerPro ESC's to accept I2C from the Mikrokopter controller. http://www.mikrokopter.de/ucwiki/en/TowerPro25A2Regler?highlight=%28KategorieEnglish%2 9#head-d0cfe4b963f8f9560486c728db622c17acc15afd
They have links to the source code for the conversion, so it could probably be modified to directly accept the motor PWM from your board.
PS. I see that Quax was involved in generating this code. I wonder if the Tower Pro ESC's are chinese knockoffs of his ESC designs?
I have a question about the TowerPro design. I'm looking at the schematic that is posted at the above URL and see that there are four BEMF sensors. Three of the sensors are used to monitor each phase voltage and are applied to ADC's in the ATmega8 AVR. But the fourth sensor combines the three phase voltages and is applied to the (+) comparator input of the AVR. How is this fourth sensor used? What exactly is it monitoring?
My first guess regarding the purpose of this fourth sensor was that it is used to detect the zero crossing of the BEMF voltage on the floating phase. But this doesn't seem efficient since the other three sensors can be used for that.
I also see that the (-) comparator input is not connected, so I surmise that the AVR is configured to compare the (+) input against the ADC inputs. (The ATmega8 can internally replace the the (-) comparator input with any one of the ADC inputs.)
sthudium
May 22, 2008, 02:21 AM
... the fourth sensor combines the three phase voltages and is applied to the (+) comparator input of the AVR. How is this fourth sensor used? What exactly is it monitoring?
I think I have the answer to my above question. The fourth sensor is used to determine the virtual neutral point (VNP) of the motor, as described in Microchip application note AN1160. The VNP provides a more accurate determination of the BEMF zero crossing time.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.