Tag Archives: SainSmart

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.
IMPORTANT!
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):
K4
1 – Normally Open
2 – Common
3 – Normally Closed
K3
1 – Normally Open
2 – Common
3 – Normally Closed
K2
1 – Normally Open
2 – Common
3 – Normally Closed
K1
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

Temperature Control (ST7735 TFT Display + Arduino + PT1000 )

This project was set up by a fan of sainsmart named Dieter. In this project, he has used the SaintSmart 1,8″ TFT.

Let’s check how did he make it.

New Project – Temperature Control (ST7735 TFT Display + Arduino

+ PT1000 )

Hi @ll,
I have started a new poject…….
A friend ask me  to build him a temperature control unit for his home brew beer production. 🙂
This control unit should be able to hold the temperature of a fluid on a defined temperature level and control the heating of the fluid tank.
The heating element of the tank has a power of 1800W.
To control it, I will choose for this task a 20A relay.
My Setup:
  • SaintSmart 1,8″ TFT ( similar to the adafruit TFT) – useing the adafruit libraries (ST7735 and gfx)[click]
  • Arduino mini pro 328
  • PT1000 with a Hygrosens PT-MOD-10V-T2 0 – +160 °C converter unit
During implementation of the firmware I decided also to create a framework for this wonderfull TFT Display useing the Adafruit libs.
With this framework you will be able to setup very quick and easy complex graphic objects on your HMI ( TFT Display ) like Symbols,Textfields, Leds, Bargraphs and many more.
Each object has several defined functions to parametrization e.g foreColor, backColor,Text,max min Values, update an object, write a value to a object or toggle it synchronized by time. ( e.g the framework should have a similar usability like working in a modern IDE like Visual Studio .NET)
So a full working Bargraph is only some rows of code in your arduino sketch, because the working code is stored in a C++ class in my framework.
A little overview about this framework you can see in the enlosed video.
The next picture will give you an overview about my HMI screen (HMI HumanMachineInterface)
  • First row the Header Text is displayed – here the name of the application
  • 6 Symbol
    • R … RUN Mode => this symbol will toggle between green and black once a second(the time is variable to define )
    • P … Programm Mode => this symbol is static if you are in program mode
    • A … Automatic Mode  => this symbol is static if you are in automatic heating mode
    • m … manual Mode      => this symbol is static if you are in manual heating mode
    • H … Heating                => this symbol is static if the heating element is on
    • E … Error                   => this symbol is static and shows that warning or error  occur
  • IST Temp = actual temperature ( e.g here 51°C – its only sample  here)
  • ZIEL Temp = target temperature ( e.g here 20°C – its only a sample here )
  • dT = delta temperature – this will be the lower power up position of the heating element. If the actual temp. is bigger than the target temp. the heating element is switched of and turns on if actual temp. is lower than target temp minus dT
  • on last position a Bargraph of the actual temperature is displayed with the maximum and minimum values
I going to report more details about this and especialy the HMI Framework soon.
Enjoy it 🙂

Absolutely Epic 3D Printed Atlas—are you ready for your new project?

Odds are, you’ve played either Portal or Portal 2 and thoroughly enjoyed yourself in the process.  And we can’t blame you – the game is incredibly unique and addicting!  One Portal fan took his love of the game to the next level by modeling Atlas in 3D (from scratch), printing the model, and painting it by hand.  Plus, he even used a 3D printed 1500 Megawatt Aperture Science Heavy Duty Super-Colliding Super Button as a base for Atlas. Read more: http://bit.ly/14e6sDr

Want to know more about  3D printer, visit our blog: http://www.sainsmart.com/blog/

Atlas 3d-printed-atlas-portal-2-model

Top 40 Arduino Projects of the Web

arduino-projects

arduino-projects-61

arduino-projects-7

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.

 

 

Working with the SainSmart 5v Relay Board

Wrote by Steve Spence

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.
IMPORTANT!
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):
K4
1 – Normally Open
2 – Common
3 – Normally Closed
K3
1 – Normally Open
2 – Common
3 – Normally Closed
K2
1 – Normally Open
2 – Common
3 – Normally Closed
K1
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 relayPin1 = 8;                 // IN2 connected to digital pin 8
int relayPin1 = 9;                 // IN3 connected to digital pin 9
int relayPin1 = 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
}

Email thisEmail the author

Arduino Uno And Other Recommended Projects

Today, we will continue to recommend you some amazing projects for beginners, but before that, we would like to introduce the Arduino Uno a little. We have cited an article here which explains in details what arduino uno is and why it is important among all the Arduino formats. As the article says, “one of the most popular Arduino formats to date is the Arduino Uno”. All in all, the importance of arduino uno can be embodied in two points. First is its stability and popularity. Second is that it’s great for beginners. That’s why the starter kit we are selling includes a uno.

未命名

Now let’s read the article together and get to know more about arduino uno:

http://newtech.about.com/od/Devices/a/The-Arduino-Uno.htm

Recommended Projects

After introducing what arduino uno is and some of its features, the article also attach another page which further introduces some good projects for arduino beginners, which include a connected thermostat, home automation, digital combination lock, phone-controlled electronics, internet motion sensor and a hotbed of ideas.

http://newtech.about.com/od/Devices/a/Arduino-Projects-For-Beginners.htm

arduino_uno_test

In the following video, you can also have a look at how the guy has fun with his arduino starter kit.

Connecting an LCD to the Arduino

Connecting an LCD to the Arduino

LCD is very popular in the use of Arduino. Many people would like to connect a LCD to their Arduino. However, for a beginner, the connection may be a little complicated. Here is an article explaining the process.

SainSmart is also selling all kinds of LCDs for Arduino, among which the 1602 LCD keypad shield is the most popular. Besides, we also provide LCDs with a touch screen.

img_221001_1_14

Cool Projects for Arduino Beginners

Every beginners of Arduino tend to face such a problem: What projects should I start with? There’s no doubt that it’s better to start with something easy and not very expensive. However, at the same time, you surely want your first project to be cool and amazing. Then how about making a traffic light controller?

featured-arduino

This project is not very expensive and very interesting. In additon to the basic Arduino, you just need:

  • A red, yellow and green LED.
  • A breadboard.
  • 3 x suitable resistors for the LEDs you have ( probably 220 Ohms is fine).
  • Connecting wires.
  • A pushbutton switch.
  • A high value resistor (10k).

All these materials are not difficult to find. For the detailed information, you may click the following link:

http://www.makeuseof.com/tag/arduino-traffic-light-controller/

2

If you still think a traffic light controller is a bit hard for you, you may have a look the other ten projects for beginners we recommend you here:

http://startingelectronics.com/beginners/start-electronics-now/tut10-ten-arduino-projects-for-absolute-beginners/

 

You may do these projects with your starter kit.

 

When you have made your first arduino project and stepped into electronics world truly, then let’s expect we can do the top 40 arduino projects of the Web one day!

3

Before that, have a look and marvel at its glamour:

http://hacknmod.com/hack/top-40-arduino-projects-of-the-web/

 

4

5

6

Cool T-shirts—Memorizing the First Anniversary of SainSmart

SainSmart has been founded for one year. There have been ups and downs for the past one year, but thanks to your support, we are becoming increasingly stronger. In memory of this special moment, we make some cool T-shirt. Those who buy goods that amount to more than $150 will get it for free. Those who become our forum’s registered users and post discussion that has many replies, will also get a free T-shirt as an award.

_mg_8489_1

In the middle of the T-shirt, you can see our log—SainSmart Boy.

_mg_8522

 

The number of the T-shirts is limited, so catch the chance before they are all sold out.

 

For more information, please click the link below:

http://www.sainsmart.com/sainsmart-designs-limited-cool-boy-logo-black-t-shirt-for-male-m-size.html