A Real Dash For A Truck Simulator

[Leon] plays Euro Truck Simulator 2, and like any good simulator, there are people out there building consoles, cockpits, and dashboards. In [Leon]’s case, he wanted a dashboard for his virtual trucks and cobbled one together out of a dash taken from a VW Polo.

This project was inspired by [Silas Parker] and his Arduino-based dashboard made out of a cardboard box, some servos, and a few LEDs. It worked, but [Leon] realized just about every dashboard made in the last decade or so has a CAN bus. You can just buy a CAN bus shield for an Arduino, and a dashboard can be easily found at any junkyard.

Right now, [Leon] is in the process of finding the CAN bus addresses of the relavent dials and LEDs on the dashboard. He found the tachometer at 0x280, and a bunch of indicator lights can be found at 0x470. Combined with a standard computer steering wheel and the telemetry SDK for Euro Truck Simulator 2, [Leon] has the beginnings of a virtual big rig on his desk.

Speaking CAN With Open Source Hardware

You can buy a dongle with a weird industrial connector that fits under the dash of any car on the road for $15. This is just a simple ODB-II transceiver meant for reading error codes and turning a Crown Vic into a police interceptor. There’s a lot more to the CAN Bus than OBD-II; robots and industrial control units, for instance, and Hackaday alum [Eric] has developed an open source tool for all things CAN.

[Eric] built this tool because of a lac of open-source tools that can talk CAN. There are plenty of boards floating around that can reset codes in a car using OBD-II, but an open hardware CAN device doesn’t really exist.

The CANtact is a small board outfitted with a USB port on one end, a DE-9 port on the other, and enough electronics to talk to any CAN device. The hardware on the CANtact is an STM32F0 – an ARM Cortex M0 that comes with USB and CAN interfaces. This chip connects to a Microchip CAN transceiver, and that’s pretty much all you need to talk to cars and industrial automation equipment. If doing something legal, moral, or safe with the CAN bus in your car isn’t your thing, Wired reports you can digitally cut someone’s brake lines.

On the software side of things, the CANtact can interface with Wireshark and the CANard Python library. All the files, from hardware to software, are available on the Github. Oh, CANtact was at Black Hat Asia, which means [Eric] was at Black Hat Asia. We should have sent stickers with him.

Ceci N’est Pas Une Clock

[Justin] tipped us about his slick custom OBD-II gauge that could easily pass for an OEM module. He was able to use the clock area of his Subaru BRZ to display a bunch of information including the oil and coolant temperatures and the battery voltage.

The forum post linked above has a good FAQ-based explanation of what he did, but so many people have told him to shut up and take their money that he created an Instructable for it. Basically, he’s got a Sparkfun OBD-II UART board communicating with a pro Trinket. The display is an Adafruit OLED, which he found to be an ideal choice for all the various and sundry light conditions inside the average car.

[Justin] was able to reuse the (H)our and (M)inute buttons and reassigned them to (H)igh to show the peak reading and (M)ode to, well, switch between modes. The (:00) now resets the peak readings. He offers suggestions for acquiring the specific CAN codes for your car to make the data more meaningful. [Justin]’s code is safe in the many tentacles of Octocat, and you can check out his demo video below.

Continue reading “Ceci N’est Pas Une Clock”

Hackaday Links: August 30, 2014

hackaday-links-chain

Adafruit did another Circuit Playground, this time concerning frequency. If you’re reading this, no, it’s probably not for you, which is great because it’s not meant to be. If you have some kids, though, it’s great. Not-muppet robots and oscilloscopes. Just great.

The Hack42 space in Arnhem, Neterhlands recently got an offer: clean out a basement filled with old computer equipment, and it’s yours. Everything in the haul had to fit through an 80cm square door, and there are some very heavy, very rare pieces of equipment here. It’ll be a great (and massive) addition to their museum. There’s a few pics from the cleanout here and here.

[Mike] has been working on a project to convert gerber files into SVGs and it’s great.

[Carl] did a roundup of all the currently available software defined radios available. It’s more than just the RTL-SDR, HackRF, and BladeRF, and there’s also a list of modifications and ones targeted explicitly to the ham crowd.

This is a Facebook video, but it is pretty cool. It’s a DIY well pump made in Mexico. A few rubber disks made out of an old inner tube, a bit of PVC pipe, and a string is all you need to bring water to ground level.

What can you do with a cellphone equipped with a thermal imaging camera? Steal PIN codes, of course. Cue the rest of the blogosphere sensationalizing this to kingdom come. Oh, what’s that? Only Gizmodo took the bait?

About a year ago, we saw a pretty cool board made by [Derek] to listen in on the CAN bus in his Mazda 3. Now it’s a Kickstarter, and a pretty good one at that.

Your connectors will never be this cool. This is a teardown of a mind bogglingly expensive cable assembly, and this thing is amazing. Modular connectors, machined copper shields, machined plastic stress relief, and entire PCBs dedicated to two caps. Does anyone know what this mated to and what the list price was?

 

The Hacklet #2

2

A new edition of The Hacklet is now available It covers some of our favorite stuff going on in the Hackaday Projects community.

In this edition, we round up a few hacks involving cars. There’s Bluetooth Low Energy connectivity, vehicle telematics, and tools to hack into your car’s CAN bus. If you’ve ever wanted to clear that pesky check engine light without paying the dealer, or unlock your car with a smart watch, these are worth a look.

Next up are a bunch of LED hacks. This starts with a DIY theater light, then looks at a portable DJ booth, finishing off with our Evil Overlords’ own LED visualization platform.

Finally, we check out a new 3D printer design. This one uses polar coordinates instead of the Cartesian coordinate system that most printers use. This gives it the unique ability to print with multiple extruders at the same time.

Once again, let us know what you think of this edition in the comments. Our goal is to keep you entertained with some of the coolest hacks on the site.

Fail Of The Week: CAN-Bus Attached HUD For Ford Mustang

This edition of Fail of the Week is nothing short of remarkable, and your help could really get the failed project back on track. [Snipor Bob] wanted to replace all of the dashboard readouts on his Mustang and got the idea of making the hacked hardware into a Heads-Up Display. What you see above is simply the early hardware proof of concept for tapping into the vehicle’s data system. But there’s also an interesting test rig for getting the windshield glass working as a reflector for the readout.

Continue reading “Fail Of The Week: CAN-Bus Attached HUD For Ford Mustang”

CAN Hacking: The Hardware

So far we have discussed the basics of CAN, in-vehicle networks, and protocols used over CAN. We’re going to wrap up with a discussion of CAN tools, and parts to build your own CAN hardware.

Wiring

Unfortunately, there’s no set standard for CAN connections. The most common connector for high-speed CAN is a DE-9, with CAN high on pin 7 and CAN low on pin 2. However cables will differ, and many are incompatible.

CAN needs to be terminated, preferably by a 120 ohm resistance on either end of the bus. In practice, you can stick a single 120 ohm resistor across the bus to deal with termination.

Tools

A good CAN tool will let you transmit and receive CAN messages, interpret live data using CAN databases, and talk CAN protocols. The tools with this feature set are proprietary and expensive, but some hacker friendly options exist.

GoodThopter

The GoodThopter12

Based on [Travis Goodspeed’s] GoodFET, the GoodThopter by [Q] uses the Microchip MCP2515 CAN to SPI controller to access the bus. The open hardware tool lets you send and receive messages using Python scripts.

CAN Bus Triple

CAN Bus Triple

The CAN Bus Triple device provides an interface to three CAN buses, and can be programmed in an environment similar to Arduino. The open source code provided lets you muck with the second generation Mazda 3. Unfortunately, the hardware does not appear to be open source.

Saleae Logic

Saleae Logic

It’s not open source, but the Saleae Logic is a very handy and cheap tool for looking at CAN buses. It can capture, decode, and display CAN traffic. This is most useful when you’re building your own CAN hardware.

DIY

The Parts

If you want to design your own hardware for CAN, you’ll need two things: a CAN controller, and a CAN transceiver.

The CAN controller generates and interprets CAN messages. There’s many microcontrollers on the market with built-in CAN controllers, such as the Atmel ATmega32M1, Freescale S08D, and the TI Tiva C Series. When using a built-in CAN controller, you’ll have to use an external oscillator, internal oscillators are not sufficiently accurate for high-speed CAN. If you want to add CAN to an existing microcontroller, the MCP2515 is an option. It’s a standalone CAN controller that communicates over SPI.

The transceiver translates signals from the controller to the bus, and from the bus to the transceiver. Different transceivers are needed for high-speed and low-speed CAN networks. The NXP TJA1050 works with high-speed buses, and the ON Semi NCV7356 works with low-speed, single wire buses.

Dev Boards

There’s a ton of development boards out there featuring microcontrollers with a CAN controller. The Arduino Due‘s SAM3 processor has a controller, but there’s no transceiver on the board. You can pick up a CAN bus shield, and the Due CAN Library to get started.

The ChipKIT Max32 is similar to the Due. It has two CAN controllers, but you’ll need to provide external transceivers to actually get on a bus. Fortunately there’s a shield for that. The ChipKIT is officially supported by Ford’s OpenXC Platform, so you can grab their firmware.

That concludes our discussion of CAN Hacking. Hopefully you’re now ready to go out and experiment with the protocol. If you have questions, send them along to our tip line with “CAN Hacking” in the subject, and we’ll compile some answers. If you liked this series and want to suggest a topic for the next set of posts we’d love to hear that as well!

CAN Hacking