Changes

Jump to navigation Jump to search
Line 1: Line 1:  
[http://wiki.sugarlabs.org/go/Activities/TurtleArt/Uso_de_TortugaArte_Sensores  español]
 
[http://wiki.sugarlabs.org/go/Activities/TurtleArt/Uso_de_TortugaArte_Sensores  español]
   −
<b>CAUTION. APPLYING EXTERNAL POWER SOURCES TO THE XO LAPTOP'S MICROPHONE INPUT CAN CAUSE PERMANENT DAMAGE. BE SURE YOU READ AND UNDERSTAND THE FOLLOWING BEFORE CONNECTING POWER SOURCES TO YOUR LAPTOP. DO NOT CONNECT TO HAZARDOUS VOLTAGES</b>
+
<b>CAUTION. APPLYING EXTERNAL POWER SOURCES TO THE XO LAPTOP'S MICROPHONE INPUT CAN CAUSE PERMANENT DAMAGE. BE SURE YOU READ AND UNDERSTAND THE SPECIFICATIONS BELOW BEFORE CONNECTING POWER SOURCES TO YOUR LAPTOP. DO NOT CONNECT TO HAZARDOUS VOLTAGES</b>
    
==Specifications==
 
==Specifications==
Line 11: Line 11:  
Standard 3.5mm 2-pin switched mono microphone jack; selectable 2V DC bias; selectable sensor-input mode (DC or AC coupled); selectable +20dB boost.
 
Standard 3.5mm 2-pin switched mono microphone jack; selectable 2V DC bias; selectable sensor-input mode (DC or AC coupled); selectable +20dB boost.
   −
If using a stereo plug it is the tip (usually the red wire) plus the earth.
+
On the XO-1, mono data is measured, the left channel, the tip (usually the red wire). The XO-1.5, XO-1.75, XO-3 and XO-4 can read both the left and right channel. (Currently on the XO-1.75, XO-3 and XO-4 stereo input is disabled).
   −
The XO1 is protected at the input by a 5V zener diode. The allowable input is -0.5V to 5V. Inputs outside this range will cause excessive current and damage. Even a single 1.5V battery can cause damage if connected reverse polarity.
+
The XO-1 is protected at the input by a 5V zener diode. ([http://wiki.laptop.org/go/File:XO-1_Schematics.pdf 1]) The allowable input is -0.5V to 5V. Inputs outside this range will cause excessive current and damage. Even a single 1.5V battery can cause damage if connected reverse polarity.
   −
The XO1.5 is protected by a resistor,(1/16W 470 ohm SMD0402) and a pair of diodes to ground and to +3.3V which should protect -6V to +9V continuously, and up to higher voltages for shorter periods of time. Similar protection is planned for the XO1.75.
+
The XO-1.5 ( [http://wiki.laptop.org/go/File:XO-1.5_Schematics_rev_G.pdf 2] [http://wiki.laptop.org/go/File:XO-1.5_Schematics_rev_I.pdf 3] [http://wiki.laptop.org/go/File:XO-1.5_Schematics_rev_M.pdf 4] )and XO-1.75 (XO-3 and XO-4 presumably too) are protected by a resistor,(1/16W 470 ohm SMD0402) and a pair of diodes to ground and to +3.3V which should protect -6V to +9V continuously, and up to higher voltages for shorter periods of time.  
   −
For the XO1, the addition of a 150k ohm series resistor would (I expect, no guarantee) give a reduced sensitivity in voltage mode (0-4V) but allow inputs to +- 100V without damage. Input impedance in resistance, volume and pitch modes is much lower but a 1k ohm series resistor should still allow inputs to +-12V.  
+
For the XO-1, the addition of a 150k ohm series resistor would (I expect, no guarantee) give a reduced sensitivity in voltage mode (0-4V) but allow inputs to +- 100V without damage. Input impedance in resistance, volume and pitch modes is much lower but a 1k ohm series resistor should still allow inputs to +-12V.  
   −
If applying an external voltage to the XO1, it is highly recommended that test leads be made up with a microphone plug and an inbuilt series resistor.
+
<b>If applying an external voltage to the XO1, it is highly recommended that test leads be made up with a microphone plug and an inbuilt series resistor. 680 ohms is the suggested resistor value, it gives a reasonable input range while still allowing the use of the full resistance range of the XO1.</b>
    
[[File:Audio 680 ohm.jpg]]
 
[[File:Audio 680 ohm.jpg]]
Line 25: Line 25:  
<i> 680 ohm series resistor on a 3.5mm audio plug</i>
 
<i> 680 ohm series resistor on a 3.5mm audio plug</i>
   −
Test leads with a zener diode and series resistor would expand the safe range for the XO1.5 and XO1.75.
+
Test leads with a zener diode and series resistor would expand the safe range for the XO1.5, XO1.75, XO-3 and XO-4.
    
Damage can also be caused by applying voltages between the grounds of any of the external sockets.
 
Damage can also be caused by applying voltages between the grounds of any of the external sockets.
    
==Voltage Mode==
 
==Voltage Mode==
===XO1===
+
===XO-1===
Measurement range is DC 0.4V to 1.85V. Voltages less than 0.4V report as 0.4V, voltages greater than 1.85V report as 1.85V. Accuracy is around 3% of full scale. Impedance 140k ohms to a 0.6V bias.
+
One channel, measurement range is DC 0.4V to 1.85V. Voltages less than 0.4V report as 0.4V, voltages greater than 1.85V report as 1.85V. Accuracy is around 3% of full scale. Impedance 140k ohms to a 0.6V bias.
    
[[File:Voltage sensor.jpg]]
 
[[File:Voltage sensor.jpg]]
   −
===XO1.5===
+
===XO-1.5===
0.17V - 3.0V, impedance 15k ohms to a 1.7V bias. (Still buggy, click stop to clear bug.)
+
Two channels, 0.17V - 3.0V, impedance 15k ohms to a 1.7V bias. (Still buggy, click stop to clear bug.)
 +
 
 +
===XO-1.75===
 +
Two channels, -0.3V to 3V, input impedance 4k ohms to a 3V bias, (models SKU204+ *) . At the time of writing, as a workaround to a bug with dual channels, apply the input to both channels, only a mono reading is available.
 +
 
 +
(* A small number of pre-production laptops were built with -3V to +3V input range and input impedance 1k ohm to a +3V bias, eg. model SKU199. Turtle Blocks V141 and previous is correctly calibrated for these laptops but not for production laptops)
 +
 
 +
===XO-4===
 +
Two channels, 0 to 3V. At the time of writing, as a workaround to a bug with dual channels, apply the input to both channels, only a mono reading is available.
    
==Resistance Mode==
 
==Resistance Mode==
===XO1===
+
===XO-1===
Measurement range is 750 ohms to 14k ohms, resistances less than 700 ohms report as 700 ohms, greater than 14k ohms report as 14k ohms. Accuracy is around 5% with respect to the full scale voltage measured across the resistor, this translates to round 50 ohms at bottom scale and 2k ohms at top scale. (A series protection resistor of around 700 ohms would give a measurement range of 0 - 13k ohms and protection against +-8V inputs.)
+
One channel, measurement range is 750 ohms to 14k ohms, resistances less than 700 ohms report as 700 ohms, greater than 14k ohms report as 14k ohms. Accuracy is around 5% with respect to the full scale voltage measured across the resistor, this translates to round 50 ohms at bottom scale and 2k ohms at top scale. (A series protection resistor of around 700 ohms would give a measurement range of 0 - 13k ohms and protection against +-8V inputs.)
   −
===XO1.5===
+
===XO-1.5===
2k ohms to open circuit. (Still buggy, click stop to clear bug.)
+
Two channels, 2k ohms to open circuit. (Still buggy, click stop to clear bug.)
 +
 
 +
===XO-1.75===
 +
Two channels, zero ohms to open circuit. At the time of writing, as a workaround to a bug with dual channels, apply the input to both channels, only a mono reading is available.
 +
 
 +
===XO-4===
 +
Two channels, zero ohms to open circuit. At the time of writing, as a workaround to a bug with dual channels, apply the input to both channels, only a mono reading is available.
    
==Pitch Mode==
 
==Pitch Mode==
Line 75: Line 89:  
[[File:Ta oscilloscope.jpg]]
 
[[File:Ta oscilloscope.jpg]]
   −
Source file as doc [[File:Oscillo.doc]]
+
Source file [[File:Oscillo.ta]] or as doc [[File:Oscillo.doc]]
 +
 
 +
(<i>Copy the text that appears in the browser for *.ta files and paste into Turtle Art or rename a *.doc to *.ta outside of Sugar, a *.ta file opens in TurtleArt in Sugar</i>)
    
==Measuring Temperature==
 
==Measuring Temperature==
(For instructions on using the LM35 sensor, see http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Temperature_Sensor and http://www.reducativa.com/xo/man-sis-sensoresdetemperatura.pdf - in Spanish)
+
(For instructions on using the LM35 sensor, see http://wiki.laptop.org/go/Making_XO_sensors/Making_a_Temperature_Sensor , http://www.jgc.org/blog/2008/03/building-temperature-probe-for-olpc-xo.html and http://www.reducativa.com/xo/man-sis-sensoresdetemperatura.pdf - in Spanish)
    
[[File:Ntc thermistor.jpg]]
 
[[File:Ntc thermistor.jpg]]
Line 104: Line 120:  
[[File:Temp24hrs.jpg]]
 
[[File:Temp24hrs.jpg]]
   −
[[File:Oscillo daily temp.doc]] ta project as doc (rename to .ta outside of Sugar or copy contents to a ta project)
+
[[File:Oscillo daily temp.ta]] or as doc [[File:Oscillo daily temp.doc]] (<i>Copy the text that appears in the browser for *.ta files and paste into Turtle Art or rename a *.doc to *.ta outside of Sugar, a *.ta file opens in TurtleArt in Sugar</i>)  
      Line 181: Line 197:  
The Python Code Block [[File:Pythoncodeblock.jpg|50px]] is used to sound an alarm in your loudspeakers.  
 
The Python Code Block [[File:Pythoncodeblock.jpg|50px]] is used to sound an alarm in your loudspeakers.  
   −
You need to type the following into Pippy and save to the Journal. Type it exactly as shown, the indents on the last 3 lines are important, for the characters '-l 1' the first is an 'el' and the second a 'one'.
+
Enter the following code into Pippy, the indents are important.
    
[[File:Doorbell python.jpg]]
 
[[File:Doorbell python.jpg]]
   −
Then in Turtle Art, load the Pippy code [[File:TAPippyButton.svg|30px]] into the Python Code Block [[File:Pythoncodeblock.jpg|50px]] , then run your program.
+
Then in Turtle Art, load the Pippy code into the Python Code Block [[File:Pythoncodeblock.jpg|50px]] by clicking on the Python Code Block, then run your program.
    
<b>Two-tone alarm</b>
 
<b>Two-tone alarm</b>
Line 193: Line 209:  
[[File:Warbling alarm TA.jpg]]
 
[[File:Warbling alarm TA.jpg]]
   −
[[File:2tone python.jpg]]
+
The following code is now a built in sample <i>sinewave.py</i>.
 +
 
 +
def myblock(lc, x):
 +
    import os
 +
    os.system('speaker-test -t sine -l 1 -f %d' % (int(x)))
 +
 
    
How it works: the 1000 and 1100 blocks are input x in the Python code. The -f option in speaker-test is the frequency, {0} gets replaced by x which in turn is replaced by 1000 or 1100 so speaker-test is sent either -f 1000 or -f 1100 giving frequencies of 1000 Hz or 1100 Hz.
 
How it works: the 1000 and 1100 blocks are input x in the Python code. The -f option in speaker-test is the frequency, {0} gets replaced by x which in turn is replaced by 1000 or 1100 so speaker-test is sent either -f 1000 or -f 1100 giving frequencies of 1000 Hz or 1100 Hz.
Line 246: Line 267:  
[[File:Charge current.jpg]]
 
[[File:Charge current.jpg]]
   −
Turtle Art project as doc [[File:Oscillo current.doc]]
+
[[File:Oscillo current.ta]] or Turtle Art project as doc [[File:Oscillo current.doc]] (<i>Copy the text that appears in the browser for *.ta files and paste into Turtle Art or rename a *.doc to *.ta outside of Sugar, a *.ta file opens in TurtleArt in Sugar</i>)
    
==Importing Logged Data into other Activities==
 
==Importing Logged Data into other Activities==
Line 380: Line 401:     
Turtle Art project as doc [[File:Turtle Art lux.doc]]
 
Turtle Art project as doc [[File:Turtle Art lux.doc]]
 +
 +
===Using the LDR to measure your pulse===
 +
Each heartbeat temporarily increases the amount of blood in your fingertip. Cover the LDR with your fingertip and hold near a bright light. You can see your pulse as a variation in the measured resistance.
 +
 +
 +
[[Image:Screenshot of Turtle Art Activity pulse-1.png |500px]]
 +
 +
 +
You need to experiment with the constant 3000 or the distance from the light to get the display onscreen.
 +
 +
 +
See also this video http://www.youtube.com/watch?v=7TdpkDmWFdw
 +
 +
Physics with the XO. A clothes peg with a white LED illuminates a LDR. If pressed between an area of translucent ​​skin such as the lobe of the ear or the area between the thumb and index finger, the program monitors your pulse using Turtle Art by measuring the change in the percentage of transmitted light. (To optimize use red LED). You can measure heart rate.
    
==Photovoltaic panel==
 
==Photovoltaic panel==
Line 399: Line 434:     
== RC time constant ==
 
== RC time constant ==
IT IS RECOMMENDED THAT A SERIES PROTECTION RESISTOR BE BUILT INTO THE PHONO PLUG AND LEADS IF USING AN EXTERNAL VOLTAGE
+
IT IS RECOMMENDED THAT A SERIES PROTECTION RESISTOR BE BUILT INTO THE PHONO PLUG AND LEADS IF USING AN EXTERNAL VOLTAGE WITH THE XO-1
    
[[File:Rc cct.jpg]]
 
[[File:Rc cct.jpg]]
Line 422: Line 457:  
  R = T/C
 
  R = T/C
 
  = 0.14 /(4x10^-6) = 35k
 
  = 0.14 /(4x10^-6) = 35k
 +
    
[[File:Rc-time.jpg]]
 
[[File:Rc-time.jpg]]
Line 433: Line 469:     
[[File:RC data to clip.jpg]]
 
[[File:RC data to clip.jpg]]
 +
 +
 +
See also a similar experiment which uses the [[Activities/TurtleBots#Buti.C3.A1|USB4Butia]] board (in Spanish) http://youtu.be/eewFtOHX5-Q and http://youtu.be/KmNwC1qBhtA
 +
 +
==Voltage-current relationship==
 +
Some devices including light bulbs have non-linear voltage current relationships. In this experiment, the V-I graph of a light bulb is drawn using the stereo input of the XO-1.5.
 +
 +
[[Image:VIgraph.jpg|250px]]  [[Image:VI Turtle Art.png|400px]]
 +
 +
[[File:Turtle Art Activity VI.ta]]
 +
 +
The light bulb and resistor were chosen thus. The maximum measurable input of the XO-1.5 is +3V, at maximum you want approximately 1.5V across the resistor and 1.5V across the bulb, the bulb should be near full brightness. A 2.8V 0.85A torch/flashlight bulb was used. The estimated resistance of the bulb is V/I, 2.8V/0.85A = 3.3 ohms, chosing from resistors at hand, trial and error found 2.2 ohms was OK. The power rating of the resistor is V*V/R, 1.5*1.5/2.2 = 1.02W, a resistor of 1W or higher rating is required.
 +
 +
A laboratory power supply was used in this experiment. It is safest if its output is within the maximum allowable voltage range of the XO-1.5, -6 to +9V. Low cost options would include a selection of dry cells in varying states of discharge. It may be practical to construct a variable resistor using a pencil lead.
 +
 +
The X axis is voltage across the bulb, voltage2 - voltage, the Y axis is the current which is proportional to the voltage across the resistor or the L channel voltage.
 +
 +
See also http://youtu.be/37vJEUr5nRI and http://www.youtube.com/watch?v=_iSXHsGvLaY (in Spanish) for experiments plotting linear and nonlinear V-I relationships using the [[Activities/TurtleBots#Buti.C3.A1|USB4Butia]] board.
    
==The XO as an audio amplifier==
 
==The XO as an audio amplifier==
Line 462: Line 516:     
The diode is still required. The original cat's whisker diode was made with galena crystals. [[http://en.wikipedia.org/wiki/Cat%27s-whisker_detector]] Other materials are iron pyrite ("fool's gold", iron disulfide), silicon, molybdenite (MoS2), and silicon carbide (carborundum, SiC). It is also possible to use a rusty razor blade (iron oxide).
 
The diode is still required. The original cat's whisker diode was made with galena crystals. [[http://en.wikipedia.org/wiki/Cat%27s-whisker_detector]] Other materials are iron pyrite ("fool's gold", iron disulfide), silicon, molybdenite (MoS2), and silicon carbide (carborundum, SiC). It is also possible to use a rusty razor blade (iron oxide).
 +
 +
 +
A gramophone [[http://www.youtube.com/watch?v=9QUlsX003fc]]
 +
 +
==The XO as an audio signal generator==
 +
The doorbell, remote doorbell and Teletype show how to use the Python block [[File:Pythoncodeblock.jpg|40px]]to generate an audio tone in Turtle Art.
 +
 +
def myblock(lc, x):
 +
    import os
 +
    os.system('speaker-test -t sine -l 1 -f %d' % (int(x)))
 +
 +
 +
The volume level can be amplified with a CD or tape player or amplified PC speakers. This can be used for resonance experiments including Chladni plates, [http://www.youtube.com/watch?v=NWRq0KiAzuU] or [http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-/Chladni.3gp] and [http://www.youtube.com/watch?v=ntk5raVQvQY rings] and also for experiments involving beat frequencies and interference patterns.
 +
 +
===Beat frequency===
 +
A beat is an interference between two sounds of slightly different frequencies, perceived as periodic variations in volume whose rate is the difference between the two frequencies. http://en.wikipedia.org/wiki/Beat_%28acoustics%29
 +
 +
 +
Three laptops are required. Two emit audio tones of 1000Hz and 1002Hz. The Python block [[File:Pythoncodeblock.jpg|40px]] is loaded with the code <i>sinewave.py</i> The third laptop graphs the sound level its microphone receives. (see [[Activities/TurtleArt/Using_Turtle_Art_Sensors#Graphing_the_output |Graphing_the_output]] )
 +
 +
 +
[[File:Beatfrequency.jpg]]
 +
 +
===Wavelength and the speed of sound===
 +
Measure the wavelength and hence the speed of sound using 2 OLPC XO laptops, one runs Turtle Art the other Measure, inspired by http://www.ted.com/talks/lang/en/clifford_stoll_on_everything.html
 +
 +
http://www.youtube.com/embed/l3vKVTW1LQA
 +
 +
One laptop running Turtleart is used to generate a 3kHz audio tone. The second laptop, XO-1.5 or higher, graphs the output of 2 microphones with Measure. If the 2 microphones are at equal distance from the source then the 2 traces are in phase. Move one microphone by half a wavelength and the 2 traces are opposite phase.
 +
 +
This experiment is best with a XO-1.5 or higher with stereo input. If you only have a mono XO-1 then you could parallel the 2 microphones to the mono input and see how the amplitude of the summed signal changes as you move one microphone
 +
 +
===Gliding tone===
 +
Here is the program to generate a sawtooth gliding tone, be sure to load the Python block with the inbuilt Python code sample <i> sinewave.py </i>
 +
 +
[[File:Glidingtone.jpg]] 
 +
 +
[[File:Turtle Art Activity gliding tone.doc]] ta project as doc
 +
 +
 +
===Mouse slider tone===
 +
Here is the code to use the mouse to adjust a slider which sets the tone. Be sure to load the first Python block with the inbuilt Python sample <i>push_mouse_event.py</i> and the second with the inbuilt Python code sample <i> sinewave.py </i>
 +
 +
[[File:Mousetone.jpg]]
 +
 +
[[File:Turtle Art Activity mouse controls tone.doc]] ta project as doc
 +
 +
[[File:Glidingtoneoutput.jpg]]
 +
 +
 +
===Using Pippy to generate a tone===
 +
The doorbell, remote doorbell and Teletype show how to generate an audio tone in Turtle Art, the following code in the Pippy Activity can generate a tone of variable duration (from Guzman Trinidad).
 +
 +
import pippy
 +
f= input ("Ingrese la frecuencia a generar (Hz):")
 +
t= input ("Ingrese el intervalo de tiempo (s):")
 +
pippy.sound.playSine(f, 5000, t, 0)
 +
pippy.sound.audioOut()
 +
 +
===Using frequency to control outputs===
 +
[[File:Freq-sensor-ic.jpg]]
 +
 +
Turtle Art is programmed to produce two different frequency sounds. The headphone output of the XO is connected to a pair of [http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS006975.PDF LM567] tone decoders, each of which lights a LED when its input signal frequency is present. With this principle we could control any device based on the frequency emitted by the XO.
 +
[http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion- "Physics with XO."] [http://www.youtube.com/watch?v=IVzVlAZsz1w video] by Guzmán Trinidad.
    
==FSK Teletype==
 
==FSK Teletype==
Line 468: Line 586:  
The Python Code Block [[File:Pythoncodeblock.jpg|50px]] is used to sound a tone in the loudspeaker, the pitch identifies the key pressed.  
 
The Python Code Block [[File:Pythoncodeblock.jpg|50px]] is used to sound a tone in the loudspeaker, the pitch identifies the key pressed.  
   −
You need to type the following into Pippy and save to the Journal. Type it exactly as shown, the indents on the last 3 lines are important, for the characters '-l 1' the first is an 'el' and the second a 'one'. Click on the Python block to load the code.
+
The following code is now a built in sample, <i>sinewave.py</i>. If typing it into Pippy, the indents are important. Click on the Python block to load the code.
 +
 
 +
def myblock(lc, x):
 +
    import os
 +
    os.system('speaker-test -t sine -l 1 -f %d' % (int(x)))
   −
[[File:2tone python.jpg]]
      
[[File:Fsk send.jpg]]
 
[[File:Fsk send.jpg]]
Line 492: Line 613:     
== Capturing with the camera ==
 
== Capturing with the camera ==
As of version 106 there are blocks to capture an image from the camera, the average brightness and the average rgb colours pushed to the heap
+
As of version 106 there are blocks to capture an image from the camera and show the average brightness.
    
[[File:Camera blocks.jpg]]
 
[[File:Camera blocks.jpg]]
   −
The camera could be used for time lapse photography, motion sensing, light level measuring, colour sensing and more.  
+
The camera can be used for time lapse photography, motion sensing, light level measuring, colour sensing and more.  
 +
 
 +
===Brightness===
 +
The average brightness of the image is calculated by the 'brightness' block [[File:Brightblock.jpg]]. As at V106, the camera's automatic gain control (AGC) is still functioning. The camera tries to correct the image brightness to a standard brightness, then calculates the average brightness. The result is a non linear relationship between actual and the measured brightness. Also, some parts of the image are brighter than others further complicates things. Using a diffuser, e.g. translucent material like a plastic bag, may help.
 +
 
 +
[[File:Brightness.jpg]]
    
===Wildlife Photography===
 
===Wildlife Photography===
Line 505: Line 631:       −
Photographs could be triggered similarly on voltage, frequency, volume, colour or brightness.
+
Photographs could be triggered similarly on voltage, frequency, volume, colour or brightness. Shown below, moving a hand in front of the camera changes the brightness and takes a photo.
 +
 
 +
[[File:Brightnesstriggeredphoto.jpg]]
 +
 
 +
[[File:Turtle Art Activity motion photo.ta]]
    
===Microscope===
 
===Microscope===
Line 515: Line 645:     
Left, close up of ball point pen, right, an XO takes a closeup of another XO screen
 
Left, close up of ball point pen, right, an XO takes a closeup of another XO screen
 +
 +
===Telescope===
 +
[[File:Telescope.jpg]]
 +
 +
[http://olpc-france.org/docs/Seminaire_edifolco_LAMAP-OLPC_dec2009-GB.pdf Children of the Moon (Hijos de la Luna) ]
 +
 +
[http://olpc-france.org/docs/Seminaire_edifolco_LAMAP-OLPC_dec2009.pdf Enfant de la lune (Hijos de la Luna) ]
    
===Timelapse Photography===
 
===Timelapse Photography===
Line 523: Line 660:  
[[File:Turtle Art Activity timelapse.doc]] TurtleArt project as doc
 
[[File:Turtle Art Activity timelapse.doc]] TurtleArt project as doc
   −
===More===
+
===Colour effects===
As of TurtleBlocksV106, the following 2 sections have been partly superceded. The Show Camera blocks [[File:Show camera.jpg]] now have the function of the Python code and Show Media blocks [[File:Python show media.jpg]] described below.
+
Here is an example where you can take a photo and apply colour effects. (Note, 'pen color' is not the same as 'turtle sees'; if you want the actual RGB value of a pixel, use the 'read pixel' block. There is also sample Python code available for setting the RGB value of a pixel.)
 +
 
 +
[[File:Colour processing.jpg]]
 +
 
 +
[[File:Camera proc.doc]] ta project as doc
 +
 
 +
As at Turtle Art V106 there is a built in sample <i>psuedo-color.ta</i> which only differs in that it loads the image from the journal rather than the camera.
 +
 
 +
 
 +
===Infrared Photography===
 +
[[File:More_ir_more_visible.jpg |300px]]
 +
 
 +
See [[User:M_anish#Partial_near-IR_photography_with_the_XO_camera ]]
 +
 
 +
===Create your own 'camera' block with Python code===
 +
As of TurtleBlocksV106, this section has been largely superceded. The Show Camera block [[File:Show camera.jpg]] now has the function of the Python code and Show Media blocks [[File:Python show media.jpg]]. This information has been retained just to show how a little Python coding can be used to create your own 'show camera'.
      Line 548: Line 700:     
   ["journal", "/tmp/turtlepic.jpg"]
 
   ["journal", "/tmp/turtlepic.jpg"]
  −
The Turtle Sees block then allows pixels in the image to be read.
      
There are two ways to make the show media tile point to the file system and not the Journal
 
There are two ways to make the show media tile point to the file system and not the Journal
Line 557: Line 707:  
2 Run Turtle Art under Gnome which has a file choser rather than a Journal object choser, the settings in the block are retained if the saved project is later run under Sugar
 
2 Run Turtle Art under Gnome which has a file choser rather than a Journal object choser, the settings in the block are retained if the saved project is later run under Sugar
    +
==Pyroelectric alarm with photo ==
 +
IT IS RECOMMENDED THAT A SERIES PROTECTION RESISTOR BE BUILT INTO THE MICROPHONE PLUG AND LEADS WHEN USING AN EXTERNAL VOLTAGE SOURCE
   −
===Colour effects===
+
The pyroelectric sensor or Passive Infrared (PIR) Sensor is activated when you change the infrared radiation that reaches it. It is powered by 12 V and connected to the mic input of a XO1. When the sensor is activated, the program emits a 1000 Hz tone and displays a photograph of the moving hot body that triggered the alarm.
Here is an example where you can take a photo and apply colour effects. (Note, 'pen color' is not the same as 'turtle sees'; if you want the actual RGB value of a pixel, use the 'read pixel' block. There is also sample Python code available for setting the RGB value of a pixel.)
+
 
 +
 
 +
In addition to the sensor and laptop, a source of 12V DC is required. For the sensor shown, power requirement is 9 to 16 V DC and current consumption at 12 V is 12 mA, its output is relay NC (normally closed, open circuit when triggered)
 +
 
 +
[[File:PIRsensor.jpg]]  [[File:PIRsensorconnections.jpg]]
 +
 
 +
[http://www.youtube.com/watch?v=V0px9BO3spE video]
 +
 
 +
[[File:Alarma con foto.ta]]
 +
 
 +
by Guzman Trinidad http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-
 +
 
 +
==Steady hand game==
 +
by Guzman Trinidad http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-
 +
 
 +
Move the wire loop along the wavy wire but do not make contact.
 +
 
 +
The "Turtle Blocks" program monitors the resistance at the microphone input. To start playing, touch the wire with the ring once. Thereafter the program displays alerts every time you touch again. On reaching the opposite end of the wire, press the switch button and the program shows the player and resets for a new game.
 +
 
 +
[[File:Steady hand game.jpg]]
 +
 
 +
http://www.youtube.com/watch?v=KrD3-0HnYwg
   −
[[File:Colour processing.jpg]]
+
[[File:Juego del aro-5.png |450px]]
   −
[[File:Camera proc.doc]] ta project as doc
+
[[File:Juego del aro-5.ta]]
    
== Hall Effect Sensor ==
 
== Hall Effect Sensor ==
A Hall Effect sensor such as the (Allegro) UGN3503UA Hall Effect Sensor http://www.jaycar.com.au/products_uploaded/ZD1902.pdf can be used to measure magnetic fields. (The Allegro1302 http://www.alldatasheet.com/datasheet-pdf/pdf/120806/ALLEGRO/A1302EUA.html is an alternative to the Allegro3503).  
+
A Hall Effect sensor such as the (Allegro) UGN3503UA Hall Effect Sensor http://www.jaycar.com.au/products_uploaded/ZD1902.pdf ($6ea.) can be used to measure magnetic fields. (The Allegro1302 http://www.alldatasheet.com/datasheet-pdf/pdf/120806/ALLEGRO/A1302EUA.html is an alternative to the Allegro3503).  
    
The sensor requires +5V, this is available from the XO's USB connectors.
 
The sensor requires +5V, this is available from the XO's USB connectors.
Line 624: Line 797:  
* maximum speed
 
* maximum speed
 
* clock and stopwatch
 
* clock and stopwatch
 +
 +
The Hall effect sensor costs $6, a cheaper option might be a reed switch $2 [http://www.jaycar.com.au/productView.asp?ID=SM1002]
    
===Ampere's Law===
 
===Ampere's Law===
Line 655: Line 830:     
==Telemetry==
 
==Telemetry==
Turtle Art can share 'show text', 'show images', turtle position and fill. This means that sensor data can be transmitted to another XO laptop
+
Turtle Art can share 'show text', 'show images', turtle position, pen trails and fill. This means that sensor data can be transmitted to another XO laptop
    
===Closed circuit TV===
 
===Closed circuit TV===
 
Open a Turtle Art session for sharing on one laptop
 
Open a Turtle Art session for sharing on one laptop
   −
[[File:Image clipping neighbohood.png]]
+
[[File:Image clipping neighbohood.png |200px]]
    
and join that session on another laptop
 
and join that session on another laptop
 +
 +
[[File:Mesh.png |150px]]
 +
 +
The following program will transmit the camera output from one laptop to the other. Transmitting large amounts of data will overload the network so the image is displayed 20% size and sent every 2 seconds.
 +
 +
[[File:Image clipping cctv.png |250px]]
 +
 +
===Remote door bell ===
 +
Based on the previous door bell example, this sounds an alarm in one laptop when an electrical connection is made on another. Open a Turtle Art session for sharing on one laptop
 +
[[File:Image clipping neighbohood.png |100px]]
 +
and join that session on another laptop
 +
[[File:Mesh.png |75px]]
 +
 +
The turtle's position is used to transmit the measured resistance to the second laptop.
 +
 +
[[File:Image clipping bellsend.png|200px]]
 +
 +
<i>sending laptop</i>
 +
 +
In this case, the sending laptop is called 'tony'. To select its turtle, by its name, 'tony', plug a text block into the 'turtle' block rather than the normal number block. Load the Python block with the sine wave sample code [[File:Pythoncodeblock.jpg|50px]] and it sounds a 1 kHz tone when the received value is less than 3000.
 +
 +
[[File:Image clipping bellreceive.png|200px]]
 +
 +
<i>receiving laptop</i>
 +
 +
It could be used to sound a remote alarm on a tank level etc.
    
==Links==
 
==Links==
Line 673: Line 874:  
* http://wiki.laptop.org/go/File:Ext_audio_1.5.png
 
* http://wiki.laptop.org/go/File:Ext_audio_1.5.png
 
* http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-  (in Spanish)
 
* http://sites.google.com/site/solymar1fisica/fisica-con-xo-investigacion-  (in Spanish)
 +
* http://wiki.laptop.org/go/Measure/Kasiisi
2,486

edits

Navigation menu