Thursday, December 18, 2014

Packt5Dollar $5 Dollar Tech Book / Video Sale

Merry Christmas! Take advantage of Packt5Dollar‬ this Holiday! Electronics and Programming books -

The $5 eBook Bonanza is here!

Treat yourself to the eBook or Video of your choice for just $5 and get as many as you like until January 6th 2015. To get you started, we've put together the Top 20 Titles of 2014 for you to pick up here. But don’t forget, you can get ANY eBook or Video for $5 in this offer.

Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and information services to IT professionals.

Working towards that vision, we have published over 2000 books and videos so far, providing IT professionals with the actionable knowledge they need to get the job done –whether that’s specific learning on an emerging technology or optimizing key skills in more established tools.

As part of our mission, we have also awarded over $1,000,000 through our Open Source Project Royalty scheme, helping numerous projects become household names along the way.

Wednesday, December 17, 2014

Remote Reprogramming your Arduino

Need to make changes to a Arduino that's remote? Monitor, Control, even reprogram remotely using your web browser on any platform from phone, tablet, or pc.

Connect the $30 CoPiino "HAT" to a Raspberry Pi, install the BlueberryC software, and you can remotely control and reprogram the onboard Arduino compatible. Full shield compatibility with existing Arduino shields.

Tuesday, December 9, 2014

SainSmart Support Forum Back Online!

The SainSmart support forum is back online! SainSmart is one of my favorite sources for Arduino's, Raspberry Pi's, and related sensors and modules. I've posted some of my favorite projects there, and will be posting more soon. Come and learn more about the products they sell, programming, electrical connections, and more. Post your favorite SainSmart based projects. Welcome to the SainSmart Community!

Tuesday, November 18, 2014

Emulating An Arduino Sketch in a Spreadsheet

Many times I'll mock up my Arduino formulas in a spreadsheet before I start building a sketch. One of the more complicated Arduino commands to emulate is the MAP command.

The Arduino code:

height = map(adc, 171, 512, 12, 0);

In Excel becomes:

= (adc-in_min)*(out_max-out_min) / (in_max-in_min) + out_min

The following emulates a voltage divider that converts a fluid level of a container to gallons. It uses a reverse map as decreasing resistance of the sensor means increasing depth.

Sunday, November 16, 2014

Installing & Programming the VV-898 2m / 70cm Ham Radio

Ricky and I installed my new Leixen VV-898 2m/70cm 10 watt dual band Ham Radio in my truck today. It's $135 delivered, from Ricky pulled out the ashtray and installed the radio in the exposed cavity. I then wired the power to the power leads from the old cigarette lighter (radio is about 10 watts, lighter can handle 150 watts), and we ran the antenna cable under the seats and out the back window (temporary, there's a rubber plug in the floor behind the seat).

UPDATE: I've programmed two of our "local" repeaters, one on the SCHeart system (Murrel's Inlet, SC), and one on the PALS system (Greelyville, SC). Both are about 35 miles from me (Andrews, SC) in opposite directions. I'm getting great signal reports, and both TX and RX is clean and clear.

Programming the radio to talk to our local repeater was a bit of a challenge (Software programming further down). Complete details were not in one place. I've collected the bits, and assembled them in an orderly and easy to follow collection.

In order to program the radio, you need to put it into Frequency mode (defaults to Channel mode). Press B on the Mic, and verify the channel + and - buttons actually change the frequency, and not the channel number.

Now enter the frequency of your repeater output using the numeric buttons on the Mic. I could not enter 146.805 (kept going to 146.800), so I knew the step was off.

Press M (which puts you in Menu mode), and CHA+ till you get to Menu 41. Press M again to enter Menu 41, and CHA+ until step says 5KHz. Press M again to back out to Menu.

Now enter the frequency of your repeater with the Mic keypad.

Press M to enter Menu mode, then:

Press CHA + or - to Menu 34, Press M to enter, and CHA- or + to pick your offset (600 KHz for us), then M again to exit.

Press CHA + or - to Menu 35, then M to enter. Set the offset type to -RPT (or whatever your repeater uses) with the CHA+ or -, then M to exit out.

Press CHA + or - to Menu 10, press M to enter, and CHA + or - to select CTC, then M to exit.

Press CHA + or - to Menu 11, press M to enter, and CHA + or - to select CTC Code (85.4 in our case), then M to exit.

Press CHA + or - to Menu 5, press M to enter, and CHA + or - to select Channel 1 (or whatever channel you want to save to), then M to exit.

Wait 3 or 4 seconds for the timeout to exit Menu, and press B to exit Frequency Mode. Now you should be able to use the CHA + or - to select saved channels.

Find out more -

If you have a Kenwood programming cable, a USB -> TTL adapter, or want to make one, you can download the CHIRP programming software, and build a cable adapter like the following:

Wednesday, November 12, 2014

The MQTT Connection

MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging “machine-to-machine” (M2M) or “Internet of Things” world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.

The MQTT protocol is based on the principle of publishing messages and subscribing to topics, or "pub/sub". Multiple clients connect to a broker and subscribe to topics that they are interested in. Clients also connect to the broker and publish messages to topics. Many clients may subscribe to the same topics and do with the information as they please. The broker and MQTT act as a simple, common interface for everything to connect to. This means that you if you have clients that dump subscribed messages to a database, to Twitter, Cosm or even a simple text file, then it becomes very simple to add new sensors or other data input to a database, Twitter or so on.

The Arduino makes a handy MQTT client, and Mosquitto (yes, with two T's) on the Raspberry Pi makes a handy MQTT broker (server).

An example Arduino project

What can you build?

Arduino Networking

As much fun as it is connecting sensors to an Arduino, and displaying data on a LCD, lighting LED's, or other local actions, the real power is when you connect to a network. Whether it's a local network and you are communicating between them or collecting data in a central database (Raspberry Pi), or connecting to the internet and contributing local weather data to a server, or broadcasting data with email or Twitter, even pulling down information like emails, tweets, or scraping other websites for data for local display, there's a lot of fun to be had.

One book that explains how this all works, and gives you easy to replicate (and understand) projects is "Arduino Networking" by my friend Marco Schwartz. This book delves into the abilities of network connectivity, explaining how and why it works, and leaves your mind swirling with new applications, and the ability to execute them. It's a must have on any maker's shelf!

Communicate with Marco at his Forum "Open Home Automation" on G+

Thursday, October 30, 2014

Making the Raspberry Pi Talk 5v

Coming from the Arduino world, most everything I do is 5v logic. It's been a switch for me now that I'm integrating my Raspberry Pi's into my Arduino solutions (they really are complementary). We have been following a great guy by the name of Jean-Damien, who has a simple solution to this problem:

When I received my Raspberry Pi the first thing I wanted to try was to use it to communicate with the electronic world.
Looking at the excellent official forum I’ve found posts explaining that the Debian image was already configured to redirect the linux system console to the broadcom chipset UART interface. Giving a try by connecting directly a scope to the GPIO pins confirmed it.
As you probably know, the broadcom chip is running at +3.3v so the GPIO pins cannot handle more than that. As “still classic” TTL are running at +5v we need to do some level shifting operation before interfacing devices to the GPIO pins. Note that if you intend to work only with 3.3v devices, this shifting isn’t required.

Tuesday, October 28, 2014

Printing with the Arduino
So you built this cool Arduino based test gear that does quality control tests on a piece of hardware. It's time to ship to the customer, and you need to send them a sheet of paper with the test results. How do we get the Arduino to print to a printer?

Years ago, serial printers were quite common. I remember installing a lot of Okidata Line Printers connected to Unix Servers using serial cables. Those printers use a type of serial called RS-232. The signals range from +10v to -10v, which allowed long distance cabling. But how would that work with the 5v signaling the Arduino can handle?

There's a chip called the MAX232. It's a RS-232 to TTL Serial converter. TTL serial is the type of serial the Arduino speaks. With a inexpensive converter board, you can create statements like Serial.println("This is printed text"); and This is printed text shows up on the printer.

All you need now is a serial printer. You can comb the catacombs of discarded computer equipment, or head over to ebay and see what they have!

Mini Thermal Receipt Printer Starter Pack

The Raspberry Pi Laptop, more than just a laptop!

More than just a cool laptop, it's a learning tool you build and expand yourself!
Pi-Top provides a platform to expand your knowledge in hardware creation. The kit takes you through each of its components and their functionality, so that you can use Pi-Top as a tool for your own projects in the future.
Pi-Top focuses on teaching people how to create real hardware. Online and integrated lesson plans teach you how to understand electronics, create Printed Circuit Boards, and 3D print objects.

Learn more at

For more delicious Raspberry Pi goodness, see

Sunday, October 26, 2014

A Calibrated Solid State Radiation Detector

I've been playing with radiation detectors. The common solution is a Geiger - Müller tube, but those solutions tend to be expensive, and contain high voltage connections. PIN Diodes can be used, and are very inexpensive, but are uncalibrated.

A nice in between is a calibrated (3.4 cpm/µSv/h) solid state sensor from Teviso, the RD2007. There are three such sensors in this family, but the RD2007 is a very affordable solution, applicable to civilians and citizen scientists alike.

It has three connections, 5v, Gnd, and data out. The output line ticks high when radioactivity is sensed. Connect this to an interrupt on the arduino, and you can easily display accurate radioactivity readings.

For more information on building Radiation Detectors, see



#define MAXCNT 10
#define CalFactor 3.4
volatile int counter = 0;
unsigned long oldTime = 0;
float rate = 0.0;
int speaker = 5;

void setup()
 pinMode(speaker, OUTPUT);
 int i = (int)(rate*10.0);
 attachInterrupt(0, count, RISING);
void loop() {
 unsigned long time;
 unsigned long dt;

 time = millis();
 if (counter >= MAXCNT) {
 dt = time-oldTime;
 oldTime = time;
 counter = 0;
 rate = (float)MAXCNT*60.0*1000.0/(float)dt/CalFactor;
 int i = (int)(rate*10.0);
void count()
 digitalWrite(speaker, HIGH);
 digitalWrite(speaker, LOW);

Friday, October 24, 2014

Does the Windows FTDI Update "Brick" your Arduino?

The story going around is Microsoft has destroyed FTDI USB to Serial Interface chips in the marketplace with the recent update. Many people are up in arms over this "clearly illegal act".

But is it illegal, and how much harm has it done? Microsoft obtains the FTDI Drivers from FTDI. The FTDI drivers provided by FTDI are certified to work with their chips. There are devices on the market that use counterfeit FTDI chips, that this update will not work with. In fact, the update turns the chip "off".

Is that illegal? Not that I can tell. Microsoft themselves disable Windows functionality if it determines it's not a genuine copy. Fortunately, there is a utility that you can run to turn the chip back on.

How does this Affect Arduino Users? If you are using recent Arduino boards, not at all, as they no longer use FTDI chips (and came with legitimate FTDI chips when they did use them). If you are using arduino clones, like Sainsmart and others, there may be a non-FTDI (even though it says FTDI) chip on board. The following video explains how to fix your "bricked" non-ftdi interface. No damage has been done, and you can get your equipment working again.

FTDI responds to the outrage:

We appreciate your feedback, comments and suggestions.

As you are probably aware, the semiconductor industry is increasingly blighted by the issue of counterfeit chips and all semiconductor vendors are taking measures to protect their IP and the investment they make in developing innovative new technology. FTDI will continue to follow an active approach to deterring the counterfeiting of our devices, in order to ensure that our customers receive genuine FTDI product. Though our intentions were honourable, we acknowledge that our recent driver update has caused concern amongst our genuine customer base.  I assure you, we value our customers highly and do not in any way wish to cause distress to them. 

The recently release driver release has now been removed from Windows Update so that on-the-fly updating cannot occur. The driver is in the process of being updated and will be released next week. This will still uphold our stance against devices that are not genuine, but do so in a non-invasive way that means that there is no risk of end user’s hardware being directly affected.    

As previously stated, we recommend to all our customers to guarantee genuine FTDI products please purchase either from FTDI directly or from one of our authorised distributors.

If you are concerned that you might have a non-genuine device, our support team would be happy to help out.

Yours Sincerely

Fred Dart - CEO

Monday, October 6, 2014

Fingerprint Scanning with the Arduino

A secure way to enable access to projects is through the use of fingerprint scanning. This tutorial uses the 5v TTL unit from Sparkfun. The scanner does not come with a cable, so make sure you also order the JST SH cable. The wires from the JST SH cable are too fine to plug into the Arduino directly, so we are using a solderless breadboard to make the connections with jumper wires.

Fingerprint Scanner -> Arduino
Pin 1 - TX    (black)             D4 - RX                    
Pin 2 - RX    (white)             D5 - TX
Pin 3 - Gnd   (white)            GND
Pin 4 - VCC  (white)            +5v

No resistor is necessary for 5v use, regardless of what the sample sketch's suggest.

The sketch uses SoftSerial, so the pins on the Arduino can be changed in the sketch.

You will need to download the examples and libraries, then upload the Enroll sketch to make the unit recognize your finger print. Follow the instructions in the serial monitor, then upload the IDfinger sketch. Now when you scan your finger, the serial monitor will show "Verified" (with the appropriate ID number) or "Finger not found" if it's not recognized. All you need to do is to enable a relay if a correct fingerprint is detected, and possibly write a entry line to a SD card with time and date stamp for a entry log.

Thursday, October 2, 2014

Protect Your Outdoor Arduino Sensors

Outdoor Arduino projects, especially temperature, humidity, and barometric pressure, need access to outdoor environmental conditions, but protection from sunlight and rain. This is done with a louvered box called a Stevenson Screen or Cotton Region Shelter.
"A Stevenson screen or instrument shelter is an enclosure to shield meteorological instruments against precipitation and direct heat radiation from outside sources, while still allowing air to circulate freely around them. It forms part of a standard weather station. The Stevenson screen holds instruments that may include thermometers (ordinary, maximum/minimum), a hygrometer, a psychrometer, a dew-cell, a barometer and a thermograph. Stevenson screens may also be known as a cotton region shelter, an instrument shelter, a thermometer shelter, a thermoscreen or a thermometer screen. Its purpose is to provide a standardised environment ..." -
This is perfect for our outdoor Weather Station
Temperature, Humidity, Barometric Pressure, Dew Point, Wind Chill, and Heat Index Project 

Here's a DIY project so you can build your own outdoor Arduino Sensor Shelter!

Wednesday, October 1, 2014

What's your favorite type of sensor?

Arduino's are great devices because they let us sense our environment around us. There are a great number of sensors available that can work with the arduino. Digital sensors allow us to sense whether something is on, or off, like a door switch. Analog sensors allow us to sense how much of something exists, like how much light, or pressure. Some sensors give us actual data streams, like a gps sensor, instead of simple on/off, or a varying voltage.

What are your favorite types of sensors?
What do you like to sense?
Give us feedback if we missed yours, or post links to the project you have personally made!

What is your favorite sensor?

 free polls

Poll doesn't work? See
What is your favorite sensor?