Showing posts with label transistors. Show all posts
Showing posts with label transistors. Show all posts

Monday, April 25, 2016

ProtoScrewShield Kit Retail

Proto Screw Shield, Arduino in a bag in a frustratingly words that conjure up images of a prototype of drilling (I had to look it up), (who is not there?). That is not quite what we're going for, but you're imagining a versatile prototyping shield, that just about any electronic component, you're definitely on the right track with a CAN interface. Proto Screw Shield is always useful with screw terminal combines our proven Arduino ProtoShield.



In this guide, we hope to put together a fully-functional, Proto Screw Shield'll try to get. Assembly section, just a little something to push you in the direction of your next project will be followed by instructions to use.

ProtoScrewShield Kit Retail
ProtoScrewShield Kit Retail
Proto Screw Shield assembling
You've probably noticed that the product looks nothing like the picture you've got pretty packaging. Before prototyping, screwing, and ... err ... talisman can begin, you need to assemble the Proto Screw Shield. Assembly is pretty straightforward, but it's easy to be through-hole soldering. If this is your first time picking up a soldering iron, I first would like to encourage you to attack one of our excellent tutorial on soldering. We are looking for someone to screw the shield is more like a piece of modern art, an enjoyable Arduino shield (yeah, that's only for the purpose of punishment is linked to The Simpsons clip) than do not want to end.

ProtoScrewShield Kit Retail
ProtoScrewShield Kit Retail
At least, a couple of tools required for assembly of opposable, is really a basic soldering iron, solder a bit, and some are cutting. In addition to the equipment, and other items to help you keep everything nice and stable, needle nose pliers, and possibly a third hand, or can be included in the vise.
Before starting assembly, empty out your bag and make sure you've got all the parts should be:
  • PCB screw 1x Shield
  • 1x 5mm yellow LED
  • 1x 330Ω resistor
  • 2x 6-pin Stackable Headers
  • 2x 8-pin Stackable Headers
  • Momentary push button 2x
  • 6x 2-pin 3.5mm screw terminals
  • 8x 3-pin 3.5mm screw terminals
If any part is missing? (Bad SparkFun kitters!) Drop an email to our customer service team. We'll leave them to you as soon as possible.

Now, dig and find yourself familiar with the PCB screw Shield. If you're like me, you probably have to flip it back over and a couple of dozen times to figure out which side is the top. To avoid assembling the shield upside-down, remember that all parts of the outline with the top side of the PCB. It looks like this:

ProtoScrewShield Kit Retail
ProtoScrewShield Kit Retail
At the top of the element that you need to insert the PCB, and soldering leads downwards.
ProtoScrewShield Kit Retail
MSPAINT skills beyond compare...
If it was not obvious enough already, where each component of the plan will ultimately Proto Screw Shield itself as a good way to be exhibiting. I work from the lowest profile element, meaning starting with 330Ω resistor, buttons, LED (polarity must be careful!), And finally followed by paretabe header'd say. This method ensures that the material is generally flush with the PCB as possible, as are seated. You look pretty enough to take home to mother Proto Screw Shield, do not want?
A special note on the header, two in fact. Board labels are not nearly as clear as they should; You can insert just the header, where they go on the diagram to ensure that yesterday. Some places look like they can be inserted in the header, and if they do not go into these remote locations, will not be compatible with your shield Arduino-. Secondly, when you welded headers, as straight as possible to take care of them. I am the first of each solder pin, and then plug it into my Arduino all six or eight, the header pins are soldered to make sure everything lines up before, like.

Now, all that remains of the screw terminals. If you have not noticed how much the screw terminal rule, I invite you to take a closer look. Have you noticed how they slide together to form mega-screw-terminal? 2, 4, 6, and 8 varieties (of the three) of the formation of mega-screw-terminal combination of 2- and 3-pin screw terminal use. Necessary in order to complete all the mega-screw-terminal screw terminal there is enough, and should be filling your Proto Screw Shield. Screw terminals to ensure that the slide Take care of each other equally.

Mega-in screw-terminal complete with all of them in their respective PCB footprints in the insert. Verify that all of the input screw terminal is facing toward the outside of the PCB. Suppose you flip the board in each of the screw terminals and solder them into place as well. You may need an extra bit of solder to the pins. Proto Screw Shield looks something like the picture below you, then congratulations! If it is not, well, maybe you should invest in some solder wick; This is a bad time to learn how to solder!

ProtoScrewShield Kit Retail
ProtoScrewShield Kit Retail
How to use Proto Screw Shield
Proto Screw Shield's prototyping area looks simple enough to use, but it may be dangerous for the health of your circuit if you plan to take part in it without soldering. Screw Shield is a lot of behind the scenes much more complicated than it looks and prototyping section. It is 5V and GND rails, grids and other pins trio, and full Arduino header extensions.

ProtoScrewShield Kit Retail
ProtoScrewShield Kit Retail
I bet you were not expecting that much going on behind the scenes. The power and ground rails in a prototyping board can be most useful material. What is great about the two pairs of rails screw Shield power, and they're separated by four rows is unrelated prototyping holes. What is power crazy, surrounded by four rows of holes unrelated prototyping great about? Well, that's a 32-hole chips come in packages with pin DIP or less of the 0.3 "wide, dip chips means that their neighbors will sit perfectly within the power rails, and you can stick it to wire up an ATmega328 is a second Arduino. Op -AMPS, 555 timer, shift-register, motor driver, compatible chip list just goes on and on. this is a major bonus, because of the wire cloth sucks, and power lines kept as short as possible awesome!
Also adjacent to the crazy threesome is what I call a floating pink pins, pink away, they're at least in my diagram. These can be any number of use, but no one asked me to stick with servos are adjusting their charismatic. Server standard pinout for a negative energy, positive energy, signals, which left power rail and pink to match up well with the trio. A power rail and a triad unit in the male header pin solder a trio, a triad of a second pin solder pin PWM Arduino, and you've got an output for a server quickly.

Proto pins might look a bit tangled unusable, unless you have a hobby knife. Cutting a tradition that traces of PCB and PCB Design engineers who all had a moment of weakness and you've thrown a simulated wire trace back through the generations. A gridlocked prototyping area can really cut down on the cable, but you probably should not be to make sure that nothing is shorted to make trace the attack back to the board with a blade will be required.

The Proto Screw Shield, let's not forget the namesake share screw terminals. Many electronic components do not care that they're not compatible Arduino- (how inconsiderate). For example, in the electronics hobbyist has a special place in their heart for stranded wire, but the damn stuff all over the place just does not want to be inserted into the header of a woman without fraying. You do not want to deal with the durability of welded wire, screw terminal that is still a great alternative to a hard, physical connectivity is to leave you with. Screw terminal, motor, sensor, or LED can be a great way to interface with just a screwdriver, do not forget!

ProtoScrewShield Kit Retail
ProtoScrewShield Kit Retail
Making use Proto Screw Shield
Proto Screw Shield is fully assembled, and the intricacies of using it with clear, responsible for some of you it is amazing. Make us proud! You tell us how you want to use your shield screw, drop us a line!
In this guide, we have a suggestion for how you can improve? No step aside? Unclear instructions? Please let us know. You can leave a comment below or email us spark@sparkfun.com. If the manual assembly of the most horrible experience you've ever let us know and we'll stop trying to improve.



Friday, April 22, 2016

Boxing Timer

Boxing and Making Noise:
If you want a boxing match, you know that two people 'box' round each other. For training, boxers, boxing, so their bodies during a bout 1 minute to 3 minutes, and the rest can be used as a war on the base at the same time, use a timer.



Our native format in front of me, the timer re-creation of the Academy. At the gym, and a common boxing timer is used to keep the bulbs burn out. The LED lasting at least 30 times longer than regular incandescent bulbs is unacceptable in this day in age. This is common in timer also expensive ($ 99) is!

Boxing Timer
Boxing Timer
Some days it is painful an engineer. Looking at this hunk of metal, I know that there is a microcontroller inside, a loud speaker, a couple of switches, some lights, and a whole lot of empty space. ..
This is a pretty straight forward project! Forgive me, but I tend to use a lot of things around the office that are available. And since this project was meant to be an example, I will use all the elements of the hole.

I hope you can use in your own projects in this part of the project:
  • Boxing Timer Eagle file
  • Boxing Timer Firmware
  • STK500 / Arduino serial bootloader
  • Boxing Timer Schematic
Boxing Timer
Boxing Timer
As you might guess, but I, ATmega168 (for the last year or so, my favorite) is based on the Arduino LilyPad 8MHz internal oscillator, along with serial boot-loader. what is this? Serial Arduino bootloader loader is based on the STK500. This is me, but instead of using a hardware programmer will be able to ATmega168 reprogram over a serial link. This code development cycle is a little easier, and users Arduino board can be used with their environment.

So there Micro, 5V supply, the painfully bright LED, and there are three rocker switches. A rocker switch (on / off) is used for other switch round length (2 or 3 minutes) and the rest of the time (1 minute or 30 seconds) is used to control.

Programming the timer using the FTDI Basic breakout.
Programming the timer using the FTDI Basic breakout.
I tried to increase the volume of the speaker এলএম 386 1W audio amplifier used. It's loud and annoying, but enough for a gym environment is not very loud. My supply voltage is only 9V (12-15V would be better), and I believe the speaker is a bit small for my application.

LED requires a maximum of 80 mA of power, so I used a basic N PN 2N3904 transistor circuits. I 20mA LED normal use, I would have driven directly from AVR - but this LED is bright.

Boxing at the gym, these are hardly the timer is turned off, so I chose to use LED instead of incandescent bulbs. Green, yellow, and red indicates where the round timer. Large 10mm LED, 80mA LED is. I covered LED development, they burned my peripheral vision so badly! For actual use, I try to disperse some of the LED light cracked the top of a Dremel tool. It helped, but LED is still very strong.

Boxers in different bags and 3 minutes, 1 minute off, their bodies get used to exerting power for a certain length of training for the equipment. When the yellow LED goes off
3 minutes 30 seconds of round (warning at the end of the round) left. The three lights, a loud tone, along with boxer at what point they have to learn in a given round.

The Box
The Box
Enclosures difficult to change! Luckily, there are tutorials we refer to Casey. Using a Dremel tools made all the difference. SparkFun pretty soft plastic enclosures make it easier to drill / cut / submitted to the beat. It's obvious that I need more practice, but in the box. I have three spots cut out switch, and the buzzer sounds coming from the increase in the number of holes drilled.

And there you have it - a boxing timer. This is an excellent example of a microcontroller can be used for the project. In this case, the microcontroller reads a couple of switches, which makes noise, different LED control, and his life is just "delay_ms" counting the cost of the majority.

I hope you can use in your own projects in this part of the project:
  • Boxing Timer Eagle file
  • Boxing Timer Firmware
  • STK500 / Arduino serial bootloader
  • Boxing Timer Schematic
Cheers!
Nathan Seidle




Sewing Lights With non-LilyPad

Regular'll show you how to use LED bulbs, I ate a quick fabric flower work together, but there is no end to the ways you can use this technique. Here I thought it was sewing supplies:



Sewing Lights With non-LilyPad
Sewing Lights With non-LilyPad
Pictured above: A pre-made fabric flowers (or use the one you want and do whatever you can), 4-ply conductive thread, needle, and two fabric disks. A pretty flower in the field, through the thick vision, support the weight of the battery holder. You see a thick fabric that is peeking through the wonderful, feel free to use only one disc!
You can also, of course, a few small pieces of electronics to be.
Sewing Lights With non-LilyPad
Sewing Lights With non-LilyPad
Pictured above: 20 mm coin-cell battery, super bright yellow LED, 330 ohm resistor, and LilyPad coin cell battery holder (this can be any color or brightness of your choice).

First, you'll want to place objects between the legs of flowers or LED. Besides, this is a good time if you are one of the steps to make sure you will remember, which is positive and not negative. If you look at the bottom of the LED, you can see that one side of the flat - the negative side of the foot. Feel free to mark it for later reference. Are you a flower, or you've been using a similar piece, the positive side of the foot and the other negative leg you want. The fabric will tear each other's feet from touching and shorting circuit. 
Sewing Lights With non-LilyPad
Sewing Lights With non-LilyPad
Next, go against the back of the more decorative fabric flower- disk to disk, sometimes as part of the space will be visible. , LED legs to the tips of the disk, press the center of the fabric, then push them through. Up to push it back down against the fabric flowers.

Coming Soon Next Part.............



Retail Servo Landing Page

Short Description:
Congratulations on your purchase of a SparkFun servers! Servos output shaft of the motor to spin properly to control, robotics and other permits for the project, opening up all kinds of possibilities.



Retail Servo Landing Page
Retail Servo Landing Page
Requirements:
Servo motor and motor driver board with a multitude of microcontrollers can be controlled. However, following this guide you will find helpful:
  • arduino
  • Female headers, jumper cables or other connection methods
  • Naked wire
  • (Optional) breadboard
  • (Optional) soldering iron
  • (Optional) sour
What is a server:
Continuously spin the motor when the maximum power will be applied to them. That is okay for many purposes, but sometimes you want to control the exact location, such as "move and close to 180 degrees." Doing this is a feedback loop, the motor shaft in response to what it was doing, and makes decisions based on the information that is required, which consists of a sensor on the measure. For example, if the motor is now pointing to 10 o'clock, 12 o'clock and from the point of you like it, then the decision-making circuitry compared to 10 o'clock and 12 o'clock, and the motor will decide to move clockwise until it is pointing to 12 o'clock.

If you time (and money) spent a lot of a motor vehicle may be added to these parts and smarts, but the good news is it's built into a server that has all these things! Inside a small package is a DC motor, slow torque ( "Energy"), a trade speed for the gear train, the output shaft position and an "error amplifier" to the desired position in order to measure the true comparison is a potentiometer ( "Error") and the motor that moves away error. Cool, huh?

How to use it:
There are two wires normal motor; You just go to the voltage applied to them and they were off. DC motor to reverse the polarity of the two wires, and it is run in reverse. A server is a little different. It's three cables, one for power, one for ground and one for the command said. Command? Let's talk first about the power and ground.

Hooking it up:
Servos hobby radio control (RC) aircraft use, which is usually 4.8 is designed for battery use. They are supplied as a fine of up to 6V will work, we usually run 5V, many of which use the electronic system. The red wire is 5V, and the brown wire to the ground. Unlike DC motors, you get the motor to run in reverse polarity should be reversed. It is always positive to 5V line, and it will run in reverse when required internal control circuitry.

In this guide, for example, if you hook up a server to an Arduino. There are many ways to accomplish this. You only woman on the server header and a jumper wire pairs in the header on Arduino can. You can also cut and solder the edges of the controller servers. Another temporary system solder together the two pieces of 3x1 male headers, so you can connect the server to a breadboard.
Retail Servo Landing Page
Retail Servo Landing Page
How do I want to control it?
Servos pulse width modulation (PWM) based on a simple electrical understand the language. This means that you control it over the wire to 5V pulse, and the pulse width will tell the server to a specific location. This sounds complicated, do not worry; The software and hardware available to do the hard work for you.

servos controlled by the width of the pulse is sent from the server you. You servers in its lowest position (0 degree) you want to move, then you have a pulse width of 1ms (MS milliseconds, or one 1000th of a second) to'd like to send. His highest position in the server (180 degrees) to move if you want to send it to a pulse width of 2ms. 2.0mx 1.0mx and in some locations will correspond to the minimum and maximum. Servos would be updated regularly, so you usually command every 20ms or so (50 times per second) to send any change in the position of servos, even if.
Retail Servo Landing Page
As a result of the input pulse and bass positions
These standards are, but you usually find in a server or even a narrow (or greater), you can get started by sending pulses. Note that the server can not do a full 360-degree spin! It allows you to go further than the rotation, the shaft internal stops (perhaps with a grinding noise) will be hit, and the server will draw quite a bit of power. (The server's life shortens, so do not do it intentionally). The server is a type of "continuous rotation" that can spin 360 degrees are called, but you lose positional control - continuous rotation servos, the pulse width of the rotation speed (forwards, backwards, and stopped 1.5ms) controls.

Show my library!
As is common with Arduino, has been working hard for someone else. Arduino IDE is a built-in library, called appropriately enough the server that makes it quite easy to control the servos. Most locations to pick up your server from the lowest to the Arduino website to follow this example. If you need help to upload sketches to the Arduino software is installed, or if their website has all the information you need.

Strategy
  • Keep in mind that, servos, while under heavy load can draw quite a bit of power. For full strength, you make sure that your power supply power to one of the World Cup (per server) will be able to handle up to.
  • In some cases, the processor in the same power supply off if you are running your servos, servos the current (or not so much noise on the line) it can draw your processor can be reset or misbehave. The easiest solution to this problem is to run your processor and a separate power supply servos (but be sure to have a common ground between them) is. More complex solutions involving power supply noise filtering technique; Google for advice.
  • Servos have the highest speed. Your server is acting erratically, then you get to switch very quickly from one location to another (after a delay to add to your command if you think this could be a problem) might try.
  • Server Library PWM pins (analogWrite for) the same as using some of the resources, and the pins will be disabled. If you want to use PWM library server at the same time be aware of this. For more information, see the documentation library.
  • Due to manufacturing variation, servos different from each other may have slightly different ranges. It will affect your project, remember that the server is connected to the library () command to fine-tune each server, you can position the minimum and maximum.
  • You need to drive a lot of servos and are running out of pins, such serial server controller (ROB -08897) might look in as external hardware controllers. The serial commands take as input, and the board can drive up to 8 servos.
Rejoice!
Enjoy your new server! If you have any questions, problems, or if you want to show off your projects, do not hesitate to contact us at Tech support@sparkfun.com.

Thursday, April 21, 2016

Piezo Drum Kit Quickstart Guide

Short Description
Piezo sensors in a five-piece drum kit drum kit lets in turn virtually anything. Play sounds when people interact with them in the past, I hang up my desk and couch Piezo sensors are used. This document is a simple introduction to working with Piezo elements. Once you Piezo sensors are able to detect the voltage levels, you can turn some sounds and start and stop your car, you can use them to start, etc. The possibilities are endless. This is because we used the drum sounds to generate an Arduino shield and MP3 player, we call this drum kit, but it is no hardware that can be used with percussive velocity input.


Necessity
Kit along with everything inside, we will use this guide to this item:
  • Soldering iron
  • Solder
  • arduino
How it Works
First, let's talk about the main components of the kit. The first element Piezo element itself. Piezo element has two leads, and when the pad is pressed, a small voltage across the material generates its leads. Piezo elements come in lots of shapes and sizes, but your finger press kit for detecting or more hits are well-tailored.

Other major components of the kit bag 1M ohm resistor. Piezo elements, such as the pull-down resistors are used in parallel with the voltage produced by the material to ensure a good read. This does not make sense now, do not worry, it will be explained later.

In this guide we will use the example code for an Arduino UNO, but this kit is an analog fashion a small voltage (5v less) can not be detected with any device that can be used.

How to use it
Out of the box, our first step is to wire a resistor element Piezo. We can only prevent jams and Piezo components Duemilanove female leads in the header. However, it could not constitute a proper connection, so we'll solder them together. If you've never welded before you, you will want to check out our welded 101 tutorials.

Connect the leads of the leads of the resistor element in a parallel fashion Piezo solder
Piezo Drum Kit Quickstart Guide
Piezo Drum Kit Quickstart Guide

To connect to the Arduino, a lead-in to your assembly line analog 0 (no analog inputs will work, but in this example we'll use A0) in the assembly line of a lead into the ground. When you're finished, it should look like.
Piezo Drum Kit Quickstart Guide
Piezo Drum Kit Quickstart Guide
Piezo elements are excited until the analog line will be zero volts in this circuit. When that happens, we must read the analog zero voltage line. In parallel with the resistor element Piezo element of a voltage of zero volts to the analog line is generated. When this happens, the voltage "override" by the weak pull-down resistor, voltage analog lines to be read, which is produced as a result. So if you want to know exactly why this works, be sure to read this on the use of pull-down resistors, a very high level of details.

Now we can start coding. The code for this step, we need two things: the analog line voltage reads, and then the voltage terminal prints. The following code is just that:

#define DRUM1 0    // Our analog pin

byte val = 0;      // Initializing the variable for the voltage value

void setup()
{
  Serial.begin(9600);  // Initializing the serial port at 9600 baud
}

void loop()
{
  val = analogRead(DRUM1);  // Read the voltage
  Serial.println(val, DEC); // Print the voltage to the terminal
}

Copy and paste this code onto your Arduino loaded. Once the code is uploaded, you open the Arduino IDE serial monitor. Make sure that it is set to 9600 baud. Once reset the board, Arduino know for sure voltage value (in this case is just an endless string of zero, 1M ohm pull-down due) to start printing.
Piezo Drum Kit Quickstart Guide
Piezo Drum Kit Quickstart Guide
Go ahead and hit your finger with a Piezo element. Change the value of the printed Notice. Hit it short, and the value of registered notes. Then hit a bit harder material, and that the target value registered more than ever. For this reason, I am more excited Piezo components, high voltage is generated it. Something like a MIDI keyboard does apply, then the "velocity" is called. Whether or not you Piezo material is very hard, too soft, or anywhere in between have been hit based on what may be caused by many different things. For instance, a loud drum sound when you hit the trigger element can be difficult, and when the material is slowly hitting a cool drum sound. You simply make the difference between hard and soft hits a threshold requirement. 200 of the code below a threshold set to distinguish between two types of hits.

#define DRUM1 0
#define THRESHOLD 200

byte val = 0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  val = analogRead(DRUM1);

  if(val > THRESHOLD) { Serial.println("HARD"); }
  else if(val > 0) { Serial.println("SOFT"); }
 
}

With this code, if the value is greater than the threshold value is detected by the analog pins, the print will be "difficult," otherwise, it will print "soft."

Conclusion
Piezo sensors that are on the principle of detecting voltages. From here, the application is up to you. Just solder resistors together with the rest of the Piezo elements, and other analog pins on the Arduino to use them in the exact same way. You can put anything you want to use to detect vibrations. Sound or light to begin using them; The possibilities are endless!

Resources
  • Datasheet (7BB-20-6L0)
  • arduino tutorials
  • Piezo elements add an additional increase in the number of "drums."
  • Create the ultimate music experience to combine with musical Shield.

Tuesday, April 19, 2016

LCD 16x2 Add-On

How it works
LCD stands for liquid crystal display. The liquid crystal display glass substrate transparent dots or pixels in a grid of electrodes etched with each. Naturally, the liquid crystal molecules, but when electricity is applied to them to straighten out. It is dark or clear the way light passes through the point to be able to be, affected. HD44780 controller chip built into the display (it is at the bottom of the black blob) receives commands from your Arduino, and a variety of letters, numbers and symbols formation of active pixels on and off. Datasheet is a diagram of all the characters stored in the controller chip. The backlighting of the display, which is powered by 15 and 16 pins for the LCD has an LED.



Assembling Display
Display Module Kit, a strip of header pins, and a potentiometer to adjust the display contrast comes with. You can plug it into breadboard in order to solder the pins to display the header. Follow this link to our handy guide assembly, and come back here when you're done.

Connecting your Arduino Display Hardware
This display is a parallel interface, 4-bit or 8-bit wide, which could be used. We'll use 4 bits since it requires less wiring. A total of 8 wires connect your Arduino to show it will take; For information on the four, two data load, and two for power and ground. You'll also need to connect to display the supplied potentiometer; This is in contrast to the need to establish visibility for the display. The following schematic and layout for details, see:

LCD 16x2 Add-On
LCD 16x2 Add-On 
LCD 16x2 Add-On
LCD 16x2 Add-On 
LCD 16x2 Add-On
LCD 16x2 Add-On
Connecting your Arduino Display Software
You can usually determine how to control the display controller chip HD44780 should read the datasheet. Fortunately, Arduino, which is a built-in library called LiquidCrystal that comes with all the hard work for you. (A prebuilt library is a collection of software functions, you can easily include in your code).

Open the Arduino IDE, and the program loads, for example: File> Examples> LiquidCrystal> HelloWorld. Upload it to your board, and "Hello, world!" The display should appear. No message will be displayed, you may need to adjust the contrast. To do this, turn the potentiometer until the "Hello, world!" There is a maximum contrast. If you still do not see anything, double-check your wiring.

You can see the "Hello, world!", Then congratulations not! For example, look at the sketch, and tried to change it to display "Hello, is your name!" Or any other text you want. For example, take a look at the other sketches also LiquidCrystal, and Arduino.cc documentation on how to take advantage of the sketch show to write.

LiquidCrystal Library
Here are a few LiquidCrystal library commands to get you started. For a complete list, see: http://arduino.cc/en/Reference/LiquidCrystal.

#include ;
// Tell the Arduino you want to use the LCD library

LiquidCrystal lcd(12,11,5,4,3,2)
// Create a new LiquidCrystal object named lcd
// using the listed pins for a 4 bit data bus (as in the above schematic)

lcd.begin(16,2);
// Initializes the library for a 16 x 2 display

lcd.clear();
// Clears the display and moves the cursor to upper left corner

lcd.home();
// Just move the cursor to the upper left corner

lcd.setCursor(col, row);
// moves the cursor to column col and row row

lcd.print(data);
// prints a string ("hello, world!") or numerical data (data, BASE) to the display

More Information

  • LCD add-ons for sik (dev-10054) Product Page
  • PDF Guidelines for Dev-10054
  • The reference library Arduino.cc LiquidCrystal
  • LCD datasheet (basic)
  • LCD datasheet (extended)
  • HD44780 datasheet 

Monday, April 18, 2016

Musical Instrument Shield Quickstart Guide

Short description
Believe it or not, the music sounds of a variety of small chips on the Shield device capable of generating. Ever Saiful at a department store (or other brand) synthesizer, played with? Shield instruments can sound just as many on the VS1053 chip! It's just how you talk to, which is the subject of this tutorial is here.


Necessity
To start working with the slope, you'll need a few things.
  • Arduino Uno or Arduino board to shield
  • Heading paretabe
  • Music Instrument Shield
  • Headphones or a 3.5mm (headphone-size) active speaker with plug
It Is Set Up


Rally
Right out of the box, an Arduino shield musical instruments need a way to connect to the main board. This means that some headers welded on. If you do not know how to solder, or the need for a review, do not forget to check out our welded 101 tutorials. Once you've welded on the header, Arduino to connect with your shield.

Software / Firmware
For example, using the code NewSoftSerial libraries. Your Arduino IDE version 1.0 or later, then you have to install this library automatically. If you use a previous version of the IDE, you will need to either upgrade or install the library manually.
  • Page Arduino 1.0
  • Page NewSoftSerial Library

Example code to use
Before we actually dig the MIDI specification, let's make some noise shield. Download and load it into your Arduino IDE example sketch.
  • Examples of music sketches Shield (Arduino 1.0 and newer)
  • Examples of music sketches Shield (Arduino 0023 and older)
Some of the statements in this example the output terminal at 57600 baud. 31250 baud statement is true now at the pin 3 and 4 of the MIDI communication through the use of NewSoftSerial library. Once loaded onto your Arduino code, for example, active speaker audio jack to plug in some headphones or on a slope, and reset. You kind of like an old sound-effects tape to hear a string of seemingly random percussion sounds.
What is actually going on in the code? Basically, a device code "Bank" chooses, and then all the "notes" that the bank, one drama after another. In this case, we have chosen a Sound Bank, and separate different words correspond to each note, even though they do not follow a set scale, like a piano key. To start working with a variety of instruments, we need to know a little bit more about the MIDI protocol.

MIDI is now easier and example code
We are doing everything thoroughly explained in this section, and is sourced from these two documents:
  • Full specification of the MIDI Tutorial
  • VS1053 datasheet
Now a set of MIDI protocol basically a serial protocol byte order. MIDI messages to one, two, or three bytes formed, and some messages are more common than others. Different types of data, the MIDI message to be conveyed in the system-level information to the manufacturer notes from turning on and off. If you did not work with MIDI in front of you right now, this will seem daunting and you may not understand it right away. MIDI is now a full run-down, please read the link at the top of the MIDI specification section of this tutorial.
For example, take a look at the sketch. Setup function, Arduino MIDI reset to a known state line to start using the device toggles. Loop function, there are three test loops, which are two comment. Take a look at the comments that does not loop. The first function call, these are:

                     talkMIDI(0xB0, 0, 0x78);

A common example of a MIDI message with these three bytes. The first byte, 0xB0, indicates that the message "Change control" message. The second byte, 0, indicates that we value zero with the "controller" would like to change. There are 127 "controllers" and the value of the controller 0, "the Bank," which means that the next value, 0x78, device we choose the "bank" is. In this case, 0x78 percussion refers to the bank.

See the loop in the next MIDI message:

                     talkMIDI(0xC0, instrument, 0);

The first byte, 0xC0, indicates that the instruction is a program to change the MIDI channel 0 (confused yet?). We have to change the program basically means "bank" to indicate that we are past the point of the instrument to a specific set of chip samples are telling. This function call "machine" that we want to load a specific set of variable sample materials. To change the bank of a variety of materials, we have "machine" will change dynamically. For example, in the code, we know that the "machine" to add confusion to the value of 30, the Bank has elected only one instrument, so it really does not matter what is the value of the instrument. Now we want to play MIDI channel to call this function which are required to be set. VS1053 is discussed on page 30 of this datasheet.

By this point you should be thoroughly confused and frustrated. The "machine" that we're actually dealing with a look at the table. The "notes" that we are the first bank selected with the MIDI commands are included in a table.

Sixty of the "Note" from 27 to 87 that the bank will be played, so that the value of a note with the "game" is, we note that we want to play with the value of the command to send the note. In this example, the following code to MIDI instructions are as follows:

                   noteOn(0, note, 60);

Note on the (...) function to turn on a function that sends a note to indicate MIDI. It is note Off (..) function changed slightly, but both functions are used often enough that it is useful to have separate functions. The first parameter, 0, MIDI channel to call this function, we want to play. Since we last point initialized with the channel 0 of us, we'll play. Note that the parameters we want to play. This value corresponds to the value of the bank table. For example, 27 of the 87 notes standard looping code, we're playing all the notes just once. The value of the "velocity" is called. That's how "hard" is an indication of the note should be played. If it is a low number, short notes, which will be played if it is a high number of instruments will be held louder and more forcefully. How hard you push a piano key note velocity. If the issue were lightly hurt, you get a note to the speed of light. If it is hit hard, loud and percussive notes are.

Note on () call after a period of 50 milliseconds delay. This means that whatever notes we chose to play in 50 milliseconds. After the delay, we would have to chip off note. Hence, () function call on the note:

                  noteOff(0, note, 60);

The concept of function calls (), on the contrary, with the exception that the third parameter is called "escape velocity." Release velocity to understand, so we like to keep it a little harder on the velocity of the notes. Please read the link at the top of the MIDI specification section of this tutorial.

The cycle continues through the loop percussion band, playing one note at a time. Banks and musical sounds with the quality of the game to get more. Remember that the value of the bank is as follows:
  • Bank of percussion instruments is 0x78
  • Banks are 0x79 melodic instruments (note: with melodic instrument, you must select the number of materials, not just the number of notes)
Page 30 Start the banks and all the values it contains the MIDI section VS1053 datasheet. Now, MIDI is now a complex protocol, and the first to understand, then read through the tutorial section at the top of the MIDI specification is hard to be sure.

Resources
  • Full specification of the MIDI Tutorial
  • VS1053 datasheet
  • Examples of music sketches Shield
  • Wikipedia's article on the MIDI
Conclusion
Fortune, and have fun making noise! If you have any problems, feel free to contact technical support Take support@electronics-tutor-shahin.blogspot.com SparkFun


Sunday, April 17, 2016

With Voice Box Shield uses TTS256

What are we doing? Watch This Video First.
IC is a cool little text to speech TTS256 SpeakJet IC chip that is connected to the device and the user text automatically send a text string and sounds are converted to be able to interpret SpeakJet. You can send TTS256 English words aloud and then Speakjet essence of the word; How cool is that! A person of this ourselves,





"code for the costs, however, could have too much; Once you have written the code required to explain in English code space will be left for your own applications. TTS256 is still plenty of room for other things in your project, you can add text to speech.

In this short tutorial, we Voicebox from SparkFun Shield TTS256 to add to the cover, and the device will look sentence for sending a basic sketch.

What do I need?
Hardware:
  • Arduino (Duemilanove or Pro 5V)
  • IC TTS256
  • Voicebox Shield
  • Stackable 6-pin header (2)
  • Stackable to 8-pin header (2)
  • Speaker
  • hookup wire

Code:
Basic TTS256 / Arduino sketch interface.

Hardware hook-up!
This is not too much to do to get the project up and running; However, there are a couple of delicate solder connections that have to be made. We'll start with the easy stuff: Voice Box paretabe header onto the slope away from the solder material so that the male connector is pointing down. Now we have to IC TTS256 onto the slope. Shield, prototyping VIAS 13 columns TTS256 14 pins on each side. Bummer! A dirty fix that must be made in order to bend the chip pins 1 and 28 can not be put into the rest of the VIAS. IC Pin 1 is indicated with a small dot. Check it out below.
TTS256 with bent pins
TTS256 with bent pins
VIAS bent pins on a slope in the voice box to keep TTS256. Orient so that the curvature of the pins on the chip shield 'Vin' pin is facing. We are one of a solder wire is bent pins, and this will make it easier.
TTS256 inserted onto the Voicebox Shield
TTS256 inserted onto the Voicebox Shield
Now the 'delicate' part; TTS256 there has to be attached to the 5 signals. The following table describes the connections that need to be made. 5V, GND and protect TTS256's Rx pin header pin should be connected. TTS256's 'Ready' and Texas Speakjet chip pins need to be wired.

Signal Name TTS256 Pin Voicebox Pin Speakjet Pin Note
Vdd 28 5V -
GND 14 Gnd -
Rx 18 2 - Make sure that the jumper on the voicebox shield is removed.
SJ_Ready 20 - 15
SJ_Tx 24 - 10

With Voice Box Shield uses TTS256
TTS256 with signals wired
With Voice Box Shield uses TTS256
Jumper removed from pin 2 of Voicebox Shield
Now that the chip is soldered to the board correctly, the only thing left to add a speaker. I have a 2-pin female header added to the Voice Box Shield and an 8 ohm speaker cable is plugged into them; But if you want the slope of the output terminal to solder directly to the speaker.

Adding firmware
TTS256 text to speech chip is quite easy to use; All that needs to be done over a serial connection, a text string (English word) to send. In this project, we are not interfered with serial transmission so that the hardware serial port on the Arduino pin 2 will use. Tutorial section of the code above to download the zip file downloaded from the start. Unzip your Arduino sketchbook folder (the folder contains only a sketch). Once you've unzipped folder in the Arduino sketch Open.

You can check out the code you can see that there is a very basic sketch. Texas Pin Pin TTS256 that the code is just to wait for a string of serial port along with the slope of the Voicebox after the initialization of all the pins on the slopes. Once a carriage return character is received, it is sent out via the serial TTS256. TTS256 sentences and single words takes Speakjet chip code which is sent to change it. Finally, changed the sound of code words Speakjet chip and speaker sends the sound.

Compile and upload code to your board. I actually have not had much luck using the Arduino serial terminal; But if I'm hyper-terminal, terminal program Tera term or another, use the X-CTU things work well. Once a connection is made (9600 baud, 8, use the settings for N and 1) just type a word and enter 'key. TTS256 sound conversion rules, you will find using the chip is not always perfect; But in my case, I found a way to manipulate the different spelling of the word could be found to achieve the desired sound.

Good luck with your project!

Saturday, April 16, 2016

Photon Remote Temperature Sensor

Role
Scientific methods to test our universe and allow his natural strength. By collecting and analyzing the data, we find the historical trend to make predictions about future events. Such a phenomenon that greatly affects our daily and long-term, life temperature. This tutorial shows you how data.sparkfun.com your own remote temperature sensor to automatically upload the data to build Web services. This is perfect for learning, hands-on projects, or learning the difference between the daily temperature fluctuations and the average temperature difference is a particularly important when climate change was discussed.


The system control device, a handy lil 'microcontroller photon particles used as a WiFi connection. Photon SparkFun TMP102 digital temperature sensor reads the temperature data, and then upload the data to a web server for remote data acquisition and, if desired, and subsequent analysis of the plot.
Photon Remote Temperature Sensor
Photon Remote Temperature Sensor
For all you visual learners, check out a video of the project below:


First, a note about the temperature!
Our macroscopic world, the temperature of a seemingly simple idea - we understand the fundamental difference between the underlying warm objects and cold objects. Often we can only assume that the temperature of the object looked at; If the oven burner is glowing red, we know that, it's probably too hot to touch, and we should avoid

The standard definition of a substance temperature heat, or thermal energy, a measure of the average amount of particles. Since the average temperature is measured, sample size is generally irrelevant. For example, a small pot of boiling water in a large pot of boiling water at the same temperature as that (as long as you are at the same height!).

On the microscopic scale, temperature, molecular motion similar to a fairly complex phenomenon that individual atoms. In other words, the temperature is a measure of the kinetic energy of an atom at a particular substance. In general, for a given substance, the lowest temperature of the solid nuclear mostly rigid, more kinetic energy of the atom, which is followed by liquid phase, and the gaseous phase is to be the most energetic atoms. However, the mass is a form of energy, the same temperature as low large-scale micro-scale molecules have more kinetic energy. For this reason, all three phases of the average temperature (eg, gaseous oxygen, liquid water, solid metal) can not have this.

Want to know more about the temperature? Check out this great resource.

Materials
To follow along with this project at home, you'll need the following:
Electronics
  • Photon particles microcontroller
  • Photon battery Shield SparkFun
  • TMP102 digital temperature sensor
  • 2.5 Watt Solar Panel
  • Polymer lithium-ion battery - 6 ah
  • Please note that the battery is intended to shield single-cell Lipo battery charge. Triple 6AH battery cell using a longer battery life you can, but be aware that each cell can be charged at the same rate.
  • If a sunnier climate than in Seattle, a low-capacity battery (eg 2000 mAh battery) can be used.
  • Be careful with the JST connectors, and remove the cable pulling, especially to avoid. For an easy way to remove them, see this tutorial.
  • Six (6) header pins
  • Surface Mount DC Barrel Jack
  • Four (4) male-to-female breadboard jumper wires (or 22-gauge insulated wire)
  • Breadboard (and / or PCB board)
Here's part of a wish list for your convenience mentioned above.