EasyConnect-Experiments-HowTo

From ArduinoInfo
Jump to: navigation, search

YourDuino EasyConnect Kit Experiments HOW-TO

ONLINE: https://arduinoinfo.mywikis.net/wiki/EasyConnect-Experiments-HowTo

Soon you'll be CONNECTING things with CABLES and seeing how they work. First, read the page EasyConnectKit... To make sure you have a clue about what Physical Computing is all about.

Look at the kit you have, and look at each of the modules it discusses in your actual kit. If they are new, in small dark plastic bags, use scissors to open the bag (and discard the trash!)..

First, look at each module in the 8 smaller compartments; we'll look at the other stuff soon.

Look closely at each module, starting with the White LED. All the modules have a small "Printed Circuit" board with a square black connector. That is their EasyConnect connector which will go to a cable to the Control Board. They also have some interesting device, like the small clear plastic Light Emitting Diode (LED) on the White LED module.

Soon you will connect each type of module and we'll show you more about what they are, what they do, and more about how they actually work.

For now, look closely at each module and put in back in the box compartment it came from. Compare them to the things shown on the page "HOW PHYSICAL COMPUTING WORKS".

Now, let's Power UP and Light UP! There are two ways:

(1) The Battery Case: You will need 6 AA batteries. The advantage is you can do a lot without a computer, just on your desktop.

(2) OR with the USB cable power, from a computer or laptop or USB charger.

Power ON

Take out the Control Board Attach the plastic covers with standoffs

CONNECT the POWER

Plug in the USB cable - one end to a computer or laptop or USB charger.

Or put 6 AA batteries in the battery case. Look here about the battery case and plug it in to the External Power Connector on the Control Board.

LIGHTS!

You should immediately see two small LEDs light up:

- GREEN LED constantly ON - YELLOW LED blinking. Trouble??

Look closely now: The Yellow LED is blinking in a pattern. What is the pattern of short blinks?? 4 Short blinks a short pause 2 short blinks. Anyone know what that message says?

CONNECTING STUFF:

OK, take out the WHITE LED module from the first compartment. Take the bunch of CABLES out of the lower left compartment. Unwrap them and take one out.

Look closely at the connectors on the end of the cable. They have 6 gold contacts and also a "latch' on the top. Look closely at the connector on the WHITE LED. It has that same shape. Plug the cable end into the WHITE LED until it snaps in. Pull it out, gently. It should be held in place. Now plug the OTHER end of the cable into the Control Board at the D6 connector. The WHITE LED should blink at te same time as the Yellow LED on the Control Board.

Now get out another cable and the BUZZER module from the first compartment. Look closely at it. It probably has a white sticker on it that says "Remove seal after washing". It's washed, so remove it! Also notice both the WHITE LED and the BUZZER have Blue tops. That means they are OUTPUT devices. Plug the BUZZER into the Control Board at the D7 connector. Listen to the pattern? Have you every heard anything like that before? Maybe on TV. It is sending MORSE CODE. There are two letters being sent: .... is H and .. is I HI to you! (Maybe unplug the buzzer before it drives you or someone else crazy!)

MORSE CODE was able to send messages on only ONE wire. See the Wikipedia Article.

DIGITAL OUTPUTS

DIGITAL means things are either ON or OFF. Nothing in between. So the LED and the BUZZER are connected to DIGITAL OUTPUTS. The Control Board is turning those two connectors (D6 and D7) ON or OFF in the "HI" pattern. So those are things that come OUT of the Control Board. What about things that can go IN??

CONTROLLING AND SEEING THINGS:

Now we need to be able to make the Control Board do DIFFERENT things, and also we want to be able to SEE INFORMATION.

Unplug the power to the Control board. (Leave the LED connected to D7)

Find the LCD DISPLAY in the lower right compartment. Use a cable to plug it into connector I2C on the control board.

Find the IR RECEIVER in the lower right compartment. Use a cable to connect it to connector D5.

TESTING THE IR REMOTE and LCD DSIPLAY

Plug the USB or Power back in. The LCD display should show "Your Smart! Duino YourDuino.com " [TROUBLE]

Find the IR REMOTE (with buttons and numbers on it). Look carefully at the end labeled "Keyes". If there is a small piece of clear plastic sticking pull it out and throw it away. That enabled the battery.

Arrange the IR RECEIVER so it's easy to see the little silver-colored receiver on it. Point the IR REMOTE at it and press 5. The LCD DISPLAY should show "5: SHOW REMOTE" and "Press a button".. Try pressing some buttons. The top buttons should show things like FORWARD and BACK ETC. If you hold any button down more than a quick press, it will show "REPEAT".

You will use the IR remote to select several different Experiments. To switch between experiments you MUST:

-Press the RESET BUTTON on the CONTROL BOARD. You need to see the starting "Your Smart! Duino" display.

- THEN press buttons 1 thru 8 for the different experiments. After pressing the button there will be a short delay and then the new Experiment number will be on the upper left.

Now, press RESET and then "1". You should see:

1: SWITCH ON/OFF IT's OFF! 0 LOW

EXAMPLE 1: DIGITAL INPUT DEVICES

These are things that can be ON or OFF but nothing in between. Let's connect some things IN to the Control Board.

PUSHBUTTON

Find the PUSHBUTTON in compartment 2. Use a cable to connect it to connector A3 on the Control Board. Watch the LCD DISPLAY. Press the button. You should see the display change to:

IT's ON! 1 HIGH. AND the WHITE LED plugged into D7 should light.

COLORED LEDS

Look in compartment 8 (We are counting the small compartments from top to bottom, left to right). Take out the 3 LEDs there. Look closely. UH-OH! they all look the same. Which color is which?? Get a marker or tape and check them out. Mark the WHITE LED and put it back in C1. Connect the other 3 LEDs one at a time and mark them: Y for Yellow, G for Green, R for RED. Leave the GREEN LED connected and put the other 2 back in C8. Try the pushbutton a few more times.

You are controlling a DIGITAL INPUT to the control board. It could be many different things (SENSORS) that can be ON or OFF, like Switches, Buttons, Motion Sensors, Tilt Sensors, (And hundreds more!) Let's try a few more.

What about ON and OFF?? In Computerese (A language you are learning, right?) there is more than one way to talk about ON and OFF. Like ZERO and ONE and HIGH and LOW. It goes like this:

[CHART}

Later you'll get used to this! Let's try some more DIGITAL INPUT devices.

OTHER SWITCHES

So, what's a SWITCH anyway?? It's something that makes an electrical connection. And then it can disconnect the connection. Let's try a few things. {optional?} There is one cable which has the usual connector on one end but only bare wires on the other end. Unplug the Pushbutton (or whatever is plugged into A3) and plug in that cable. NOTE: This is not unsafe: The wires have at most 5 Volts and very little current capacity. SO: Try a few things. Check that the LED is plugged into D6 and the BUZZER into D7. Touch the two wires together. The LED and BUZZER should go ON. That's a switch.


TILT SENSOR

Unplug the cable or the PUSHBUTTON and put it back in C2 and find the TILT SENSOR in C3. Connect it on the end of the cable. Tilt it from side to side. There should be some angles where it is ON and some where it is OFF. It has a small metal ball inside the black sensor that rolls back and forth and makes or breaks the connection. You could use it to know when something is opened or closed. OK, let's try another. Unplug the TILT SENSOR and put it back in C3 and find the MOTION SENSOR. Plug it into the cable, and position it so the white sensor is level. Maybe tape the cable down to your desk.

MOTION SENSOR

You need to hold your body very still for a while until the GREEN LED stays lit. Now wave your hands in front of the sensor. The GREEN LED should go off. Hold very still for about 10 seconds and it should come back on. Hmmm.. What's happening here? THIS kind of sensor is ON when it's not activated and OFF when it detects someone moving. Is this a problem??

Very often we want something to happen when a switch is OFF instead of ON. Those are just OPPOSITES. In computers it is easy (and very common) to INVERT a signal. An ON becomes an OFF and vice-versa. We can "FIX IT IN SOFTWARE".

Let's make it become an ALARM if people move near it. Get the BUZZER again from C1 and use a cable to connect it to D8. The software in the Control Board makes D8 be the OPPOSITE of D7.

Hold very still again until the GREEN LED goes on. The BUZZER should be quiet. Now move around near the sensor. The GREEN LED should go off and the BUZZER should come on.

So you made an alarm system that does this - Use a PIR MOTION SENSOR [WIKIPEDIA FIX] to detect when warm things like humans move near it. - Turn on a GREEN light when nothing is detected - Turn the GREEN light OFF and sound a BUZZER when motion is detected.

Try out holding still and then moving a few feet in front of the sensor. How far away can it detect your warm body?


TOUCH SENSOR

This is a kind of "Switch" which only needs a light touch from your body. Unplug the MOTION SENSOR and put it back in C3 and find the TOUCH SENSOR in C2 and plug it on the end of the cable. OH! That's weird.. it's ON even without TOUCHing it. Now touch it. The LCD DISPLAY says it's OFF. The LED is ON. This is another case where the action is INVERTED. You can decide to use the LED or the BUZZER for this switch, and if they are ON or OFF when you touch the sensor. . It's "Fixed in Software". Later you will learn how to do this.

In the DIGITAL world, upside-down is NO PROBLEM.



EXAMPLE 2: ANALOG to LCD

ANALOG sensors are not just ON or OFF, but give us VALUES of what they sense.

  • The Rotation Sensor (Potentiometer)  gives us a VALUE for the POSITION of it's Knob
  • The Photocell Sensor Photo Resistor)  gives us a VALUE for how bright light is

Connect the Rotation Sensor to A0 (This is an Analog Input

Connect the Photocell Sensor to A1 (This is an Analog Input

+Compare light level, turn on light if dark

Voltage dividers discussed? Different resistive type sensors discussed

LCD Displays the values of knob and Photoresistor (0..1024) Discuss binary?

EXAMPLE 3: Analog IN / OUT

Analog variable from user's Potentiometer on A3

Dimming of Bright LED on LED_MODULE Pin 6

Strobe blink speed on STROBE LED on Pin 9

+ BUZZER if "TooFast"

Servo Position on pin A2 (Speedometer)

REMAINING EXPERIMENTS HOW-TO PAGES UNDER CONSTRUCTION BELOW!


/*------------------( Example 4: Temperature and Humidity with DHT11 Sensor )----------------

User connect DHT11 sensor to D8

LCD Displays Temperature / Humidity

OPPORTUNITY: Have button change display from F to C ??

/*------------------( Example 5: Test handheld IR Remote: display codes )----------------

User selects "5" with IR remote

User presses all the different buttons on the remote, see results

User aligns the IR receiver with the remote and backs off to determine range.

/*--------------------( Example 6: Test Ultrasonic Sensor module )---------------------------

User connects the Ultrasonic Sensor Module to connector D3D4

User aims the sensor to an open area

User Places different objects in front of the sensor, sees distance displayed

Connect Buzzer: Hear different tones as distance changes.


/*--------------------( Example 7: Test Joystick )---------------------------

User connects the Joystick D2A6A7

User Moves the Joystick over X-Y area

User sees the X and Y values displayed on the LCD display

User pushes DOWN on joystick, sees "Z" value displayed, LED13 goes ON and OFF

/*--------------------( Example 8: System for Traffic System )---------------------------

CONNECTIONS:

  1. Ultrasonic Sensor Module to D3D4
  2. Touch switch to A0
  3. RED LED Module to D6
  4. YELLOW LED Module to D7
  5. GREEN LED Module to D8
  6. WHITE LED Module to D9

User arranges LEDs as a traffic signal RED-YELLOW-GREEN

User arranges WHITE LED as WALK signal

User makes a model intersection with the traffic signal, with the Ultrasonic sensor detecting approaching vehicle on side street, and with a WALK button at the main street.

The system runs the traffic signal sequence and timing. It responds to a vehicle on the cross street, and to the Walk button being pressed.

system is discussed and diagrammed.