Considering how fast the technology improves, fully autonomous cars are not far ahead, but that's not going to magically transform a 50 years old car into a talkative friend!
The concept
I'm a programmer by trade.Working on the car is mostly a way to use my fingers for something else than entering lines of code on a keyboard, be outside in the sun, and sometime curse out loud after having ripped some of my skin out ...
These few last years I've gotten interested in home automation1, web design, gadgets and internet of things2, so it's natural that the car became a target of this interest:
How smart can an old car become?
The idea started from something simple: I wanted to be able to monitor the status of the batteries to know when to plug the car to avoid depleting them3.
Obviously this required a way to monitor the level, but also some way to send the information out to some servers, personal computer or even mobile phone.
One thing leading to another, I ended up with a fully functional Windows 10 PC and a 4G internet connection, plus all the necessary gizmos.
The computer
I originally decided to go for a Windows PC because it made it easier to develop and debug, but also because the machine was powerful enough to run a number of games, including EVE Online4.Some of the important parameters to consider when you put sensitive devices in a car is that it's a very, very harsh environment: It can get very cold, it can get extremely warm, but it can also get extremely humid.
If you choose the wrong hardware, it will fail. Fast.
The computer I selected is a Shuttle XS35 V4, a small intel based5, fanless computer, designed to run 24/7 and able to auto-reboot if something goes wrong.
It also came with a small VESA compatible mount to install the computer against a wall... and it has quite many USB connectors6.
I also installed a 21" Full HD TV screen natively running on 12v power.
It was supposed to be used to watch TV, but in practice receiving the DVBT7 signal proved to be very difficult.
Since during summer the car is used as a camping car, it's practical to have a decent internet line on board, so I decided to go for a good 4G internet modem/router (DLINK DWR-921).
This computer is vastly overpowered for what I'm doing at the moment with it, but with barely 11 watt8 of power usage it actually works just fine, and I have room for more advanced trickery later if necessary.
At some point I may replace the always-on car computer by something more power efficient, such as a Raspberry PI or Arduino, but so far the computer has been running for weeks without depleting the batteries9.
The sensors
Interestingly, at this stage I still do not have a way to automatically monitor the status of the batteries and solar panels.The epSolar MPPT controller monitoring system uses a relatively simple protocol that supports only one connection, which at the moment is plugged to the control panel we use for manual inspection.
I will have to either upgrade the controller to the new version, or directly measure the voltages.
For the rest of the system I've been relying heavily on Yoctopuce products:
- Yocto-Meteo, to get the temperature, humidity and air pressure
- Yocto-3D, to get the orientation of the vehicle in regard to the ground
- Yocto-Knob, to detect if the doors are opened or closed
Finally, I got a GlobalSat BU353-S4 GPS receiver, a set of key fobs with a matching wireless control box equipped with four relays, and a bunch of other small parts to glue the whole thing together.
Yes: I can press a button to get the car play beep beep :p
The software
The whole concept is mostly based on the "Because I Can", not on really anything sensible, which means that the only restrictions were technical or practical :)I present you ValpOS:
Since I had a big computer available, I just decided to make a giant mash-up of various separate things and try to get them to work together.
The whole project was written in C++, using the following APIs and libraries:
- The Yoctopuce libraries for handling all the Yoctopuce modules
- The Mongoose WebServer (Cesanta Software) to serve the real-time Ajax-powered status page
- IRCClient (Fredi Machado) for the command and control API using Irc messages
- CNMEAParser (VGPS) to decode the information from the GPS module
At that point the code is not very portable, it runs only on Windows, but at some point I will probably make it run on Linux and release the source package.
On this day most of the system has been installed on the car, the internet line is running, and the car informs my external servers of its status every few minutes.
Not everything has been connected, some of the sensors (the magnetic compass) are confused by being in a large metal cage, some others seem to be impacted by the temperature and humidity level so the values they return need to be interpreted with a healthy dose of skepticism.
It's kind of cool to be able to monitor the car, check where it is located, know the temperature and humidity.
Very geeky, but cool.
I'm obviously far from K.I.T.T., the car is not talking, it does not listen to any order, and it does not have any rocket launchers.
What's next
The big test is going to be the power consumption and the winter weather.Will the computer work fine when we reach negative temperature and high humidity levels?
Will the solar panels generate enough power to keep the computer on at all time?
These are questions that will have to be answer... but not today.
1. See: Home-automation experiments↩
2. See: I'm in love with Kira↩
3. You don't want to get your batteries at less than 50% of charge level, that tends to damage them↩
4. Always important to make your partner happy↩
5. Intel Celeron J1900@2ghz with 8 gigabytes of DDR3 memory↩
6. It even has one internal USB connector, which I used for the Logitech wireless keyboard dongle↩
7. Also called "TNT" in France.↩
8. I measured it, which is strange because the documentation states "Power consumption: ca. 16W (idle mode) and ca. 20W (full load)"↩
9. The real test will be next winter. Lack of sun, and layers of snow on the solar panels will probably make that challenging.↩