A Neural Network Can Now Be Your Writing Assistant

Writing is a difficult job; though, as a primarily word-based site, we may be a little biased here at Hackaday. Not only does a writer have to know the basics, like what a semicolon is and when to use one, they also need to build sentences that convey information in a manner that is pleasant to read. As many commenters like to point out, even we struggle with this on occasion (lauded and scholarly as we are).

Wouldn’t it be better if we could let our computers do the heavy lifting for us? After all, a monkey with infinite time will eventually write Shakespeare and all that. Surely, a computer can be programmed to do all that fancy word assembly while we sit back and enjoy some coffee. Well, that’s what [Robin Sloan] set out to do with a recurrent neural network-powered writing assistant.

Alright, so it doesn’t actually write completely on its own. Instead, [Robin’s] software takes advantage of [JC Johnson’s] torch-rnn project, and integrates it into Atom to autocomplete sentences. [Robin] trained his neural network on hundreds of old issues of the sci-fi magazines Galaxy and IF Magazine, which are available at the Internet Archive. Once the server and corresponding Atom package are installed, a writer can simply push the Tab key and the sentence will be completed.

The results are interesting. [Robin] himself says “it’s like writing with a deranged but very well-read parrot on your shoulder.” While it’s not likely to be used as a serious writing tool anytime soon, the potential is certainly intriguing. When trained on relevant source material, the integration into software like Atom could be very useful. If a neural network can compose music, surely it can write some silly tech articles.

[thanks to Tim Trzepacz for the tip!]

Typewriter image: LjL (Public domain).

World’s Worst Bitcoin Mining Rig

Even if we don’t quite understand what’s happening in a Bitcoin mine, we all pretty much know what’s needed to set one up. Racks of GPUs and specialized software will eventually find a few of these vanishingly rare virtual treasures, but if you have enough time, even a Xerox Alto from 1973 can be turned into a Bitcoin mine. As for how much time it’ll take [Ken Shirriff]’s rig to find a Bitcoin, let’s just say that his Alto would need to survive the heat death of the universe. About 5000 times. And it would take the electricity generated by a small country to do it.

Even though it’s not exactly a profit center, it gives [Ken] a chance to show off his lovingly restored Alto. The Xerox machine is the granddaddy of all modern PCs, having introduced almost every aspect of the GUI world we live in. But with a processor built from discrete TTL chips and an instruction set that doesn’t even have logical OR or XOR functions, the machine isn’t exactly optimized for SHA-256 hashing. The fact that [Ken] was able to implement a mining algorithm at all is impressive, and his explanation of how Bitcoin mining is done is quite clear and a great primer for cryptocurrency newbies.

[Ken] seems to enjoy sending old computer hardware to the Bitcoin mines — he made an old IBM mainframe perform the trick a while back. But if you don’t have a room-size computer around, perhaps reading up on alternate uses for the block chain would be a good idea.

[via Dangerous Prototypes]

Sneak Thieves Beware: A Pi Watcheth

Ever have that strange feeling that somebody is breaking into your workshop? Well, Hackaday.io user [Kenny] has whipped up a tutorial on how to scratch that itch by turning a spare Raspberry Pi you may have kicking around into a security camera system that notifies you at a moment’s notice.

The system works like this: a Raspberry Pi 3 and connected camera module remain vigilant, constantly scanning for motion and recording video. If motion is detected, it immediately snaps and sends a picture to the user’s mobile via PushBullet, then begins recording video. If there is still movement after a few seconds, the process repeats until the area is once again devoid of motion. This also permits a two-way communication with your Pi security system, so you can check in on the live feed whenever you feel the urge.

To get this working for you — assuming that your Pi has been recently updated — setup requires setting up a PushBullet account as well as installing it on your mobile and  linking it with an API. For your Pi, you can go ahead with setting up some Python PushBullet libraries, installing FFmpeg, Pi Camera Notifier, and others. Or, install the ready-to-go image [Kenny] has prepared. He gets into the nitty-gritty of the code in his guide, so check that out or watch the tutorial video after the break.

Continue reading “Sneak Thieves Beware: A Pi Watcheth”

Improving The Accuracy Of Gas Sensors

If you need a sensor to detect gasses of some sort, you’ll probably be looking at the MQ series of gas sensors. These small metal cylinders contain a heater and some electrochemical sensor. Wire the heater up to a voltage, and connect one end of the resistor to an ADC, and you have a sensor for alcohol vapors, hydrogen sulfide, carbon monoxide, or ozone, depending on which model of sensor you’ve picked up.

These are simple analog devices, and as you would expect they’re sensitive to both temperature and humidity. [Davide Gironi] wanted a more accurate gas sensor, so he’s diving into a bit of overengineering and correlating the output of these sensors against temperature and humidity.

There’s a difference between accuracy and precision, and if you want to calibrate gas sensors, you’ll need to calibrate them against something. Instead of digging out a gas sensor of known precision, [Davide] took the easy way out: he graphed the curves on the datasheets for these sensors. It’s brilliant in its simplicity.

These numbers were thrown into R, and with a bit of work, [Davide] had a look up table of various concentrations of gasses plotted against certain resistances. In testing these sensors, he found a higher correlation between humidity and temperature and gas concentrations, which one would expect.

The files for these sensors are available on [Davide]’s website, and he included a neat little video showing everyone what went into these calculations. You can check that out below.

Continue reading “Improving The Accuracy Of Gas Sensors”

Bearing-in-Bearing Fidget Spinner Taken To The Max

People who know about bearings go through a phase of bemusement with regards to fidget spinners. We say something like, “man, I got a whole box of bearings in the basement.” Then we go through a “OK, I’ll make one” phase and print one out of PLA.

[fishpepper] took that sentiment a step further. After being forced to print spinners for his kids, he got jealous and decided to make his own—but his spinner would be a version for engineers. [fishpepper]’s ginormous spinner consists of five bearings superglued inside each other, with the grease cleaned out of the insides to make them spin faster. The inner two sets are doubled up bearings, 6 mm x 17 mm x 6 mm and 17 mm x 30 mm x 7 mm. The middle bearing measures 30 mm x 55 mm x 13 mm, and the fourth bearing 55 mm x 90 mm x 18 mm.

If you want to stop here, it’s a good size, around two inches across. However, [fishpepper] took it a step further, adding a fifth bearing, a 90 mm x 140 mm x 24 mm monster weighing in at 1 kg by itself. The total weight comes to 1.588 kg with the 3D-printed hub included. If you want to make one yourself, check out [fishpepper’s] bearing-in-bearing spinner tutorial which guides you through the various steps.

Hackaday likes fidget spinners so much you’d think we were in 6th grade: we’ve published posts on the three-magnet spinner hack, a fidget-spinning robot, and teaching STEAM with fidget spinners.

Continue reading “Bearing-in-Bearing Fidget Spinner Taken To The Max”

Movie Encoded In DNA Is The First Step Toward Datalogging With Living Cells

While DNA is a reasonably good storage medium, it’s not particularly fast, cheap, or convenient to read and write to.

What if living cells could simplify that by recording useful data into their own DNA for later analysis? At Harvard Medical School, scientists are working towards this goal by using CRISPR to encode and retrieve a short video in bacterial cells.

CRISPR is part of the immune system of many bacteria, and works by storing sequences of viral DNA in a specific location to identify and eliminate viral infections. As a tool for genetic engineering, it’s cheaper and has fewer drawbacks than previous techniques.

Besides generating living rickrolls and DMCA violations, what is this good for? Cheap, self-replicating sensors. [Seth Shipman], part of the team of scientists at Harvard, explains in an interview below a number of possible applications. His focus is engineering cells to act as a noninvasive data acquisition tool to study neurobiology, for example by using engineered neurons to record their developmental history.

It’s possible to see how this technique can be used more broadly and outside an academic context. Presently, biosensors generally use electric or fluorescent transducers to relay a detection event. By recording data over time in the DNA of living cells, biosensors could become much cheaper and contain intrinsic datalogging. Possible applications could include long-term metabolite (e.g. glucose) monitors, chemical detectors, and quality control.

It’s worth noting that this technique is only at the proof of concept stage. Data was recorded and retrieved manually by the scientists into the bacterial genome with 90% accuracy, demonstrating that if cells can be engineered to record data themselves, accuracy and capacity are high enough for practical applications.

That being said, if anyone is working on a MEncoder or ffmpeg command line option for this, let us know in the comments.

Continue reading “Movie Encoded In DNA Is The First Step Toward Datalogging With Living Cells”

Hackaday Prize Entry: Crop Data For Improved Yields

As the world’s population continues to increase, more food will be needed for all the extra mouths to feed. Unfortunately, there’s not a whole lot of untapped available farmland. To produce extra food, crop yields need to increase. [Vignesh Ravichandran] is tackling this with the Farmcorder – a device for detecting crop nutrition levels.

The device centers around using spectroscopy to measure the chlorophyll content of leaves. This information can then be used to make educated decisions on the fertilizer required to maximize plant yield. In the past, this has been achieved with expensive bespoke devices, or, at the other end of the spectrum, simple paper color charts.

[Vignesh]’s project takes this to the next level, integrating a spectroscopy package with a GPS and logging over the GSM mobile network. This would allow farmers to easily take measurements out in the field and log them by location, allowing fertilizer application to be dialed in on a per-location basis.  The leaf sensor package is particularly impressive. Relying on a TSL2561 sensor IC, the samples are lit with 650nm and 940nm LEDs. The sensor readings can then be used to calculate the chlorophyll levels in the leaves.

It’s a project that sets out to tackle a serious world problem and uses off-the-shelf parts and some hacker know-how to do so. We hope to see this hardware on farms across the world in the near future!