Learn Neural Network and Evolution Theory Fast

[carykh] has a really interesting video series which can give a beginner or a pro a great insight into how neural networks operate and at the same time how evolution works. You may remember his work creating a Bach audio producing neural network, and this series again shows his talent at explaining the complex topic so anyone may understand.

He starts with 1000 “creatures”. Each has an internal clock which acts a bit like a heart beat however does not change speed throughout the creature’s life. Creatures also have nodes which cause friction with the ground but don’t collide with each other. Connecting the nodes are muscles which can stretch or contract and have different strengths.

At the beginning of the simulation the creatures are randomly generated along with their random traits. Some have longer/shorter muscles, while node and muscle positions are also randomly selected. Once this is set up they have one job: move from left to right as far as possible in 15 seconds.

Each creature has a chance to perform and 500 are then selected to evolve based on how far they managed to travel to the right of the starting position. The better the creature performs the higher the probability it will survive, although some of the high performing creatures randomly die and some lower performers randomly survive. The 500 surviving creatures reproduce asexually creating another 500 to replace the population that were killed off.

The simulation is run again and again until one or two types of species start to dominate. When this happens evolution slows down as the gene pool begins to get very similar. Occasionally a breakthrough will occur either creating a new species or improving the current best species leading to a bit of a competition for the top spot.

We think the series of four short YouTube videos (all around 5 mins each) that kick off the series demonstrate neural networks in a very visual way and make it really easy to understand. Whether you don’t know much about neural networks or you do and want to see something really cool, these are worthy of your time.

Continue reading “Learn Neural Network and Evolution Theory Fast”

Cordless Water Pump!

A water pump is one of those items that are uncommonly used, but invaluable when needed. Rarer still are cordless versions that can be deployed at speed. Enter [DIY King 00], who has shared his build of a cordless water pump!

The pump uses an 18 volt brushed motor and is powered by an AEG 18V LiPo battery. That’s the same battery as the rest of [DIY King]’s power tools, making it convenient to use. UPVC pipe was used for the impeller — with a pipe end cap for a housing. A window of plexiglass to view the pump in motion adds a nice touch.

A bit of woodworking resulted in the mount for the pump and battery pack, while a notch on the underside allows the battery to lock into place. Some simple alligator clips on the battery contacts and the motor connected through a switch are all one needs to get this thing running.

Continue reading “Cordless Water Pump!”

Don’t Fear the Filter: Cascading Sallen-Keys

In the last edition of Don’t Fear the Filter, we built up two examples of the simplest and most-used active filter of all time: the two-pole Sallen-Key lowpass. This time, we’re going to put two of these basic filter blocks in a row, and end up with a much sharper lowpass filter as well as a bandpass filter. For the bandpass, we’ll need to build up a quick highpass filter as well. Bonus!

I claimed last time that the Sallen-Key lowpass would cover something like 80% of your filtering needs. (And 72.4% of all statistics are totally made up!) These two will probably get you through another 10% or so. Honestly, I’ve never built a standalone active highpass, for reasons we’ll see below, but the active bandpass filter that we’re building it for is a great tool to have in your belt, especially for anything audio.

Continue reading “Don’t Fear the Filter: Cascading Sallen-Keys”

Source Parts on TaoBao: An Insider’s Guide

For hardware aficionados and Makers, trips to Shenzhen’s Huaqiangbei have become something of a pilgrimage. While Huaqiangbei is a tremendous and still active resource, increasingly both Chinese and foreign hardware developers do their sourcing for components on TaoBao. The selection is vastly greater and with delivery times rarely over 48 hours and frequently under 24 hours for local purchases it fits in nicely with the high-speed pace of Shenzhen’s hardware ecosystem.

For overseas buyers, while the cost of Taobao is comparable to, or slightly less than AliExpress and Chinese online stores, the selection is again, many, many times the size. Learning how to effectively source parts from Taobao will be both entertaining and empowering.

Continue reading “Source Parts on TaoBao: An Insider’s Guide”

Turn that Pi Zero into a Streaming Camera, Step-by-Step

What makes [mwagner1]’s Raspberry Pi Zero-based WiFi camera project noteworthy isn’t so much the fact that he’s used the hardware to make a streaming camera, but that he’s taken care to document every step in the process from soldering to software installation. Having everything in one place makes it easier for curious hobbyists to get those Pi units out of a drawer and into a project. In fact, with the release of the Pi Zero W, [mwagner1]’s guide has become even simpler since the Pi Zero W now includes WiFi.

Using a Raspberry Pi as the basis for a WiFi camera isn’t new, but it is a project that combines many different areas of knowledge that can be easy for more experienced people to take for granted. That’s what makes it a good candidate for a step-by-step guide; a hobbyist looking to use their Pi Zero in a project may have incomplete knowledge of any number of the different elements involved in embedding a Pi such as basic soldering, how to provide appropriate battery power, or how to install and configure the required software. [mwagner1] plans to use the camera as part of a home security system, so stay tuned.

If Pi Zero camera projects catch your interest but you want something more involved, be sure to check out the PolaPi project for a fun, well-designed take on a Pi Zero based Polaroid-inspired camera.

CNC Turns Empty Cans into Action Figures

[apollocrowe] at Carbide 3D (a company that does desktop CNC machines) shared a project of his that spent years being not-quite-there, but recently got dusted off and carried past the finish line. His soda can robot action figures were originally made by gluing a paper design to aluminum from a soda can, but [apollocrowe] was never really able to cut the pieces as reliably or as accurately as he wanted and the idea got shelved. With a desktop CNC machine to take care of accurate cutting, the next issue was how to best hold down a thin piece of uneven metal during the process. His preferred solution is to stick the metal to an acrylic wasteboard with hot glue, zero high enough and cut deep enough to account for any unevenness, and afterwards release the hot glue bond with the help of some rubbing alcohol.

Assembly involves minor soldering and using a few spare resistors. A small spring (for example from a retractable pen) provides the legs with enough tension for the figure to stand by itself. The results look great, and are made entirely from a few cents worth of spare parts and recycled materials. A video of the process is embedded below, and the project page contains the design files.

Continue reading “CNC Turns Empty Cans into Action Figures”

Say It With Me: Aliasing

Suppose you take a few measurements of a time-varying signal. Let’s say for concreteness that you have a microcontroller that reads some voltage 100 times per second. Collecting a bunch of data points together, you plot them out — this must surely have come from a sine wave at 35 Hz, you say. Just connect up the dots with a sine wave! It’s as plain as the nose on your face.

And then some spoil-sport comes along and draws in a version of your sine wave at -65 Hz, and then another at 135 Hz. And then more at -165 Hz and 235 Hz or -265 Hz and 335 Hz. And then an arbitrary number of potential sine waves that fit the very same data, all spaced apart at positive and negative integer multiples of your 100 Hz sampling frequency. Soon, your very pretty picture is looking a bit more complicated than you’d bargained for, and you have no idea which of these frequencies generated your data. It seems hopeless! You go home in tears.

But then you realize that this phenomenon gives you super powers — the power to resolve frequencies that are significantly higher than your sampling frequency. Just as the 235 Hz wave leaves an apparent 35 Hz waveform in the data when sampled at 100 Hz, a 237 Hz signal will look like 37 Hz. You can tell them apart even though they’re well beyond your ability to sample that fast. You’re pulling in information from beyond the Nyquist limit!

This essential ambiguity in sampling — that all frequencies offset by an integer multiple of the sampling frequency produce the same data — is called “aliasing”. And understanding aliasing is the first step toward really understanding sampling, and that’s the first step into the big wide world of digital signal processing.

Whether aliasing corrupts your pristine data or provides you with super powers hinges on your understanding of the effect, and maybe some judicious pre-sampling filtering, so let’s get some knowledge.

Continue reading “Say It With Me: Aliasing”