Wireless microcontroller/PC interface for $3


Sending data from a microcontroller to a PC usually requires some sort of serial connection, either through fiddly on-chip USB, FTDI chips, or expensive radio ICs. [Scott] didn’t want to deal with this when creating a network of wireless temperature sensors, so he hacked up a few cheap 433 MHz radio transmitters and receivers to transmit data to a PC for about $3.

After sensor data is collected on a microcontroller and sent over radio, there’s still the issue of getting it into a PC. For this, [Scott] piped the data into the microphone port of a cheap USB sound card. We’ve seen this trick before both in the world of microcontrollers and loading programs onto a Commodore 64 via a cassette interface.

Once the data is sent into the sound card, it’s decoded with a a small Python app. Given the range and quality of the RF transmitters and receivers  [Scott] says it’s not an extremely reliable way to send data to a PC. It is cheap, though, and if you need to read sensors wirelessly on a budget, it’s hard to do much better.

Check out [Scott]‘s demo of his creation below.

Another salvo in the PIC vs. AVR holy war

holy war

Ah, PIC vs. AVR, the never-ending battle of electronic design supremacy. Some people swear by Atmel’s AVR microcontrollers, while others are wrong. [majenko] is firmly planted in Microchip’s PIC camp, so he wrote up a nice comparison of Atmel’s AVR versus Microchip’s PIC family of microcontrollers. The results aren’t that surprising; PIC microcontrollers come out as a better product that no hobbyist uses because no hobbyist uses them.

Atmel and their series of AVR microcontrollers has seen a huge increase in popularity in the hobbyist market in the last few years, no doubt thanks to the Arduino and other AVR-powered dev boards. This isn’t to say Microchip and PIC haven’t seen their time in the lime light; there was a time when you could actually buy electronic components at Radio Shack, including kits containing Microchip’s very popular but somewhat outdated Basic Stamp.

After going over the capabilities of the Atmel AVR ATMega328p, the similarly equipped Microchip’s PIC PIC18F25K80, and TI’s MSP430G2533, [majenko] found the perennial favorite, the AVR, lacked in some very important categories. The AVR has a lower resolution ADC, fewer PWM pins, fewer 16-bit timers, while costing about $0.75 more.

Of course [majenko]‘s analysis doesn’t take into account the intangibles of choosing a PIC over an AVR. Thanks to the Arduino’s adoption of the AVR, there are many, many more code and schematic examples floating around on the Internet for just about every project imaginable. The development tools for PIC are a bit more expensive than their AVR equivalents; A PICkit2 runs about $50 while AVR ISP programmers can be found just about everywhere for pocket change.

It’s a lazy Sunday, so all ‘yall can go on and argue in the comments.

Pinoccio – An Ecosystem for the Internet of Things


[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! [Read more...]

Overclocking microcontrollers


We’re all familiar with overclocking desktop computers; a wonderful introduction to thermal design power and the necessities of a good CPU cooler. [Marcelo] wanted to see how far he could overclock a microcontroller – in this case an ATMega328 – and ended up with a microcontroller designed for 20 MHz running at 30 MHz.

To verify that his uC could run at higher clock speeds, [Marcelo] began his experiments by uploading a piece of code that toggled a few pins as fast as possible. He needed to upload this code with a common 16 MHz crystal – AVRDude simply won’t work when a chip is clocked at higher speeds.

After successfully demonstrating his microcontroller will turn pins on and off at 30 MHz, [Marcelo] wanted to see if he could do something useful. By editing a single setting in his Arduino boards.txt file., [Marcelo] was able to have his overclocked microcontroller read and reply to characters sent over a serial connection. It worked, demonstrating an overclocked microcontroller could be useful in some situations.

As for what [Marcelo] plans to do with his faster microcontroller, he’s thinking of improving a ATMega-powered VGA color generator. A higher clock speed means he can push more pixels out to a VGA monitor.

Weird Processing Unit only has 4 instructions

[Tomáš], a.k.a. [Frooxius] is playing around with computational theory and processor architectures – a strange hobby in itself, we know – and has created the strangest CPU we’ve ever seen described.

The Weird Processing Unit, or WPU, isn’t designed like the Intel or ARM CPU in your laptop or phone. No, the WPU is a thought experiment in computer design that’s something between being weird for the sake of being weird and throwing stuff at the wall and seeing what sticks.

The WPU only has four instructions, or attoinstructions, to change the state of one of the 64 pins on the computer – set to logical 1, set to logical 0, invert current state, and halt. These instructions are coded with two bits, and the operand (i.e. the wire connected to the computer) is encoded in another six bits.

These 64 wires are divided up into several busses - eight bit address and control busses make up the lowest 16 bits, a 32-bit data bus has a function akin to a register, and a 16-bit ‘Quick aJump bus’ provides the program counter and attocode memory. The highest bit on the WPU is a ‘jump bit’, implemented for unconditional jumps in code.

We’re not even sure the WPU can even be considered a computer. We realize, though, that’s probably not the point; [Tomáš] simply created the WPU to do something out of the ordinary. It’s not meant to be a real, or even useful, CPU; it’s simply a thought experiment to see what is possible by twiddling bits around.

Tip ‘o the hat to [Adam] for sending this one in.

A JavaScript interpreter for ARM ‘micros

When programming a microcontroller to do your bidding, you only have two choices. You could write your code in a proper language such as C and cross-compile your source into a piece of firmware easily understood by a micro. Alternatively, your could load an interpreter on your microcontroller and write code via a serial connection. Interpreters are a really fast and easy method to dig in to the hardware but unfortunately most microcontroller interpreters available are based on BASIC or Forth.

[Gordon] figured it’s not 1980 anymore, and interpreters for these relatively low-level languages aren’t a good fit with the microcontrollers of today. To solve this problem, he created Espruino, a JavaScript interpreter for the new batch of ARM development boards that have been cropping up.

Espruino is designed for the STM32VL Discovery board, although [Gordon] plans on porting his interpreter to the Arduino Due when he can get his hands on one. Installation is as easy as uploading any other piece of firmware, and even though [Gordon]‘s STM32VL doesn’t have a USB port for a serial terminal, it’s a snap to connect a USB to TTL converter and get this interpreter working.

Espruino isn’t open source yet, only because [Gordon] would like to clean up his code and write a bit of documentation. He’d also like to make Espruino profitable so he can work on it full-time, so if anyone has an idea on how [Gordon] can do that, leave a note in the comments.

The easiest way to dive in to ARM programming

[Brad] has been very excited about an ARM Cortex-M0 chip released by NXP; it’s a fully featured ARM microcontroller, and is, quite amazingly, stuffed into a hobbyist and breadboard-friendly DIP-28 package. After finding a supplier for this chip, [Brad] dove in and put together a great tutorial for programming an ARM on the breadboard using open source tools.

The chip in question is NXP’s LPC1114FN28, a 28-pin breadboard friendly chip we’ve posted about before. After finding a single supplier for this microcontroller (only $1.26 for one chip!), [Brad] pulled out his breadboard and started wiring things up.

Because this microcontroller has an on-board oscillator, wiring up a breadboard and putting in a breakout for an FTDI cable was a snap. After configuring a toolchain and writing a bit of code, the only issue was uploading the code to the chip. This was handled by the lpc21isp programming tool, slightly modified and configured by [Brad] to support his favorite microcontroller.

The LPC1114FN28 is an impressive bit of kit, and with free tools to program the damn thing, we can’t wait for a homebrew ARM dev board to show up.