lucysrausch / hoverboard-firmware-hack

New Hoverboard Firmware Hack. Now written from scratch and generally much better.
GNU General Public License v3.0
680 stars 392 forks source link

Can control Hoverboard motors with PWM but not PPM #158

Closed mccgregory closed 3 years ago

mccgregory commented 3 years ago

Hi, I have been following you for some time. Absolutely excellent work! Thank you so much for your efforts and your generosity in sharing it- what a great team effort! In trying to replicate your work – I would like to achieve a 4WD robot driven on ‘missions’ by a drone Flight Controller. The Flight Controller requires PPM- output. With your project I can achieve PWM output, but haven’t been able to get PPM to work. The RC Transmitter I am using is a FlySky FS-i6X Transmitter and FS-IA6B Receiver. My MainBoard was bought, new, especially for this project and is very similar to the one shown in NiklasFauth’s GitHub page. I have checked the output from the Receiver is PPM (as the TX is capable of PWM & PPM) and that it is actually working by connecting the RX to the Flight Controller and checking the virtual controls (also checked with a logic analyser). Can you think of any diagnosis, Trouble-shooting or fault finding I can do with the Hoverboard Mainboard to help me resolve this? I do have some background in electronics with the required test equipment – what should I be looking for? I have no problems with changing the Config.h file and re-compiling – I have tried several different downloads and have EVEN used the code via https://pionierland.de/hoverhack/ and used RoboDurden’s hex/bin files direct without any success for PPM control.

I haven’t tried DEBUG MODE – would this give any indication of the PPM signals being received?

Thank you in anticipation All the Best with your imaginative projects! Greg

Candas1 commented 3 years ago

Hi, have you tried changing the number of channels in the firmware ?

mccgregory commented 3 years ago

Hi, thanks for the reply.

Do you mean in the line:

define PPM_NUM_CHANNELS 6 // total number of PPM channels to receive, even if they are not used.

If so, then my Receiver (FS-IA6B) has 6 Channels and therefore the line is correct?

Best regards

Greg

From: Candas1 notifications@github.com Sent: 13 October 2020 16:27 To: NiklasFauth/hoverboard-firmware-hack hoverboard-firmware-hack@noreply.github.com Cc: mccgregory mccgregor.gm@gmail.com; Author author@noreply.github.com Subject: Re: [NiklasFauth/hoverboard-firmware-hack] Can control Hoverboard motors with PWM but not PPM (#158)

Hi, have you tried changing the number of channels in the firmware ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NiklasFauth/hoverboard-firmware-hack/issues/158#issuecomment-707819449 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKT2MCJTSBDKMRSJ4ENTJQTSKRWUBANCNFSM4SPB5UWA . https://github.com/notifications/beacon/AKT2MCPMABR5JUI2ETANPHLSKRWUBA5CNFSM4SPB5UWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFIYHPOI.gif

Candas1 commented 3 years ago

Try 8

mccgregory commented 3 years ago

Well that’s puzzling!

It works!

Thank you very much!

Much appreciated – I’ve been struggling with this on-and-off for hours over the last few weeks.

One question here, and I have a solution.

Thanks again!

Greg

From: Candas1 notifications@github.com Sent: 14 October 2020 09:04 To: NiklasFauth/hoverboard-firmware-hack hoverboard-firmware-hack@noreply.github.com Cc: mccgregory mccgregor.gm@gmail.com; Author author@noreply.github.com Subject: Re: [NiklasFauth/hoverboard-firmware-hack] Can control Hoverboard motors with PWM but not PPM (#158)

Try 8

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NiklasFauth/hoverboard-firmware-hack/issues/158#issuecomment-708233897 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKT2MCPNVHXQZ7TDDAKICALSKVLP3ANCNFSM4SPB5UWA . https://github.com/notifications/beacon/AKT2MCL4DBGEVT37UJ5WMKLSKVLP3A5CNFSM4SPB5UWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFI3MVKI.gif

mccgregory commented 3 years ago

Candas1 suggested I set it to 8 Channels instead of the default (and correct number) of 6. That works! Thank you.

mccgregory commented 3 years ago

I have since rechecked the Receiver spec. and everything I have seen shows it as 6 Channels. I have tested the RX and found although it has 6 x PWM Channels (limited by physical hardware) it is outputting 8 x PPM Channels when set to PPM.

Candas1 commented 3 years ago

Yes I know it because I have the same receiver. If you want to benefit from FOC motor control and ibus protocol you could also try this firmware https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC It has a recent bug that has to be fixed though. Join the telegram group, you can get quick help there as well.

mccgregory commented 3 years ago

Can't seem to attach file or picture. Previous comment (above) gave me the option but didn't deliver - anyway it shows definite 8 Channels, so the spec. for the RX would be more accurate if it said 6 x PWM Channels. As a touch of irony, having solved this problem, I don't need to worry as the Flight Controller input is PPM, but the Motor Outputs are PWM! :o)