Hackaday Prize Entry: Real Hard Drives In The Raspberry Pi

‘Boy, I wish the Raspberry Pi had a SATA port’. This is the plea that echoes through the Internet, and for once, the Internet is not wrong. A SATA port — or any connector to a big, dumb spinny disk — would be a great addition to the Raspberry Pi ecosystem.

[AlanH]’s entry to the Hackaday Prize is the exact opposite of what everyone wants. The NetPi-IDE is a Parallel ATA IDE disk emulator that turns an inexpensive Raspi Zero into a big, dumb, unspinny hard drive. Drop this machine in your Windows 98 Starcraft battlestation, and you have a hard drive that you can ssh into.

As with any build involving a lot of data, bandwidth is important. The highest bandwidth interface on the Pi’s GPIO ports is the SPI interface. [AlanH] is hanging a Lattice MachXO2 FPGA off the SPI port and using that to emulate a disk. In the future, he’s going to move to the much more open Lattice iCE40HX, compatable with the Open Source IceStorm synthesis chain.

The feature set for this project includes proper IDE disk emulation with sizes ranging from 10 Megabytes to 8 Gigabytes tested so far. If you need anything bigger, you don’t need an IDE drive. A DOS redirector allows mounting any arbitrary directory to a DOS drive letter, a virtual network interface turns this project into The Cloud™, and a serial console is mapped to unused IDE registers, allowing any host system to login to the Pi without any external cables.

While it’s not what everyone wants in a Pi, this is an exceptionally cool project. PATA drives are getting old, and the systems supporting them are too. If you want to keep those retrocomputers running, we have to start planning now, and there’s no better way to do that than with cheap hardware and Open Source toolchains.

Introduction To TensorFlow

I had great fun writing neural network software in the 90s, and I have been anxious to try creating some using TensorFlow.

Google’s machine intelligence framework is the new hotness right now. And when TensorFlow became installable on the Raspberry Pi, working with it became very easy to do. In a short time I made a neural network that counts in binary. So I thought I’d pass on what I’ve learned so far. Hopefully this makes it easier for anyone else who wants to try it, or for anyone who just wants some insight into neural networks.

Continue reading “Introduction To TensorFlow”

Adulterated food detection

Hackaday Prize Entry: Detecting Adulterated Food Using AI

Adulterated food is food that has a substance added to it to save on manufacturing costs. It can have a negative effect, it can reduce the food’s potency or it can have no effect at all. In many cases it’s done illegally. It’s also a widespread problem, one which [G. Vignesh] has decided to take on as his entry for the 2017 Hackaday Prize, an AI Based Adulteration Detector.

On his hackaday.io Project Details page he outlines some existing methods for testing food, some which you can do at home: adulterated sugar may have chalk added to it, so put it in water and the sugar will dissolve while the chalk will not. His approach is to instead take high-definition photos of the food and, on a Raspberry Pi, apply filters to them to reveal various properties such as density, size, color, texture and so on. He also mentions doing image analysis using a deep learning neural network. This project touches us all and we’ll be watching it with interest.

If all this talk of adulterated food makes you nervous about your food supply then consider growing our own, hacker style. One such project we’ve seen here on Hackaday is Farmbot, an open-source CNC farming robot. Another such is MIT’s OpenAg Food Computer, a robotic control and monitoring growing chamber.

Generator Monitor Gives The Phone Company The Boot

Part of the problem with having an alarm system is its reliance on land line telephone service. Some of them are getting away from this practice, but there are still many legacy systems out there that require a check to be sent in to Ma Bell every month in addition to the alarm system fees. Like these antiquated systems, [jgyates] was having a similar problem with the generator at his home which could only be monitored with a link to a cell network. Now that there’s a Raspberry Pi in every house, however, [jgyates] has a generator monitor that isn’t beholden to the phone company.

The hardware setup is little more than connecting the communications lines from the generator’s controller (in this case, a Generac Evolution controller) to the serial communications pins on a Raspberry Pi 3. [jgyates] did most of the work in Python, and his code is able to monitor almost every aspect of this generator and report it over WiFi or Ethernet, as well as control the generator settings from anywhere that has an Internet connection.

Even if you don’t have a generator with this particular controller, it will be a good guide for converting a monitor of any type into one that doesn’t require a land line or cell network connection. To that end, there have been lots of projects that convert even simple, old, analog household devices to report data over the LAN.

Sandwich Together A Raspberry Pi Laptop

Ever since the Raspberry Pi was released to an eager public just over five years ago there is one project that seems to have been tackled more frequently than any other using the small computer from Cambridge: that of making a laptop with Pi for brains. Perhaps you feel you have had your fill of Pi laptops both good and bad, but it’s still a project that can bring up some surprises.

Does [Eben] carry a silver marker with him, laptops for the signing of?
Does [Eben] carry a silver marker with him at all times, laptops for the signing of?
[Archie Roques] is a young maker from Norwich, UK, and at the Raspberry Pi birthday party in early March he had rather an unusual laptop. He’d done the usual thing of mating the official Pi screen, a bluetooth keyboard/touchpad, Pi, and battery, but as always it’s the detail that matters. His case is a carefully designed sandwich of laser-cut plastic that somehow manages the impossible task of containing all the laptop internals while not being too bulky.

For power he at first used a 4 AH LiPo cell from a dead tablet with a Pimoroni LiPo power board, but since he hit problems with the Pimoroni board supplying both screen and Pi he’s switched to an off-the-shelf power bank. Unusually this laptop also has built-in audio, using another Pimoroni product, their speaker pHAT.

Where this laptop has a flaw though is in the display hinges. He has plans for a beautifully made 3D printed hinge, but for now he’s using a piece of tape, which though functional does not add to the aesthetic. When we saw it in Cambridge the keyboard was fitting more snugly than it does in the photos on his write-up, so perhaps he’s fixed some of its issues. Despite the in-progress hinge it’s a very usable little Pi laptop, and though (Hint, [Archie]!) he hasn’t yet published the design files for it, we’re sure when he does we’ll see other people building the same machine. They won’t be quite as exclusive as [Archie]’s model though, while he was in Cambridge he managed to get it signed by [Eben Upton], founder of the Raspberry Pi Foundation and judge for the 2017 Hackaday Prize.

We recently showed you a Pi laptop build in a cigar box that was useful in its detailing of the various modules required, but in the past we’ve shown you another one using the official touch screen, a lovely one in the style of a Psion palmtop, and vertically bulky yet small-footprint one, and another that keeps its presence hidden.

A tip of the hat to Norwich Hackspace.

3G To WiFi Bridge Brings The Internet

[Afonso]’s 77-year-old grandmother lives in a pretty remote location, with only AM/FM radio reception and an occasionally failing landline connecting her to the rest of the world. The nearest 3G cell tower is seven kilometers away and unreachable with a cell phone. But [Afonso] was determined to get her up and running with video chats to distant relatives. The solution to hook granny into the global hive mind? Build a custom antenna to reach the tower and bridge it over to local WiFi using a Raspberry Pi.

The first step in the plan was to make sure that the 3G long-shot worked, so [Afonso] prototyped a fancy antenna, linked above, and hacked on a connector to fit it to a Huawei CRC-9 radio modem. This got him a working data connection, and it sends a decent 4-6 Mbps, enough to warrant investing in some better gear later. Proof of concept, right?

On the bridging front, he literally burned through a WR703N router before slapping a Raspberry Pi into a waterproof box with all of the various radios. The rest was a matter of configuration files, getting iptables to forward the 3G radio’s PPP payloads over to the WiFi, and so on. Of course, he wants to remotely administer the box for her, so he left a permanent SSH backdoor open for administration. Others of you running remote Raspberry Pis should check this out.

We think it’s awesome when hackers take connectivity into their own hands. We’ve seen many similar feats with WiFi, and indeed [Afonso] had previously gone down that route with a phased array of 24 dBi dishes. In the end, the relatively simple 3G Pi-and-Yagi combo won out.

Part two of the project, teaching his grandmother to use an Android phone, is already underway. [Afonso] reports that after running for two weeks, she already has an Instagram account. We call that a success!

Replica Fallout Terminal

If you’ve played Fallout 4, you’re familiar with the wall-mounted terminals in the game. They’ve got a post-apocalyptic aesthetic and the glowing green screen that calls out to anyone that grew up with computers and hacker movies from the 80s and 90s. Remember the first time you set your command line text to green? Don’t be embarrassed, we were all young once.

[PowerUpProps] liked the Fallout terminal so much they developed a replica. It’s a build that leans heavily on maker standards, a Raspberry Pi and 3D printing form the basis of the terminal. With ready access to such powerful tools, it makes starting such a project much more approachable. The key to the success of this build is the fine attention to detail in the finishing – the paint job looks incredible, and when photographed appropriately, it could be mistaken for the real thing an in-game screenshot.

An interesting touch is the use of a dark green acrylic window in front of the LCD, which gives the display a tinted hue. We’d like to see this compared with a clear glass window with a classic fishbowl curve to it, combined with greening up in software. The creator readily admits that this looks great at the command line, but is somewhat of a letdown when using the GUI.

Perhaps the only thing the prop build could use is some sort of user interface — the keyboard is only 3D printed and there’s no mouse or other pointing device included. There are some creative solutions to this problem, which we often see in other Fallout projects, like the ever popular Pip-Boy replica builds.

[Thanks to Sjoerd for the tip!]