Change only some output's to brushed PWM
Posted: Thu May 21, 2015 7:35 pm
Hey guys, I need help...
Since last winter, before I was using multiwii, I've been working on a micro tricopter, it's 4" wide and PCB based with all components on the single board that also serves as the frame(it's pretty much the tri version of a ProtoX) but I had a brain fart and overlooked a very important aspect and now I'm stuck.
Note 1: I'm currently testing with a bread board and arduino nano V3, the frame PCB's are VERY expensive so I dont want to order them till they're 100% finalized, because of the intricate milling needed it's nearly $150 for a panel of 10 of 4x5.25"boards)
The issue is, I wasnt thinking about how when I enable brushed motor output (controlled via PWM duty cycle) that I would loose servo control on the 4th motor output because servo's run on the same type of PPM signal as brushless ESC (pulse duration) and not PWM at all. I need a way I can make multiwii change only three of the motor output's to PWM while leaving the 4th (for the servo) as a standard PPM signal when I enable brushed motors. How can I accomplish this? The other choice is using a stand alone brushless converter to convert the PWM signal back into PPM but it seems like, since multiwii is originally a ESC controller and only recently been made capable of converting the signals to PWM on board, that there should be a way to select exactly which output's I want converted to PWM and which I want left as a standard servo / ESC output.
Other notes:
I am currently working in MW2.4 because that's what I use on my brushless models however I can switch to any older version that may be better suited to this task. I am using only an MPU6050 sensor, no MAG or other equipment and running a 328P MCU. Currently I'm using a DSMX RX (in PPM mode) into PD2 but eventually I plan to either have the CC2500 chip on board or possible switch to a NRF24L01+ module (which would also be on board) but that's later, after I've got it flying with the orangeRx Rx module.
I have the board setup to use the standard arduino pinout for a tri-
front left motor = PB3 (D11)
Front right = PB2 (D10)
Rear motor = PB1 (D9)
Servo = PD3 (D3)
I was thinking perhaps it would be best to move the three motor output's to HW PWM pins so maybe I should swap the front right motor (PB2 is not a HW PWM) and the servo (PD3, which is PWM) with each other before going further?
Any help at all would be great guys, thanks!
Since last winter, before I was using multiwii, I've been working on a micro tricopter, it's 4" wide and PCB based with all components on the single board that also serves as the frame(it's pretty much the tri version of a ProtoX) but I had a brain fart and overlooked a very important aspect and now I'm stuck.
Note 1: I'm currently testing with a bread board and arduino nano V3, the frame PCB's are VERY expensive so I dont want to order them till they're 100% finalized, because of the intricate milling needed it's nearly $150 for a panel of 10 of 4x5.25"boards)
The issue is, I wasnt thinking about how when I enable brushed motor output (controlled via PWM duty cycle) that I would loose servo control on the 4th motor output because servo's run on the same type of PPM signal as brushless ESC (pulse duration) and not PWM at all. I need a way I can make multiwii change only three of the motor output's to PWM while leaving the 4th (for the servo) as a standard PPM signal when I enable brushed motors. How can I accomplish this? The other choice is using a stand alone brushless converter to convert the PWM signal back into PPM but it seems like, since multiwii is originally a ESC controller and only recently been made capable of converting the signals to PWM on board, that there should be a way to select exactly which output's I want converted to PWM and which I want left as a standard servo / ESC output.
Other notes:
I am currently working in MW2.4 because that's what I use on my brushless models however I can switch to any older version that may be better suited to this task. I am using only an MPU6050 sensor, no MAG or other equipment and running a 328P MCU. Currently I'm using a DSMX RX (in PPM mode) into PD2 but eventually I plan to either have the CC2500 chip on board or possible switch to a NRF24L01+ module (which would also be on board) but that's later, after I've got it flying with the orangeRx Rx module.
I have the board setup to use the standard arduino pinout for a tri-
front left motor = PB3 (D11)
Front right = PB2 (D10)
Rear motor = PB1 (D9)
Servo = PD3 (D3)
I was thinking perhaps it would be best to move the three motor output's to HW PWM pins so maybe I should swap the front right motor (PB2 is not a HW PWM) and the servo (PD3, which is PWM) with each other before going further?
Any help at all would be great guys, thanks!