Saturday, January 18, 2014

Volt Amp Watt Hour Meter Shield

A while back I designed a watt hour meter for tracking power produced by solar or wind, power consumed by loads, and power contained in a battery bank. I have produced a new version built on the Sparkfun Protoshield. This one uses a ACS712 (5 amp) current sensor, and is designed to monitor up to 10vdc. Different current sensors and resistors can be installed for other current and voltage ranges. The next upgrade will be a 16 pin header for a LCD display. So stay tuned. Code and wiring schematics coming shortly.


#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 10, 9, 8, 7);

const float referenceVolts = 5; // the default reference on a 5-volt board
//const float referenceVolts = 3.3; // use this for a 3.3-volt board

const float R1 = 10000; // value for a maximum voltage of 10 volts
const float R2 = 10000;
// determine by voltage divider resistors, see text
const float resistorFactor = 1023.0 / (R2/(R1 + R2));
const int batteryPin = 0; // +V from battery is connected to analog pin 0

int sensorPin3 = A3; // select the input pin for the potentiometer

int sensorValue0 = 0; // variable to store the value coming from the sensor
int sensorValue3 = 0; // variable to store the value coming from the sensor

void setup() {
// initialize serial communication at 9600 bits per second:
lcd.begin(20,4); // columns, rows. use 16,2 for a 16x2 LCD, etc.
lcd.clear(); // start with a blank screen

void loop() {

int val = analogRead(batteryPin); // read the value from the sensor
float volts = (val / resistorFactor) * referenceVolts ; // calculate the ratio
Serial.print("Volts :");
Serial.println(volts); // print the value in volts

float average = 0;
for(int i = 0; i < 1000; i++) {
average = average + (.0264 * analogRead(A3) -13.51) / 1000;
Serial.print("Amps :");

lcd.setCursor(0,0); // set cursor to column 0, row 0 (the first row)
lcd.print("Volts:"); // change this text to whatever you like. keep it clean.
lcd.setCursor(0,1); // set cursor to column 0, row 1

// if you have a 4 row LCD, uncomment these lines to write to the bottom rows
// and change the lcd.begin() statement above.
lcd.setCursor(0,2); // set cursor to column 0, row 2
lcd.setCursor(0,3); // set cursor to column 0, row 3


Sparkfun Arduino Protoshield Kit

I've done a video of the building of a Sparkfun Arduino Protoshield Kit, as it is the basis for a number of our upcoming projects, and wanted you to see how to make your breadboard projects more permanent. There are two LED's available for your projects, and two pushbuttons, although one is a reset, so only one is available to you. This is not a REV3 kit, so the extra pins (IOREF,  and duplicate I2C) are not available, but we didn't need them for this project.

Sparkfun's build page
Quickstart Guide

Tuesday, January 14, 2014

The Baofeng GT-3 Operational Review

Update! Added the $11 Nagoya NA-771 Antenna, and can cleanly hit the Murrell's Inlet SC Repeater, 30 miles away!

This is not a review about the flashlight, the siren, or even the FM radio built into this Dual Band Ham Radio. It's not a review about the fact you can receive weather frequencies, or use the FRS/GMRS bands, or even the cool accessories that come with the radio. It is an operational review of the 2m/70cm abilities of this Ham Radio. Like how to access a repeater, and how to talk direct to another Ham Radio.

Now some have complained that it's hard to seat the radio into the charger, but after 5 tries, and actually looking at how the unit does seat, it's quite easy to get it into the right spot.

Others have complained that with the backlight off you can't read the screen. My opinion that it's still legible, but does depend on lighting conditions. A press of any key brings the light right back on.

Operationally, it's very similar to the UV-5R series, but with upgraded electronics, it reaches father, and clearer.

I've been using this radio for about 3 weeks, and communications are crystal clear, battery life is fantastic, and it sits in the hand perfectly.

I've included the instructions we have worked out for programming a repeater below.

If in Channel Mode, Press VFO for Frequency mode
Press A/B Button to go to the top line (arrow points up)
Enter Receive Freq (ex. 146.805)
Press Menu 13 Menu
Enter CTCS Tone (ex. 85.4)
Press Menu (confirmed), then Exit

Press Menu, 27, Menu
Enter your Memory Channel (ex. 001)
Press Menu (receiving memory), then Exit
Enter transmit frequency (ex. 146.205)
Press Menu, 27, Menu, channel number (ex. 001), Menu (transmitting frequency), then exit
Press VFO (channel mode), A/B to bottom line, and arrow keys to new channel (ex. 1)

To get this fantastic, and inexpensive Ham Radio, see

Stay "tuned" for our review of the new RT Systems Programming software and cable for this radio!