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
240
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
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
130
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
160
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
650
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
340
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
150
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
The free-lunch guide to idea circularity
hollycummins
0
270
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
220
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
170
AI 開発合宿を通して得た学び
niftycorp
PRO
0
150
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Automating Front-end Workflow
addyosmani
1370
200k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
180
Joys of Absence: A Defence of Solitary Play
codingconduct
1
310
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Being A Developer After 40
akosma
91
590k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
210
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!