Home Blog  





14 Jul 2011

swharden.com writes:

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]

21 Jun 2011

ermicro.com writes:

Pulse Width Modulation (PWM) is a technique widely used in modern switching circuit to control the amount of power given to the electrical device. This method simply switches ON and OFF the power supplied to the electrical device rapidly. The average amount of energy received by the electrical device is corresponding to the ON and OFF period (duty cycle); therefore by varying the ON period i.e. longer or shorter, we could easily control the amount of energy received by the electrical device. The Light Emitting Diode (LED) will respond to this pulse by dimming or brighten its light while the electrical motor will respond to this pulse by turning its rotor slow or fast.

Working with Atmel AVR Microcontroller Basic Pulse Width Modulation (PWM) Peripheral – [Link]

21 Jun 2011

ermicro.com writes:

The rapid penetration of the internet networks into many of today’s modern homes and personal gadgets (e.g. smart phone and smart pads) opening a tremendous useful and interesting embedded system application that could be integrated into our house or known as the intelligent house. For example by putting a small embedded system web server in our house, we could easily monitor such as alarm, temperature or even turn on/off the lamp or the garden’s water sprinkle; eventually from any remote location through the wireless personal gadget; Or perhaps you just want to impress your relative or friend with a very accurate digital clock which automatically synchronized the time through the Network Time Protocol (NTP) over the internet at your home or office.

Integrating Wiznet W5100, WIZ811MJ network module with Atmel AVR Microcontroller – [Link]

20 Jun 2011

ermicro.com writes:

Sometimes we need to extend or add more I/O ports to our microcontroller based project. Because usually we only have a limited I/O port left than the logical choice is to use the serial data transfer method; which usually only requires from one up to four ports for doing the data transfer. Currently there are few types of modern embedded system serial data transfer interface widely supported by most of the chip’s manufactures such as I2C (read as I square C), SPI (Serial Peripheral Interface), 1-Wire (One Wire), Controller Area Network (CAN), USB (Universal Serial Bus) and the RS-232 families (RS-423, RS-422 and RS-485). The last three interface types is used for long connection between the microcontroller and the devices, up to 1200 meters for the RS-485 specification, while the first three is used for short range connection.

Using Serial Peripheral Interface (SPI) Master and Slave with Atmel AVR Microcontroller – [Link]


20 Jun 2011

ermicro.com writes:

I2C (read as I Squared C) bus first introduced by Philips in 1980, because of its simplicity and flexibility the I2C bus has become one of the most important microcontroller bus system used for interfacing various IC-devices with the microcontroller. The I2C bus use only 2 bidirectional data lines for communicating with the microcontroller and the I2C protocol specification can support up to 128 devices attached to the same bus. Today many I2C IC-devices available on the market such as Serial EEPROM, I/O Expander, Real-Time Clock, Digital to Analog Converter, Analog to Digital Converter, Temperature Sensor and many more.

How to use I2C-bus on the Atmel AVR Microcontroller – [Link]

27 May 2011

Atmel has announced their AVR Xplained series of dev boards.

Atmel AVR Xplained is a series small-sized and easy-to-use evaluation kits for 8- and 32-bit AVR microcontrollers. It consists of a series of low cost MCU boards for evaluation and demonstration of feature and capabilities of different AVR familie. Example projects and code drivers are provided in AVR Studio 5. Code functionality is easily added by pulling in additional drivers and libraries from the AVR Software Framework.

The AVR Xplained series also consists of a range of add-on boards that can be stacked on the MCU boards to create platforms for specific application development. A wide range of add-on boards is available, including, intertial pressure and temperature sensors, ZigBee RF, and Cryptographic authentication.

List price for MCU boards is around $30, with sensor modules between $25-54.

Details on features and availability are available from Atmel.

Atmel AVR Xplained dev boards – [Link]

27 May 2011

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]

25 May 2011

ermicro.com writes:

In this two series of tutorial, we will provides you with the information on the tools and the basic steps that are involved in using the C programming language for the Atmel AVR microcontrollers. It is intended for people who are new to this type of microcontrollers. The AVRJazz Mega168 board will be use in this tutorial, however this information could be applied to other AVR family as well.

Starting Atmel AVR C Programming Tutorial - [Part1]+[Part2]

16 May 2011

hardwarehank writes:

The Atmel ATTiny85 chip is an 8-pin MCU that is totally awesome. If you’ve been programming with the bigger boys (the ATMega series), these are a nice adventure – you’re rather limited in the number of output pins, but a creative design gives us a lot of flexibility in a very small package.

Apple-style LED pulsing using a $1.30 MCU – [Link]

12 May 2011

rbw writes – [via]

Pulse Width Modulation (PWM) is a technique widely used in modern switching circuit to control the amount of power given to the electrical device. This method simply switches ON and OFF the power supplied to the electrical device rapidly. The average amount of energy received by the electrical device is corresponding to the ON and OFF period (duty cycle); therefore by varying the ON period i.e. longer or shorter, we could easily control the amount of energy received by the electrical device. The Light Emitting Diode (LED) will respond to this pulse by dimming or brighten its light while the electrical motor will respond to this pulse by turning its rotor slow or fast.

Working with Atmel AVR Microcontroller Basic Pulse Width Modulation (PWM) - [Link]



 
 
 

 

 

 

Search Site | Advertising | Contact Us
Elektrotekno.com | Free Schematics Search Engine | Electronic Kits