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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Andrei Mukamolau
August 25, 2023
Programming
270
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
800
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
360
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
740
はてなアカウント基盤 State of the Union
cockscomb
1
720
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
590
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
180
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
Creating Composable Callables in Contemporary C++
rollbear
0
170
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.5k
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
210
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Optimizing for Happiness
mojombo
378
71k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
The untapped power of vector embeddings
frankvandijk
2
1.8k
A Tale of Four Properties
chriscoyier
163
24k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Believing is Seeing
oripsolob
1
150
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
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!