Тёмный

Radio Control Raspberry Pi Pico I-Bus 

Penguin Tutor
Подписаться 5 тыс.
Просмотров 9 тыс.
50% 1

The Raspberry Pi Pico does not come with any kind of wireless build-in, but that doesn't mean you can't control it without wires. You can easily add a Radio Control controller such as ones used to control RC model Airplanes.
In an earlier video I explained about how you could interface with a receiver using the same PWM signal which is normally used to control servo motors. Whilst this worked it put a lot of work load on the Raspberry Pi Pico and was not as reliable as I hoped for.
I have now investigated other technologies and found that using I-Bus is a much better way to interface to a radio control receiver. This did mean an upgrade for the receiver, but it was a big improvement in reliability and reduces the load on the Raspberry Pi Pico.
The RC controller I am using is a FlySky FS-i6. This is a relative is relatively inexpensive controller for RC model planes. Although designed for model airplanes it can be used with other models and in this case to send signals to a Raspberry Pi Pico. You could also use other types of controllers such as those designed for cars or boats, as long as they can provide an I-Bus output. It may also be possible to use SBus, but that may need additional electronics or an alternative software library. If you'd rather use PWM then see: www.penguintutor.com/news/elec...
although there is significant advantages to using I-Bus instead of PWM.
Originally I used the FS-iA6 receiver, but unfortunately that does not support I-Bus. A better receiver is the FS-iA6B which has the same PWM output as the FS-iA6 but also adds IBus. The I-Bus interface can be used to interface with a Raspberry Pi Pico or other microcontroller using a serial UART connection.
Instead of using C++ which I used when reading PWM, I have created this using MicroPython, which is easier to understand and modify.
In this video I only cover the theory, but I plan to put this to practical use in a future project most likely based around a www.penguintutor.com/projects/... mecanum robotics chassis
More information - including source code download see: www.penguintutor.com/news/elec...
Chapters:
00:00 Introduction to Radio Control Pico
02:15 Using Radio Control PWM with Pico
04:50 PWM vs I-Bus
06:33 The FS-iA6B I-Bus receiver
11:08 Using I-Bus with MicroPython on Pico
18:03 Testing radio control I-Bus with Pico
23:39 Summary and future project

Наука

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@doganbenli9681
@doganbenli9681 Месяц назад
You save my day! Thanks and God bless you.
@johnobrien125
@johnobrien125 2 года назад
Thank you very much for the very helpful explanation and example Micropython code. A relevant discovery I wanted to share; while cutting the signal does not stop the receiver from transmitting signals for each channel, one can engage a failsafe mode for each channel from the transmitter, with a custom level. That way, if the signal between the transmitter and the receiver is lost, the signal for that channel will revert to the failsafe level set, and not to the last signal received. To adjust the failsafe for the FS-IA6B receiver using the FS-16X transmitter, one navigates to System->RX Setup->Failsafe. Select the channel and adjust the failsafe value by manipulating the relevant channel on the control. Then, when the list of channels is displayed again, long hold the Cancel button to save the setting. For the dials (channel 5 and channel 6), the setting should be -100% on the transmitter to failsafe to 0 as the signal for the Pi Pico if one is using the very helpful example ibus code provided by Penguin Tutor (Stewart Watkiss).
@PenguinTutor
@PenguinTutor 2 года назад
I'm glad you found it useful. Thanks for the additional information, that's a great help.
@CucamongaGuy
@CucamongaGuy 2 года назад
just what I needed! Excellent explanation my man
@jerredshifflett6287
@jerredshifflett6287 2 года назад
I really enjoy the work you put into your projects. I would love to see you expand this example to work with all 10 channels of the FlySky FS-iA10B. Maybe even in such a way the all of your FlySky FS-iA6B viewers could reconfigure their controllers to include one or more of the toggle switches and then make use of the FlySky FS-iA10B example. Keep up the great work and informative videos.
@PenguinTutor
@PenguinTutor 2 года назад
Thanks. I'm going to look at putting this into an actual project next, but I may be able to look at further development in future. Unfortunately the datasheet / instruction manuals are a bit limited so some of this is through trying it out and seeing how it works.
@tytrvd
@tytrvd 2 месяца назад
Amazing work !
@whitneydesignlabs8738
@whitneydesignlabs8738 11 месяцев назад
Thanks! Works like a champ. I was really hoping to find a Python port of iBus for my Flysky.
@endercn6871
@endercn6871 2 года назад
Thank you
@jackyli6716
@jackyli6716 2 года назад
That's great!
@davidfelcan1187
@davidfelcan1187 2 года назад
Nice work! I recently got sbus to work on my Raspberry Pi 3. The main challenge with SBUS is that it is a 100000 baud rate protocol, which is not something the standard UART supports on the Raspberry Pi. But I was able to get it to work using a plain GPIO pin and getting the timing of the edge transitions from pigpio. Because the Rasperry Pi 3 is not a microcontroller, sometimes I lose a packet I think due to context switching. But around 75-80% of the packets are good (checked with parity and UART frame bits). I haven't stress tested it yet, that performance might degrade under load. However, the transmitter is transmitting a packet every 10ms or so, so a dropped packet just increases the lag to 20ms, which is plenty acceptable. SBUS has 18 channels, which is nice, though probably overkill in most situations, and most transmitters transmit RSSI (radio strength) on channel 16. Anyway, I am thinking of posting a video and releasing the code. I haven't done that before so that might take a bit and I really need to clean up the code and make it ready for others. If/when I do so I'll edit this comment and add a link.
@PenguinTutor
@PenguinTutor 2 года назад
That sounds like it would be really useful. It is possible to use pwm inputs to a Raspberry Pi but I've not seen an implementation of sbus yet.
@davidfelcan1187
@davidfelcan1187 2 года назад
@@PenguinTutor FWIW, I have completed this project. Here is a You Tube link (which has a link to the github with the code) - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-pWE8LxcFq9Y.html. I am considering adding a separate video with a code walkthrough like you have done. Thank you for posting your video, makes me feel like there are people out there who are interested in doing this sort of thing.
@Videogame9559
@Videogame9559 Год назад
What's follow up video with servos working control the servo with flysky nice to see in working not just date
@gkhnglmz1
@gkhnglmz1 2 года назад
Great video! Thank you. Can we run it on Raspberry Pi 3B+?
@PenguinTutor
@PenguinTutor 2 года назад
This video is based around a Pico. I expect it is possible to do the same using python-ibus on a Raspberry Pi. This is likely to be better than trying to use PWM on a Raspberry Pi.
@feelfree.1
@feelfree.1 Год назад
Interesting Video! Do you also know how to do this with a ELRS-receiver (like Radiomaster RP1), which uses the Crossfire protocol (crsf) over uart? So far, I have not yet found the library for the crsf protocol in micropython.
@PenguinTutor
@PenguinTutor Год назад
I've not come across that before. It sounds interesting. Unfortunately I don't have time to look into that at the moment but it may be something I could look at in future.
@TBV121
@TBV121 4 месяца назад
I get "ImportError: no module named". Any idea what cases this?
@PenguinTutor
@PenguinTutor 4 месяца назад
You normally get that if you don't upload the module first. Did it tell you it was ibus that it couldn't find? Did you transfer the ibus.py file to the Pico as explained at 0:11:08 ?
@dr._pie3745
@dr._pie3745 22 дня назад
That happens because the code is calling upon a separate file, which in your case isn't there. Add the file he sent under your comment and it should work
Далее
▼ЕГО БОЯЛИСЬ МОНГОЛЫ 🍣
32:51
Просмотров 451 тыс.
"Amazing When You Need It" SBUS/PPM to PWM Converter
11:53
This is how you destroy Raspberry Pi
9:10
Просмотров 375 тыс.
Raspberry Pi Flight Controller: Hardware Review
6:30
Raspberry Pi Pico Servo Motors via PWM
12:49
Просмотров 29 тыс.