Building a Better Baby Bottle Boiler

[Sebastian Foerster] hasn’t been at his blog in a while. He and his wife just had twins, so he’s been busy standing waiting for formula or milk to warm up. Being a technical kind of guy, he took a look at the tools currently on the market to do this, analyzed them, and decided instead to do it himself.

[Sebastian] looked to his Nespresso Aeroccino – a milk frother designed to give you hot or cold frothy milk for the top of whatever beverage you decide to put it on top of. It made the milk a bit too hot, 60°C, but once it got to the temperature, it would shut off, so if [Sebastian] could get it to shut off at a lower temperature, he had found the solution!

After taking the Aeroccino apart and going over the circuit, it seemed like a simple design relying on a resistor and NTC (negative temperature coefficient) thermistor connected to an ATTiny44 microcontroller. [Sebastian] didn’t want to have to reprogram the ATTiny, so he looked at the resistor and NTC. The resistor and thermistor create a voltage divider and that voltage is read in by the microcontroller through an analog pin. After looking up some info on the thermistor and replacing the resistor with a potentiometer, [Sebastian] could adjust the shut-off temperature while measuring with a thermometer. When he got the temperature he liked, he reads the value of the potentiometer and then replaces it with a couple of resistors in series.

Now [Sebastian] gets the babies’ bottles ready from fridge to temperature in about 25 seconds. He doesn’t have to worry about keeping an eye on the bottles as they heat up. We’re sure that getting two bottles ready in under a minute is much better on the nerves of new parents than waiting around for ten minutes. For more fun with thermistors, check out our article on resistors controlled by the environment or check out this bluetooth bbq thermometer!

6502 Retrocomputing Goes to the Cloud

In what may be the strangest retrocomputing project we’ve seen lately, you can now access a virtual 6502 via Amazon’s Lambda computing service. We don’t mean there’s a web page with a simulated CPU on it. That’s old hat. This is a web service that takes a block of memory, executes 6502 code that it finds in it, and then returns a block of memory after a BRK opcode or a time out.

You format your request as a JSON-formatted POST request, so anything that can do an HTTP post can probably access it. If you aren’t feeling like writing your own client, the main page has a form you can fill out with some sample values. Just be aware that the memory going in and out is base 64 encoded, so you aren’t going to see instantly gratifying results.

Continue reading “6502 Retrocomputing Goes to the Cloud”

ESP32 Display is Worth a Thousand Words

The ESP32 is the successor to the wildly popular ESP8266. There seems to be no end to what the chips can do. However, despite all the wireless communication capabilities, the module doesn’t have a display. [G6EJD] wanted to connect an ILI9341 TFT display and he put the code and information on GitHub. You can also see a video of his work, below.

Since the display uses a serial interface, there isn’t much wiring required. The Adafruit GFX library does the heavy lifting, utilizing the SPI library for the actual communications. The first demo shown on the hardware can pull weather data decoded. If you want more details on the display’s operation, check out [G6EJD’s] YouTube channel and you’ll find other videos that go into more detail.

We’ve seen these displays married to an ESP8266 with an integrated PCB, too. There’s a choice of libraries, and perhaps we’ll see a similar range of choice for the ESP32.

Continue reading “ESP32 Display is Worth a Thousand Words”

TMS9900 Retro Build

[Robert Baruch] found a TMS9900 CPU from 1983 in a surplus store. If that name doesn’t ring a bell, the TMS9900 was an early 16-bit CPU from Texas Instruments. He found that, unlike modern CPUs, the chip took several voltages and a four-phase twelve-volt clock. He decided to fire it up and — of course — one thing led to another and he wound up with a system on a breadboard. You can see one of the videos he made about the machine below.

This CPU had some odd features, most notably that it stored its registers in off-chip memory and can switch contexts by changing where the registers reside. That was a novel idea when the memory and the CPU were similar in speed. In a modern computer, the memory is much slower than the CPU and this would be a major bottleneck for program execution. The only onboard registers were the program counter, the status register, and a pointer to the general-purpose registers in memory.

Continue reading “TMS9900 Retro Build”

Graduation Cap Shows Us What It’s Got!

A high school graduation ceremony is well due the pomp and circumstance for making it through one of life’s many milestones. To commemorate the event with their own flair, redditor [PM_(cough)_FOR_KITTENS] hid a 32 x 32 GIF-playing LED matrix in their graduation cap!

The board is controlled by a Teensy hosting a SmartMatrix shield. With the shield’s assistance, the matrix enables scrolling text and GIFs to play across the LEDs, as well as an SD card slot to load up your favourites. Currently, it’s set to a 50-50 chance of playing a gif — one of sixty — or one of the twenty scrolling text lines loaded onto the SD card. [PM_(ahem)_FOR_KITTENS] co-opted his friend’s expertise to write the code — available here — while he designed the circuit and handled the assembly.

Carefully unwrapping his cap, [PM_(yep)_FOR_KITTENS] reinforced it with thinner and stronger cardboard, cutting slots into it, allowing the boards and wires to — barely — fit inside. A hole in the side of the cap is enough for a barely noticeable USB cable to run down his neck to a 2000 mAh battery which can power the cap for over five hours at 5V and 2A. Check out a demo video after the break!

Continue reading “Graduation Cap Shows Us What It’s Got!”

Practical IoT Cryptography on the Espressif ESP8266

The Espressif ESP8266 chipset makes three-dollar ‘Internet of Things’ development boards an economic reality. According to the popular automatic firmware-building site nodeMCU-builds, in the last 60 days there have been 13,341 custom firmware builds for that platform. Of those, only 19% have SSL support, and 10% include the cryptography module.

We’re often critical of the lack of security in the IoT sector, and frequently cover botnets and other attacks, but will we hold our projects to the same standards we demand? Will we stop at identifying the problem, or can we be part of the solution?

This article will focus on applying AES encryption and hash authorization functions to the MQTT protocol using the popular ESP8266 chip running NodeMCU firmware. Our purpose is not to provide a copy/paste panacea, but to go through the process step by step, identifying challenges and solutions along the way. The result is a system that’s end-to-end encrypted and authenticated, preventing eavesdropping along the way, and spoofing of valid data, without relying on SSL.

We’re aware that there are also more powerful platforms that can easily support SSL (e.g. Raspberry Pi, Orange Pi, FriendlyARM), but let’s start with the cheapest hardware most of us have lying around, and a protocol suitable for many of our projects. AES is something you could implement on an AVR if you needed to.

Continue reading “Practical IoT Cryptography on the Espressif ESP8266”

Better LEDs through DMA

While regular Hackaday readers already know how to blink a LED with a microcontroller and have moved onto slightly more challenging projects such as solving the Navier-Stokes equations in 6502 assembly, that doesn’t mean there’s not space for newbies. [Rik] has published a great tutorial on abusing DMA for blinkier glowy things. Why would anyone want to learn about DMA techniques? For blinkier glowy things, of course.

This tutorial assumes knowledge of LED multiplexing and LED matrices, or basically a bunch of LEDs connected together on an XY grid. The naive way to drive an 8×8 grid of LEDs is attaching eight cathodes to GPIO pins on a microcontroller, attaching the eight anodes to another set of GPIO pins, and sourcing and sinking current as required. The pin count can be reduced with shift registers, and LED dimming can be implemented with PWM. This concludes our intensive eight-week Arduino course.

Thanks to microcontrollers that aren’t trapped in the 1980s, new techniques can be used to drive these LED matrices. Most of the more powerful ARM microcontrollers come with DMA, a peripheral for direct memory access. Instead of having the CPU do all the work, the DMA controller can simply shuffle around bits between memory and pins. This means blinker projects and glowier LEDs.

[Rik]’s method for DMAing LEDs includes setting up a big ‘ol array in the code, correctly initializing the DMA peripheral, and wiring up the LED matrix to a few of the pins. This technique can be expanded to animations with 64 levels of brightness, something that would take an incredible amount of processing power (for a microcontroller, at least) if it weren’t for the DMA controller.

The setup used in these experiments is an STM32F103 Nucleo board along with the OpenSTM32 IDE. [Rik] has released all the code over on GitHub, and you are, of course, encouraged to play around.