Reverse-Engineering The Peugeot 207’s CAN Bus

Here’s a classic “one thing led to another” car hack. [Alexandre Blin] wanted a reversing camera for his old Peugeot 207 and went down a rabbit hole which led him to do some extreme CAN bus reverse-engineering with Arduino and iOS. Buying an expensive bezel, a cheap HDMI display, an Arduino, a CAN bus shield, an iPod touch with a ghetto serial interface cable that didn’t work out, a HM-10 BLE module, an iPad 4S, the camera itself, and about a year and a half of working on it intermittently, he finally emerged poorer by about 275€, but victorious in a job well done. A company retrofit would not only have cost him a lot more, but would have deprived him of everything that he learned along the way.

Adding the camera was the easiest part of the exercise when he found an after-market version specifically meant for his 207 model. The original non-graphical display had to make room for a new HDMI display and a fresh bezel, which cost him much more than the display. Besides displaying the camera image when reversing, the new display also needed to show all of the other entertainment system information. This couldn’t be obtained from the OBD-II port but the CAN bus looked promising, although he couldn’t find any details for his model initially. But with over 2.5 million of the 207’s on the road, it wasn’t long before [Alexandre] hit jackpot in a French University student project who used a 207 to study the CAN bus. The 207’s CAN bus system was sub-divided in to three separate buses and the “comfort” bus provided all the data he needed. To decode the CAN frames, he used an Arduino, a CAN bus shield and a python script to visualize the data, checking to see which frames changed when he performed certain functions — such as changing volume or putting the gear in reverse, for example.

The Arduino could not drive the HDMI display directly, so he needed additional hardware to complete his hack. While a Raspberry Pi would have been ideal, [Alexandre] is an iOS developer so he naturally gravitated towards the Apple ecosystem. He connected an old iPod to the Arduino via a serial connection from the Dock port on the iPod. But using the Apple HDMI adapter to connect to the display broke the serial connection, so he had to put his thinking cap back on. This time, he used a HM-10 BLE module connected to the Arduino, and replaced the older iPod Touch (which didn’t support BLE) with a more modern iPhone 4S. Once he had all the bits and pieces working, it wasn’t too long before he could wrap up this long drawn upgrade, but the final result looks as good as a factory original. Check out the video after the break.

It’s great to read about these kinds of hacks where the hacker digs in his feet and doesn’t give up until it’s done and dusted. And thanks to his detailed post, and all the code shared on his GitHub repository, it should be easy to replicate this the second time around, for those looking to upgrade their old 207. And if you’re looking for inspiration, check out this great Homemade Subaru Head Unit Upgrade.

Continue reading “Reverse-Engineering The Peugeot 207’s CAN Bus”

Model Of A Transmission Line

Transmission lines are the kind of thing that seems to confuse beginners. After all, the fact that short-circuits can have infinite impedance and open-circuits can behave like a short is not intuitive at all!. That’s why we like [Tinselkoala]’s latest video that shows a nice model of a transmission line. It helps to understand the line as inductors and capacitors in series-parallel connection.

Any pair of wires used to transmit electrical power have tiny amounts of inductance and capacitance. This is not a problem with DC or low-frequency AC, but when the frequency is sufficiently high, weird things start to happen. The energy tends to escape as radio waves, and current reflects from discontinuities such as connectors and cable joints.  For this reason, transmission lines for high frequency signals use specialized construction to minimize those effects and reduce power losses.

[Tinselkoala] has built a model of a transmission line using coils and capacitors to simulate the inductance and capacitance of the line, with LED’s placed between the coils. He feeds the system with the signal generator with frequencies from 10 kHz to 1 MHz. In his words, they act as simple “visual voltmeters” to show the peaks and nodes of the standing waves of voltage in the line.

It is relatively simple to build your own version if you want to experiment with this fascinating subject. You will only need some magnet wire, capacitors, resistors and LED’s. If the subject sounds interesting to you,  here you can find an excellent introduction to transmission lines.

Continue reading “Model Of A Transmission Line”

Rusty ARM

You’ve probably heard that Rust is a systems programming language that has quite the following growing. It purports to be fast like C, but has features like guaranteed memory and thread safety, generics, and it prevents segmentation faults. Sounds like just the thing for an embedded system, right? [Jorge Aparicio] was frustrated because his CPU of choice, an STM32 ARM Cortex-M didn’t have native support for Rust.

Apparently, you can easily bind C functions into a Rust program but that wasn’t what he was after. So he set out to build pure Rust programs that could access the device’s hardware and he documented the effort.

Continue reading “Rusty ARM”

BionicCobot and human working together

Pneumatic Rotary Vane Joints Lend A Gentle Helping Hand

Festo has released a video showing the workings of their BionicCobot, a pneumatic robot arm developed for lending a helping hand to humans at a workstation. Since it works intimately with humans, it has to be safe, producing no harmful movements, and reacting when encountering an obstacle such as an arm containing delicate human bone. This it does using pneumatics and rotary vanes.

Rotary vane in action
Rotary vane in action

The arm has seven degrees of freedom, three in the shoulder, one in the elbow, another in the lower arm, and two in the wrist. But you won’t find any electric motor or gears. Instead each contains a rotary vane. Compressed air pushes on both sides of the vane. If the air pressure is the same on both sides of the vane then it doesn’t rotate. But with more pressure on one side than the other, the vane rotates. This is much like in a human arm, where two muscles work together to bend the arm, one muscle contracts while the other relaxes. Together they’re referred to as an antagonistic pair. In addition, each joint has a circuit board with two pressure sensors for monitoring the joint.

Using pneumatics, if an obstacle is encountered, the pressure can be released, making it instantly safe. And air being compressible, the joint can behave like a spring, further adding to the safeness. By controlling the pressure, the spring can be made more or less tense.

You can see it in action in the video below the break, along with more details such as how they use ROS, the popular, open system Robot Operating System which we’ve seen here a lot before, along with their Festo valve bank, one of which our own [James Hobson] used for his slick elysium exoskeleton. The video also covers how they handled running the hoses, the kinematics and the UI software.

Continue reading “Pneumatic Rotary Vane Joints Lend A Gentle Helping Hand”

Electromechanical Lunar Lander

One of the smash hits of the 1970s arcade was Atari’s Lunar Lander. A landing craft in orbit around a moon would descend slowly towards the surface, and through attitude and thrust controls the player had the aim of bringing it safely in to land. Many a quarter would have been poured into the slot by eager gamers wanting to demonstrate their suitability for astronaut service.

It was to this game that [Chris Fenton] turned when he was looking for inspiration for the 2016 NYCResistor Interactive show, and the result was a Lunar Lander game with a difference, one in which the gameplay was enacted through a physical lander and lunar surface. In this case the moon in question is a papier-mâché-covered inflatable ball, and the lander is a 3D-printed model on the end of a lead screw. Control is provided by an Arduino, with a rough facsimile of the original control panel and a set of microswitches on the model to detect a crash or a safe landing.

The result is a surprisingly playable game, as can be seen from the video below the break.

Continue reading “Electromechanical Lunar Lander”

Hackaday Prize Entry: Analyzing And Controlling Hand Tremors

For the millions of people suffering from Parkinson’s and other causes of hand tremor, there is new hope in the form of [mohammedzeeshan77]’s entry into the Hackaday Prize: a glove that analyzes and controls the tremors.

The glove uses an accelerometer and a pair of flex sensors to determine the position of the hand as it oscillates. A Particle Photon crunches the raw data to come up with the frequency and amplitude of the tremors and uploads it to the cloud for retrieval and analysis by medical staff.

Hand tremors can vary in frequency and severity depending on the cause. Some are barely perceptible movements, and others are life-disrupting shakes. By analyzing the frequency and amplitude of these tremors, doctors can better understand a patient’s condition.

The best part of this glove is that it also provides immediate relief to the wearer by stabilizing the hand. A rapidly spinning super precision gyroscope counteracts the tremor oscillations as it tries to maintain its position. The last time we saw innovation like this, it came with a set of attachments.

Hands-On The Hot New WeMos ESP-32 Breakout

Just two weeks ago our favorite supplier of cheap ESP8266 boards, WeMos, released the long-awaited LOLIN32 ESP-32 board, and it’s almost a killer. Hackaday regular [deshipu] tipped us off, and we placed an order within minutes; if WeMos is making a dirt-cheap ESP32 development board, we’re on board! It came in the mail yesterday. (They’re out of stock now, more expected soon.)

If you’ve been following the chip’s development, you’ll know that the first spin of ESP-32s had some silicon bugs (PDF) that might matter to you if you’re working with deep sleep modes, switching between particular clock frequencies, or using the brown-out-reset function. Do the snazzy new, $8, development boards include silicon version 0 or 1? Read on to find out!

Continue reading “Hands-On The Hot New WeMos ESP-32 Breakout”