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?

Saturday, September 27, 2014

Arduino Seismic / Vibration Sensor

Want to sense Earthquakes? Maybe equipment vibration? We have put together a quick and inexpensive project that will sense vibration. We use a Vibration sensor from Sparkfun, a SainSmart UNO, and a I2C LCD.

We have created a bar graph that moves back and forth based on vibration intensity, and a "Earthquake" message that displays when the level exceeds a threshold.

I2C library and LCD tutorial

See Code and Video below:


//sensitivity variables
int minimum = 200;
int maximum= 1023;
int maxdelay = 400;

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27 // change to your address found with I2C scanner
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

// Custom Character
byte seismic[8] = {

//defines the pin connections
int sensePin= 2;

void setup()

lcd.begin (16,2); // or (20,4)
// Switch on the backlight

lcd.createChar(0, seismic);
lcd.begin(16, 2);


void loop()
int reading= analogRead(sensePin);
reading = constrain(reading, minimum, maximum);
reading = map(reading, minimum, maximum, 0, 15);

for (int i=0; i <= reading; i++){


if (8<=reading){
lcd.setCursor(0, 1);



Saturday, September 20, 2014

Arduino Himalayan Salt Candle

Himalayan Salt Lights are really cool looking translucent salt "Rocks". With a lightbulb inside, not only are they a soothing warm light, but they are supposed to give off Negative Ions that leave you refreshed. I have added a Arduino and  SSR to give my light a flickering candle look, which makes it a very interesting conversation piece.

Video, code, and parts list below!


Arduino UNO
Solid State Relay (SSR)
Himalayan Salt Light


int lightPin = 9;   
int randNumber;

void setup()  { 
  pinMode(lightPin, OUTPUT);  

void loop()  { 
    randNumber = random(50, 254);
    analogWrite(lightPin, randNumber);   

Tuesday, September 16, 2014

De-Soldering Can Be A Pain!

I typically hate de-soldering. Removing old parts, or re-working a new design can be tricky, as you can over heat a part, damage the board, etc. Well, I've been using a inexpensive manual vacuum tool for months now, and it works GREAT! Cleans the holes out well, and the parts drop right out. The Soldapullt DS-017 is the perfect companion to my Sparkfun variable temperature soldering station.

Tuesday, September 2, 2014

The Under $5 Arduino

Next time you build a permanent project, don't waste a $15-$30 Arduino board. You can get the same functionality of the Arduino UNO for less than $5 at

No usb or power onboard (requires 5v). Program it with an existing UNO or a FTDI Cable.

Will post a programming tutorial as soon as these arrive!

Friday, August 22, 2014

Pan & Tilt, Arduino Style

I've been wanting to play with an Arduino controlled Pan & Tilt Mechanism for quite some time. Today I ordered a kit that will be a prototype for a solar array on a bigger scale. I'll be using this Pan & Tilt Mechanism. The kit includes brackets, two miniature servos and all the nuts and bolts. I'll mount a small solar panel from a garden light on here, and keep you posted as to my progress.

Update: Received kit 8/25/14
Check your hardware package before starting assembly! Mine was missing a small self tapping screw for holding the servo to the wheel. Jameco sending replacement hardware.
Update: Received replacement hardware 8/29/14. Jameco Rocks!

Thursday, August 21, 2014

Albert Piganti Updates Arduino Basic Connections

Albert Piganti, known as Pighixxx, is well known for his beautiful artwork depicting various microcontrollers like the Arduino and Raspberry Pi, and the various accessories and connections that can be made with them. He is updating his original designs, and you can find them at

Friday, August 15, 2014

4 Channel 16 Bit ADC Arduino / Raspberry Pi

The Arduino UNO has five 10 bit Analog to Digital Converter pins (0-1023), but I needed higher resolution. I'm working with a I2C connected 16 bit 4 channel ADC from Adafruit called the ADS1115. 16 bits of resolution allows me to measure signed integers with values ranging from negative 32768 through positive 32767 (-5v to +5v). Although I'm running this single ended (measuring 4 separate inputs in respect to ground), it can also run in a 2 channel differential mode. This would measure the voltage difference between AIN0 and AIN1, and between AIN2 and AIN3. I'm multiplying the value being reported by the ADC by .000188 (188uV / bit) to get the voltage being supplied to the input.

The Raspberry Pi has no ADC, and can only read digital inputs, so this would be a nice addition, as the Pi does have a I2C interface. I'll post an article on the code for doing this soon. Here is the code for the Arduino. Complete tutorial, connections, and library available at

#include <Wire.h>
#include <Adafruit_ADS1015.h>

Adafruit_ADS1115 ads1115;

void setup(void)

  Serial.println("Getting single-ended readings from AIN0..3");
  Serial.println("ADC Range: +/- 6.144V (1 bit =  188uV)");

void loop(void)
  int16_t adc0, adc1, adc2, adc3;
  float volt0, volt1, volt2, volt3;

  adc0 = ads1115.readADC_SingleEnded(0);
  adc1 = ads1115.readADC_SingleEnded(1);
  adc2 = ads1115.readADC_SingleEnded(2);
  adc3 = ads1115.readADC_SingleEnded(3);
  volt0 = adc0*0.000188;
  volt1 = adc1*0.000188;
  volt2 = adc2*0.000188;
  volt3 = adc3*0.000188;
  Serial.print("AIN0: ");
  Serial.print(" ");
  Serial.print(volt0, 4);
  Serial.println(" vdc");
  Serial.print("AIN1: ");
  Serial.print(" ");
  Serial.print(volt1, 4);
  Serial.println(" vdc");
  Serial.print("AIN2: ");
  Serial.print(" ");
  Serial.print(volt2, 4);
  Serial.println(" vdc");
  Serial.print("AIN3: ");
  Serial.print(" ");
  Serial.print(volt3, 4);
  Serial.println(" vdc");
  Serial.println(" ");