Posts | Comments

Planet Arduino

Archive for the ‘car hacks’ Category

Whilst swapping out the stereo in his car for a more modern Android based solution, [Aaron] noticed that it only utilised a single CAN differential pair to communicate with the car as opposed to a whole bundle of wires employing analogue signalling. This is no surprise, as modern cars invariably use the CAN bus to establish communication between various peripherals and sensors.

In a series of videos, [Aaron] details how he used this opportunity to explore some of the nitty-gritty of CAN communication. In Part 1 he designs a cheap, custom CAN bus sniffer using an Arduino, a MCP2515 CAN controller and a CAN bus driver IC, demonstrating how this relatively simple hardware arrangement could be used along with open source software to decode some real CAN bus traffic. Part 2 of his series revolves around duping his Android stereo into various operational modes by sending the correct CAN packets.

These videos are a great way to learn some of the basic considerations associated with the various abstraction layers typically attributed to CAN. Once you’ve covered these, you can do some pretty interesting stuff, such as these dubious devices pulling a man-in-the-middle attack on your odometer! In the meantime, we would love to see a Part 3 on CAN hardware message filtering and masks [Aaron]!

In the old days, a physical button or switch on the dashboard of your car would have been wired to whatever device it was controlling. There was potentially a relay in the mix, but still, it wasn’t too hard to follow wires through the harness and figure out where they were going. But today, that concept is increasingly becoming a quaint memory.

Assuming your modern car even has physical buttons, pushing one of them likely sends a message over the CAN bus that the recipient device will (hopefully) respond to. Knowing how intimidating this can be to work with, [TJ Bruno] has been working on some software that promises to make working with CAN bus user interfaces faster and easier. Ultimately, he hopes that his tool will allow users to rapidly integrate custom hardware into their vehicle without having to drill a hole in the dashboard for a physical control.

But if you’re the kind of person who doesn’t like to have things done for them (a safe bet, since you’re reading Hackaday), don’t worry. [TJ] starts off his write-up with an overview of how you can read and parse CAN messages on the Arduino with the MCP2515 chip. He breaks his sample Sketch down line by line explaining how it all works so that even if you’ve never touched an Arduino before, you should be able to get the gist of what’s going on.

As it turns out, reading messages on the CAN bus and acting on them is fairly straightforward. The tricky part is figuring out what you’re looking for. That’s where the code [TJ] is working on comes in. Rather than having to manually examine all the messages passing through the network and trying to ascertain what they correspond to, his program listens while the user repeatedly presses the button they want to identify. With enough samples, the code can home in on the proper CAN ID automatically.

The upside to all this is that you can activate aftermarket functions or hardware with your vehicle’s existing controls. Need an example? Check out the forward-looking camera that [TJ] added to his his 2017 Chevy Cruze using the same techniques.

It used to be that there wasn’t a problem on the average car that couldn’t be solved with a nice set of wrenches, a case of beer, and a long weekend. But the modern automobile has more in common with a spaceship than those vintage rides of yesteryear. Bristling with sensors and electronics, we’re at the point that some high-end cars need to go back to the dealer for even minor repairs. It’s a dark time for the neighborhood grease monkey.

But for those of us who are more likely to spend their free time working with a compiler than a carburetor, a modern car can be an absolute wonderland. That’s what [TJ Bruno] found when he recently started experimenting with the CAN bus on his 2017 Chevy Cruze. Not only was he able to decode how the different switches and buttons on the dashboard communicated with the vehicle’s onboard systems, he was able to hack in a forward-looking camera that’s so well integrated you’d swear it was a factory option.

The idea started simple enough: using some relays, [TJ] planned on physically switching the video feed going to the Chevy’s dashboard between the stock rear camera and his aftermarket front camera. That’s all well and good, but the car would still only bring up the video feed when the gear selector was put in reverse; not exactly helpful when he’s trying to inch his way into a tight spot. He needed to find a way to bring up the video display when the car was moving forward.

With a PCAN-USB adapter connected to the car’s OBD-II port, he shifted into and out of reverse a few times and noted which messages got transmitted on the network. It wasn’t long before he isolated the proper message, and when he injected it with his laptop, the dashboard display switched over to the backup camera regardless of what gear the car was in. Building on this success, he eventually figured out how to read the status of all the buttons on the car’s dashboard, and programmed an Arduino to listen for the appropriate signals.

The final piece of the puzzle was combing bringing both of these capabilities, so that went the appropriate button was pressed on the dashboard the Arduino would not only send the signal to turn on the video display, but kick the relays over to switch the camera source. Now [TJ] has a front-facing camera that can be called up without having to kludge together some button or switch that would never match the modern styling of the vehicle’s interior.

A couple years back we saw a similar project to add a backup camera to a Peugeot 207 that was too old to have one from the factory, and more recently we saw how CAN hacking can allow you to fight back when your car’s touch screen interface robs you of simple pleasures like pushing buttons and turning knobs.

Unless your car is fresh off the lot, you’ve probably had the experience of riding in a newer car and seeing some feature or function that triggered a little pang of jealousy. It probably wasn’t enough for you to run out and sign yourself up for a new car loan (which is what the manufacturer was hoping for), but it was definitely something you wished your older model vehicle had. But why get jealous when you can get even?

[Saabman] wished his 1999 Saab 9-5 had the feature where a quick tap of the turn signal lever would trigger three blinks of the indicator. Realizing this was an electronic issue, he came up with a way to retrofit this function into his Saab by adding an Arduino Pro Micro to the vehicle’s DICE module.

The DICE (which stands for Dashboard Integrated Central Electronics) module controls many of the accessories in the vehicle, such as the lighting and wipers. In the case of the blinkers, it reads the state of the signal lever switches and turns the blinkers on and off as necessary. After poking around the DICE board, [Saabman] found that the 74HC151 multiplexer chip he was after: the state of the blinker switches could be read from pins 1 and 2, and he’d even be able to pull 5 V for the Arduino off of pin 16.

After prototyping the circuit on a breadboard, [Saabman] attached the Pro Micro to the top of the 74HC151 with some double sided tape and got to work on refining the software side of the project. The Arduino reads the state of the turn signal switches, and if they flick on momentarily it changes the pin from an input to an output and brings it high for three seconds. This makes the DICE module believe the driver is holding the turn lever, and will keep the blinkers going. A very elegant and unobtrusive way of solving the problem.

Hackers aren’t complete strangers to the garage; from printing hard to find parts to grafting in their favorite features from other car manufacturers, this slick Saab modification is in good company.

Telemetric devices for vehicles, better known as black boxes, cracked the consumer scene 25 years ago with the premiere of OnStar. These days, you can get one for free from your insurance company if you want to try your luck at the discounts for safe driving game. But what if you wanted a black box just to mess around with that doesn’t share your driving data with the world? Just make one.

[TheForeignMan]’s DIY telematics box was designed to pull reports of the car’s RPM, speed, and throttle depression angle through the ODBII port. An ODBII-to-Bluetooth module sends the data to an Arduino Mega and logs it on an SD card along with latitude and longitude from a NEO-6M GPS module. Everything is powered by the car’s battery through a cigarette lighter-USB adapter.

He’s got everything tightly wrapped up inside a 3D printed box, which makes it pretty hard to retrieve the SD card. In the future, he’d like to send the data to a server instead to avoid accidentally dislodging a jumper wire.

If this one isn’t DIY enough for you to emulate, start by building your own CAN bus reader.

Whether we like it or not, eventually the day will come where we have to admit that we outgrew our childhood toys — unless, of course, we tech them up in the name of science. And in some cases we might get away with simply scaling things up to be more fitting for an adult size. [kenmacken] demonstrates how to do both, by building himself a full-size 1:1 RC car. No, we didn’t forget a digit here, he remodeled an actual Honda Civic into a radio controlled car, and documented every step along the way, hoping to inspire and guide others to follow in his footsteps.

To control the Civic with a standard RC transmitter, [kenmacken] equipped it with a high torque servo, some linear actuators, and an electronic power steering module to handle all the mechanical aspects for acceleration, breaking, gear selection, and steering. At the center of it all is a regular, off-the-shelf Arduino Uno. His write-up features plenty of videos demonstrating each single component, and of course, him controlling the car — which you will also find after the break.

[kenmacken]’s ultimate goal is to eventually remove the radio control to build a fully autonomous self-driving car, and you can see some initial experimenting with GPS waypoint driving at the end of his tutorial. We have seen the same concept in a regular RC car before, and we have also seen it taken further using neural networks. Considering his background in computer vision, it will be interesting to find out which path [kenmacken] will go here in the future.

If you are working with OBD2 hardware or software, it’s easy enough to access test data, simply plug into a motor vehicle with an OBD2 socket. If, however, you wish to test OBD2 software under all possible fault conditions likely to be experienced by an engine, you are faced with a problem in that it becomes difficult to simulate all faults on a running engine without breaking it. This led [Fixkick] to create an OBD2 simulator using a secondhand Ford ECU supplied with fake sensor data from an Arduino to persuade it that a real engine was connected.

The write-up is quite a dense block of text to wade through, but if you are new to the world of ECU hacking it offers up some interesting nuggets of information. In it there is described how the crankshaft and camshaft sensors were simulated, as well as the mass airflow sensor, throttle position, and speedometer sensors. Some ECU inputs require a zero-crossing signal, something achieved with the use of small isolating transformers. The result is a boxed up unit containing ECU and Arduino, with potentiometers on its front panel to vary the respective sensor inputs.

We’ve brought you quite a few OBD2 projects over the years, for example, there was this LED tachometer, and a way into GM’s OnStar.

Thanks [darkspr1te] for the tip.

Filed under: Arduino Hacks, car hacks

M2 by Macchina

We’re excited to announce the latest member of Arduino’s AtHeart program. M2 by Macchinanow live on Kickstarter–is an open-source, versatile development platform for hacking and customizing cars.

M2’s design is compact, modular, wirelessly connectable, and built on the popular Arduino Due. The device can be wired under the hood for a more permanent installation or plugged into the OBD2 port, enabling you to do virtually anything with your vehicle’s software. 

Macchina, a Minnesota-based company, has partnered with Arduino, Digi and Digi-Key to develop M2, and believes that its highly-adaptable hardware will most benefit hot rodders, mechanics, students, security researchers, and entrepreneurs by providing them access to the inner workings of their rides.

M2 accommodates a wide variety of wireless options thanks to its Digi XBee form-factor socket, allowing you to easily connect your car to the Internet, smartphone, satellites, or the cloud using BLE, WiFi, GSM, LTE, and other modules.

The platform can be programmed using the latest Arduino IDE, and is compatible with a number of software packages. Moreover, given its open-source nature, potential applications are bounded only by the collective imagination of the coding community.

Interested? Check out Macchina’s Kickstarter page to learn more or pre-order your M2 today!

nfcphoneAdding an NFC unlocker to your car allows you to open your vehicle with your phone, or an NFC ring.

Read more on MAKE

The post Use Your Smartphone as Your Car Key with an NFC Lock appeared first on Make: DIY Projects and Ideas for Makers.

display1Harin De Mel could have hacked his car to display something "useful", but where's the challenge in that? Shower thoughts, it is!

Read more on MAKE

The post Hack Your Car’s Dashboard to Display Reddit Shower Thoughts appeared first on Make: DIY Projects and Ideas for Makers.

  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook