Handheld Motor Cancels Out Every Twist And Turn

It’s one thing to know that input from a motion sensor can steer a motor. It’s another to see and feel the two cancelling out the other in real-time, right in the palm of one’s hand. That’s [cpietsch]’s takeaway from the CAN do GYRO, a brushless motor with a CAN interface and tiny STM32-based development board perched atop it.

No matter how one moves, the motor swivels to keep pointing the top in the same direction; a bit like a south-pointing chariot.

It’s essentially a one-axis gimbal with a few thoughtful features. The unit tracks itself fully in three dimensions, so while the motor is limited to one axis, the unit doesn’t get confused by complex movements. It also auto-calibrates, and auto-stops within half a rotation if it detects the motor spinning freely.

The hardware consists of a tiny XIAO STM32C5 microcontroller board with integrated IMU (Inertial Measurement Unit) and CAN transceiver, and an M5Stack RollerCAN motor. The motor, handily, has a small OLED screen built into it.

Combined with a battery it’s small enough to be handheld while it shows off what a tight control loop paired with a suitable motor can do. Watch it in action in the video, embedded below.

Of course, accurate gimbals using brushless motors have been around for many years. But one thing that’s plain is just how much the kind of hardware available to individuals has changed. Compare this build to a DIY gimbal project from about ten years ago and you’ll see the function looks about the same, but today’s hardware has evolved considerably.

Continue reading “Handheld Motor Cancels Out Every Twist And Turn” →

A Tool For Testing CANopen Networks

If you find yourself working with CANopen CC networks, you might find yourself in need of a tool for monitoring what’s happening on the wire. [Michael Fitzmayer] whipped up a piece of software to fulfil just that role. 

CANopenTerm might be named after the CANopen standard, but it’s really a terminal-driven tool for working with CAN buses in general. The software is built for real-time use, allowing sniffing raw frames on the wire, tracing, and probing of nodes, all from within the console. It’s also possible to add scripting via Lua or Python for more advanced work, as well as do protocol-aware inspection if that’s relevant to your use case. The key idea of the software is to be fast and scriptable to suit a given need, rather than bogging everything down with a heavy GUI interface that’s slower to work with.

If you aren’t afraid of getting into the nitty gritty with CAN and like lightweight text-based interfaces, this might be the tool for you. We’ve also explored some other CAN visualization tools lately, as well. Ultimately, there is a lot of machinery out there running on some variant of CAN or other, so it pays to know how to work with it. If you’ve got your own projects cooking up in this space, don’t hesitate to let us know on the tipsline!

CAN Bus Analyzer Runs In Your Browser

If you’ve got a modern car, truck, or tractor, it’s probably got a CAN bus or three that is bouncing data all around the vehicle. Listening in on these transmissions can enlighten you to what’s going on with sensors and modules which can aid in troubleshooting. You might find [Chanchal]’s latest work to be helpful in this regard — a CAN bus visualizer that runs right in your browser.

CANviz, as the project is known, is designed to work with any one of a number of cheap USB CAN reader modules. To use it, you simply run the Python “pip” tool to install it, and then you have a live CAN bus frame analyzer running on your local machine. Point your browser to localhost:8080 and you can see the data pouring in from whatever you happen to be hooked up to. The tool supports decoding CAN DBC files to make better sense of the raw data coming off the bus, and you can also record sessions for later analysis and even send CAN frames yourself if you need to. You can also run the tool on a remote single-board PC if so desired and access it over a network connection from another machine.

We’ve explored CAN hacking tools before and tools for visualization as well. Often, the latter is important when trying to debug and investigate dynamic issues. Meanwhile, if you’re working on your own automotive interface hacks, don’t hesitate to notify the tipsline!

Supercon 2024: Yes, You Can Use The Controller Area Network Outside Of Cars

Ah, the CAN bus. It’s become a communication standard in the automotive world, found in a huge swathe of cars built from the mid-1990s onwards. You’ll also find it in aircraft, ships, and the vast majority of modern tractors and associated farm machines, too.

As far as [Randy Glenn] is concerned, though, the CAN bus doesn’t have to be limited to these contexts. It can be useful far beyond its traditional applications with just about any hardware platform you care to use! He came down to tell us all about it at the 2024 Hackaday Supercon.

Continue reading “Supercon 2024: Yes, You Can Use The Controller Area Network Outside Of Cars” →

Bosch Starter Motor Freed From Mercedes Prison

Vehicle alternators are interesting beasts. Produced on a massive scale, these electric machines are available for a minimum of cost and contain all kinds of great parts: some power electronics and a belt-driven generator are generally standard fare. This generator can also be used as a motor with only minor changes to the machine as a whole, so thanks to economies of scale it’s possible to get readily-available, powerful, compact, and cheap motors for all kinds of projects using alternators as a starting point. [LeoDJ] noticed that this starter motor in a modern Mercedes had some interesting benefits beyond all of these perks, but it took a bit more work to get up and running than a typical alternator would have.

The motor, built by Bosch, can be found in the Mercedes E200 EQ Boost. This is a hybrid car, but different than something like a Prius in that it doesn’t have an electric motor capable of powering the car on its own. Instead it uses a combination starter motor/alternator/generator to provide extra power to the engine during acceleration, increasing efficiency and performance. It can also charge the small battery bank when the car slows down. Vehicles that use this system need much beefier alternators than a standard car, but liberating it from the car means that it has much more power available than a typical alternator would.

There were a number of issues to solve, though. Being that the motor/alternator has to do all of this extra work (and that it came out of a car whose brand is known for being tedious to work on in the first place) it is much more complicated than an off-the-shelf alternator. [LeoDJ] has been able to get his to spin by communicating with it over the CAN bus, but there’s still some work to be done before it goes into something like an impressively fast electric bicycle.

Thanks to [RoganDawes] for the tip!

Game boy with custom cartridge mounted on car dashboard

A Game Boy Speedometer, Just Because You Can

From a practical standpoint, [John] may be correct that his recent creation is the “world’s worst digital dash”, but we’re still oddly enamored with the idea of using a Nintendo Game Boy as a digital speedometer. Pulling it off meant interfacing the handheld with the vehicle’s CAN bus system, so whether you’re into retro gaming or car hacking, this project has something to offer.

Showing real-time vehicle speed on the Game Boy sounds like it should be relatively easy, but the iconic game system wasn’t exactly built for such a task. Its 2 MHz CPU and 160×144 pixel dot-matrix screen were every kid’s dream in 1989, but using it as a car dashboard is pushing it. To bridge that gap, [John] designed two custom circuit boards. One interfaces with the Game Boy, intercepting its memory requests and feeding it data from a microcontroller. The other processes the CAN bus signals, translating speed information into a form the Game Boy can display. [John] used inexpensive tools and software to read the CAN bus data, and used GBDK-2020 to write the software in C. His video goes in great detail on how to do this.

Months of work have gone into decoding the Game Boy’s data bus and creating a schematic for the interface board. Tricking the Game Boy into thinking it was loading a game, while actually displaying incoming speed data. The screen’s low resolution and slow refresh rate rendered it barely readable in a moving vehicle. But [John]’s goal wasn’t practicality — it was just proving it could be done.

Want to dive deep into the Game Boy?  Have you seen the Ultimate Game Boy talk?

Continue reading “A Game Boy Speedometer, Just Because You Can” →

PCB Design Review: Tinysparrow, A Module For CAN Hacking Needs

I enjoy seeing modules that can make designing other devices easier, and when I did a call for design reviews, [enp6s0] has submitted one such board to us. It’s a module called TinySparrow (GitHub), that helps you build your own vehicle ECUs and any other CAN-enabled things. With a microcontroller, plenty of GPIOs, a linear regulator and a CAN transceiver already onboard, this board has more than enough kick for anyone in hobbyist-range automotive space – and it’s surprisingly tiny!

You could build a lot of things around this module – a CAN bus analyzer or sniffer, a custom peripheral for car dashes, or even a full-blown ECU. You can even design any hardware for a robot or a piece of industrial technology that uses CAN for its backbone – we’ve all seen a few of those! It’s a great board, but it uses six layers. We’ll see if we can do something about that here.

Modules like TinySparrow will make your PCBs cheaper while ordering, too! Thanks to the carefully routed microcontroller and the CAN transmitter, whatever board you design around this chip definitely wouldn’t need six layers like this one does – and, unlike designing your own board, you can use someone’s well-tested and tailored libraries and reference circuits!

With TinySparrow, you save a lot of time, effort and money whenever you want to design a car or industrial accessory. After looking at the board files, my proposal for helping today’s board is – like last time – to make its production cheaper, so that more people can get this board into their hands if the creator ever does try and manufacture it. I also have some tips to make future improvements on this design easier, and make it more friendly for its userbase.

Continue reading “PCB Design Review: Tinysparrow, A Module For CAN Hacking Needs” →