Friday, May 22, 2015

Perfuino, the Arduino for Prototypers

Yes, it's another barebones Arduino, but the additional prototyping space makes it a unique and very handy board to have. The Atmega328 is socketed, so if you do something crazy, you are back in business for under $5. At a cost of $16, it's a affordable alternative to the commercial clones. It does not include a USB interface, so a FTDI cable for ICSP programmer will be necessary (headers at upper left). Only 3 days left on the kickstarter, so get in fast!

Tuesday, May 19, 2015

Ham Radio Shield for Arduino

Would you like a complete 2m / 1.25m / 70cm ham radio that connects like a shield to an Arduino? Can be used with a Raspberry Pi as well. Onboard Lipo charger / controller also powers your Arduino. Make your own TNC / Packet Radio, Repeater, Echo Link node, and more! 200mw, with an optional 10w amplifier. Coming soon! -

The HobbyPCB RS-UV3 radio module is a 144/220/450 MHz FM transceiver board. The RS-UV3 is a low cost transceiver solution for Packet Radio, repeaters, Echolink stations, base station and mobile applications. The RS-UV3 supports multiple interfaces including microphone/speaker, line level audio (soundcard), TTL serial control and Arduino Shield connections. The RS-UV3 has an built-in battery charger and provides conditioned power for the Arduino controller.

Monday, May 18, 2015

Measuring Voltage with an Arduino and an External AREF

The Arduino Uno has 6 analog inputs, designed for measuring a voltage. Other versions of the Arduino can have several more. Voltages are analog, meaning they can have a range of values, versus digital, which only has two, on or off. Whether you are reading a potentiometer, a TMP36 or LM35 temperature sensor, or even the voltage of a battery, these devices output an analog signal. Many devices are strictly in the analog world.

The Arduino is very good at measuring these voltages, as long as they are in the 0-5v range (UNO) or 0-3.3v range on some other models. The issue we run into is that although the 5v is assumed, sometimes it's not 5v. If you have your Arduino plugged into your computer USB, or have a lot of devices connected to your Arduino, that 5v can be as low as 4.8 volts.

Why does this matter? The Arduino analog to digital converter has 1024 steps so 5v / 1024 = 0.0048828125 per step. But if the voltage was 4.8 volts, then each step would equal 0.0046875. Doesn't seem like a big difference does it? With a sensor like the TMP36, that difference could equal several degrees of inaccuracy.

So how do we correct this? Well, powering your Arduino from a 9v source through the barrel connector is a big help, as the onboard voltage regulator will do a good job of enforcing that the INTERNAL reference is really 5v. For real precision, a EXTERNAL reference is best.

We are using a LM4040 precision voltage source from Adafruit, which takes a nominal 5v input, and delivers a precision voltage reference of 2.048 and 4.096 volts, regardless of your supply voltage to the Arduino. By connecting one of these outputs to your AREF pin, and specifying the AREF voltage (verify with your meter), you now can precisely measure a analog signal from 0 - AREF voltage.

If your signal is greater than the AREF voltage, you can use resistors to create a voltage divider to bring it back into range.


Here is a sample sketch showing how to use a EXTERNAL reference, like the Adafruit LM4040.

When using AREF, always specify analogReference(EXTERNAL); before doing an analog read, as you could short the internal reference, damaging the Arduino. I recommend you upload this sketch before connecting the AREF pin.

#define aref_voltage 4.096 

int ADCPin = 1; //using A1 input for this sketch
int ADCReading;

void setup(){




void loop(){

  ADCReading = analogRead(ADCPin);  
  Serial.print("ADC reading = ");
  Serial.print(ADCReading);     // the raw analog reading
  // converting that reading to voltage, which is based off the reference voltage
  float voltage = ADCReading * aref_voltage;
  voltage /= 1024.0; 
  // print out the voltage
  Serial.print(" - ");
  Serial.print(voltage); Serial.println(" volts");


Related Posts Plugin for WordPress, Blogger...