Truckduino: adding computers to my computerless vehicle

“Never trust a computer you can’t throw out the window” - Steve Wozniak

So my truck is old enough to not have any computers, except for the headdeck.

It is also the 2nd most stolen vehicle in the country, with 2 thieves that specialize in stealing this vehicle in the next province over, one reportedly with a master key from Nissan to make stealing easier.

I thought of having killswitches for the starter and fuel solenoids, but that’s quite easy to defeat if you know what you’re doing (e.g. use a hammer across the starter actuator terminals).

I also don’t want to put my aftermarket gauges back in as they’re a little bit unsightly, I don’t know where to put them that is nice, and they could also make the truck more interesting to thieves.

So I figured I’d use a collection of Pis and arduinos to both alert me of the trucks location via telegram via an LTE modem, and display various readings on a single 3.5" screen mounted on the steering wheel mast.

Here’s my basic architecture diagram:

Basic Plan

And how I figure I would accomplish each step:

Start detection

  • the startup will cause large voltage spikes that may not even be quelled by caps causing damage to the equipment
  • we don’t know if the engine is actually running except by:
    • checking for voltage spikes from the alternator
    • spying on the RPM signal

Boot up rules

  • use arduino responsible for starting the pi(s)
    • power provided from ACC line
    • lots of/big caps and a diode to try keep it alive
  • listen for voltage spikes on alternator/battery line
    • use voltage divider to level the voltage
    • look for 13v equiv to indicate engine start
    • this will use A0
    • this probably require pushing the throttle as charging voltage not produced on idle?
  • listen to pulse on RPM sender
    • jump the terminals on the back of the tacho
    • plug one end into D2
    • plug one end to GND
    • detect the frequency of pulse to and trigger on >500rpm
  • other options:
    • listen for audio of engine (too early detect?)
    • detect vibration (too early detect?)
    • detect heat (too slow?)

Boot up trigger

  • NC relay powered from ON, arduino trigger relay to open then back to closed
  • Pis auto boot when power is re-applied

Shutdown trigger

  • Use a voltage divider and feed stepped down ACC signal to a spare GPIO
  • read the GPIO and when the signal goes away, trigger a shutdown
  • OR use a read-only rootfs

Peripherals

Sensors

Implement in order of A, B and C

  • A - Exhaust Gas Temp (easy)
  • A - Battery voltage level (easy)
  • C - Water temp DS18B20 probe (easy)
  • B - Outside temp DHT22 (easy)
  • C - Alternator voltage output (medium)
  • B - Oil Pressure(medium)
  • C - RPM (medium)
  • C - Boost (hard)

Application

So then there’s 2 applications I need to develop.

Readings Display GUI: RPi2/3

  • any OS, but probably Arch
  • Golang + Qt/QML
  • GTK preferred but previous experiments failed
  • boot speed optimized
  • Simple grid showing the readings
  • Later try to add a multi-axis chart view of readouts

Security bot: RPi Zero W

  • boot speed optimized
  • PiCore or Arch?
  • Telegram bot runs on the RPiZ
  • Sends message when truck is started
  • Uses slash commands in a bot menu at the bottom of the chat
  • Command “track” will send the GPS coords every sec, disable the auto shutdown
  • Command “kill” will hold a normally closed relay open on the fuel solenoid and starter solenoid (FUTURE)

I’ve done so pre-work over the years. Like I have done proof of concept for the EGT and oil pressure in the past so I know I can read them, and I have the circuit diagrams for them, it would just require calibration against the actual gauges. The DHT22 and the DS18B20 are easy to read. I also have the USB GPS logger premade and ready to go as well as the voltage divider for the battery voltage checker.

I’ve already got most of the kit, so will try get started over Xmas, but it will be a long slog so I may be a while between updates, since I have a wife fresh out of surgery to look after, a 110yo house to maintain, and I also need to do other work on the truck to finalize it for certification.

In the meantime I’d be keen to hear suggestions or recommendations.

7 Likes

Phase 1

This is phase 1, to test the basic concepts:

  • get the small screen working
  • test if the arduino can detect RPM
  • test if the arduino can trigger the relay when RPM goes above 500
  • get RPiZ running
  • make a voltage divider for ACC and test if the RPi2 and RPiZ can read it
  • test powering startduino from ACC buck
  • test powering pis from the ON step downs through the NC relay
  • test the LTE connection to the RPiZ
6 Likes

Probably not helpful, but at one point I owned a 1986 Honda CRX and didn’t live in the best area. At one point, those were stolen all the time. The easiest solution wound up: Quick disconnect terminals for the Battery - I’d had a system that was easy to remove the entire battery when parking it at work and at home. I remember staying up at night and watching thieves try to hotwire a car that had no battery, and them being confused why they couldn’t. Turns out that it’s really hard to start a car if it doesn’t have a battery in it, unless you have the presence of mind to push-start it (which wasn’t feasible, as the car was parallel parked on the street).

2 Likes

Haha, that sounds hilarious. I don’t think it would run at all without a battery since you need some juice for the fuel solenoid.

I was thinking of maybe using one of those exhaust shutoff valves to block the exhaust or the intake so that even if they bought their own battery they would need to find the switch to allow the engine to breathe.

When you push start it, the belts also engage the alternator, which starts supplying power to the overall system. That can be enough to just start the process of pumping fuel from the tank to the engine, and when that kicks over, after a few fast stop/start cycles, becomes a self-running system.