Прошивка гироскутера под радиоуправление

Всем привет! Продолжаем эксперименты с прошивкой гироскутера от EmanuelFeru. Прошивка платы гироскутера под радиоуправление это ещё один способ заставить его шевелить своими моторами, на этот раз дистанционно, с пульта управления. Если Вы ещё ничего не знаете о прошивке, посетите страницу прошивка гироскутера под ручку газа. В начале той статьи рассказано какие платы подходят для такой прошивки, какое ПО потребуется установить на компьютер, какой будет нужен программатор и собственно сам процесс заливки прошивки.

Здесь расскажу пошагово именно о настройке прошивки и подключении приемника к контроллеру. Вам не обязательно быть программистом и специалистом в радиоэлектронике, чтобы так же прошить свой гироскутер. Всё довольно просто и доступно для начинающих.

радиоуправление гироскутер

В экспериментах использован пульт (передатчик) и приёмник для радиоуправляемых моделей с протоколом сигналов на выходах приемника PWM (ШИМ).

Прошивка также поддерживает протоколы PPM и iBUS.

Бюджетная аппаратура FLYSKY FS-i6 с различными приемниками под PWM, PPM, iBUS с доставкой из Китая / быстрая доставка из РФ.

Для управления гироплатой понадобится два канала приемника. Первый для движения вперед/назад и второй для рулевого управления влево/вправо. Повороты осуществляются за счет вращения колес в противоположные стороны, либо разной скорости вращения в одном направлении.

Я использовал каналы правого джойстика, так как при отпускании он автоматически возвращается в центральное положение, в котором моторы неподвижны.

Подготовка платы

Для протокола iBUS схема подключения есть в репрозитории автора исходника в разделе Wiki.

Конденсаторы и подтягивающие резисторы необходимы для защиты входов от импульсных помех. Без них возможна нестабильная работа устройства, а именно дерганье колес. Желательно запаять их прямо на плате.

Длинна сигнальных проводов между приемником и платой должна быть минимальной. Если по цветам провода на плате расположены в другом порядке, ориентируйтесь не по цветам а по расположению.

Питание приемника 5 вольт можно взять от выводов на датчики Холла для моторов. Максимальный ток с преобразователя 5В ограничен 100 мА, включая питание самих Холлов. Для приемника этого хватает, так как его потребление невелико и обычно составляет не более 50 мА. Если собираетесь использовать оставшиеся каналы приемника для дополнительных устройств, придется для питания применить отдельный понижающий стабилизатор на 5В. В этом случае плюсовой вывод приемника с платой не соединяем.

Подключение программатора и процесс прошивки описан в предыдущей статье.

Настройка прошивки

Вариант радиоуправления

Для радиоуправления по протоколу PWM в platformio.ini необходимо раскомментировать (убрать в начале знак «;«) строку default_envs = VARIANT_PWM. Если у Вас приемник с протоколами PPM или iBUS, соответственно проделываем это для своего варианта.

Остальные настройки производятся разделе Incconfig.h.

Батарея

Измеряем вольтметром и указываем текущее напряжение батареи в строке #define BAT_CALIB_REAL_VOLTAGE (у меня указано напряжение 35,88 В). Это избавит от преждевременного отключения контроллера при разряде батареи. А также от несвоевременных предупреждающих звуковых сигналов о её напряжении.

#define BAT_CELLS — указываем количество (S) ячеек батарее. Гироскутерная стандартная батарея 10S 2P.

#define BAT_LVL3….#define BAT_LVL1 — записываем напряжение на одной S ячейке батареи, при котором будет подаваться соответствующий звуковой сигнал. Если не нужна такая индикация, записываем заведомо меньшее напряжение, или отключаем индикацию в строках #define BAT_LVL2_ENABLE и #define BAT_LVL1_ENABLE, записав в них 0. Я оставил только #define BAT_LVL1_ENABLE при напряжении 31,0 В на батарее.

#define BAT_DEAD — напряжение при котором контроллер принудительно отключится. В примере это 30,0 В.

Раздел MOTOR CONTROL

#define CTRL_TYP_SEL — доступно три варианта:

  • COM_CTRL
  • SIN_CTRL
  • FOC_CTRL

#define CTRL_MOD_REQ — в сочетании с SIN_CTRL возможен вариант VLT_MODE (управление напряжением)   — не проверял его

в сочетании с  FOC_CTRL возможны:

  • VLT_MODE (управление напряжением) Без явного свободного наката, но и без режима удержания на месте.
  • SPD_MODE (управление оборотами) Отклонением стика задаем нужную скорость, пока он ее не достигнет, в моторы подается максимальный ток. Наката нет от слова совсем, режим удержания на месте в нейтральном положении стиков.
  • TRQ_MODE (управление током) Очень мягкий старт. Отклонением стика задаем подаваемый в моторы ток, при этом скорость сильно будет зависеть от приложенной нагрузки. Накат есть, но можно убрать активировав функцию ELECTRIC_BRAKE_ENABLE 

Я использовал FOC_CTRL + SPD_MODE для своей тележки.

I_MOT_MAX — максимальный ток на каждый мотор в амперах (чем больше ток, тем сильнее тяга).

I_DC_MAX — максимальный ток на каждый мотор при котором срабатывает защита от превышения, рекомендуется устанавливать на 2А больше I_MOT_MAX , но если при максимальной нагрузке моторы пищат, то увеличиваем на 1 пока не уйдет писк.

N_MOT_MAX — ограничение максимальных оборотов двигателей в об/мин.

VARIANT PWM SETTINGS

  • если радиоаппаратура с протоколом PPM или iBUS, смотрите разделы настройки для этих вариантов соответственно

В этом разделе я оставил всё по умолчанию. Здесь можно поэкспериментировать с STEER_COEFFICIENT (руление). Среднее значение этого коэффициента 16384. При этом максимальные обороты (режим FOC_CTRL + SPD_MODE ) при развороте совпадают с максимальными оборотами при движении вперед — назад. Чтобы их уменьшить — уменьшите коэффициент.

Это все настройки, которые я сделал. После заливки прошивки всё работает без калибровки, но если колеса дергаются или крутятся в нейтральном положении — сделайте калибровку.

Файл прошивки на случай трудностей при самостоятельной сборке (для проверки) :

Не забывайте привязать приемник к пульту !

Звуковые информирующие и сигналы ошибок контроллера

Прошивка платы гироскутера под радиоуправление и ручку газа это не все способы доступные для управления. О других также планируется рассказать, если это будет кому-то интересно. Напишите об этом в комментариях.

Дополнения к статье

Подключение двух конторллеров гироскутера к одному приемнику

платформа радиоуправляемая тележка полный привод

Способ для радиоаппаратуры без функции микшера вынесен в отдельную статью «Подключение двух конторллеров гироскутера к одному приемнику«.

Дополнительное управление с проводного джойстика

К левому уарту можно дополнительно подключить проводной джойстик. Чтобы получить возможность управления с него, в файле config.h необходимо активировать строку #define DUAL_INPUTS, убрав // в начале.

При этом, при отсутствии сигнала с приемника (например потеря связи с пультом) будет работать управление с проводного джойстика.

Обязательно проводим калибровку джойстика как при прошивке под ручку газа.

При потере связи с пультом моторы неконтролируемо вращаются

Если Вы наблюдаете неконтролируемое поведение моторов при потере связи приемника с пультом управления. Также, если управление двойное (с радиоаппаратуры на правом уарте и с проводного джойстика на левом уарте), но контроллер не переходит на запасное управление и неконтролируемо вращает моторы.

Это может быть вызвано включенной на приемнике функцией ФЕЙЛ-СЕЙФ (FAIL-SAFE). Назначение этой функции (в зависимости от настроек) — выдавать какой либо сигнал на каком либо выходе приемника при потере связи с пультом управления. В аварийной ситуации, например при потере связи на модели вертолета, его винт не остановится а понизит обороты для плавной посадки, чтобы избежать резкого падения. Функция может быть уже включена на новой аппаратуре «из коробки».

По этой причине также невозможна активация дополнительного управления, так как сигнал с приемника всё же присутствует. Ищем мануал по своей аппаратуре и отключаем функцию.

Если очень хочется, поддержать автора можно тут 🙂



273 комментария к “Прошивка гироскутера под радиоуправление”

  1. Алексей

    Добрый день!
    Мне нужно сделать тележку (на основе электрического самоката) радиоуправляемой для движения по рельсу или швеллеру?
    Тележка маленькая для перевозки грузов до 10 кг.
    Два поддерживающих колеса.
    Скорость до 35 км/ч.
    Радиосигнал до 50 п.м.
    Заряд до 6 ч. Быстрая смена аккумулятора.
    Движение на открытом воздухе и во все сезоны.
    Стоимость работы и материалов?

  2. Андрей

    Все сделано по схеме. В результате есть движение вперед всеми четырьмя колесами и поворот направо. Движения назад и левого поворота нет.
    что может быть не так?

  3. Всех с НГ! Спасибо за прошивку. Работает нормально. Но. Слишком маленькая скорость. В раздаче только .bin файл, config отсутствует. Что умного можете посоветовать?

  4. Владимир

    Добрый день прочитал вашу статью и решил сделать на основе гироскутера газонокосилку на радиоуправлении. Купил гироскутор MIZAR 11, а там засада плата управления другая не такая как у вас на картинке не подскажите может сталкивались с таким чудом китайским. Как его перепрошить?

  5. I have been browsing on-line more than 3 hours lately, but I by no means found any attention-grabbing article like yours. It’s pretty value enough for me. In my view, if all website owners and bloggers made excellent content as you did, the internet will likely be a lot more useful than ever before.

  6. I like the helpful info you supply to your articles. I’ll bookmark your blog and check once more right here frequently. I am moderately certain I’ll be informed many new stuff proper right here! Best of luck for the following!

  7. Good website! I really love how it is simple on my eyes and the data are well written. I am wondering how I could be notified whenever a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a nice day!

  8. Игорь

    Доброго времени суток!
    Помогите разобраться с настройкой под TBS Crossfire. после заливки прошивки под PWM, при нажатии джойстика вперёд колеса постоянно вращаются и не реагируют на нажатия кнопок. Калибровку делал, не помогло…
    после перезагрузки ведёт себя идентично.
    пульт radiomaster tx12

  9. Hi, Neat post. There’s an issue along with your site in web explorer, might test this… IE nonetheless is the market leader and a large component of folks will leave out your great writing due to this problem.

  10. With havin so much written content do you ever run into any issues of plagorism or copyright infringement? My website has a lot of unique content I’ve either created myself or outsourced but it seems a lot of it is popping it up all over the internet without my agreement. Do you know any ways to help prevent content from being ripped off? I’d genuinely appreciate it.

  11. Good site! I truly love how it is simple on my eyes and the data are well written. I am wondering how I might be notified when a new post has been made. I have subscribed to your feed which must do the trick! Have a great day!

  12. I will immediately clutch your rss as I can’t in finding your email subscription hyperlink or e-newsletter service. Do you have any? Please permit me realize in order that I could subscribe. Thanks.

  13. Thanks on your marvelous posting! I truly enjoyed reading it, you might be a great author.I will remember to bookmark your blog and will often come back from now on. I want to encourage you to continue your great work, have a nice weekend!

  14. With havin so much content and articles do you ever run into any problems of plagorism or copyright violation? My site has a lot of unique content I’ve either written myself or outsourced but it appears a lot of it is popping it up all over the internet without my authorization. Do you know any solutions to help prevent content from being ripped off? I’d genuinely appreciate it.

  15. I cling on to listening to the reports talk about getting free online grant applications so I have been looking around for the finest site to get one. Could you tell me please, where could i find some?

  16. I’ve been browsing on-line more than three hours these days, but I never found any interesting article like yours. It¦s pretty value enough for me. In my view, if all site owners and bloggers made good content as you did, the internet shall be much more helpful than ever before.

  17. I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.

  18. Hey There. I found your blog the use of msn. This is an extremely smartly written article. I’ll make sure to bookmark it and come back to learn extra of your helpful information. Thank you for the post. I will definitely comeback.

  19. What i do not realize is actually how you are not actually much more well-liked than you may be now. You are so intelligent. You realize therefore significantly relating to this subject, produced me personally consider it from a lot of varied angles. Its like men and women aren’t fascinated unless it is one thing to do with Lady gaga! Your own stuffs nice. Always maintain it up!

  20. Hi, just required you to know I he added your site to my Google bookmarks due to your layout. But seriously, I believe your internet site has 1 in the freshest theme I??ve came across. It extremely helps make reading your blog significantly easier.

  21. I would like to thnkx for the efforts you’ve put in writing this web site. I am hoping the same high-grade site post from you in the upcoming as well. Actually your creative writing skills has inspired me to get my own web site now. Actually the blogging is spreading its wings quickly. Your write up is a good example of it.

  22. Yoou acually makke itt appear eally easy togetheer
    with yoyr presentation butt I fihd this matyer to bbe really
    one thing thhat I believe I might byy no means understand.
    It ort oof feelks too complicated annd extremwly huuge for me.
    I’m ooking forwardd to your nrxt publish, I will ttry to
    gget thee hsng off it!

  23. Admiring the time and effort you put into your website and detailed information you offer. It’s nice to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read! I’ve saved your site and I’m including your RSS feeds to my Google account.

  24. I do accept as true with all of the ideas you have introduced on your post. They are really convincing and can certainly work. Nonetheless, the posts are very quick for beginners. May you please extend them a little from next time? Thank you for the post.

  25. Fitspresso is a brand-new natural weight loss aid designed to work on the root cause of excess and unexplained weight gain. The supplement uses an advanced blend of vitamins, minerals, and antioxidants to support healthy weight loss by targeting the fat cells’ circadian rhythm

  26. Fitspresso is a brand-new natural weight loss aid designed to work on the root cause of excess and unexplained weight gain. The supplement uses an advanced blend of vitamins, minerals, and antioxidants to support healthy weight loss by targeting the fat cells’ circadian rhythm

  27. I’ve been exploring forr a bbit forr any high-quality articlles oor blog posts iin this kind of area .

    Explorikng inn Yahoko I ultikmately stumbbled upon thiss website.

    Reading thius innfo So i am glad tto express thawt I’ve ann incredibly
    exceklent uncanny feeling I discovered jut whaqt I needed. I
    such a lott for suyre wikll make sjre too do nott fforget this ite and pdovides
    iit a glance oon a continuing basis.

  28. FBSHBFHBFSUDYHB

    зДРАСТВУЙТЕ не могли бы вы помочь с настройкой кода в Visual studio

    если можете напишите в тг @Fret_TV

  29. I found your blog web site on google and check just a few of your early posts. Continue to maintain up the superb operate. I just further up your RSS feed to my MSN News Reader. Searching for ahead to studying extra from you in a while!…

  30. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. 한국야동

  31. Hello! I’m at work browsing your blog from my new apple iphone! Just wanted to say I love reading through your blog and look forward to all your posts! Keep up the fantastic work!

  32. Thanks on your marvelous posting! I truly enjoyed reading it, you area great author.I will ensure that I bookmark your blog and definitely will come back in the future.I want to encourage that you continue your great writing, have anice weekend!

  33. When I originally commented I clicked the «Notify me when new comments are added» checkbox and now eachtime a comment is added I get four e-mails with the same comment.Is there any way you can remove people from that service?Appreciate it!

  34. Thank you for sharing excellent informations. Your site is so cool. I’m impressed by the details that you have on this site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found just the information I already searched all over the place and just could not come across. What a perfect website.

  35. Oh my goodness! Amazing article dude! Thanks, However I am having issues with your RSS. I don’t understand why I can’t subscribe to it. Is there anybody else having the same RSS problems? Anyone that knows the answer can you kindly respond? Thanx!

  36. Throughout the great pattern of things you’ll get a B+ for effort and hard work. Where you lost us ended up being in all the particulars. As people say, the devil is in the details… And that couldn’t be more accurate right here. Having said that, permit me tell you just what did deliver the results. Your authoring is certainly incredibly powerful and this is possibly the reason why I am making the effort in order to opine. I do not really make it a regular habit of doing that. Second, whilst I can see a jumps in reason you come up with, I am not really sure of just how you seem to unite the ideas which produce the conclusion. For the moment I shall yield to your position but trust in the future you actually connect your facts better.

  37. What i don’t understood is in fact how you’re not actually a lot more well-liked than you might be right now. You are so intelligent. You know therefore considerably when it comes to this subject, made me personally imagine it from a lot of various angles. Its like men and women don’t seem to be fascinated until it is one thing to accomplish with Girl gaga! Your own stuffs great. All the time handle it up!

  38. Great – I should definitely pronounce, impressed with your site. I had no trouble navigating through all tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or something, website theme . a tones way for your client to communicate. Nice task..

  39. I like what you guys are up too. Such clever work and reporting! Carry on the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my site 🙂

  40. I do like the way you have presented this specific difficulty and it really does offer me personally a lot of fodder for consideration. However, because of just what I have observed, I just simply trust as the commentary stack on that people today stay on issue and don’t get started upon a tirade associated with some other news of the day. Still, thank you for this excellent piece and although I do not necessarily agree with the idea in totality, I respect your viewpoint.

  41. Good post. I study something more difficult on totally different blogs everyday. It’ll at all times be stimulating to learn content material from other writers and apply a little something from their store. I’d choose to use some with the content material on my weblog whether you don’t mind. Natually I’ll offer you a link in your web blog. Thanks for sharing.

  42. Good web site! I really love how it is easy on my eyes and the data are well written. I am wondering how I could be notified whenever a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a nice day!

  43. I am curious to find out what blog system you have been working with? I’m experiencing some small security issues with my latest site and I would like to find something more safe. Do you have any suggestions?

  44. Aw, this was a very nice post. In idea I would like to put in writing like this additionally – taking time and actual effort to make a very good article… however what can I say… I procrastinate alot and under no circumstances appear to get one thing done.

  45. Aw, this was an exceptionally nice post. Takinga few minutes and actual effort to generatea very good article… but what can I say… I hesitate a lot anddon’t seem to get nearly anything done.

  46. Your writing is a true testament to your expertise and dedication to your craft. I’m continually impressed by the depth of your knowledge and the clarity of your explanations. Keep up the phenomenal work!

  47. helloI like your writing very so much proportion we keep up a correspondence extra approximately your post on AOL I need an expert in this space to unravel my problem May be that is you Taking a look forward to see you

  48. Hi there just wanted to give you a quick heads up and let you know a few of the images aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show the same outcome.

  49. Hi there! I just wanted to ask if you ever have any trouble with hackers?My last blog (wordpress) was hacked and I ended up losing months of hard work due to noback up. Do you have any solutions to protectagainst hackers?Visit my blog :: acne skin

  50. Excellent post. I was checking continuously this blog and I’m impressed! Very useful info particularly the last part 🙂 I care for such information a lot. I was looking for this certain information for a very long time. Thank you and good luck.

  51. An fascinating discussion is worth comment. I believe that it’s best to write more on this topic, it may not be a taboo subject however typically people are not sufficient to talk on such topics. To the next. Cheers

  52. Do you have a spam problem on this blog; I also am a blogger, and I was curious about your situation; we have developed some nice methods and we are looking to swap techniques with others, please shoot me an e-mail if interested.

  53. I don’t even understand how I stopped up right here, but I assumed this post wasonce great. I don’t recognise who you’re however definitely youare going to a well-known blogger should youaren’t already. Cheers!

  54. Do you have a spam issue on this blog; I also am a blogger, andI was wanting to know your situation; many of us have developed some nice procedures and we are looking to swapmethods with others, please shoot me an e-mail ifinterested.

  55. I’m extremely impressed with your writing skills as well as withthe layout on your blog. Is this a paid theme or did youcustomize it yourself? Anyway keep up the excellent quality writing, it is rare to see a nice blog like this one nowadays.

Оставьте комментарий

Ваш адрес email не будет опубликован.