Trying DSO138 digital oscilloscope from Gearbest

We all agree that hobbyist or engineer should have proper bench oscilloscope for everyday use. They have all standard features including built in screen, interchangeable probes and convenient knob controls. Anyway if you are looking for temporary cheap solution, you can try building your own oscilloscope. Luckily you don’t have to make it from scratch because there are many projects and kits available that are cheap but powerful enough to fit most of basic needs.

DSO138_assembled Continue reading

Using current limiting resistors on AVR I/O pins

Today I want to talk about protecting digital Inputs of AVR or any other microcontroller from over-voltages. When you look at majority microcontroller circuits found on internet shared by hobbyists you don’t find any input protection. Some argue that in most cases this is not needed, or simply don’t understand how it works. Lets see how simple resistor can save a day.

Lets see at simplified version of digital input of AVR microcontroller.

avr_io_protection

We can see there that input uses CMOS logic where transistor is switched by voltage. According to AVR datasheet, gate control voltage should stay within -0.5V to VCC+0.5V range. If we power our device with 5V supply, we need to make sure that pin input voltage stays in range -0.5 to 5.5V. When input voltage source is taken from same power supply, then we don’t have to worry much about it. But what if AVR is accepting digital signals from other sources like sensors, other devices that are powered with their own power supplies. Can we be sure that voltage will always be within safe limits. This is why there are two clamping diodes (sometimes called ESD protection diodes) used. They are here to protect logic from over-voltages and under-voltages. Actually they do their work pretty well… until they die. Lets take situation when voltage at pin is 7V what happens here. D1 Anode voltage is 7V while cathode is VCC=5V. Then we get 7-5 = 2V on diode. But diode forward voltage drop is about 0.7V. Diode becomes unprotected and high current flows through diode until it fails. And so logic becomes unprotected. Same is with under-voltage. If we apply -2V at input pin then diode D2 starts conducting forward from GND to PIN with 2V across. Again voltage drop at diode is 0.7V and so current grows until diode fails. And so if we expect that input voltage may be off limits we need to add current limiting resistor. Continue reading

Understanding 1-wire interface

1-wire devices are commonly used in many applications. You probably are familiar with famous DS18B20 digital temperature sensor in TO92 package. They can be powered and interfaced using same single data line plus ground return of course. 1-wire originally was designed by Dallas Semiconductors Corp. which is also a major provider of 1-wire devices like temperature sensors, timers, real time clocks, memory and well known iButton.

1-wire devices. DS18B20 and iButtons

1-wire interface is a bidirectional, half duplex slow serial communication standard. It doesn’t use any clock signal. When talking of speed, standard data rate is 15.4kbps. But there is possible to overdrive 1-wire communication to up to 125kbps. Continue reading

What microcontroller development boards I have

During time I’ve been purchasing or building various microcontroller boards. Most of them were used just to try things out or because they were cheap to get. So I thought, why not to blow dust away and see what we have here. Maybe there will be some fresh thoughts on where to use them.

collection of microcontroller boards

Probably I should spare a few words about each of them. Continue reading

Microcontroller based apps for android mobile phones

Recently I obtained a Samsung Galaxy Ace S5830 android mobile phone. It was released a year before but it seems to have enough power to run most of apps you can find around.

It is powered by Qualcomm MSM7227 ARM11 processor running at 832MHz. Has internal 158MB of internal memory and can support up to 32GB MicroSD flash card. Other features include GPS, WiFi, 320×480 TFT touch screen, 5MP camera and so on. Device is powered by Android OS v2.3. These are specs you can find on any mobile website. To get your own Samsung phone, check out phones4u.

Smart phone devices are as valuable as there are some useful apps there. So I started wandering if there are electronics/microcontroller related apps that could be useful in daily work. Lets see what can we find in app store. First of all we are interested in free apps. Search on AVR microcontrollers gave me coupe results: AVR Fuse Calculator and Using Atmega128 apps. Lets see what are they capable of. Continue reading