Designing And Building A Custom Optical Fuel Sensor

At some time or another, we’ve all had an idea we thought was so clever that we jumped on the Internet to see if somebody else had already come up with it. Most of the time, they have. But on the off chance that you can’t find any signs of it online, you’re left with basically two possible conclusions. Either you’re about to enter uncharted territory, or your idea is so bad that everyone has collectively dismissed it already.

Which is precisely where [James Stanley] recently found himself. He had an idea for an non-contact optical sensor which would detect when his racing mower was about to run out of gas by analyzing light passed through a clear section of fuel hose. He couldn’t find any previous DIY examples of such a device, nor did there appear to be a commercial version. But did that mean it wouldn’t work, or that nobody had ever tried before?

Continue reading “Designing And Building A Custom Optical Fuel Sensor”

An Open Source IR Gateway Based On The ESP8266

The market is absolutely inundated with smart gadgets, with everything from coffee makers to TVs advertising that they support the latest and greatest in home automation platforms. Don’t worry about how many of those platforms and services will still up up and running in the next few years, the thing will probably stop working before then anyway. No sense worrying about the details in a disposable world.

Of course, not all of us are so quick to dump working hardware in the name of the latest consumer trend. Which is why [Viktor] has developed an open source infrared gateway that can connect your “dumb” devices to the latest flash in the pan backend service with nothing more than a software update. Though even modern smart TVs still include IR remotes, so there’s nothing stopping you from using it with newer gear if you don’t trust like the built-in implementation.

The hardware here is really quite simple, essentially boiling down to a few IR LEDs and an IR receiver hanging off the GPIO ports of an ESP8266. While the receiver isn’t strictly necessary, it does allow [Viktor] to rapidly implement new IR codes. He just points the existing remote at the board, hits a button, and the decoded command gets sent out over MQTT where he can easily snap it up.

[Viktor] has done the hard work of creating the PCB design and testing out different IR LEDs to find the ones with the best performance. But if you wanted to just throw something together in a weekend, you should be able to get his firmware running with little more than a bare ESP and a random IR LED salvaged from an old remote. But don’t be surprised if you get hooked on the concept and end up rolling your own home automation system.

New BBC Micro:bit Adds Microphone And Speaker

There’s an old tale that TV companies only need to make a few years of kids’ TV shows, because their audience constantly grows out of their offerings and is replaced by a new set with no prior knowledge of the old shows. Whether it’s true or not is up for debate, but does the same apply to single board computers aimed at kids? The original BBC micro:bit was first announced back in 2015 and must be interesting its second generation of kids by now, but that hasn’t stopped them bringing out a second version of the little educational computer. How do you update such a simple device? Time to take a look.

Edge connector shown on the original micro:bit design

The form factor of the new board is substantially the same as its predecessor, with the same edge connector and large connection pads, and the familiar LED matrix display. The most obvious additions are a small speaker and MEMS microphone allowing kids to interact with audio in their code, but less obvious is a new touch button in the micro:bit logo. The original had it in the silk screen layer, while the new one has it as copper for a capacitive sensor.

The silicon has an upgrade too, now sporting a Nordic Semiconductor nRF52833 running at 64 MHz and sporting 512k of ROM and 128k of RAM with built-in Bluetooth Low Energy. Binaries are incompatible with the original, however all the development environments can recompile code for a new universal binary format capable of running the appropriate software for either version.

The micro:bit has been more of a hit in schools than it has in our community, perhaps because it has the misfortune to have arrived alongside so many strong competitors. However it remains a powerful contender whose easy programming alongside the power of more traditional toolchains make it a good choice for kids and grown-ups alike.  We took a look at the original back in 2016, if you are interested.

Fat Bottomed-Keebs, You Make The Clackin’ World Go Round

Depending on the circles you run in, it can seem like the mechanical keyboard community is all about reduced layouts, and keebs without ten-keys are about as big as it gets. But trust us, there’s plenty of love out there for the bigger ‘boards like [Ben]’s tasty fat-bottomed keyboard. Man oh man, what a delicious slab of throwback to the days when keyboards doubled as melee weapons.

More specifically, this is a 199-key modified Sun Type 5 layout. It runs on two Teensy 2.0s — one for the keyboard matrix, and one for everything else. [Ben] made the metal enclosure entirely by hand without a CNC or laser cutter. While I don’t personally care for linear switches, I have mad respect for these, which are vintage Cherry Blacks pulled from various 1980s AT/XT boards. That 10-key island on the left is dedicated to elementary macros like undo/redo, cut/copy/paste, and open/close/save.

We absolutely love the gigantic rotary encoders, which give it a bit of a boombox look. There’s even reuse involved here, because the encoder knobs are made from jam jar lids that are stuffed with homemade Sugru. [Ben] can use them to play PONG on the LCD and other games not yet implemented on the everything-else Teensy.

Here’s another Sun-inspired keeb, but this one has a reverse 10-key layout that matches the DTMF phone dial.

Developing An Open Source Electronics Trainer

It’s a safe bet that most Hackaday reader’s interest in electronics started at a young age, and that their early forays into the world of hardware hacking likely involved some form of “playground” kit. As long as you didn’t lose any of the components, these kits promised the user that hundreds of possible projects were just a few jumper wires away. Extra points awarded for when you decide to toss away the manual and fly solo.

While there’s still no shortage of such products on the market, [Josh Kittle] felt the concept could do with a freshening up. His open hardware “Microcontroller Trainer” harkens back to those old multi-kits, but adds in the sort of high-tech gadgetry that makes the modern DIY world go round.

It’s still got the traditional layout: a center mounted breadboard surrounded by an array of LEDs, a handful of buttons, and a pair of potentiometers. But there’s also sockets for the Raspberry Pi, ESP8266, ESP32, and Arduino. Plus a few of their most popular friends to keep them company: a .96″ OLED, 2.4″ Touch TFT, and a BC05 Bluetooth module.

Originally [Josh] created this design to help clean up his own workspace, figuring he could just put his most used components on a single compact board. But as you might expect, others expressed interest in the concept. Now he’s producing them as kits, and even working his way towards a third hardware revision that adds features such as an integrated 18650 battery for portable use.

While electronics kits that have you build a functional device are a great way to learn the ropes, we’re always glad to see fresh takes on the classic electronic “playground” concept.

Dice Roller Keeps Germs Out Of Your Snake Eyes

Do you need a to find a more sanitary way to roll the dice at your next socially-distanced board game gathering? [CJA3D]’s pop-o-matic mason jar dice roller can roll the bones two different ways — either by hitting that big, inviting arcade button, or though a web app that everyone can access on their own phones.

We think this looks great, and is a great reuse of a glass jar. The brains of this operation is an ESP8266, which drives a continuous-rotation servo underneath the dice. Push the button or use the web app and the servo disturbs the plate, moving the dice around.

Besides the sanitary aspect, one benefit of using the web app is that there are four different speed presets for the servo. As a bonus, [CJA3D] included the files for a pair of printed 6-sided dice. Click through to the project to see it in action.

We know you take games seriously, and so do we. Just look at this dice roller that uses machine vision to ensure fairness.

Minimal TinyAVR 0 Programming

When [Alain] wanted to use some of the new TinyAVR 0 chips — specifically, the Attiny406 — it seemed overkill to use the Windows IDE. There are plenty of sources of information on programming other AVR chips using simple command line tools, but not for these newer 0-series parts which use a new programming protocol known as UPDI. That led to a deep diving into how to program a TinyAVR 0 with a text editor, makefile, and USB-to-serial cable.

The Attiny406 has 4K of flash, 256 bytes of RAM and can run at 20 MHz with no external clock. You might think programming would be similar to a regular AVR part, but these tiny devices use UPDI (Unified Programming and Debug Interface) which uses 3 pins for programming. Older devices used different protocols.

It is very easy to create a UPDI programmer. A USB to logic-level serial cable and a 4.7K resistor is all it takes. There’s Python code that knows how to drive the protocol, too. You can also use the logic-level serial port on the Raspberry Pi with some device tree modifications explained in the code’s documentation.

[Alain] made a nice breakout board for the device. It fits a breadboard, allows for 5V or 3.3V operation, and has an LED and switch. Nothing fancy, but handy. Once you know how to ship a hex file to the chip, the rest is pretty standard. While the AVR version of gcc doesn’t cross-compile for the ATTiny out of the box, there is a device pack from Microchip that enables that feature.

The trend is to go to bigger processors, not smaller, but when you need to cram something in a small space, save a few pennies per unit, or draw very little power, these tiny processors can be just the ticket. The processors may be small, but if you work you can do some pretty big things with them.