Library for internal AVR temperature sensor

Modern AVR micros are equipped with internal temperature sensors that can be used to measure core temperature or simply be a source for fast learning ADC without external components. Its accuracy isn’t great for serious readings but enough for monitoring. Nerd Ralph decided to write small library allowing to read on-chip temperature.

reading_avr_internal_temperature

Every AVR have a slight different way of setting up ADC, so he managed library to take care of this process. Several #ifdef lines fixes things up when compiling code. Also he took care of calibartion routine which gave pretty decent readings. If you don’t need great accuracy, you can get away with this internal sensor, but for more serious applications, better use external calibrated sensor which isn’t affected bu chip core temperature and noise. Library can be found on Google repository.

Repairing pool cleaning robot with Atmega8

One day Davide found that his pool cleaning robot was dead. Damage was caused by chlorine which cut through gasket and shorted circuits. Official repairing wasn’t an option because new electronics would cost more than robot itself. So he thought that in reality cleaning robot doesn’t do much – moves around and sucks water through the filter. He can build his own control circuit based on his microcontroller of choice.

He built a circuit which is actually a count down timer. Robot works in periods that can be selected with five buttons. Settings are stored in to microcontrollers internal EEPROM so once set it always works as programmed. Status LEDs indicate robot working conditions. Green shows that robot is working, while RED indicates over/under current detection. Robot moving motor is BLDC, so he used hobby ESC Mistery FM30A to drive motor with PWM generated from Atmega. That’s it solved and robot continues its work.

Building capacitance and inductance meter

Capacitor and inductor are like brother and sister. They both are reactive components with somewhat similar characteristics. Like any other electronics component you need to know its value before putting in to circuit. Capacitors are a bit easier as they are pretty good labeled. Inductors are different story. Some of them are labeled, but what if you want to make your own – then you can calculate its value (what is not always so easy) or measure. Most multimeters come with capacitance meters, but only few have inductance measuring option. BasinStreetDesign from instructables decided to build capacitance/inductance meter that would be accurate enough for his daily use.

capacitance_inductance_meter

He considered several measuring methods including resonance, time constant and impedance. Resonance seemed to be most accurate. Measuring frequency and calculating component value definitely involved microcontroller that he wanted to avoid. Interesting thing is that he used UV erasable PIC microcontroller. Most of young hobbyists probably never seen this before. So the project got some smell of retro. Anyway further journey took everything to AVR. He had some struggle by setting things up and writing software, but eventually digits lit up asking for further calibration. He put schematic in to tin can, painted and labeled.

BASIC computer on ATmega1284P

BASIC programming language was founded back in 1964. Its main goal was to enable people to use computers for their need the easier way. BASIC is generally a high level programming language that from simple form evolved in to modern programming language like Visual Basic .NET. Anyway simple forms of BASIC language still exists and are used in several areas. Microcontrollers are one place where it fits pretty well. Dan has been doing projects with BASIC functionality. His earlier work was done on building Arduino BASIC shield. But eventually he saw the limitations of such approach like low TV out resolution and Arduino dependence.

avr_basic_computer

Having these in mind he decided to build a standalone BASIC computer based on ATmega128P. Using stand alone solution these problems were gone. BASIC computer has a PS/2 keyboard support, TV out and the rest GPIO headers for interfacing purposes. BASIC programs are stored in AVR EEPROM memory. Microcontroller runs TinyBASIC Plus which supports most of common BASIC commands including IO support, system commands, storage, math, etc. BASIC computer is assembled using only through hole components, so building one is really piece of cake.