Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Contents

  1. Serial
  2. Display
  3. Controlled Shutdown

Serial

For use with Speeduino SDC requires a serial connection to the Speeduino ECU using the “Secondary Serial” port (often also referred to as “serial3”).

Connection of the serial ports between the Pi and the Arduino Mega is relatively easy but since the Pi is a 3.3v device, you must add a voltage divider to the Pi’s receive (Rx) line otherwise the 5v signals from the Arduino will kill it. If you have a 3v3 device such as an STM32, then you don’t need the voltage divider as both sides of the connection will be at 3.3 volts.

The best way to get your device connected is to purchase a Raspberry Pi SDC I/O Hat from me. It comes with a means to power the Pi from your vehicle’s 12v (nominal) power source using a DC-DC converter, terminal connections for the serial and ground wires from Speeduino, 5 digital inputs suitable for connecting hardware switches or rotary encoders, and optionally has a Canbus port with a 120ohm termination resistor (enable termination via a jumper). Version 1.4 of the I/O hat contains a jumper to choose between 5v and 3v3 devices; this automatically introduces the voltage divider where needed.

I expect one or two users might consider trying bluetooth as the serial connection rather than using a cable. To be blunt, don’t do it. Although you can probably get it to work, the modules are not that reliable and the data rates will be significantly slower. If you’re trying to get a working cluster you really need a proper update rate otherwise it’ll suck.

Display

Once you have the Speeduino connected via serial you will need to connect a display to the device. Follow the instructions for your display to connect it to your Raspberry Pi. This may include editing the config.txt file on the SD card to add a custom HDMI setting using settings such as hdmi_cvt, hdmi_group, and hdmi_mode. Your display’s instructions should tell you what you need to do. There is extensive documentation on the Raspberry Pi Configuration Website - Video Settings

There are two types of display supported by SDC:

  • An HDMI screen with optional capacitive touchscreen, of which there are many to choose. For these, the touchscreen must be USB HID based.
  • The official Raspberry Pi 7” touchscreen. The resolution on these is probably as low as you’d want to go, as they are only 800x480, whereas many HDMI 7” touchscreens are typically 1024x600.

Displays that use the GPIO pins to connect (such as the HyperPixel monitor or any SPI screen) are not supported. Resistive touchscreens are not supported.

Brightness control is supported on the official Raspberry Pi touchscreen. To control it, you can send in a canbus message from another device, or you can use the setting ‘officialbrightness’ which you will find defined in the SDC.INI file shipped with the software. Whenever this setting is updated by a touch action, the brightness of the official Raspberry Pi touchscreen will be set to match.

Controlled Shutdown

Controlled shutdown enables some key features to be safely enabled including the ability to remember certain settings between power downs, and the ability to safely close datalogs after the ignition is turned off when data logging is enabled. For further details please see the Controlled Shutdown section