Alexa And Particle Modernize Coffee Machine By One Iota

When [Steve Parker]’s girlfriend got a tea kettle that takes voice commands, he suddenly saw his fancy bean-to-cup coffee machine as a technological dinosaur. It may make good coffee, but getting the DeLonghi going is inconvenient, because it runs a self-cleaning cycle each time it’s turned on or off.

Thus began [Steve]’s adventure in trying to turn the thing on with Alexa via Particle Photon. Because of the way the machine is designed, simply adding a relay wouldn’t do—the machine would just turn off and back on, only to start the self-clean again. Once inside, he found it’s controlled by a PIC18LF2520. Further research indicated that it is powered by an off-line switcher that combines a power MOSFET with a power supply controller. [Steve] figured out that the buttons are read via square wave and interpreted by a multiplexer.

The project went into the weeds a bit when [Steve] tried to read the signals with a knock-off Saleae. As soon as he plugged it in, the control board fried because the DeLonghi evidently has no reference to Earth ground. While waiting for a replacement board to arrive, he tried replacing the mux and shift register chips, which actually fixed the board. Then it was more or less a matter of using the DeLonghi’s status LEDs to determine the machine’s state, and then to interface with the Photon and Alexa. Cycle past the break for a ristretto-sized demonstration.

[Steve] didn’t do all this to actually make coffee, just turn the machine on with a voice command. The Photon is totally capable of making coffee, though, as we saw with this closed-loop espresso machine.

Continue reading “Alexa And Particle Modernize Coffee Machine By One Iota”

State Your Intentions More Clearly With State Machines

To the uninitiated the words ‘State machine’ sound like something scarily big and complex. They aren’t (necessarily) and can be quite useful. In fact, state machines are no physical machines but a model of processes. They link the states a system can be in with allowed transitions. For example a media player when stopped can change to play or open another file. While playing, it can go to pause, stop, reverse, fast forward and so on. A state machine creates a map of all states and how they are connected. It is an abstract tool hat offers a graphical approach to organizing your code before actually programming.

In his video [Chris Guichet] uses a state machine to debounce a switch for a beginner friendly introduction of the concept. He then shows how to turn the hand drawn map to actual code, including a section on debugging state machines.

Continue reading “State Your Intentions More Clearly With State Machines”

IoT Chore Reminder For The Serially Forgetful

The secret to domestic bliss often lies in attention to detail, an area in which we can all do a little better. But if paper notes and smartphone reminders are not enough to help you remember to knock jobs off your list, perhaps this IoT task reminder will give you the edge you need to keep the peace at home.

As [Andreas Spiess] points out, his best intentions of scheduling recurring tasks in Google Calendar were not enough to keep him on on top of his share of chores around the house. He found that the notifications popping up on his phone were far too easy to swipe away in favor of other distractions, so he set about building a real-world reminder. His solution uses a WeMOS D1 Mini in a bright blue 3D-printed box with from one to four LED switches on the front. Each box is linked to his Google Calendar, and when a task comes due, its light turns on. Sprinkled about the house near the task, like the laundry room or near the recycling, [Andreas] can’t help but see the reminder, which only goes out when he cancels it by pressing the task button. Simple but effective, and full of potential for other uses too.

Of course, the same thing could be accomplished with a Magic Mirror build, which we’ve seen a lot of over the years. But there’s something about the simplicity of these devices and their proximity to the task that makes sense — sort of like the Amazon Dash concept. We might build a few of these too.

Continue reading “IoT Chore Reminder For The Serially Forgetful”

Wireless Terminal Over ESP8266

From debug messages to the fundamental ‘hello world’, serial communication does it all over three little wires. Now imagine being able to cut the cord to your next microcontroller project and use your phone as a VT100 terminal. This was the premise of [Ondřej Hruška]’s Wireless Terminal Project where he took an ESP8266  and added an in-browser terminal emulator which can be accessed over WiFi. The final hardware uses an ESP-01 module mounted atop a breadboard adapter with a 3.3V LDO, protection circuitry for the pins and under-voltage disable.

The firmware is based on [SpriteTM]’s libesphttpd code which was modified to include the VT100 escape sequence parser. The parser, in turn, was coded as a state machine and compiled using Ragel which simplifies such projects greatly. When you access the tiny web server, the loaded webpage starts to communicate over web sockets to the ESP-01. Key-presses from the terminal are sent to the buffer and onto the parser and control logic. The characters are then passed to the hardware UART lines at 115200bps and if an escape sequence is detected, the corresponding action is executed instead.

[Ondřej Hruška] shares the code as well as a user manual in PDF for anyone who would like to try it out and help improve the project. With a little inspiration on learning about state machines, you could extend the project to your own use case as well.

Thanks for the tip [Marco Saarloos]

Retrotechtacular: A Desktop Computer From 1965

About eight years before the Xerox built the Alto at PARC and over a decade before the Apple ][ premiered, Italian business equipment manufacturer Olivetti produced a bona fide desktop personal computer. When Olivetti debuted this typewriter-sized marvel in 1965 at a business convention in New York City, people were in absolute awe that this tiny, self-contained unit could perform the same types of functions as the hulking room-sized mainframes of the time. Some were sure that it was simply a small input device for a much bigger machine hiding behind the curtain.

But the revolutionary Olivetti Programma 101 was no joke. It performed standard four-banger operations and could handle square root and absolute value calculations. The Olivetti had 16 jump instructions as well as 16 conditional jump instructions, which put it firmly in state machine territory. Programs could be printed on a roll of paper or stored long-term on long magnetic cards.

Continue reading “Retrotechtacular: A Desktop Computer From 1965”

Object Oriented State Machine Operating System Goes Open Source

On a desktop computer, you think of an operating system as a big piece of complex software. For small systems (like an Arduino) you might want something a lot simpler. Object Oriented State Machine Operating System (OOSMOS) is a single-file and highly portable operating system, and it recently went open source.

OOSMOS has a unique approach because it is threadless, which makes it easy to use in memory constrained systems because there is no stack required for threads that don’t exist. The unit of execution is a C++ object (although you can use C) that contains a state machine.

You can read the API documentation online. Just remember that this is not an end user OS like Windows or Linux, but an operating environment for managing multiple tasks. You can, though, use OOSMOS under Windows or Linux as well as many other host systems.

Continue reading “Object Oriented State Machine Operating System Goes Open Source”