Author Archives: R-B

PIC based shaking LED dice

Electronics dice projects using push buttons are available all over the internet. This one is a little bit different. It is meant to provide the real feeling of shaking a dice by using a spring with weight and a wire. The two make and break contacts when shaken. The PIC16F688 microcontroller detects the contacts between the spring and the wire, and rolls the dice. After the spring motion stopped completely, the dice output number is displayed with glowing LEDs.

Read more

Easy Data Logger with Virtual USB

“V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.”
For further details on V-USB and licensing, visit http://www.obdev.at/products/vusb/index.html

This is a data logger project that reads an analog signal, converts into digital number, and sends it to a host computer using Virtual USB. This is a good example application of V-USB. An 8-pin ATtiny45 microcontroller without an external crystal oscillator is used for this demonstration. The beauty of this project is the ATtiny45 presents itself as a USB keyboard to the host computer, and sends the measurements by itself. All you need to do is to open a text editor on the host computer, and press the Start/Stop button on the data logger. The data will be typed automatically on the editor. The sampling time for data logger is set to 1 sec, and an on-board LED indicates the logger is active.

Read more

External Interrupts in Atmega AVR

An interrupt is a process of forcing a microcontroller to temporarily suspend the current job and perform a higher priority task. Once the new request is served, the micrcontroller resumes the original task. Interrupts are powerful tools in embedded system design, and special cares must be taken while implementing them. This tutorial teaches how to use an external and pin change interrupts on an AVR microcontroller.


Read

Using Timer interrupts in AVR

Timers are vital in embedded systems design. Timer module inside a microcontroller can be used to measure time interval, generate exact duration pulse, count external pulses, etc. Their proper use could reduce the overall consumption of available resources. This tutorial from Protostack teaches you about the 8 and 16 bit timers on an ATmega168 microcontroller. The concept of Timer is fundamental and is similar with other microcontrollers too.


Read

Determine capacitance by measuring the charging time

There are many ways to determine the capacitance of a capacitor. You can use an oscillating circuit where the capacitor is a part of it and measure the frequency of oscillation to find the capacitance. Or, you can also use a resistor-capacitor network and measure the rate of voltage rise across the capacitor to determine the capacitance, if the value of the resistor is known.

Here’s a similar project where a PIC16F88 microcontroller measures the time required by a capacitor to charge through a known resistor from 0 to half of the reference voltage provided, and the capacitance is determined based on that information.

Read more

« Older Entries Recent Entries »