OpenMower: Open Source Robotic Lawn Mower With RTK GPS

Robotic mowers are becoming a common sight in some places, enabled by the cost of motors and the needed control electronics being much lower, thanks to the pace of modern engineering. But, in many cases, they still appear to be really rather dumb, little more than a jacked up bump-and-go with a spinning blade. [Clemens Elflein] has taken a cheap, dumb mower and given it a brain transplant based around a Raspberry Pi 4 paired up with a Raspberry Pi Pico for the real time control side of things. [Clemens] is calling this OpenMower, with the motivation to create an open source robot mower controller with support for GPS navigation, using RTK for extra precision.

The donor robot was a YardForce Classic 500, and after inspection of the control PCB, it looks like many other robot mower models are likely to use the same controller and thus be compatible with the openmower platform. A custom mainboard houses the Pi 4 and Pico, an ArduSimple RTK GPS module (giving a reported navigational accuracy of 1 cm,) as well as three BLDC motor drivers for the wheels and rotor. Everything is based on modules, plugging into the mainboard, reducing the complexity of the project significantly. For a cheap mower platform, the Yardforce unit has a good build quality, with connectors everywhere, making OpenMower a plug and play solution. Even the user interface on top of the mower was usable, with a custom PCB below presenting some push buttons at the appropriate positions.

OpenMower mainboard

Motor control is courtesy of the xESC project, which provides FOC motor control for low cost, interfacing with the host controller via a serial link. This is worth looking into in its own right! On the software side of things, [Clemens] is using ROS, which implements the low level robot control, path planning (using code taken from Slic3r) as well a kinematics constraints for object avoidance. The video below, shows how simple the machine is to operate — just drive it around the perimeter of lawn with a handheld controller, and show it where obstacles such as trees are, and then set it going. The mower is even capable of mowing multiple lawns, making the journey between them automatically!

Robotic mower projects are not new around here, here’s the mysterious TK with an interesting take, another using RTK GPS for good (or possibly bad) and quite probably the jankiest one we’ve seen in a while, which uses a LoRa base-station to transmit RTK corrections. We’d recommend keeping well away from that last one.

Continue reading “OpenMower: Open Source Robotic Lawn Mower With RTK GPS”

the RP2040 stamp

Putting The RP2040 On A Stamp

In the electronics world, a little one-inch square board with castellated edges allows a lot of circuitry to be easily added in a small surface area. You can grab a prepopulated module, throw it onto your PCB of choice, and save yourself a lot of time routing and soldering. This tiny Raspberry Pi 2040 module from [SolderParty] ticks all those boxes.

With all 30 GPIO broken out, 8MB of onboard flash, and a NeoPixel onboard, you have plenty to play with on top of the already impressive specs of the RPi2040. Gone are the days of in-circuit programmers, and it uses a UF2 bootloader to make it easy B to transfer new images over USB. Rust, MicroPython, Arduino, and the PicoSDK are all development options for code. All the KiCad files, BOM, schematics, and firmware are up on GitHub under a CERN license for your perusal pleasure. They’ve helpfully included footprints as well as a reference carrier board design.

It is a handy little project that might be good to keep in mind or just use as a reference design for your efforts. We have a good overview of the RPi2040 from an STM perspective. If you’re curious about what you could even use this little stamp for, why not driving an HDMI signal?

DOOM Comes To The RP2040

To the point of being a joke, it seems like DOOM is adapted to run on everything these days. So it was only natural that we would see it ported to the RP2040 by [Graham Sanderson], the tiny chip powering the Raspberry Pi Pico.

You might be thinking, what’s different about this port? There have been 55 articles about DOOM here on Hackaday, showing it running on everything from web checkboxes to desk phones. The RP2040 has 256 K of RAM, two decently clocked processor cores, and 2 MB of flash, so it’s not the most constrained platform ever to have DOOM run it. But [Graham] also set some very lofty goals: all nine levels needed to be playable, faithful graphics and music, multiplayer, and it would output to VGA directly. It should play just like the original. DOOM has a demo that is stored as a sequence of input events. They form excellent regression tests as if the character gets stuck or doesn’t make it to the end; then you’re not accurate according to the original code.

There are two big problems right out the gate. First, a single level is larger than the 2 MB storage that the RP2040 has. And to drive the 320×200 display, you either need to spend a lot of your CPU budget racing the beam or allocate a vast amount of RAM to framebuffers, making level decompression much harder.

A default compression scheme wouldn’t cut it because it needed a high compression ratio and random access since decompressing into RAM wasn’t an option. However, carefully optimizing and compressing the different data structures yielded great results. Save game files are given a similar treatment to ensure they fit into the remaining flash after all the levels (34k).

The result is fantastic, and it supports DOOM, Ultimate DOOM, and DOOM II. The write-up goes into far more detail than we could here; enjoy the read. If you decide to make a day trip to the depths of Hell on your own Pi Pico, be sure to let us know in the comments.

Continue reading DOOM Comes To The RP2040″

Screenshot of Pulseview showing capture and decode of some digital channels

Need A Logic Analyzer? Use Your Pico!

There’s a slew of hardware hacker problems that a logic analyzer is in a perfect position to solve. Whether you’re trying to understand why an SPI LCD screen doesn’t initialize, what’s up with your I2C bus, or determine the speed of an UART connection, you’ll really want to have a logic analyzer on hand. People have been using a Pi Pico as a logic analyzer in a pinch, and now [pico-coder] has shared a sigrok driver that adds proper support for a Pico to beloved tools like Pulseview.

The specs offered are impressive. Compared to the $10 “Saleae” clone analyzers we are so used to, this thing boasts 21 digital channels with up to 120 MHz capture speed, 3 ADC channels at up to 500 KHz, and hardware-based triggers. The GitHub repository linked above stores the driver files out-of-tree, but provides build instructions together with an easily flash-able uf2 firmware. It’s likely that you’ll soon see this driver in a stock Pulseview installation, however, given the submitter-friendly attitude we’ve witnessed on the sigrok mailing list. However, if you need a logic analyzer ASAP, you should follow the caringly offered quickstart guide.

We’ve covered Pulseview being used in combination with cheap accessible analyzers before — a must-watch if you need to get yourself up to speed on the value they provide to a hobbyist. If an oscilloscope is what you need and a smartphone is what you have, perhaps you’ll enjoy the Scoppy firmware for the Pico.

We thank [mip] for sharing this with us!

You Can Send MIDI Over I2C If You Really Need To

The Musical Instrument Digital Interface has a great acronym that is both nice to say and cleanly descriptive. The standard for talking to musical instruments relies on a serial signal at 31250 bps, which makes it easy to transmit using any old microcontroller UART with a settable baud rate. However, [Kevin] has dived into explore the utility of sending MIDI signals over I2C instead.

With a bit of hacking at the Arduino MIDI library, [Kevin] was able to get the microcontroller outputting MIDI data over the I2C interface, and developed a useful generic I2C MIDI transport for the platform. His first tests involved using this technique in concert with Gravity dual UART modules. After he successfully got one running, [Kevin] realised that four could be hooked up to a single Arduino, giving it 8 serial UARTS, or, in another way of thinking, 8 MIDI outputs.

At its greatest level of development, [Kevin] shows off his I2C MIDI chops by getting a single Raspberry Pi Pico delivering MIDI signals to 8 Arduinos, all over I2C. All the Arduinos are daisy-chained with their 5V and I2C lines wired together, and the system basically swaps out traditional MIDI channels for I2C addresses instead.

There’s not a whole lot of obvious killer applications for this, but if you want to send MIDI data to a bunch of microcontrollers, you might find it easier daisy-chaining I2C rather than hopping around with a serial line in the classic MIDI-IN/MIDI-THRU fashion.

We’ve seen [Kevin]’s work before too, like the wonderful Lo-Fi Orchestra. Video after the break.

Continue reading “You Can Send MIDI Over I2C If You Really Need To”

Breakbeats Courtesy Of The RP2040

While one often listens to songs or albums in full, sometimes you just want to lay down a simple beat. [todbot]’s latest project promises to do just that.

The build relies on a Raspberry Pi Pico or any other RP2040-based microcontroller board, and is programmed in CircuitPython. The PWM feature is used for audio output, and it’s loaded with different WAV samples of the classic “Amen” break.

Each measure, a random new sample is chosen and played, changing the beat. Even better, all the samples can loop, and they come in varying lengths, allowing them to overlap and lay over each other to add further depth to the mix. It’s a cinch to setup, as CircuitPython has an AudioMixer object built in.

Those wishing to tinker for themselves can find all the code and samples on Github. A build like this one is a great way to start learning about working with audio and music, after all. We’ve seen [todbot]’s work here before, too. Video after the break.

Continue reading “Breakbeats Courtesy Of The RP2040”

Reverse Engineering: Trash Printer Gives Up Its Control Panel Secrets

Many of us hardware-oriented types find it hard to walk past a lonely-looking discarded item of consumer electronics without thinking “If only I could lug that back to the car and take it home to play with” and [phooky] from NYC Resistor is no stranger to this sentiment. An old Epson WF-2540 inkjet printer was disassembled for its important ‘nutrients,’ you know, the good stuff like funky motors, encoders and switches. But what do you do with the control panel? After all, they’re usually very specific to the needs of the device they control, and don’t usually offer up much scope for reuse.

The RP2040 PIO is quite capable of pushing out those LCD pixels

[phooky] doesn’t usually bother with them, but this time decided to have a crack at it for fun. Inside, nothing out of the ordinary, with a large single-sided PCB for the key switches and LEDs, and a small PCB hosting the LCD display. The easy part was to figure out how the keyboard scanning was done, which turned out to be pretty simple, it just uses some 74-series shift register devices to scan the columns and clock out the row lines. A Raspberry Pi Pico module was pressed into service to scan the keyboard and enable a keyboard map to be created, by pure brute-force. No need to trace the circuit.

Things got interesting when [phooky] started looking into the LCD interface, based on the Epson E02A46EA chip (good luck finding a datasheet for that one!) and quickly realised that documentation simply wasn’t available, and it would be necessary to do things the hard way. Poking around the lines from the main CPU (an Epson E01A9CA , whatever that is) the display clock was identified, as well as some control signals, and three lines for the RGB channels. By throwing a Saleae data capture into some ROM exploring software, the display configuration was determined to be a standard 320×120 unit.

The PIO unit of the RP2040 was used to generate the video waveforms and push the pixels out to the LCD controller, allowing the RP2040 board to be wired inside the case permanently, converting the control panel into a USB device ready for action!

Want to know a little more about reverse engineering junk (or not) items and repurposing them to your will? Checkout this hacking piece from a couple of weeks back. For something a little more advanced, you could try your hand at a spot of car ECU hacking.

Thanks [Perry] for the tip!