A Simple Web Configured BLE To GPIO Bridge

[Daniel Dakhno] kept ending up in a situation where the ability to read the status of, or control a few digital IO pins with minimal effort, would be terribly useful. Not wanting to keep compiling code, for such simple needs, they instead used a nRF51-based module as a physical interface and produced a general purpose firmware that could be configured with a simple web interface. The NRF51-IO-module was born, whose job is to pair with whatever device you have in front of you, provided it supports BLE, and give direct access to those IO pins.

Rather than acting as a rather slow logic analyser, the firmware is intended for mostly static configurations. The web application sends a configuration packet over to the nRF51 board, which then programs it into FLASH and restarts, reading the updated configuration and applying it to the IO pins. These outputs then persist as long as there is power. The read-side of the equation can also be performed via the web page, but we didn’t have a chance to verify that. The code implements the Bluetooth automation IO service as well as the binary sensor service so if you have access to applications that talk these services, then you should be able to fire it up and go with it, although we’ve not personally tested this due to lack of an nRF51 board. We noticed that the Home Assistant automation platform supports the BT binary sensor, which might be a big help for some people with a need for some wireless control and sensing.

If you need a practical example of a use for remote sensing, here’s a physical mailbox status monitor, using the nRF51. Whilst we’re thinking of Bluetooth and sensors, here’s a custom firmware for some super cheap environment sensors that frees them from vendor lock-in.

Header image: Ubahnverleih, CC0.

Food Safe 3D Printing: A Study

[Matt Thomas] wanted to answer the question of whether 3D printed structures can be food-safe or even medical-safe, since there is an awful lot of opinion out there but not a lot of actual science about the subject. As a mechanical engineer who dabbles in medical technical matters, he designed as series of tests using a wide range of nasty-sounding pathogens, to find once and for all what works and what does not.

One common argument sprung up from the maker movement response to COVID-19, 3D printed masks and visors. Many of us (this scribe included) printed many thousands of visor frames and ear protectors, using the armies of 3D printers we had available, then distributed them to nursing homes and doctors’ surgeries, and anywhere else that couldn’t get ‘proper’ medical-grade items.

There was much opinion about the risks associated with contamination of such 3D printed structures, due to the allegedly porous nature of the prints. [Matt] has shown with some SEM imaging, that a typical 3D print does not have any detectable porosity, and that the grooves due to the layer lines are so positively huge compared to your average bacterium, as to also be irrelevant.

Cutting to the chase, [Matt] shows that ordinary dish soap and water are totally sufficient to remove 90% or more of all of the pathogens he tested, and that using a mix of culturing swap samples as well as protein detection, that 3D printed parts could be cleaned close to medical standards, let alone those of food handling. Even those pesky biofilms could be quickly dispatched with either a quick rinse in bleach-water or a scrub with baking soda. Does this article clear this up finally? Only you can decide!

We’ve obviously covered the subject of 3D printing masks a fair bit, but it’s not all about PPA, sometimes ventilators need some 3D printing love too. Prusa did some work on the subject of food safety, looking specifically at post-processing for 3D prints, and produced some interesting results.

Thanks to [Keith] for the tip!

Aluminium-Sulphur Batteries For Local Grid Storage?

Lithium-Sulphur batteries have been on the cusp of commercial availability for a little while now, but nothing much has hit the shelves as of yet. There are still issues with lifetime due to cell degradation, and news about developments seems to be drying up a little. Not to worry, because MIT have come along with a new battery technology using some of the most available and cheap materials found on this planet of ours. The Aluminium-Sulphur battery developed has very promising characteristics for use with static and automotive applications, specifically its scalability and its incredible charge/discharge performance.

The cell is based upon electrodes constructed from aluminium metal and sulphur, with a electrolyte of molten catenated chloro-aluminate salts. With an operating temperature of around 100 degrees Celsius, you’re not going to want this in a mobile phone anytime soon, but that’s not the goal. The goal is the smoothing out of renewable energy sources, and localised electricity grid balancing. A major use case would be the mass charging of battery electric vehicles. As the number of charge points increases at any given location, so does the peak current needed from the grid. Aluminium-Sulphur batteries are touted to offer the solution to ease this, with their high peak discharge current capability enabling a much higher peak power delivery at the point of use.
Continue reading “Aluminium-Sulphur Batteries For Local Grid Storage?”

KittyOS: Writing A Toy OS For The ATmega168 From Scratch

Writing an operating system for a computing platform is one of those non-trivial tasks few people actually need to do, regardless of whether it’s for a small microcontroller or a larger general-purpose computer. Many of us spend a large amount of our time working on producing robust code for embedded systems, occasionally diving deeper into the abstraction when we’re stuck on a problem. Quite often this work is sitting on top of an RTOS, which we consider a solved problem. [Jonathan Diamond] had picked up a fair bit of knowledge of some of the low-level AVR black magic, as well as some details of how operating systems work internally, and so decided to have a crack a building a toy operating system called KittyOS, for the learning experience alone.

[Jonathan] hastens to add that this is not a practical OS, but a learning platform that needs a few more bells and whistles added to be useful. Aimed at the 8-bit AVR ATmega168 with its mere 16kB of flash and 1kB of SRAM, the diminutive chip can still perform more than well enough to host the rudimentary OS — up to four application tasks, and some basic system call support.

Already, KittyOS sports preemptive multitasking, with prioritization and support for applications written in C. Hardware support is a bit limited, with just serial I/O and a spot of GPIO, but that’s more than enough for a demonstrator. Applications can be loaded into any of the four available slots, with per-slot run state control, using the Python-based host interface. The post is a long one, with an absolute ton of the gory details we love around these parts, and we’re very glad [Jonathan] took the time to make a proper write-up as well as a demonstration video, which can be found after the break.

Continue reading “KittyOS: Writing A Toy OS For The ATmega168 From Scratch”

GP2040: A Configurable Game Pad Firmware

[feralAI] and fellow GitHub contributors present for your viewing pleasure GP2040: an open source game pad firmware for RP2040-based hardware. The dual-core RP2040 is a good platform to use for gaming inputs, as there is plenty of CPU grunt to get sub-1 ms USB polling time, regardless of any other tasks the controller may be performing. Currently the firmware supports PC, Android, RPi, Nintendo Switch, PS3, PS4 (legacy mode), and the sweet MiSTer FPGA-based retro-gaming platform.

The firmware supports the older DirectInput API and the newer shiny (but rather restrictive) XInput API (no, it’s not the old X11 input extension with the same name) — as well as the usual controller features like SOCD cleaning, D-pad mapping, and RGB support for additional distractions. There is even support for those tiny OLED displays (SSD1306 and friends), although we can’t think of a use case for that at the moment. Configuration is particularly interesting, however, as it is based upon an embedded web application. This is where the pin mappings to your actual hardware are defined, as well as all that RGB bling, if you so desire.

Continue reading “GP2040: A Configurable Game Pad Firmware”

This Pico-W IoT Starter Project Gets You Into Home Assistant Quick As A Flash

Many of us hacker types with some hardware knowledge and a smattering of embedded experience would like to get into home automation, but there can be quite a learning curve. If you’re looking for a hackable starting point; something to deploy, learn about and then later expand upon, then look no further than the PicoW Home Assistant Starter project from [Danilo Campos].

The project is based upon the arduino-pico core, which supports a whole pile of RP2040-based boards, so you don’t need to restrict yourself to the “official” Pico-W, so long as you have working networking, Wi-Fi or otherwise. Integration is provided by the arduino-home-assistant library, which acts as the bridge between your sensors and other widgets, MQTT, and thence the network beyond. Events and sensor data on the end-point are packaged up with MQTT and published out to the broker via the network provided, all for minimal initial effort. Once you’ve got the basic connectivity to your Home Assistant instance working, there are many code examples in the arduino-home-assistant GitHub page to give you a helping start to connect whatever tickles your fancy.

It turns out we’ve covered HA quite a bit on these fair pages, like for example, these sweet automated window blinds. Another hack uses load cells under the bed legs to detect if someone is in bed or not, and if this isn’t your thing, maybe your idea of a home assistant is a bit more like this one?

Cutting The Grass With Frickin’ Lasers

We techie types are quite often much more comfortable in front of a keyboard knocking out code, than out in the yard splitting logs for winter, and even the little jobs like cutting the grass are sometimes just too much like hard manual labour for our liking. The obvious solution is a robot mower, but they’re kinda boring, with their low-tech spinning metal blades. What we need is a big frickin’ laser. YouTuber [rctestflight] has been experimenting with using a 40W blue diode laser module to cut the weeds, (Video, embedded below) and it sort of works, albeit in a rather dangerous fashion.

A nice flat ‘cut’

The first test used a fixed assembly, mounting the laser to a camera lens, upon a rotating gear driven by a small stepper motor. An Arduino controls the beam scanning, very slowly, burning the grass in its sights. But with a range limited to around eight feet best case, sitting in one spot just isn’t going to cut it. (sorry) The obvious next step was to mount one of the tested laser modules onto a moveable platform. After tweaking one of his earlier projects — a tracked rover — with a new gearbox design, it could now drive slow enough to be useful for this slow task. The laser was mounted to a simple linear rail slider, with an attempt at a vacuum pickup system to suck up the clippings, removing them from the beam path, and stopping them impeding the cutting efficiency of the laser.

Obviously this vacuum idea didn’t work, and since the contraption takes the best part of a week to cut just one small area, we reckon it would likely be growing faster than that! Still, it must have been fun to build it anyway. It just goes to show that despite the march of technological progress, maybe the boring old spinning blades of old are still the best way to get the job done.

Lawnmowing is clearly one of those jobs we love to hate, and do so with hacks. Here’s a way to prevent your mower sucking up foreign bodies and hurling them at you at ballistic speeds, and for those who really want to be hands off, add RTK-GPS to a robot mower, and just leave it to do the dirty work.

Continue reading “Cutting The Grass With Frickin’ Lasers”