Dumb Coffee Grinder Gets Smarter With Time

[Forklift] has a Rancilio Rocky, a prosumer-level coffee grinder that’s been a popular mainstay for the last few decades. It’s a simple machine with a direct-drive motor. Rocky has one job, and it will do that job in one of 55 slightly different ways as long as someone is pushing the grind button. What Rocky doesn’t have is any kind of metering technology. There’s no way to govern the grind length, so repeatable results rely on visual estimates and/or an external clock. Well, there wasn’t until [Forklift] designed a programmable timer from the ground up.

The timer interface is simple—there’s a D-pad of buttons for navigation through the OLED screen, and one button to start the grind. The left and right buttons move through four programmable presets that get stored in the EEPROM of the timer’s bare ATMega328P brain. Grind duration can be adjusted with the up/down buttons.

We like that [Forklift] chose to power it by piggybacking on the 240VAC going to the grinder. The cord through the existing grommet and connects with spade terminals, so there are no permanent modifications to the grinder. Everything about this project is open source, including the files for the 7-segment font [Forklift] designed.

Tea aficionados may argue that creating their potion is the more time sensitive endeavor. We’ve got you covered there. Only question is, one button or two?

Cheap DIY MIDI To USB Adapter

[Joonas] became frustrated with cheap but crappy MIDI to USB converters, and the better commercial ones were beyond his budget. He used a Teensy LC to build one for himself and it did the job quite well. But he needed several converters, and using the Teensy LC was going to cost him a lot more than he was willing to spend. With some tinkering, he was able to build one using an Adafruit Pro Trinket which has onboard hardware UART (but no USB). This lack of USB support was a deal killer for him, so after hunting some more he settled on a clone of the Sparkfun Pro Micro. Based on the ATmega32U4, these clones were just right for his application, and the cheapest to boot. He reckons it cost him about $5 to build each of his cheap USB MIDI adapters which receive notes and pedal data from the keyboard’s MIDI OUT and transmit them to a computer

Besides the Pro Micro clone, the only other parts he used are a generic opto-coupler, a couple of resistors and a MIDI connector. After testing his simple circuit on a bread board, he managed to squeeze it all inside an old USB dongle housing, stuffing it in dead-bug style.

The heavy lifting is all done in the firmware, for which [Joonas] used LUFA — the Lightweight USB Framework for AVR’s. He wrote his own code to handle MIDI (UART) to USB MIDI messages conversion. The interesting part is his use of a 32.15 kbps baud rate even though the MIDI specification requires 31.25 kbps. He found that a slightly higher baud rate fixes a problem in the AVR USART implementation which tends to miss consecutive bytes due to the START edge not being detected. Besides this, his code is limited in functionality to only handle a few messages, mainly for playing a piano, and does not have full-fledged MIDI capabilities.

We’ve featured several of [Joonas]’s hacks here over the years, the most recent being the Beaglebone Pin-Toggling Torture Test and from earlier, How to Turn A PC On With a Knock And An ATTiny.

Friday Hack Chat: 8-Bit Micros With Microchip

A few years ago, Microchip acquired Atmel for $3.56 Billion. There are plenty of manufacturers of 8-bit microcontrollers, but everyone makes 8051s, and the MSP430 isn’t as popular as it should be. Microchip’s acquisition of Atmel created what is probably the largest manufacturer of 8-bit micros, with a portfolio ranging from ATtinys smaller than a grain of rice to gigantic PICs.

This Friday, we’re hosting a Hack Chat with the Technical Marketing Engineer of 8-bitters at Microchip. If you love AVR, this is the guy to talk to. If you’re still rocking the vintage 1993 PICkit, this is the guy to talk to.

On the docket for this Hack Chat are some new PICs and some very interesting peripherals coming down the line. ADCC — A2D with computation — is on the table, along with configurable logic cells. This Hack Chat is also going to go over Microchip design tools like MP Lab Xpress.

Of course, these Hack Chats are a question and answer session for the community. We’re encouraging everyone to ask a few questions about what Microchip is doing. We’ve opened up a discussion guide for this Hack Chat. If you have a question, just add it to the list.

If you can’t make the Hack Chat, don’t worry. We’re going to have a transcript of the entire chat. That should be available here shortly after the chat concludes.

Here’s How To Take Part:

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. This hack chat will take place at noon Pacific time on Friday, June 9th. Here’s a fancy time and date converter if you need timezone help.

Log into Hackaday.io, visit that page, and look for the ‘Join this Project’ Button. Once you’re part of the project, the button will change to ‘Team Messaging’, which takes you directly to the Hack Chat.

You don’t have to wait until Friday; join whenever you want and you can see what the community is talking about

Hackaday Prize Entry: A PC-XT Clone Powered By AVR

There is a high probability that the device on which you are reading this comes somehow loosely under the broad definition of a PC. The familiar x86 architecture with peripheral standards has trounced all its competitors over the years, to the extent that it is only in the mobile and tablet space of personal computing that it has not become dominant.

The modern PC with its multi-core processor and 64-bit instruction set is a world away from its 16-bit ancestor from the early 1980s. Those early PCs were computers in the manner of the day, in which there were relatively few peripherals, and the microprocessor bus was exposed almost directly rather than through the abstractions and gatekeepers we’d expect to see today. The 8088 processor with an 8-bit external bus though is the primordial PC processor, and within reason you will find software written for DOS on those earliest IBM machines will often still run on your multiprocessor behemoth over a DOS-like layer on your present-day operating system. This 35-year-plus chain of mostly unbroken compatibility is both a remarkable feat of engineering and a millstone round the necks of modern PC hardware and OS developers.

Those early PCs have captured the attention of [esot.eric], who has come up with the interesting project of interfacing an AVR microcontroller to the 8088 system bus of one of those early PCs. Thus all those PC peripherals could be made to run under the control of something a little more up-to-date. When you consider that the 8088 ran at a modest 300KIPS and that the AVR is capable of running at a by comparison blisteringly fast 22MIPS, the idea was that it should be able to emulate an 8088 at the same speed as an original, if not faster. His progress makes for a long and fascinating read, so far he has accessed the PC’s 640KB of RAM reliably, talked to an ISA-bus parallel port, and made a CGA card produce colours and characters. Interestingly the AVR has the potential for speed enhancements not possible with an 8088, for example it can use its own internal UART with many fewer instructions than it would use to access the PC UART, and its internal Flash memory can contain the PC BIOS and read it a huge amount faster than a real BIOS ROM could be on real PC hardware.

In case you were wondering what use an 8088 PC could be put to, take a look at this impressive demo. Don’t have one yourself? Build one.

A Simple, DIY GPS Tracker

Today, there are dozens of off-the-shelf solutions for a GPS tracking device. Most of them use GSM, some of them use satellites, and all of them are astonishingly inexpensive. If you want to track a car, dog, or your luggage, you’ve never had more options.

[Emilio] wanted to track his own car, and the original solution for this was a smartphone. This smartphone was also a good choice, as it’s a programmable GPS device connected to a cell network, but there had to be a simpler solution. It came in the form of an eight euro GPS module and a three euro GSM module (Google Translatrix right here). The rest of the hardware is an ATMega48V [Emilio] had sitting around and a 2500 mAh lithium cell. It’s a cellular tracker make out of eleven euro’s worth of hardware and some junk in a drawer.

There are only a few caveats to this hardware. First, the ATmega48V only has one UART. This is connected to the GPS module at 9600, 8N1. The connection to the GSM M-590 module is only 2400 bps, and slow enough for a bitbanged UART. This hardware is soldered to a piece of perfboard, thus ending the hardware part of this build.

The software is a little more complex, but not by very much. The GPS part of the firmware records the current latitude and longitude. If the GSM module receives a call, it replies with an SMS of the current GPS coordinates and a few GPS coordinates seen earlier. Of course, a pre-paid SIM is required for this build, but those are cheap enough.

Not even ten years ago, a simple, DIY GPS tracker would have cost a small fortune. Now that we have cheap GPS modules, GSM modules, and more magical electronics from the East, builds like this are easy and cheap. What a magical time to be alive.

OBDII to Speed Pulse: Atmel ICE

Building An OBD Speed Pulse: Behold The ICE

I am a crappy software coder when it comes down to it. I didn’t pay attention when everything went object oriented and my roots were always assembly language and Real Time Operating Systems (RTOS) anyways.

So it only natural that I would reach for a true In-Circuit-Emulator (ICE) to finish of my little OBDII bus to speed pulse generator widget. ICE is a hardware device used to debug embedded systems. It communicates with the microcontroller on your board, allowing you to view what is going on by pausing execution and inspecting or changing values in the hardware registers. If you want to be great at embedded development you need to be great at using in-circuit emulation.

Not only do I get to watch my mistakes in near real time, I get to make a video about it.

Getting Data Out of a Vehicle

I’ve been working on a small board which will plug into my car and give direct access to speed reported on the Controller Area Network (CAN bus).

To back up a bit, my last video post was about my inane desire to make a small assembly that could plug into the OBDII port on my truck and create a series of pulses representing the speed of the vehicle for my GPS to function much more accurately. While there was a wire buried deep in the multiple bundles of wires connected to the vehicle’s Engine Control Module, I have decided for numerous reasons to create my own signal source.

At the heart of my project is the need to convert the OBDII port and the underlying CAN protocol to a simple variable representing the speed, and to then covert that value to a pulse stream where the frequency varied based on speed. The OBDII/CAN Protocol is handled by the STN1110 chip and converted to ASCII, and I am using an ATmega328 like found on a multitude of Arduino’ish boards for the ASCII to pulse conversion. I’m using hardware interrupts to control the signal output for rock-solid, jitter-free timing.

Walk through the process of using an In-Circuit Emulator in the video below, and join me after the break for a few more details on the process.

Continue reading “Building An OBD Speed Pulse: Behold The ICE”

DIY Tiny Single-PCB Synthesizer

[Jan Ostman] has been pushing the limits of sound synthesis on the lowly AVR ATMega microcontrollers, and his latest two project is so cute that we just had to write it up. The miniTS shares the same basic sound-generation firmware with his previous TinyTS, which we’ve covered here before, but adds a lot more keys, an OLED, and MIDI, while taking away some of the knobs.

Both feature keyboards that are just copper pads placed over a ground plane, and the code does simple capacitive-sensing to figure out if they’re being touched or not. The point here is that you could pick up a PCB from [Jan] on the cheap, and experiment around with the code. Or you could just take the code and make a less refined version for yourself with a cheapo Arduino and some copper plates.

Either way, we like the combination of minimal materials and maximum tweakability, and think it’s cool that [Jan] shares the code, if not also the PCB designs. Anyone with PCB layout practice could get a clone worked up in an afternoon, although it’s going to be cheaper to get these made in bulk, and you’re probably better off just buying one from [Jan].