Close

Function Diagrams

A project log for OtBC

"Old-timer Board Computer" Mostly because cheap electronics are widely available.

Frédéric DruppelFrédéric Druppel 09/12/2019 at 21:290 Comments

Just to clarify, the board computer here does not control the engine, steering or brakes (not even the brake lights), as I do not have the skills to certify my own work to automotive standards, plus some aspects of such modifications would be illegal in my zone of jurisdiction.

That said, here is the block diagram of the elements of the OtBC :

As you can see, there are three GPCs that communicate with each other via a RS485 bus. GPC01 and 02 are based on an Arduino Due, and GPC03 on an Arduino Uno or Mega (I'm not sure yet as dev has not begun on this one).

 I'm splitting the board computer in three parts for safety and coding convenience : every GPC can work on their own, but they can share values (like engine RPM from GPC01, GPS speed from GPC02, etc.), plus I can probe the RS485 bus with a computer with an Ad Hoc interface.

GPC01 is used for the vital functions : lights, dash lamps and warnings. Its code has to be lightweight and reliable. I'm not adding too many bells and whistles to it, and I'm intensively testing it as a crash would inevitably disable all the lighting of the car, which is not a good thing while driving.

The code works by multithreading the Arduino Due with the Scheduler library. I've already used this lib, and when used carefully it is really reliable.

There are threads that read the switches states ans sets flags if on, and other threads that read the flags and sets the outputs high or low. Why go through flags ? Well, it's easier to debug, to force a state, and to manipulate in other parts of the code; for example, I do not have to call the "digitalRead()" function (which can slow down the code considerably) every time I want to know the state of something. TL;DR: Reading a boolean is faster than calling a "digitalRead()" function every time.

[GPC02 schematic block image placeholder]

GPC02 is used for multimedia and environmental awareness (fancy words for "It knows the temperature and GPS data" amongst other things). The multimedia aspect of this GPC consists of an Audio block with an fm radio module and a bluecoats receiver etc., and a rudimental navigation system (= on screen compass). It also has an audio module which reads MP3 files from an SD card; this is used to playback recording alert messages, when a problem appears (for example, a voice will say "Warning, engine overheating", when the engine overheating sensor triggers). [this section will get more detailed as the dev of GPC02 continues].

[GPC03 schematic block image placeholder]

GPC03 doesn't really control anything, it's more of a RS485 sniffer that displays the data on rotary indicator gauges. As the dev of GPC03 has not yet begun, I don't really have to say anything yet, so this section will change when the dev has begun.

Discussions