I developed a nifty way to send data from any microcontroller to any PC running any operating system with zero components and hardware you probably already have sitting in front of you. Traditional interface methods (namely serial port and usb port, both have been referenced on Electronics-Lab) have drawbacks. For serial, you need a level converter IC (like a max232) and an archaic PC with a serial port, or a USB serial port adapter (many of which don’t run on Linux or newer versions of windows), and a crystal specifically chosen for transfer at a certain bit rate. FTDI makes a series of USB/serial interfaces, but they’re expensive and SMT only I don’t feel like paying even more for a breakout board just to communicate with a $1 microcontroller. Also, many ATMEL chips (most of the ATTiny series) don’t have rs232 capability built in, so you have to bit bang it in software (not fun). USB is another option, but requires a crystal and some level conversion circuitry, and isn’t supported by most small/cheap ATMEL chips. It’s built in some simple PICs (like some of the 18F series) but I don’t want to switch architecture just to send a few bytes to a PC! The V-USB project helps ATMEL chips bit-bang the USB protocol, and I’ve gotten it to work, but it’s not easy (their hello world program is hundreds of lines of code), and you have to mess with writing USB drivers or interfacing pre-made USB drivers with OS-specific solutions, it’s not fun either.
I’ve long wished there were an easier way! In this post, I demonstrate a simple way to send data from a microcontroller to a PC (and a more advanced second example showing bidirectional communication) using PC a sound card! Although the one built in most PCs would work, I decided to do it with $1.30 sound cards that are all over eBay. The chip sends pulses of data to the PC and a Python script (which can be run on virtually any OS) listens to the sound card with the pyAudio library and waits for data. When it’s received, it measures distances between pulses and dumps data values to the screen (optionally logging them to a CSV file ready for graphing by Excel or some other program). A series of calibration pulses precede the data stream allowing the PC to adapt to incoming data at any speed (no specific clock speed or crystal is required).
Although it’s not a refined method suitable for consumer applications, it sure is a useful hack for anyone looking to quickly exchange data between a microcontroller and a PC!
Sound Card Microcontroller / PC Communication - [Link]
Even upmarket digital multimeters with a built-in capacitance function are useless if you want to check out tiny capacitances, such as 2.7 pF or 5.6 pF. Usually the lowest measuring range is 2000 pF, which is a joke for RF designers and radio amateurs. Although the resolution of a 3.5-digit DMM resolution is 1 pF at this range setting, measurements below 200 pF or so yield results that are rough at best and ridiculous at worst. [via]
Please welcome ATtiny & The Low Picofarads – [Link]
Here is a complete tutorial in 9 easy steps for programming ATtiny chips from Atmel using an Arduino. Fills in missing pieces from other online guides
Program an ATtiny Using an Arduino - [Link]
This handy breadboard header for ATTiny 25/45/85 microcontroller is a new design based on the original idea from Tinkerlog. Maybe the most useful feature is that it can provide power to the vertical breadboard strips while connecting all six port pins to the horizontal strips. Other features are :
Breadboard header for ATTiny 25/45/85 - [Link]
These tiny controller boards are build to provide a quick start for projects with 8 and 20 pin AVR microcontrollers, e.g. ATtiny13, ATtiny45, ATtiny85 and ATtiny2313. They don’t include any fancy stuff, they are just as simple as possible. Eagle schematics are included.
ATtiny breadboard headers - [Link]
Microprocessors are so cheap these days. If only there were a way to program them up just as cheaply… In this instructable, find out how to build up a complete AVR microprocessor toolchain: compiler, programmer software, programmer hardware, and some simple demos to get your feet wet. The endpoint is not quite as swanky as Atmel’s suite, but it’s gonna run you about $150 less and take only a little more work to get it set up.
This instructable is based on the Atmel ATtiny 2313 chip, mostly because it’s one of the smaller chips (in size) while still being beefy enough to do most anything. And at $3 a pop (non-bulk), they don’t break the bank.
Also check the new USB version here.
Getting started with AVR microprocessors on the cheap - [Link]
With this small board you can program most of the AVR ATTiny microcontrollers or you can build your projects to use it in a stand alone application. It can be powered with a 9V battery because it has 5V voltage regulator on it. The voltage regulator can give 1000mA current. The power to the board can also be supplied with a wall wart. Low power external devices like a LCD module can be powered via the board itself.
ATTiny Program/Project Board - [Link]
alex_weber’s first Instructable is a cool one: an LED project that learns and replays sequences of light. Alex’s project is built around the Atmel ATtiny13v, an LED, and a Light Dependent Resistor-the whole thing is powered by a CR2032 battery.
Reprogrammable LED Learns and Plays Back Light Sequences - [Link]
Programmable LED - [Link]