Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CAN bus emulation with FreeRTOS and Qt
Search
Andrei Mukamolau
August 25, 2023
Programming
250
1
Share
CAN bus emulation with FreeRTOS and Qt
Deck from Tallinn DevClub meetup
Andrei Mukamolau
August 25, 2023
Other Decks in Programming
See All in Programming
Running Swift without an OS
kishikawakatsumi
0
740
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
300
まかせられるPM・まかせられないPM / DevTech GUILD Meetup
yusukemukoyama
0
110
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
220
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
9
5.4k
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
240
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
190
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.8k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
880
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
580
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
680
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Bash Introduction
62gerente
615
210k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
GraphQLとの向き合い方2022年版
quramy
50
14k
We Have a Design System, Now What?
morganepeng
55
8.1k
Why Our Code Smells
bkeepers
PRO
340
58k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
Amusing Abliteration
ianozsvald
1
150
Facilitating Awesome Meetings
lara
57
6.8k
Transcript
CAN bus emulation with FreeRTOS and Qt Andrei Mukamolau, Dmitriy
Stupak
Contents 1. Why 2. Prerequisites 3. FreeRTOS app 4. Qt
app 5. Demo
Who we are • Automotive software development company • Develop
and design apps • HMI • Android Automotive • Connected cars
Problem • App testing requires real data from the vehicle
• It can be only obtained from the vehicle • We don’t often have needed vehicle available • Testing becomes expensive
Solution • Cheap CAN bus stand for development • Close
to real life technologies • Test apps without vehicle
Hardware used in cars • Sensors • ECUs • Instrument
cluster • Infotainment • CAN bus
CAN bus • Controlled Area Network • 2-way short range
communication • Used in automotive and industrial apps • Simple at first glance • Fast • Robust
Software used in cars • Embedded soft for sensors •
RTOS for ECUs • Embedded Linux for infotainment and instrument cluster • Android Automotive for infotainment
Software used in cars • Embedded soft for sensors •
RTOS for ECUs • Embedded Linux for infotainment and instrument cluster • Android Automotive for infotainment
RTOS • Real Time Operating System • Scheduler runs tasks
for a fixed amount of time • May not have all the features of standard OSes • Critical for safety-related systems
RTOSes • QNX • VxWorks • FreeRTOS
Software used in cars • Embedded soft for sensors •
RTOS for ECUs • Embedded Linux for infotainment and instrument cluster • Android Automotive for infotainment
Embedded Linux • Regular Linux kernel, tuned for specific hardware
• UI can be done in any way • Most popular is Qt
Tech stack • Arduino Uno with FreeRTOS app • Raspberry
Pi with Qt app
FreeRTOS app
Hardware • Arduino Uno • CAN bus shield • Buttons
• Wires • 10 kOhm resistor
Software • PlatformIO • C++ (Arduino) • FreeRTOS
Advantages • Arduino is cheap • Highly configurable • Can
be extended and ported easily • FreeRTOS is flexible enough • Can be used backwards
Problems • Arduino Uno is not so powerful • FreeRTOS
eats up memory if you’re not careful • Jitter
Qt app
What’s Qt • Cross-platform framework • Written in C++ •
Signals and slots • Double licensing • Its own IDE - Qt Creator
Technologies/Tools
Qt Creator
Qt Creator - design editor
Connect can or vcan • Guide • Connect physical CAN
HAT • Install the necessary modules • Set up it with commands • Install can-utils • Turn on the interface • Send frames with can-utils The same for vcan but without physical part
Cross-platform application Windows 10 Raspberry OS macOS
Hiccups • C++ errors are obscure • CAN loopback didn’t
work • Qt libs on Raspberry are not available by default • Qt versions mismatch Win/Mac Qt 6.4.3 Raspberry OS 5.15.5
Demo app workflow • Click on the button on Arduino
• Build CAN signal and send to Raspberry Pi via CAN wires • Receive CAN frame and process it • Visualize it in Qt application
Demo
Q&A
Thanks!