0% found this document useful (0 votes)
39 views7 pages

Robotics Club - Data Logging

Introduction to datalogging on the Mindstorms NXT robots using the sensors standard in the Education kit.

Uploaded by

amykerkemeyer471
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views7 pages

Robotics Club - Data Logging

Introduction to datalogging on the Mindstorms NXT robots using the sensors standard in the Education kit.

Uploaded by

amykerkemeyer471
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

!

"#$% #% '(#( )%**+"*



1he lessons on daLa logglng should be compleLed Al1L8 you are comforLable
programmlng Lhe roboL Lo move and use lLs sensors.

,-(# +. /(#( 0%**+"*1 uaLa logglng means Lo Lake measuremenLs from Lhe
envlronmenL. ?ou can Lhen look aL Lhe daLa Lo perform calculaLlons, answer quesLlons,
eLc. 1he nx1 roboLs can log Lhe lnformaLlon LhaL lL gaLhers from lLs sensors (such as
Louch, llghL, ulLrasonlc, sound, eLc.)

,-(# +. ( .2".%$1 A sensor ls a devlce LhaL Lakes ln lnformaLlon from lLs
surroundlngs. lor example, Lhe sound sensor wlll deLecL sound ln Lhe room and Lhe
Louch sensor deLecLs lf a buLLon ls pressed.

1hese are Lhe sensors you have used before:


,-3 4%50/ 42 5.2 ( /(#( 0%**2$1 An elecLronlc daLalogger can record
lnformaLlon for long perlods of Llme wlLhouL Llrlng. lL can Lake measuremenLs much
more qulckly Lhan a person can. lL can also record lnformaLlon from mulLlple sensors aL
Lhe same Llme.

,-(# /%2. ( /(#(0%**2$ "22/ #% 6"%41

lf you wanL Lo Lell a daLalogger Lo collecL daLa, lL needs Lo know
Lhese Lhlngs:

1) ,-(# klnd of sensor ls lL recordlng?
2) ,-2$2 ls Lhe sensor plugged ln? (whaL porL)
3) 7%4 %8#2" does lL need Lo collecL daLa (Llme beLween
sampled daLa)
4) 7%4 0%"* does lL need Lo collecL daLa for? (LoLal Llme of
Lhe experlmenL)
'(#(0%**+"* 9:;2$+<2"# = > ?2#-2$2/ /(#( 0%**+"*@

?ou wlll program your roboL Lo measure dlsLance uslng Lhe ulLrasonlc sensor and ploL
Lhe lnformaLlon on a graph whlle Lhe nx1 roboL ls connecLed dlrecLly Lo Lhe compuLer.

SLep 1: Launch Lhe Lego MlndsLorms sofLware
SLep 2: lug Lhe roboL ln uslng Lhe uS8 cable

SLep 3: LnLer daLa logglng mode by cllcklng Lhls symbol ln Lhe upper lefL:

?ou should now have a new wlndow wlLh a blue background llke Lhls: (lnsLead of an
orange background) and lL should say 'uaLa Logglng' aL Lhe Lop of Lhe wlndow.


SLep 4: ln Lhe box where lL says 'SLarL new LxperlmenL', Lype a name for your program
and cllck 'Co>>'


SLep 3: now you need Lo seL up Lhe daLa collecLlon ln Lhe followlng wlndow. SeL lL up as
shown here and cllck 'Ck'


SLep 6: Make sure your MlndsLorms roboL ls connecLed Lo Lhe compuLer wlLh Lhe uS8
cable.
SLep 7: 8un your program - cllck Lhe Lrlangle ln Lhe mlddle (download and run)



Whlle your program runs, polnL Lhe ulLrasonlc sensor aL Lhe Lable. Move Lhe
roboL/sensor Lowards and away from Lhe Lable as Lhe program runs whlle waLchlng Lhe
graph on Lhe screen.

?our MlndsLorms roboL wlll collecL daLa from Lhe ulLrasonlc sensor and graph lL on Lhe
compuLer. AL Lhe end of your experlmenL, you wlll end up wlLh a ploL LhaL wlll look
someLhlng llke Lhe followlng (yours wlll noL look qulLe Lhe same dependlng on whaL your
sensor deLecLed!)

?ou can run your experlmenL agaln and lL wlll ploL a second seL of daLa on Lhe same
graph. Cllck on Lhe color box ln Lhe Lable aL Lhe boLLom Lo change Lhe color of Lhe
second graph Lo blue or any oLher color you choose.

'(#(0%**+"* 9:;2$+<2"# A > B2<%#2 /(#( 0%**+"*@

?ou wlll program your roboL Lo measure dlsLance uslng Lhe ulLrasonlc sensor and ploL
Lhe lnformaLlon on a graph whlle Lhe nx1 roboL ls nC1 connecLed Lo Lhe compuLer. 1he
roboL wlll collecL and save Lhe daLa, you wlll Lhen reLrleve Lhe daLa from Lhe roboL and
graph lL.

SLep 1: LnLer daLa collecLlon mode as you dld ln uaLa Logglng LxperlmenL 1

SLep 2: 1ype a name for your program ln Lhe box and cllck 'Co>>'

SLep 3: now you need Lo seL up Lhe daLa collecLlon as you dld ln Lhe prevlous daLa
logglng experlmenL

SLep 4: Make sure your MlndsLorms roboL ls connecLed Lo Lhe compuLer wlLh Lhe uS8
cable.

SLep 3: uCWnLCAu your program Lo Lhe MlndsLorms roboL (uownload Lo nx1) buL do
noL run lL yeL.



SLep 6: 8emove Lhe uS8 cable.

SLep 7: llnd your program flle on Lhe roboL and choose '8un'. ConducL your daLa
collecLlon by movlng Lhe ulLrasonlc sensor near and away from ob[ecLs unLll Lhe
program sLops. ?ou can collecL Lhe daLa anywhere ln Lhe room now.

SLep 8: 8econnecL your roboL wlLh Lhe uS8 cable.

SLep 9: Cllck Lhe uLCAu l8CM nx1 buLLon whlle on Lhe /(#( 0%**+"* screen (Lhe one
LhaL says 'uaLa Logglng' aL Lhe Lop)






SLep 9: Choose Lhe daLa log flle you wlsh Lo reLrleve from Lhe roboL. lf you have more
Lhan one daLa flle on Lhe roboL, choose Lhe mosL recenL one based on Lhe daLe/Llme.
Cllck Lhe 'uLCAu' buLLon on Lhe boLLom of Lhe wlndow.



?our daLa graph should now be shown on Lhe compuLer screen (lL may noL look llke Lhls
one, dependlng on Lhe daLa your roboL collecLed!)

C2:# .#2;.@

now LhaL you have learned abouL daLa logglng, pracLlce uslng remoLe daLa collecLlon by
deslgnlng a new experlmenL. 1hlnk abouL Lhe followlng quesLlons whlle you plan your
own experlmenL Lo collecL daLa wlLh Lhe MlndsLorm sensors.

1. WhaL sensors LhaL are aLLached Lo your roboL could you use Lo collecL daLa ln Lhe
room? WhaL wlll Lhe sensors be able Lo Lell you?

2. Pow long wlll your experlmenL run?

3. WhaL do you Lhlnk Lhe daLa wlll look llke (make a predlcLlon before you run your daLa
collecLlon experlmenL)

'(#(0%**+"* 9:;2$+<2"# D > B%E+"* '(#( )%**2$@

?ou wlll program your roboL Lo measure dlsLance uslng Lhe ulLrasonlc sensor and ploL
Lhe lnformaLlon on a graph whlle Lhe nx1 roboL ls nC1 connecLed Lo Lhe compuLer. ?ou
wlll Lhen reLrleve Lhe daLa and graph lL.

1he followlng program wlll Lurn Lhe MlndsLorm nx1 lnLo an auLomaLed daLalogglng
roboL. 1he roboL navlgaLes Lo avold ob[ecLs uslng Lhe ulLrasonlc sensor whlle recordlng
Lhe daLa from Lhe ulLrasonlc sensor aL Lhe same Llme.

rogram Lhe roboL Lo use Lhe ulLrasonlc sensor Lo avold ob[ecLs whlle drlvlng (Lhlnk
back, you've done Lhls before!).

lf Lhe roboL encounLers an ob[ecL closer Lhan 10 lnches, have Lhe roboL play a sound,
Lurn Lo Lhe rlghL, and conLlnue drlvlng. (8emember, Lo Lurn a corner only drlve wlLh one
moLor - you need Lo declde how many roLaLlons you need Lo Lurn Lhe roboL)


SLarL by programmlng Lhe porLlon of Lhe program Lo drlve Lhe roboL (Lhe one ln Lhe loop
above).

Cnce you have your program navlgaLlng as you wanL, now also add a daLa logglng block
Lo collecL daLa whlle your roboL drlves. ?ou can flnd Lhls block under Lhe 'Advanced'
program blocks:




Cllck on Lhe myuaLa block Lo seL up your daLa collecLlon. SeL Lhe duraLlon Lo 'unllmlLed'


now uCWnLCAu your program Lo Lhe MlndsLorm roboL.

llnd your flle on Lhe roboL and run your program. Allow your roboL Lo collecL daLa.

AfLer lL has collecLed daLa for a whlle, press Lhe grey sLop buLLon.

ALLach your MlndsLorm roboL Lo Lhe compuLer. Co Lo your /(#( 0%**+"* screen (Lhe
one LhaL says 'uaLa Logglng' aL Lhe Lop) and choose Lhe 'uLCAu l8CM nx1' buLLon.

SelecL your daLa flle and cllck 'upload' Lo dlsplay your graph on Lhe compuLer.

You might also like