If you’ve written a great library to generate random numbers with a microcontroller, what’s the first thing you would do? Build an electronic pair of dice, of course.
[Walter] created the entropy library for AVRs for a reliable source of true random numbers. It works by using the watchdog timer’s natural jitter; not fast by any means but most sources of entropy aren’t that fast anyway. By sampling a whole lot of AVR chips and doing a few statistical tests, it turns out this library is actually a pretty good source of randomness, at least as good as a pair of dice.
The circuit itself uses two 8×8 LED matrices from Adafruit, an Arduino, and a pair of buttons. The supported modes are 2d6, 2d4, 2d8, 2d10, 1d12, 1d20, a deck of cards, a single hex number, a single 8-bit binary number, or an eight character alphanumeric password. It’s more than enough for D&D or when you really need an unguessable password. Video demo below.
Continue reading “The Most Random Electronic Dice Yet”
[Edward] and [Tom] managed to build an actual phased array speaker system capable of steering sound around a room. Powered by an Atmega 644, this impressive final project uses 12 independently controllable speakers that each have a variable delay. By adjusting the delay at precise intervals, the angle of maximum intensity of the output wave can be shifted, there by “steering” the sound.
Phased arrays are usually associated with EM applications, such as radar. But the same principles can be applied to sound waveforms. The math is a little scary, but we’ll walk you through only what you need to know in case you’re ever in need to steer sound with a
speaker and a servo phased array sound system.
Continue reading “Steering Sound with Phased Array”
We don’t know if this will come as a surprise to the regular Hackaday reader, but a whole bunch of Atmel microcontrollers have a very cool feature hidden away in their datasheets. Most of them – everything from the ATMega 168, 328, 32u4, to the ATtiny85 and 84 have a temperature sensor right on the chip. [Connor] did a little bit of research on this sensor and came up with a little bit of code that spits out the core temperature of these Atmel chips over the serial port.
The temperature sensor on these Atmel chips is accessed by writing a code – ‘100111’ for the Mega32u4 and ‘100010’ for the tiny84, for example – into the ADMUX register on the chip. According to the datasheet, the returned temperature is accurate to +- 10°C, but that can be easily calibrated by holding an ice cube (in a plastic bag, of course) up to the chip.
With a little more code, [Connor] is able to output the temperature of the microcontroller core over a serial port. In testing, his chip started out at 20°C and reached equilibrium at 24°C after about a minute. Pretty neat, and could be used as a temperature sensor for a project in a pinch.
Your desktop has two, four, or even eight cores, but when’s the last time you’ve seen a multicore homebrew computer? [Jack] did just that, constructing the DUO Mega, a 16 core computer out of a handful of ATMega microcontrollers.
From [Jack]’s description, there are 15 ‘worker’ cores, each with their own 16MHz crystal and connection to an 8-bit data bus. When the machine is turned on, the single ‘manager’ core – also an ATMega328 – polls all the workers and loads a program written in a custom bytecode onto each core. The cores themselves have access to a shared pool of RAM (32k), a bit of Flash, a VGA out port, and an Ethernet controller attached to the the master core.
Since [Jack]’s DUO Mega computer has multiple cores, it excels at multitasking. In the video below, you can see the computer moving between a calculator app, a weird Tetris-like game, and a notepad app. The 16 cores in the DUO Mega also makes difficult calculations a lot faster; he can generate Mandelbrot patterns faster than any 8-bit microcontroller can alone, and also generates prime numbers at a good click.
Continue reading “16 core computer made of ATMegas”
The advent of the Arduino brought the world of microcontrollers to hobbyists, students, and artist the world over. Right now we’re in the midst of a new expansion in hobbyist electronics with the Raspberry Pi, but we can’t expect everyone to stay in the comfortable, complex, and power-hungry world of Linux forever, can we? Eventually all those tinkerers will want to program a microcontroller, and if they already have a Raspberry Pi, why not use that?
[Kevin] wanted to turn his Raspi into an AVR development workstation, without using any external programmers. He decided to use the Raspi’s SPI port to talk to an AVR microcontroller and was able to make the electrical connections with just a few bits of wire an a handful of resistors.
For the software, [Kevin] added support for SPI to avrdude, available on his git. Theoretically, this should work with any AVR microcontroller with the most popular ATMegas and ATtinys we’ve come to love. It doesn’t support the very weird chips that use TPI programming, but it’s still extremely useful.
[Pinoccio] is currently an Indeigogo crowd-sourced project that aims use the real-world programmability of the Arduino through the internet using a wifi connection. One could rightly point out that this can already be done through the use of a wifi shield. Before ruling this device out, just “shush your shussins” and consider that it’s designed specifically for interfacing with “things” over the internet. This can replace several components (see 1:10 in the video after the break) and should be less of a hassle.
Additionally, with a shield on one of these devices, several other [Pinoccio] boards can communicate with the Internet using this as a hub in a mesh network. This is similar to how the many “smart” electrical meters work, with a grid router being a central hub for communications. Additionally, this board has a built in temperature sensor and a RGB (instead of a single-color) LED, so you can do some interesting stuff with it right out of the box. Assuming this project gets funded, which seems likely at this point, we’re excited to see the projects that get built using it! Continue reading “Pinoccio – An Ecosystem for the Internet of Things”
We see a lot of microcontroller dev boards here at Hackaday, so much that we’re jokingly considering changing our name to Board a Day. These devices – from Arduinos to Arduino-compatible boards, very, very small boards, to extremely powerful ARM devices – are a great way to learn about the wonders of controlling electricity with code. There’s a problem, though: if you’re teaching a class on programming microcontrollers, giving each student a $20 board is nearly out of the question.
This is where the shrimp comes in. It’s a very, very minimal Arduino-compatible circuit meant to control all the pins on an ATMega328. The components only cost about £1.40 ($2.25 USD) when bought in volume, making it perfect for teaching a class or workshop on the Arduino and giving each student a circuit to take home.
The basic circuit is just an ATMega328 – the same microcontroller used in the Arduino Uno – with a few caps, resistors, and a 16 MHz crystal. It’s a very bare-bones system, but once built and programmed provides all the functionality of a $25 Arduino.
Like all microcontroller platforms, there’s the chicken-and-egg problem of actually programming the device. The Shrimp team is using a CP2102 USB to UART bridge to program each shrimp. Not an inexpensive part, but it is of course possible to only have one serial bridge for each workshop.