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
1
230
CAN bus emulation with FreeRTOS and Qt
Deck from Tallinn DevClub meetup
Andrei Mukamolau
August 25, 2023
Tweet
Share
Other Decks in Programming
See All in Programming
これならできる!個人開発のすゝめ
tinykitten
PRO
0
140
Deno Tunnel を使ってみた話
kamekyame
0
310
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
520
Implementation Patterns
denyspoltorak
0
140
チームをチームにするEM
hitode909
0
440
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
240
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
310
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
1
150
Graviton と Nitro と私
maroon1st
0
160
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
640
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.3k
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1k
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
How to Talk to Developers About Accessibility
jct
1
94
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
1
340
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
The Limits of Empathy - UXLibs8
cassininazir
1
200
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Visualization
eitanlees
150
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
A Tale of Four Properties
chriscoyier
162
23k
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!