Posts with «robots hacks» label

The Dar es Salaam Hacker Scene and Gamut Detection

We’re on a sort of vacation in Tanzania at the moment and staying in a modest hotel away from the tourist and government district. It’s a district of small shops selling the same things and guys repairing washing machines out on the sidewalk. The guys repairing washing machines are more than happy to talk. Everybody’s amazingly friendly here, the hotel guy grilled us for an hour about our home state. But I really didn’t expect to end up in a conversation about computer vision.

In search of some yogurt and maybe something cooler to wear, we went on a little walk away from the hotel. With incredible luck we found a robotics shop a few blocks away. Mecktonix is a shop about two meters each way, stuffed full of Arduinos, robots, electronics components, servos, and random computer gear, overseen by [Yohanna “Joe” Harembo]. Nearby is another space with a laser engraver and 3D printer. The tiny space doesn’t stop them from being busy. A constant stream of automotive tech students from the nearby National Institute of Transport shuffle in for advice and parts for class assigned projects.

In between students, Joe demos an autonomous car he’s working on. In classic hacker fashion, he first has to reattach the motor driver board and various sensors, but then he demos the car and its problem –  the video frame rate is very slow. We dive in with him and try to get some profiling using time.monotonic_ns(). He’s never done profiling before, so this is a big eye opener. He’s only processing one video frame every 4.3 seconds, using YOLO on a Pi 3, and yup, that’s the problem.  I suggest he change to gamut detection or a Pi 4.

Gamut Detection

If you’re not familiar with gamut detection, it’s one of the simplest of all computer vision techniques, so it’s easy to implement on slow processors and almost trivial to code. Basically, it’s “look for a color”.  If you want your robot to follow you, wear a lime green T shirt. Now the robot just has to look for lime green. Same for catching a ball or following a line. The algorithm is simple – convert each pixel to HSV, where hue corresponds to the direction around the color wheel,  saturation corresponds to how concentrated the color is, and value how bright. Brightness depends on the lighting, so you can throw value away and just set limits for H and S. Anything within those limits is part of our target. The box formed by those limits is our “gamut”.

There are a couple speedups you can apply as well. First, ask yourself how much resolution you need from the camera. If you only want to track a green T shirt that’s never less than 24 pixels on screen, turn the resolution down by a factor of six each way and look for four-pixel T shirts. You now have 1/36th as much data to process and your algorithm runs 36 times faster. If you can’t control the camera resolution, you can shrink the image or just sample every nth pixel. Second, you can often ask for a YUV or YIQ image from the camera. Discard Y and set your limits in IQ or UV coordinates. It’s about the same as HSV.

Joe’s eating this up – he’s had limited chances to talk with somebody else who is into computer vision. As we write this, he’s still trying with YOLO, but at lower resolution. If it doesn’t work he’ll try gamut detection. And it’s not his only project. Passenger carrying motorcycles called pikipikis are common here. A student has a project to enforce passengers wearing a helmet, and we fiddle with the student’s project.

The Dar es Salaam Scene

There’s other tech happening in Tanzania too. A few blocks away is [Ruta Electronics], a similar sugar cube sized shop developing smart meters. Everything from cases to PCB etching happens in the tiny shop. Downtown there are a few tech startups. There’s a fab lab, mostly oriented towards children. And on a quiet side street off the main drag, there’s a tiny shop with three guys who are hacking like crazy.

For us, we’ve had a chance to make a friend from a different culture and play with a robot car together — what could be better?  When you’re traveling, are you on the lookout for other hackers or hackerspaces? It’s worth the effort and brings our community together in a way that even the internet can’t.

Machine Learning Robot Runs Arduino Uno

When we think about machine learning, our minds often jump to datacenters full of sweating, overheating GPUs. However, lighter-weight hardware can also be used to these ends, as demonstrated by [Nikodem Bartnik] and his latest robot.

The robot is charged with autonomously navigating a simple racetrack delineated by cardboard barriers. The robot is based on a two-wheeled design with tank-style steering. Controlled by an Arduino Uno, the robot uses a Slamtec RPLIDAR sensor to help map out its surroundings. The microcontroller is also armed with a Bluetooth link and an SD card for storage.

The robot was first driven around the racetrack multiple times under manual control, all the while collecting LIDAR data. This data was combined with control inputs to help create a data set that could be used to train a machine learning model. Feature selection techniques were used to refine down the data points collected to those most relevant to completing the driving task. [Nikodem] explains how the model was created and then refined to drive the robot by itself in a variety of race track designs.

It’s a great primer on machine learning techniques applied to a small embedded platform.

A Guard Bot For Your Home Assistant

While fixed sensors, relays, and cameras can be helpful in monitoring your home, there are still common scenarios you need to physically go and check something. Unfortunately, this is often the case when you’re away from home. To address this challenge, [PriceLessToolkit] created a guardian bot that can be controlled through Home Assistant.

The robot’s body is made from 3D-printed components designed to house the various modules neatly. The ESP32 camera module provides Wi-Fi and video capabilities, while the Arduino Pro Mini serves as the bot’s controller. Other peripherals include a light and radar sensor, an LED ring for status display, and a speaker for issuing warnings to potential intruders. The motor controllers are salvaged from two 9-gram servos. The onboard LiPo battery can be charged wirelessly with an integrated charging coil and controller by driving the bot onto a 3D-printed dock.

This build is impressive in its design and execution, especially considering how messy it can get when multiple discrete modules are wired together. The rotating castor wheels made from bearings add an elegant touch.

If you’re interested in building your own guard bot, you can find the software, CAD models, and schematics on Github.

Thanks for the tip [Bernard]!

Home Assistant is a popular software tool around, and we’ve seen it connect to boilers, blinds, beds and 433 MHz sensors.

Hackaday Prize 2023: Bolt Bot Micro Servo Droids

This Hackaday prize entry from [saul] is the beginning of a reconfigurable kit of 3D printed parts and servo motors for robotics learning. With just access to a printer, a few cheap-as-chips servo motors, an Arduino, and some nuts and bolts, you could be hacking together robot walkers within a few hours of starting!

Bolt Bots is very simple to understand, with all the mechanics and wiring out there in the breeze, but strictly for indoor use we reckon. If you want to add remote control to your application, then drop in one of the ubiquitous nRF24L01 boards and build yourself a copy of the remote control [saul] handily provides in this other project.

There really isn’t a great deal we can say about this, as it’s essentially a build kit with quite a few configuration options, and you just have to build with it and see what’s possible. We expect the number of parts to proliferate over time giving even more options. So far [saul] demonstrates a few flavors of ‘walkers’, a rudimentary ‘robot arm’, and even a hanging drawbot.

The bolt hardware can be found in this GitHub repo, and the remote control code in this second one.

Servo-based designs are sometimes sneered at due to their dubious accuracy and repeatability, but with a little of effort, this can be vastly improved upon. Also, multi-legged walkers need multiple servos and controllers to drive ’em. Or do they?

The HackadayPrize 2023 is Sponsored by:

Retired Welding Robot Picks Up Side Hustle as CNC Router

Who says you can’t teach an old robot new tricks? Nobody, actually. That saying is about dogs. But it applies to robots too, at least judging by the way this late-90s industrial beast was put to use in a way it was never intended: as a giant CNC router.

The machine in question is an ABB IRB6400, a six-axis, floor-mounted industrial machine that had a long career welding at a Eurorail factory in Austria before [Brian Brocken] made its acquaintance. He procured the non-working machine — no word on what he paid for it — and moved the 2-ton paperweight into his shop, itself a non-trivial endeavor. After a good scrubbing, [Brian] tried to get the machine started up. An error prevented the robot controller from booting; luckily, there’s a large community of ABB users, and [Brian] learned that one of the modules in the controller needed replacement.

After fixing that — and swapping out the controller’s long-dead backup batteries, plus replacing the original 1.44 MB floppy drive with a USB drive — he was able to bring the machine back to life. Unfortunately, the limited amount of internal memory made it difficult to use for anything complicated, so [Brian] came up with an application to stream coordinates to the controller over a serial port, allowing for unlimited operation. With that in place, plus a simple spindle mounted to the robot’s wrist with a 3D printed adapter, [Brian] was able to carve foam blocks into complex shapes. The video below shows everything from delivery to first chips — well, dust at least.

This build seems to be a significant escalation from [Brian]’s previous large-format CNC machine. He must have something interesting in mind, so stay tuned for details.

Hack a Day 11 Apr 09:00

Robotic Platform Is Open Sourced And User Friendly

Having a 3D printer or a CNC machine available for projects is almost like magic. Designing parts in software and having them appear on the workbench is definitely a luxury. But for a lot of us, these tools aren’t easily available and projects that use them can be out-of-reach. That’s why one of the major design goals of this robotics platform was to use as many off-the-shelf components as possible.

The robot is called the OpenScout and, as its name implies, intends to be a fully open-source robotics platform for a wide range of use cases. It uses readily-available aluminum extrusion as a frame, which bolts together without any other specialized tools like welders. The body of the robot is articulating, helping it navigate uneven terrain outdoors. The specifications also call for using an Arduino to drive the robot, although there is plenty of space in the robot body to house any robotics platform you happen to have on hand.

For anyone looking to get right into the useful work of what robots can do, rather than spending time building up a platform from scratch, this is an excellent project. It’s straightforward and easy to build without many specialized tools. The unique articulating body design should make it effective in plenty of environments. If you do have a 3D printer, though, that opens up a lot of options for robotics platforms.

Sisyphean Ball Race Robot Toils Gracefully, Magnetically

Aren’t ball races and marble runs fun? Wouldn’t they be so much more enjoyable if you didn’t have to climb back up the ladder each time, as it were, and reset the thing? [Johannes] wrote in to tell us about a wee robot with the Sisyphean task of setting a ball bearing on a simple but fun course, collecting it from the end, and airlifting it back to the start of the track.

[Johannes] built this ‘bot to test small-scale resin printing strength as well as the longevity of some tiny linear actuators from Ali that may or may not be available at a moment’s notice. The point was to see how these little guys fared when connected directly to an Arduino or other microcontroller, rather than going the safer route with a motor driver of some kind.

Some things worked well, like the c-clips that keep the axles together, and using quick pulses to release the magnetically-linked ball from the gripper. Other aspects didn’t work out so well. Tiny resin parts do not respond well to force, for starters. And then there’s the actuators themselves. The connections are fragile and the motors are weak, but they vary wildly in quality from piece to piece, so YMMV. Some lose steps, and others occasionally seize. But you wouldn’t know any of that from the graceful movement capture in the video below. Although it appears to be automated, the bot is under remote control because of the motor issues.

Not into ball runs? There are other Sisyphean tasks available, such as moving sand around in the name of meditation.

2022 Sci-Fi Contest: A Hand-Following Robot, Powered by Arduino

If there’s one thing audiences love in sci-fi, it’s a cute robot companion that follows the heroes around. If you want one of your own, starting with this build from [mircemk] could be just the ticket.

The build relies on the classic Arduino Uno microcontroller, which talks to a HC-SR04 ultrasonic sensor module and two infrared sensors in order to track a human target and follow it around. Drive is thanks to four DC gear motors, driven by a L293D motor driver, with a two-cell lithium battery providing power for everything onboard.

The robot works in a simple manner, following a hand placed in front of the robot’s sensors. First, the robot checks for the presence of an object in front using the ultrasonic sensor. If something is detected, the twin infrared sensors mounted left and right are used to guide the robot, following the hand.

It’s not a sophisticated algorithm, and it won’t really let your robot follow you down a crowded street. However, it’s a great project to learn on for beginners and could serve as a great entry into more advanced projects using face tracking or other techniques. Video after the break.

 

Hack a Day 13 Apr 21:00

Robotic Xylophone Makes Music with MIDI Magic

The MIDI format has long been used to create some banging electronic music, so it’s refreshing to see how [John P. Miller] applied the standard in his decidedly analog self-playing robotic xylophone.

Framed inside a fetching Red Oak enclosure, the 25-key instrument uses individual solenoids for each key, meaning that it has no problem striking multiple bars simultaneously. This extra fidelity really helps in reproducing the familiar melodies via the MIDI format. The tracks themselves can be loaded onto the device via SD card, and selected for playback with character LCD and rotary knob.

The software transposes the full MIDI music spectrum of a particular track into a 25-note version compatible with the xylophone. Considering that a piano typically has 88 keys, some musical concessions are needed to produce a recognizable playback, but overall it’s an enjoyable musical experience.

Perhaps most remarkable about this project is the documentation. If you want to build your own, everything you need to know is available online, and the no-solder approach makes this project very accessible. Most of the write-up happened some years ago, and we’re really interested to see what improvements have been made since.

The robotic xylophone is reminiscent of these automatic tubular bells from some time ago. These musical hacks can be particularly inspiring, and we can’t wait to see more.

[Thanks Assad Ebrahim for the great tip.]

Quit Hunching Over Your Screen With A Little Robotic Help

[Norbert Zare] has identified a problem many of us suffer from – chronically bad posture. Its very common to see computer users hunched forwards over a screen, which eventually will lead to back problems. He mentions that most posture correction devices are pretty boring, so the obvious solution to [Norbert] was to build a simple robot to give you a friendly nudge into the correct position.

This simple Arduino-based build uses the ubiquitous MPU-6050 which provides 3-axis acceleration and 3-axis gyro data all processed on-chip, so it can measure where you’re going, which way you are orientated and how fast you are rotating. This is communicated via the I2C bus, so hooking into an Arduino or Raspberry Pi is a simple affair. There are plenty of Open Source libraries to work with this very common device, which helps reduce the learning curve for those unfamiliar with programming a fairly complex device.

At the moment, he is mounting the sensor on his body, and hard-wiring it, so there’s already some scope for improvement there. The operating premise is simple, if the body angle is more than 55 degrees off vertical, move the servos and shove the body back in to the correct position.

The project GitHub has the code needed, and the project page over on Hackaday.io shows the wiring diagram.

We have seen quite a few projects on this subject over the years, like this one that sends you mobile notifications, an ultrasonic rangefinder-based device, and one that even uses a webcam to keep an eye on you. This one has the silliness-factor, and we like that round these parts. Keep an eye on [Norbert] we’re sure there more good stuff to come!

Hack a Day 21 Oct 00:00