Modular Robotics Made Easier With ROS

A robot is made up of many hardware components each of which requires its own software. Even a small robot arm with a handful of servo motors uses a servo motor library.

Add that arm to a wheeled vehicle and you have more motors. Then attach some ultrasonic sensors for collision avoidance or a camera for vision. By that point, you’ve probably split the software into multiple processes: one for the arm, another for the mobility, one for vision, and one to act as the brains interfacing somehow with all the rest. The vision may be doing object recognition, something which is computationally demanding and so you now have multiple computers.

Break all this complexity into modules and you have a use case for ROS, the Robot Operating System. As this article shows, ROS can help with designing, building, managing, and even evolving your robot.

Continue reading “Modular Robotics Made Easier With ROS”

Reverse-Emulating NES: Nintendception!

This is a stellar hack, folks. [Tom7] pulled off both full-motion video and running a Super Nintendo game on a regular old Nintendo with one very cute trick. And he gives his presentation of how he did it on the Nintendo itself — Nintendo Power(point)! The “whats” and the “hows” are explained over the course of two videos, also embedded below.

In the first, he shows it all off and gives you the overview. It’s as simple as this: Nintendo systems store 8×8 pixel blocks of graphics for games on their ROM cartridges, and the running program pulls these up and displays them. If you’re not constrained to have these blocks stored in ROM, say if you replaced the cartridge with a Raspberry Pi, you could send your own graphics to be displayed.

He demos a video of a familiar red-haired English soul-pop singer by doing just that — every time through the display loop, the “constant” image block is recalculated by the Raspberry Pi to make a video. And then he ups the ante, emulating an SNES on the Pi, playing a game that could never have been played on an NES in emulation, and sending the graphics block by block back to the Nintendo. Sweet!

The second video talks about how he pulled this off in detail. We especially liked his approach to an epic hack: spend at least a day trying to prove that it’s impossible, and when you’ve eliminated all of the serious show-stoppers, you know that there’s a good chance that it’ll work. Then, get to work. We also learned that there were capacitors that looked identical to resistors used in mid-80s Japan.

These are long videos, and the first one ends with some wild speculation about how a similar human-brain augmentation could take a similar approach, replacing our “memories” with computed data on the fly. (Wait, what?!? But a cool idea, nonetheless.) There’s also another theme running through the first video about humor, but frankly we didn’t get the joke. Or maybe we just don’t know what’s funny. Comments?

None of that matters. A SNES game was played in an NES by pushing modified graphics from a “ROM” cartridge in real-time. And that’s awesome!

If you want more Nintendo-in-Nintendo goodness, check out this NES ROM that’s also a zip file that contains its own source code. If you compile the source, you get the zip file, which if you unzip gives you the source to compile. Right?

Continue reading “Reverse-Emulating NES: Nintendception!”

Internet Of Smells: Giving A Machine The Job Of Sniffing Out Spoiled Food

Has the food in your pantry turned? Sometimes it’s the sickening smell of rot that tells you there’s something amiss. But is there a way to catch this before it makes life unpleasant? If only there were machines that could smell spoiled food before it stinks up the whole place.

In early May, I was lucky enough to attend the fourth FabLab Asia Network Conference (Fan4). The theme of their event this year was ‘Co-Create a Better World’. One of the major features of the conference was that there were a number of projects featured, often from rural areas, that were requesting assistance throughout the course of the conference.

Overall there were many bright people tackling difficult problems with limited resources. This is how I met [Yogesh Kulkarni] who runs a FabLab in Pabal, a farming community not far from Pune, India. [Yogesh] has also appeared on TED Talks (video here). He explained to me that in his area, vendors sell milk-based desserts. These are not exactly refrigerated, and sometimes people become ill from eating them. It would be nice if there was a way for the vendors to avoid selling the occasional harmful product.

I’ve had similar concerns with food safety in my area (Vietnam), and while it has been fine nearly all of the time, a few years ago I nearly died from a preventable food-borne illness. I had sufficient motivation to do a little research.

Continue reading “Internet Of Smells: Giving A Machine The Job Of Sniffing Out Spoiled Food”

Accurate Coffee Billing Through Reverse Engineering

If you’ve ever worked in a stingy office, you’ve become familiar with the communal coffee maker that runs on some variant of the honor system. There’s bits of paper, a coin jar shabbily sealed with sticky tape, and the routine note every six months telling people off for not paying for their daily brew. It all gets a bit much. Thankfully, if you work with [Fabian], it’s no longer a problem (PDF link).

The project forms the basis for [Fabian]’s thesis, in which a DeLonghi coffee maker is reverse engineered. This is undertaken with the explicit goal of properly metering the amount of consumables (coffee beans) used per beverage, to more fairly charge users depending on their brew of choice. This involves breaking down and understanding the coffee maker’s internal communications, as well as implementing a system to record and handle billing. For reasons of simplicity, [Fabian] decided that this should be handled using his colleague’s existing computer accounts. Easy!

It’s a highly academic approach to what we’re sure was a very stimulating project with lots of delicious aromas. Coffee’s a popular topic among hackers, that’s for sure – check out this roaster to take your game to the next level.

 

Serial Connection Over Audio: Arduino Can Listen To UART

We’ve all been there: after assessing a problem and thinking about a solution, we immediately rush to pursue the first that comes to mind, only to later find that there was a vastly simpler alternative. Thankfully, developing an obscure solution, though sometimes frustrating at the time, does tend to make a good Hackaday post. This time it was [David Wehr] and AudioSerial: a simple way of outputting raw serial data over the audio port of an Android phone. Though [David] could have easily used USB OTG for this project, many microcontrollers don’t have the USB-to-TTL capabilities of his Arduino – so this wasn’t entirely in vain.

At first, it seemed like a simple task: any respectable phone’s DAC should have a sample rate of at least 44.1kHz. [David] used Oboe, a high performance C++ library for Android audio apps, to create the required waveform. The 8-bit data chunks he sent can only make up 256 unique messages, so he pre-generated them. However, the DAC tried to be clever and do some interpolation with the signal – great for audio, not so much for digital waveforms. You can see the warped signal in blue compared to what it should be in orange. To fix this, an op-amp comparator was used to clean up the signal, as well as boosting it to the required voltage.

Prefer your Arduino connections wireless? Check out this smartphone-controlled periodic table of elements, or this wireless robotic hand.

Continue reading “Serial Connection Over Audio: Arduino Can Listen To UART”

Counting Bees With A Raspberry Pi

Even if keeping bees sounds about as wise to you as keeping velociraptors (we all know how that movie went), we have to acknowledge that they are a worthwhile thing to have around. We don’t personally want them around us of course, but we respect those who are willing to keep a hive on their property for the good of the environment. But as it turns out, there are more challenges to keeping bees than not getting stung: you’ve got to keep track of the things too.

Keeping an accurate record of how many bees are coming and going, and when, is a rather tricky problem. Apparently bees don’t like electromagnetic fields, and will flee if they detect them. So putting electronic measuring devices inside of the hive can be an issue. [Mat Kelcey] decided to try counting his bees with computer vision, and so far the results are very promising.

After some training, a Raspberry Pi with a camera can count how many bees are in a given image to within a few percent of the actual number. Getting an accurate count of his bees allows [Mat] to generate fascinating visualizations about his hive’s activity and health. With real-world threats such as colony collapse disorder, this type of hard data can be crucial.

This is a perfect example of a hack which might not pertain to many of us as-is, but still contains a wealth of information which could be applicable to other projects. [Mat] goes into a fantastic amount of detail about the different approaches he tried, what worked, what didn’t, and where he goes from here. So far the only problem he’s having is with the Raspberry Pi: it’s only able to run at one frame per second due to the computational requirements of identifying the bees. But he’s got some ideas to improve the situation.

As it so happens, we’ve covered a few other methods of counting bees in the past, though this is the first one to be entirely vision based. Interestingly, this method is similar to the project to track squirrels in the garden. Albeit without the automatic gun turret part.

Stock Market Prediction With Natural Language Machine Learning

Machines – is there anything they can’t learn? 20 years ago, the answer to that question would be very different. However, with modern processing power and deep learning tools, it seems that computers are getting quite nifty in the brainpower department. In that vein, a research group attempted to use machine learning tools to predict stock market performance, based on publicly available earnings documents. 

The team used the Azure Machine Learning Workbench to build their model, one of many tools now out in the marketplace for such work. To train their model, earnings releases were combined with stock price data before and after the announcements were made. Natural language processing was used to interpret the earnings releases, with steps taken to purify the input by removing stop words, punctuation, and other ephemera. The model then attempted to find a relationship between the language content of the releases and the following impact on the stock price.

Particularly interesting were the vocabulary issues the team faced throughout the development process. In many industries, there is a significant amount of jargon – that is, vocabulary that is highly specific to the topic in question. The team decided to work around this, by comparing stocks on an industry-by-industry basis. There’s little reason to be looking at phrases like “blood pressure medication” and “kidney stones” when you’re comparing stocks in the defence electronics industry, after all.

With a model built, the team put it to the test. Stocks were sorted into 3 bins —  low performing, middle performing, and high performing. Their most successful result was a 62% chance of predicting a low performing stock, well above the threshold for chance. This suggests that there’s plenty of scope for further improvement in this area. As with anything in the stock market space, expect development in this area to continue at a furious pace.

We’ve seen machine learning do great things before, too – even creative tasks, like naming tomatoes.