Difference between revisions of "Activities/TurtleArt/Tutorials/Turtle Sensors Tutorial gci2012"

From Sugar Labs
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Turtle Art with Sensors==
 
==Turtle Art with Sensors==
 +
Created during Google Code In 2012 http://www.google-melange.com/gci/task/view/google/gci2012/7976214
  
 
===Introduction===
 
===Introduction===
Line 30: Line 31:
  
 
3. Then have a x/y block. In the x spot put a blue left block, which can be found under the screen symbol. In the y spot have a 0 block.
 
3. Then have a x/y block. In the x spot put a blue left block, which can be found under the screen symbol. In the y spot have a 0 block.
 +
 +
[[Image:TAportfolio.png|500px]]
  
 
4. A pen down block should follow.
 
4. A pen down block should follow.
Line 37: Line 40:
 
6. Inside the repeat put another x/y block. In the x input connect a xcor block which can be found under the turtle. In the y input connect a loudness  
 
6. Inside the repeat put another x/y block. In the x input connect a xcor block which can be found under the turtle. In the y input connect a loudness  
 
block that can be found under the wire symbol.
 
block that can be found under the wire symbol.
 +
 +
[[Image:TAsensors.png|500px]]
  
 
7. Then have a blank block. This block can be found under the repeat symbol.
 
7. Then have a blank block. This block can be found under the repeat symbol.
 +
 +
[[Image:TAflow.png|500px]]
  
 
8. Connect yet another x/y block. In the x input connect a + block. This block will be found under the 123+-= symbol.For the top value on the + block connect a xcor block. For the bottom value connect a number block with a 1.
 
8. Connect yet another x/y block. In the x input connect a + block. This block will be found under the 123+-= symbol.For the top value on the + block connect a xcor block. For the bottom value connect a number block with a 1.
Line 86: Line 93:
 
6. Then connect a forward block. The forward block should be attached to a loudness block that is found under the wire symbol.  
 
6. Then connect a forward block. The forward block should be attached to a loudness block that is found under the wire symbol.  
  
 
+
[[Image:TAsensors.png|500px]]
 
 
 
 
 
 
 
 
  
  
Line 131: Line 134:
 
    
 
    
  
Sensors Applied
+
===Sensors Applied===
 
 
Modes
 
 
 
  
Voltage Mode
+
====Modes====
  
Resistance Mode
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Voltage_Mode Voltage Mode]
  
Pitch Mode
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Resistance_Mode Resistance Mode]
  
Sound Mode
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Pitch_Mode Pitch Mode]
  
Volume Mode
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Sound_Mode Sound Mode]
  
Measuring
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Volume_Mode Volume Mode]
  
Measuring Temperature
+
====Measuring====
  
Measuring Soil Moisture
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Temperature Measuring Temperature]
  
Measuring Water Salinity
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Soil_Moisture Measuring Soil Moisture]
  
Measuring AC Amps
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_Water_Salinity Measuring Water Salinity]
  
Measuring power
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_AC_Amps Measuring AC Amps]
  
Measuring DC Amps
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_power Measuring power]
  
Measuring Water Salinity
+
[http://wiki.sugarlabs.org/go/Activities/Turtle_Art/Using_Turtle_Art_Sensors#Measuring_DC_Amps Measuring DC Amps]
  
Here are some interesting usages of sensors:
+
====Here are some interesting usages of sensors:====
  
Seismograph
+
[http://tonyforster.blogspot.com/2011/10/xo-175-seismograph.html Seismograph]
  
Graphing Pitch and Volume
+
[http://tonyforster.blogspot.com/2011/05/graphing-pitch-and-volume.html Graphing Pitch and Volume]

Latest revision as of 22:15, 22 January 2013

Turtle Art with Sensors

Created during Google Code In 2012 http://www.google-melange.com/gci/task/view/google/gci2012/7976214

Introduction

Sensors are used to measure the temperature, soil moisture, water salinity, AC/DC amps, etc. Sensors also have different modes. Some of the modes include, voltage mode, resistance mode, pitch mode etc. Sensors are used to build interesting things some examples are carbon microphones, doorbells/ burglar alarms, photovoltaic panels, etc. Sensors are also used to connect to microscopes, telescopes, and many, many more things. All these sensors can be accessed through Turtle Art.

Types of Sensors

Humidity Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Humidity_Sensor

Construir Sensor Luz http://wiki.laptop.org/go/Making_XO_sensors/Construir_Sensor_Luz

Lichtsensor http://wiki.laptop.org/go/Making_XO_sensors/Lichtsensor

Light Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Light_Sensor

Magnetic Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Magnetic_Sensor

Switch Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Switch_Sensor

Temperature Sensor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Temperature_Sensor

Thermistor http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Thermistor

Accelerometer http://wiki.laptop.org/go/Accelerometer

Hands on Example: Graphing the Loudness of Your Voice

1. Start Turtle Art.

2. Put a pen up block, after start.

3. Then have a x/y block. In the x spot put a blue left block, which can be found under the screen symbol. In the y spot have a 0 block.

TAportfolio.png

4. A pen down block should follow.

5. Next comes the repeat block. Connect a width block to it. The width block is found under the screen symbol as well.

6. Inside the repeat put another x/y block. In the x input connect a xcor block which can be found under the turtle. In the y input connect a loudness block that can be found under the wire symbol.

TAsensors.png

7. Then have a blank block. This block can be found under the repeat symbol.

TAflow.png

8. Connect yet another x/y block. In the x input connect a + block. This block will be found under the 123+-= symbol.For the top value on the + block connect a xcor block. For the bottom value connect a number block with a 1.

9. For the y value on the x/y block connect s ycor block. Your blocks should look like this:





10. Test your sensor. Hit start and talk to your computer. Your graph should look something like this:

How to Build a Sensor

Temperature Sensor

Materials:

A soldering iron
Solder
Wire
Wire cutter/stripper
Insulating tape
A LM35D temperature sensor
A 3 mm audio jack
A USB cable or a USB connector

Procedure

First separate your audio jack. Then cut two pieces of wire and strip them on both ends. Make a knot in one of the wires; this is so you know which wire is which. Solder one wire to the central terminal, the other to the outer terminal. Take your USB cable and cut it in the middle. You only need the black and red wires in the USB cable. To connect your temperature sensor, connect the rightmost leg when the flat side is facing you, to the black wire. Then connect the wire that is connected to the outer terminal. Connect the leftmost leg of the sensor to the red wire. Apply insulation tape over both connections. Connect the wire that is connected to the central terminal to the middle leg of the temperature sensor. Insert the audio jack into the pink input and insert the USB into the USB input. Your temperature sensor is ready to go.

Using Sensors in Art

1. Start Turtle Art.

2. Put the clean block right after start. This will clear the screen.

3. Then put a right block with 90 for the angle.

4. Get the forever block from Flow Operators palette.

5. Now attach a left 90 block.s

6. Then connect a forward block. The forward block should be attached to a loudness block that is found under the wire symbol.

TAsensors.png



7. Then add a right 270 block, followed by a forward loudness block. The end result should look like this: 8. Test your sensor. To test it click start and speak. The turtle should run all over the place, graphing your voice. Note how the turtle makes a longer line when your voice is louder. Your screen should look something like this when you are done testing it.















Scientific Sensor Application

You can use a LDR or Light Dependant Resistor to measure your pulse. A LDR is a sensor because it senses light and uses it to work. You will have to put a Cartesian block after the start block. Then connect a forever block, followed by a clean block. Connect a pen up block, followed by an x/y block. For the x input you will need a –600 block, in the y input you will need a 0 block. Then connect a pen down block, followed by a repeat block. The repeat block should be connected to a 1200 block. After the repeat block should be an x/y block. For the x input you should have a + block. Connect the top of the + block to an xcor, connect the bottom to a 1 block. For the y input you should have a – block. Connect the top of the – block to a resistance block. The bottom should be connected to a 3000 block. To test your sensor, cover the LDR with your fingertip and hold near a bright light. Your test should look something like this:


Sensors Applied

Modes

Voltage Mode

Resistance Mode

Pitch Mode

Sound Mode

Volume Mode

Measuring

Measuring Temperature

Measuring Soil Moisture

Measuring Water Salinity

Measuring AC Amps

Measuring power

Measuring DC Amps

Here are some interesting usages of sensors:

Seismograph

Graphing Pitch and Volume