Tag Archives: arduino projects

Working with the SainSmart 5v Relay Board

Today we are working with our SainSmart 5v Relay Board. This is a simple and inexpensive 4 port SPDT relay board (there are boards with more or less relays)  that takes a digital signal (LOW) from the Arduino, through an optoisolator, which triggers a transistor, pulling in the relay. The relay contacts are rated for 10 amps at 120/240vac, and 10 amps at 30vdc or less.
The contact pins are not numbered, and are reversed if you go by what the schematic appears to be saying. Facing the screw terminals, with the board face up (solder side down), the screw terminals are as follows (from left to right):
1 – Normally Open
2 – Common
3 – Normally Closed
1 – Normally Open
2 – Common
3 – Normally Closed
1 – Normally Open
2 – Common
3 – Normally Closed
1 – Normally Open
2 – Common
3 – Normally Closed
When you send a logic low, that turns on the LED, and energizes the coil. However, a disconnected input will drop out the LED and the coil, as will a logic HIGH. We will send a logic HIGH in setup to ensure the relays are disabled on boot.

There is a 6 pin male header, so you will need a cable or female pins to slide over the header to connect it to your Arduino. Pin 1 connects to Arduino GND, Pins 2-5 to Digital output pins, and Pin 6 to Arduino 5v. A red LED for each relay lights when active (LOW).

int relayPin1 = 7;                 // IN1 connected to digital pin 7
int relayPin2 = 8;                 // IN2 connected to digital pin 8
int relayPin3 = 9;                 // IN3 connected to digital pin 9
int relayPin4 = 10;                // IN4 connected to digital pin 10

void setup()
pinMode(relayPin1, OUTPUT);      // sets the digital pin as output
pinMode(relayPin2, OUTPUT);      // sets the digital pin as output
pinMode(relayPin3, OUTPUT);      // sets the digital pin as output
pinMode(relayPin4, OUTPUT);      // sets the digital pin as output
digitalWrite(relayPin1, HIGH);        // Prevents relays from starting up engaged
digitalWrite(relayPin2, HIGH);        // Prevents relays from starting up engaged
digitalWrite(relayPin3, HIGH);        // Prevents relays from starting up engaged
digitalWrite(relayPin4, HIGH);        // Prevents relays from starting up engaged

void loop()
digitalWrite(relayPin1, LOW);   // energizes the relay and lights the LED
digitalWrite(relayPin2, LOW);   // energizes the relay and lights the LED
digitalWrite(relayPin3, LOW);   // energizes the relay and lights the LED
digitalWrite(relayPin4, LOW);   // energizes the relay and lights the LED
delay(1000);                  // waits for a second
digitalWrite(relayPin1, HIGH);    // de-energizes the relay and LED is off
digitalWrite(relayPin2, HIGH);    // de-energizes the relay and LED is off
digitalWrite(relayPin3, HIGH);    // de-energizes the relay and LED is off
digitalWrite(relayPin4, HIGH);    // de-energizes the relay and LED is off
delay(1000);                  // waits for a second

read more: http://arduinotronics.blogspot.com/2013/01/working-with-sainsmart-5v-relay-board.html

HUMAVIPS robot finds you in a party

What makes a good friend? All right. Ability to recognize a number of other people, from These are the social skills of a team of researchers has given operating system € 2.600.000 € of funding from the European Commission sought to create in three years for new Arduino robot.

high quality arduino robot kit,6wd robot chassis online for sale.

“Humanoids with hearing and visual abilities in populated” project to test new ways to help the autonomous mobile robots to mimic the social skills that we can “cocktail effect” or the ability of a person or a lone voice among the noise and called several other people. In the past there were many best arduino robots with any type of voice or facial recognition software, but it has a different level HUMAVIPS robot. The ability to focus on one person, this type of system a large group of data that could be something specific to focus on just the next step in the direction of anthropomorphic robots.
High quality 4wd arduino robot kit with Omni-directional wheel
Another way to understand this robot is able to communicate with friends and maybe people gestures. Project Director and Director of Research INRIA, Radu Horaud, he explained, as shown by neurophysiological experiments, exercise activates the auditory areas of the brain. Wholesale arduino robot with an emphasis on his words with gestures is one thing that is not given much importance in the past, and add an interesting dynamic interaction between humans and robots.
2wd arduino robot kit,3-wheel robot chassis
As Horaud reveals the goal of all of these studies is to determine ultimately HUMAVIPS robots in a room full of people to enter and be able to be the voice of one, select the person you want to talk to him, we are focused on themselves and go to the development of communication involved. To achieve this goal, it is much more complicated than that, but what I think people think it’s not so easy to get the other.

read more: http://www.mhobbies.com/blog/humavips-robot-finds-you-in-a-party-2/

The top 5 Arduino projects for advanced hackers

As the Arduino surges in popularity, people keep dreaming up crazier and more complex ways to use it. We’ve rounded up five of the most impressive Arduino projects on the web to show what’s possible with such a versatile and inexpensive platform. Be warned – these projects aren’t for beginners, but if you’re looking for a challenge and something to brag about, they could be just the ticket.

Click any item on the list to jump to the relevant section:

  1. Open Energy Monitor – Build a home energy monitoring system
  2. OpenMoCo – Make automated camera control rigs like the pros
  3. DIY Drones – Fly an unmanned aerial vehicle
  4. DIY Magic Mirror – Create a cinema-worthy prop
  5. Arduino beer brewing – Get yo’ geeky drink on

Open Energy Monitor

Open Energy Monitor is an open source energy monitor for use throughout your entire house.  Much more than just a quick circuit you slap on your utility meter, OpenEnergyMonitor consists of multiple components that work together to take readings on energy consumption by room or device, room temperature, and more, then feed all of it wirelessly back to a dashboard that can be displayed locally or through a web interface.

We like Open Energy Monitor a lot because it’s a great introduction to real-world systems. When you build a home monitoring or automation platform, you’re using your Arduino as part of a larger network rather than just a standalone device.  Learning how to get your microcontroller talking to the outside world is critical as you graduate to more complex projects, and OEM provides a great example of a polished, well designed architecture.

OpenMoCo – The Open-Source Photographic Motion-Control Community

As described in the expanded title, OpenMoCo is all about enabling motion in photography. Whether shooting video, time-lapse, or panoramic photography, accurate camera motion is often an important consideration. As many photographers know, professional equipment for automating camera movement and activation can be prohibitively expensive. OpenMoCo serves as a repository for community knowledge on how to design and create motion control tools on a budget.

Most OpenMoCo tools start with the OpenMoCo reference design, which is a modular platform that consists of an engine, interfaces, and elements. The Arduino-based engine covers the brains of the operations, interfaces include various UX controls and displays, and elements comprise motion tools such as stepper motors or actuators.

DIY Drones

Have you ever seen Predator drones in the news or watched the robot planes in Terminator movies and thought “Man, I wish I could build one of those”? Well, now you can. DIY Drones describes themselves as “the home for everything about amateur Unmanned Aerial Vehicles (UAVs)”. We don’t think too many people would argue, as the community has grown to over 20,000 members and is one of the top 100,000 websites in the world.

DIY Drones goal is to create hardware and software for any type of aerial robot, whether it be a helicopter, plane, quadcopter, or blimp. Their site is packed with various user groups, blogs, and forums, all with useful information on starting your own project. The DIY Drones store offers their premier product, the ArduPilot, a universal autopilot board equipped with an Arduino Mega 2560, 6-axis gyro/accelerometer, and GPS. Depending on what type of vehicle you’re creating, you can flash appropriate software such as ArduPlane or ArduCopter and be completely ready to fly. If you’re interested in drones or even radio controlled aircraft of any type, check out the site, because there’s a wealth of useful experience for any level of hobbyist.

DIY Magic Mirror

The DIY Magic Mirror is nifty contraption that will turn heads at your Halloween party, theme house, or even a bar. By combining an Arduino-compatible sensor kit with a laptop display and open-source software, you can create a mirror that interacts with visitors and spits out custom messages with text-to-speech. The site is more of a business venture than some of the other communities here, but the code is out there and the prices for the hardware are reasonable. You can get as involved as you want, by building the kit from scratch and even adding a breathalyzer so your mirror can publicly shame friends that overindulge at your holiday party.

Arduino beer brewing

Home brewing has gotten increasingly popular recently, as breweries get smaller, equipment gets cheaper, and Portland hipsters get more discerning in their IPA preferences. Luckily, Arduino can make this process easy, and a number of enterprising hackers have posted information on their automated beer brewing journeys.

The best resource we know of for this type of project is the HackaDay beer hacks category, which has plentiful examples of homemade mashtuns, kegerators, and automated dispensers, all enhanced with Arduino.

There are also several other noteworthy destinations for Arduino-powered beer projects. First up, Kegbot is an impressive and full featured beer tracking and pouring system. As described on their site:

Kegbot is a free, open-source project to turn your beer kegerator into a computerized drink tracker. Kegbot is an open source project, intended to beer enthusiasts, DIY hackers, homebrewers, and anyone with an interest in monitoring their beer.

Next, homebrewing.com has an article on home brewing automation with Arduino, which links to several other projects such as the Halfluck Automated Brewing System (HABS) grain brewing machine.

Wrap up

There’s enough here to keep you tinkering for a while, but we know we’ve only scratched the surface of great high-level Arduino projects. Do you have any suggestions that we should add to this list? Let us know in the comments. In the meantime, happy hacking…

read more:http://www.engblaze.com/top-arduino-projects-for-advanced-hackers/

Amazing!! DIY Furniture from Recycled Circuit Boards

They may appear to be a monstrous mess from a distance, but look closely and you’ll see the extreme detail in this project.  The Binary furniture collection is as new age you can get; or as geeky.   All three were made from pieces of salvaged electronics: everything from ethernet cables and PCBs. For instance, the inner skeleton of the Binary Table (above) is made from computer case metal and the surface is motherboards, LCD screens, and hard drives.

  • The Binary Chairs have cushion cover weaved from wire (see below), typically stripped Ethernet cables, in a slightly random but colorful mosaic configuration. The hard drive disks can be spun, the telephone keys and other buttons can be pressed, and the antennae raised and adjusted.



Read more:http://hacknmod.com/hack/diy-furnature-from-recycled-circuit-boards/

Incredible Light Painting with an Arduino


Long exposure shots can create some pretty interesting effects.  Light painting takes this idea and morphs it into innovative examples of ‘illuminated’ art. If you experiment with different light sources and treat them as ‘brushes’, the results can be awesome.  Check out this artist’s Flickr photostream to check out how the images above were created

read more: http://bit.ly/j2aMw7

LED Cube How it works + CODE


Arduino syncs lights to music!

Reblogged from: http://paralluminati.blogspot.com/2013/04/arduino-syncs-lights-to-music.html

So I’ve been messing around with arduino for about a year and a half or so now and still don;t have much hardware to show for it but I have learned enough to last me.

Currently I’ve gotten the arduino working with stepper motors, simple ethernet web servers, bluetooth communications, and use with the labview drivers.  This post is for a project to entertain party guests with lights synced to music.

The Music

You can get the signal from the music being played by either splitting the signal going to the speakers by purchasing an audio splitter cable or you can use a microphone.  While the latter doesn’t offer as much in ease of employment it is readily available in breakout module form from various micro-electronics shops.

I decided to go with the microphone approach, above you see the analog mic (right) and the audio analyzer (left)both from DF Robot.  The mic sensor means I can utilize any audible source of sound for my lights or other uses.  The analyzer takes in the music signal and produces data regarding the intensities at different frequencies in the signal, thus allowing us to hone out things in the music to use to activate the relays for the lights like the bass, mid, and treble of a song or just make the most ridiculous sounds we can to see where our voices register in the frequencies.  The analyzer also comes with a arduino library to make things extra easy for us which can be found at DF Robot’s wiki site for the analyzer…you will need these libraries installed on your computer to be able to use my code example provided below.

The Arduino

The next step is reading the info from the analyzer and doing something with it.  This is where my code and their library come in.  I uploaded my code to media file HERE.  After uploading the code to the arduino we need a way for the pins to de/activate the lights so we use some relays.  Since mechanical relays have a finite life and create a bit of sound and typically require more than 5v to trigger, I went with a solid state relay.  To keep things compact I ordered a pre-made 4 channel 5v SSR board from SainSmart which is perfect for the arduino.  The arduino code defines which digital pins to hook the relay inputs to as well as which to hook the analyzer inputs to if you missed those in the analyzer wiki page.

At this point it is assumed you have the microphone hooked into the analyzer which is sending its data to the arduino which is telling the relay board which relays to activate.  Now all that is left is hooking up the lights to the relay board.  USA mains outlets have a Live and a Neutral and a Gnd, most light strands are only two wires though…dafuq??  No worries this is a common practice since when working with ac power we can use the N as a “ground” to complete the circuit thus eliminating the need for an individual ground wire, this is typically only used for low energy circuits such as led strips since they don’t require a heavy duty ground.  To hook the light strands up to the relays simply find the L in the power cable and cut it leaving the N intact. Then plug the ends of the L wire into the screw terminals on the relay board and tighten them down.  Plug the light cables into a wall outlet or power strip and you’re ready to jam.  Below is a video of a 3 light (Bass\Mid\Treble) set up I fashioned my apartment with before a party.  Definitely makes for an interesting beer pong game.



Arduino Phone

What you need:

1.Arduino Uno

2.TFT Touch Shield

3.GPRS Shield


5.Custom ArduinoPhone Charge Circuit (or Lipo Rider)

6.Li-po battery

7.A shell (with 3D printer)

All components at here.


More details: http://www.instructables.com/id/ArduinoPhone/

SainSmart 1.8 LCD / DHT-22 Temp / Humidity

I now have a DHT-22 Temperature and humidity module matched up with the SainSmart 1.8 TFT LCD. The tricky part of this project was converting floats to strings for the display. If you don’t need decimal point precision, you may not need this function, but it’s in there.

The DHT-22 connections and the SainSmart LCD connections are in the code.

Arduino TFT text example

This example demonstrates how to draw text on the
TFT with an Arduino. The Arduino reads the value
of an analog sensor attached to pin A0, and writes
the value to the LCD screen, updating every
quarter second.

This example code is in the public domain

Created 15 April 2013 by Scott Fitzgerald

Heavily modified to work with the DHT-22 code
by Steve Spence of http://arduinotronics.blogspot.com



#include “TFT.h” // Arduino LCD library
#include “SPI.h” // Arduino SPI Library

// pin definition for the Uno
// SCL -> 13
// SDA -> 11
#define cs   10
#define dc   9
#define rst  8

// create an instance of the library
TFT TFTscreen = TFT(cs, dc, rst);

// char array to print to the screen
char tempPrintout[6];
char humPrintout[6];

// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
// Fahrenheit conversion added by Steve Spence, http://arduinotronics.blogspot.com

#include “DHT.h” //get the DHT library from http://learn.adafruit.com/dht

#define DHTPIN 2     // what pin we’re connected to

// Uncomment whatever type you’re using!
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302)
//#define DHTTYPE DHT21   // DHT 21 (AM2301)

// Connect pin + (middle) of the sensor to +5V
// Connect pin S  (on the right) of the sensor to whatever your DHTPIN is (2)
// Connect pin – (on the left) of the sensor to GROUND
// Connect 10k resistor between S and +

int cycleTime = 2000;


float h;
float t;

void setup() {

// Put this line at the beginning of every sketch that uses the GLCD:

// clear the screen with a black background
TFTscreen.background(0, 0, 0);

// write the static text to the screen
// set the font color to white
// set the font size
// write the text to the top left corner of the screen
TFTscreen.text(“Temp (F)”,0,0);
// write the text to the top left corner of the screen
TFTscreen.text(“Humidity (%)”,0,60);
// ste the font size very large for the loop



void loop() {

// Read the value of the temp/humidity sensor on D2

// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds ‘old’ (its a very slow sensor)
h = dht.readHumidity();
t = dht.readTemperature();
t = (t*1.8)+32; //C to F conversion

String tempVal = doubleToString(t, 0); // decimal places of precision
String humVal = doubleToString(h, 0); // decimal places of precision
// String sensorVal = String(1.234);

// convert the reading to a char array
tempVal.toCharArray(tempPrintout, 6);
humVal.toCharArray(humPrintout, 6);

// set the font color
// print the sensor value
TFTscreen.text(tempPrintout, 0, 25);
TFTscreen.text(humPrintout, 0, 85);
// wait for a moment
// erase the text you just wrote
TFTscreen.text(tempPrintout, 0, 25);
TFTscreen.text(humPrintout, 0, 85);

//Rounds down (via intermediary integer conversion truncation)
String doubleToString(double input,int decimalPlaces){
String string = String((int)(input*pow(10,decimalPlaces)));
if(abs(input)<1 p=””>if(input>0)
string = “0”+string;
else if(input<0 p=””>string = string.substring(0,1)+”0″+string.substring(1);
return string.substring(0,string.length()-decimalPlaces)+”.”+string.substring(string.length()-decimalPlaces);
else {
return String((int)input);

Robotic Remote Control Car Using Touch Screen Remote

Robotic car control using STM32F4 discovery broad(ARM Cortex M4)and SainSmart 3.2″ TFT LCD. On broad Accelerometer is also used to control the car.