Debugging With Serial Print At 5333333 Baud

Debugging with printf is something [StorePeter] has always found super handy, and as a result he’s always been interested in tweaking the process for improvements. This kind of debugging usually has microcontrollers sending messages over a serial port, but in embedded development there isn’t always a hardware UART, or it might already be in use. His preferred method of avoiding those problems is to use a USB to Serial adapter and bit-bang the serial on the microcontroller side. It was during this process that it occurred to [StorePeter] that there was a lot of streamlining he could be doing, and thanks to serial terminal programs that support arbitrary baud rates, he’s reliably sending debug messages over serial at 5.3 Mbit/sec, or 5333333 Baud. His code is available for download from his site, and works perfectly in the Arduino IDE.

The whole thing consists of some simple, easily ported code to implement a bare minimum bit-banged serial communication. This is output only, no feedback, and timing consists of just sending bits as quickly as the CPU can handle, leaving it up to the USB Serial adapter and rest of the world to handle whatever that speed turns out to be. On a 16 MHz AVR, transmitting one bit can be done in three instructions, which comes out to about 5333333 baud or roughly 5.3 Mbit/sec. Set a terminal program to 5333333 baud, and you can get a “Hello world” in about 20 microseconds compared to 1 millisecond at 115200 baud.

He’s got additional tips on using serial print debugging as a process, and he’s done a followup where he stress-tests the reliability of a 5.3 MBit/sec serial stream from an ATMega2560 at 16 MHz in his 3D printer, and found no missed packets. That certainly covers using printf as a debugger, so how about a method of using the debugger as printf?

This 3D-Printed Robotic Vacuum Sucks

After you’ve taken a moment to ponder the turn of phrase used in the title, take a look at this scratch-built robotic vacuum created by [theking3737]. The entire body of the vacuum was 3D printed, and all of the internal electronics are off-the-shelf modular components. We can’t say how well it stacks up against the commercial equivalents from iRobot and the like, but it doesn’t look like it would be too hard to build one yourself to find out.

The body of this rather concerned-looking robot was printed on a DMS DP5 printer, which is a neat trick as it only has a build platform of 200 mm x 200 mm. Once all the pieces were printed, a 3D pen was used to “weld” the sections together. The final result looks a bit rough, but should give a bond that’s just as strong as the printed parts themselves.

The robot has four sets of ultrasonic range finders to detect walls and obstacles, though probably not in the positions you would expect. The right side of the robot has two sets of sensors, while the left side only gets one. We aren’t sure the reasoning behind the asymmetrical layout, but presumably the machine prefers making right turns.

Control is provided by an Arduino Mega and the ever-reliable HC-05 Bluetooth module. A companion Android application was written which allows configuring the robot without having to plug into the Arduino every time you want to tweak a setting.

We can’t say we’ve seen that many DIY robotic vacuums here at Hackaday, but we’ve certainly featured our fair share of hacks for the commercially available models.

Cat laser on a pan-tilt robot

Robotic Laser Keeps Cat Entertained While You Hack

Whether it’s our own cat or a neighbor’s, many of us have experienced the friendly feline keeping us company while we work, often contributing on the keyboard, sticking its head where our hands are for a closer look, or sitting on needed parts. So how to keep the crafty kitty busy elsewhere? This roboticized laser on a pan-tilt mechanism from the [circuit.io team] should do the trick.

The laser is a 650 nm laser diode mounted on a 3D printed pan-tilt system which they found on Thingiverse and modified for attaching the diode’s housing. It’s all pretty lightweight so two 9G Micro Servos do the grunt work just fine. The brain is an Arduino UNO running an open-source VarSpeedServo library for smooth movements. Also included are an HC-05 Bluetooth receiver and an Android app for controlling the laser from your phone. Set it to Autoplay or take a break and use the buttons to direct the laser yourself. See the video below for build instructions and of course their cat, [Pepper], looking like a Flamenco dancer chasing the light.

Continue reading “Robotic Laser Keeps Cat Entertained While You Hack”

Arduino Watchdog Has Bite And Doesn’t Need Treats

My dog Jasper isn’t much of a watchdog: he’s too interested in sleeping and chasing my cats to keep an eye on things. Fortunately, [Vadim] has come up with a more reliable alternative with this simple Arduino watchdog. It’s designed to work with crypto coin mining rigs, but it could be easily adapted for other high-uptime uses, such as file servers or doomsday weapons.

Continue reading “Arduino Watchdog Has Bite And Doesn’t Need Treats”

This Radio Gets Pour Reception

When was the last time you poured water onto your radio to turn it on?

Designed collaboratively by [Tore Knudsen], [Simone Okholm Hansen] and [Victor Permild], Pour Reception seeks to challenge what constitutes an interface, and how elements of play can create a new experience for a relatively everyday object.

Lacking buttons or knobs of any kind, Pour Reception appears an inert acrylic box with two glasses resting on top. A detachable instruction card cues the need for water, and pouring some into the glasses wakes the radio.

Continue reading “This Radio Gets Pour Reception”

DIY Peristaltic Pump Keeps The Booze Flowing

A few months ago we showed you a bar bot built by [GreatScott] that uses peristaltic pumps to food-safely move the various spirits and mixers around behind the curtain. The bar bot uses three of them, and at $30 each for pumps with decent flow rate, they added a lot to the parts bill. These pumps are pretty much the ideal choice for a bar bot, so what do you do? [GreatScott] decided to see if it was worth it to make them instead.

Peristaltic pumps are simple devices that pump liquids without touching them. A motor turns a set of rollers that push a flexible tube against a wall. As the motor turns, the rollers move liquid through the tube by squeezing it flat from the outside in turns. Typically, the more you pay for an off-the-shelf peristaltic, the higher the flow rate.

[GreatScott] figured it was cheaper to buy the motor and the control circuitry. He chose a NEMA-17 for their reputation and ubiquity and a DRV8825 controller to go with it. The pump is driven by an Arduino Nano and a pot controls the RPM. After trying to design the mechanical assembly from scratch, he found [Ralf]’s pump model on Thingiverse and modified it to fit a NEMA-17.

The verdict? DIY all the way, assuming you can print the parts. [GreatScott] was trying to beat the purchased pumps’ flow rate of 100mL/minute and ended up with 200mL/minute from his DIY pump. Squeeze past the break for the build video and demonstration.

Is there a bar bot build on your list? No? Is it because you’re more of a single-malt scotch guy? Build a peristaltic pachyderm to pour your potion.

Continue reading “DIY Peristaltic Pump Keeps The Booze Flowing”

Underwater Logging For Science

Logging data with an Arduino is old-hat for most Hackaday readers. However, [Patricia Beddows] and [Edward Mallon] had some pretty daunting requirements. Their sensors were going underground and underwater as part of an effort to study conditions underwater and in caves. They needed to be accessible, yet rugged. They didn’t want to use batteries that would be difficult to take on airplanes, but also wanted more than a year of run time. You can buy all that, of course, if you are willing to pay the price.

Instead, they used off-the-shelf Arduino boards connected together inside PVC housings. Three alkaline AA batteries are compact and give them more than a year of run time. They wrote a journal paper to help other scientists use the same techniques for the Sensors journal published by the Multidisciplinary Digital Publishing Institute.

Continue reading “Underwater Logging For Science”