Sie sind auf Seite 1von 7

6/3/2015

BasicX24

DC Motor Controllers

EvosapienCommunity
Robosapien.tkCommunity
Forums

Up to 2x150A. Advanced features USB, Serial, Analog or RC Interface

Thissitewaslastupdated:
January082005
ImodifiedmyRobosapienwiththeBasicX24
MicrocontrollerandandRambboardfrom
Robodysseythatsupportscarryingthechip,and
abletoprogramviadb9cabletoaPC.
CurrentaddonisaSharpSensor,attachedtohis
faceforavoidingwalls,futureplansinclude
Photocell,andalsoMotorControllerforincrease
inlegwalkingandalsoarmsupport,(notchip
related,springeenhancement)

WowWee2006Robot
Lineisout..CLICK
HEREtocheckoutmy
pageaboutit,whichwill
constantlybeupdatedto
showusersthenew
pictures,orvideosthat
mightcomeout!!!Wow
Weehastheirown
SoftwareNOW!!
YaY!!!!

SchematicOverview:basicallythethickblackwireinsideRShas7wiresor
so,youneedtoCUT/STRIP/SOLDERtheBlackandWhiteWireasitlooks
ontheDiagram

ClickHeretowatch
MarkTilden,V2,
Roboraptoronthe
GadgetShow10mb
4:42Min

Notes:ThisshowstheRobosapieniR(infrared)tappedintousingtheRAMBboardandtheBasicX
24Microcontroller,thechipisontheRambboard,lookaboveforpicturesoftheactualhardware.

Thisiswhatyouget
whenyouget2RSv2s
withfreshbatteries,
Robopet,Roboraptor,
and3V1sallinthe
sameroom,fightingover
whattowatchonthe
TV!!!

AfewnotestomeantionforadvancedusersthisRAMBboardhascutoutsomeofthePins
BX24usesforotherthings,andwerenotadded,sonoonescrewsitup,IwillpostaPIN#
diagramsostuffwillbealoteasier,lookforthatinthecommingdayorJune1314

<==
Besidethisisadiagramofwherethe
DIODEandtheRESISTORgo.inthe
originalHackAToythesecomponents
werenotadded,butasmeantionedin
ThandleysBX24ExperiencesHeusedthis
tonotfrytheICControllers,ifyoudont
haveit,morethenlikelyyourRScan
handleit,asotherRShaveusedthismod
w/outitforhoursuponhoursandno
effecthashappened,butjustasa
precautionIwouldmakesureyouhave

http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

EvoSapien
NocturnalRobosapienSite
RoBBoTT'sNeonModssite
Sprocket2Cog's

1/7

6/3/2015

BasicX24
that....clicktheImagetoseeadetailed
artitcle+abiggerpicturetowirethat
together

RoboRaptorsite

IlearntthisfromreadingdocumentsonBX24RSrelatedMateiraloffhissite,whichisinmylinksifyou
wanttocheckitout,healsohasalotofotherBX24RSmodshehasdone.butIampastinghis
documentsbelowsincetheyareallfinelytuned:)youcouldsay

AwordofCaution...DONOTtrytodrive5VTTLlevelsfromtheBX24'sOutputstotheControllerBoard's
InputsoryouwillDamagetheControllerIC!ThefollowingschematicisasimpleSCHOTTKYDiodeClamp
whichwill'Clamp'theBX24'sOutputtowithin0.3VofVCC(3.3V):
YoucanusemostanySCHOTTKYDiode(DONOTuseaSiliconDiode!).I'drecommendthe1N5817,
1N5818,or1N5819sincetheyareeasytofind.Thefollowingdescribeshowtoinstallit.Refertothediagrams
below:Lookingatthebackofthecontrollerboardwiththelongestsideontop,notethe10pinconnectorthat
connectstoRoboSapien'sHead.ThethirdpinfromtheleftistheIRinputandthereisablankpadjusttothe
lowerleftofthepinlabeled"IR"or"IROUT".Connectthediode'sAnodetoeitherthepinorthepad.
Now,lookingattheupperleft4pinconnector,whileit'snotlabeled,thethirdpinfromtheleftisVCC.Onmy
boardtheleftpinislabeled"M4+",thenextis"M4",thethirdisnotlabeledandthefourthislabeled"P1.6".
Slidesomeheatshrinkorothertubingoverthediodeandconnectit'sCathodetothispin.
Nextadda2.2KresistorfromtheBX24'sOutputtotheIRinputwherethediode'sAnodeisconnected.You
canuseanywattageresistorlikea1/8Wor1/4WorevenanSMDpackage.
ToisolatetheIRSensor,removethe3rdwirefromtheFemaleconnectorthatconnectstotheIRInputonthe
ControllerBoard.Inmycase,it'saWhitewire.ConnectthiswiretothepinyouareusingontheBX24.The
reasonforthisisthatpinisusedfortheInputCapture()procedure.
Inmyinterface,IusedMaleandFemale'breakaway'headersbasedon0.1"centersandribboncable.These
arerealcommonandeasytoobtain.Iuseda2pinMaleheaderconnectedtotheresistoraboveandGNDon
theControllerBoardheader.Next,IusedasinglewiresolderedtotheIRSensorwirewithHeatShrinktubing,
connectedtoasingleFemaleheader.Thatallowsmetoeitherconnectthetwofornormaloperationorisolate
themforconnectingtotheBX24.Thandley

BUILDINGAPROGRAMTOGOWITHROBOSAPIEN......IR
CODES/HEXCODESANDBINARYANDCODEFORBASICX
PROGRAMMING,HOWITACTUALLYWORKS...
Butwhynottakea'Chance'andgettoknowwhatBinaryreallyis,wellnotreally,butanunderstandingofit...
got01minute??)
ThisisalistofIRCommandsreferencedtotheRoboSapienmanual.Values
areinHexand(Decimal)format.Foracompletelistofstandardandsecret
commandsaswellasdetailedIRtiminginformation,checkthissite:
http://www.aibohack.com/robosap/ir_codes.htm
IhavemodifiedthislisttodisplaytheBinaryValueofeachcommandforpeoplewhouseRobodyssy,ormy
Program,aswellasgiveyouanunderstandingofwhatisactuallygoingon
RedCommands:
=============
(PageP.7)
81(129)RightArmUp10000001
84(132)RightArmDown10000100
85(133)RightArmIn10000101
82(130)RightArmOut10000010
83(131)TiltBodyRight10000011
89(137)LeftArmUp10001001
8C(140)LeftArmdown10001100
8D(141)LeftArmIn10001101
8A(138)LeftArmOut10001010
8B(139)TiltBodyLeft10001011
(PageP.8)
80(128)TurnRight10000000
88(136)TurnLeft10001000
86(134)WalkForward10000110
87(135)WalkBackward10000111
8E(142)Stop10001110
http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

2/7

6/3/2015

BasicX24

92(146)RightSensorProgram10010010
94(148)SonicSensorProgram10010100
93(147)LeftSensorProgram10010011
90(144)MasterCommandProgram10010000
91(145)ProgramPlay10010001
GreenCommands:
===============
(PageP.9)
A1(161)RightHandThump10100001
A4(164)RightHandPickup10100100
A5(165)LeanBackward'10100101
A2(162)RightHandThrow10100010
A3(163)Sleep10100011
A9(169)LeftHandThump10100001
AC(172)LeftHandPickup10101100
AD(173)LeanForward10101101
AA(170)LeftHandThrow10101010
AB(171)Listen10101011
A0(160)RightTurnStep10100000
A8(168)LeftTurnStep10101000
A6(166)ForwardStep10100110
A7(167)BackwardStep10100111
AE(174)RESET10101110
B2(178)RightSensorProgramExecute10110010
B4(180)SonicSensorProgramExecute10110100
B3(179)LeftSensorProgramExecute10110011
B0(176)MasterCommandProgramExecute10110000
B1(177)WakeUp10110001

OrangeCommands:
================
(PageP.11)
C1(193)RightHandSweep11000001
C4(196)High511000100
C5(197)RightHandStrike111000101
C2(194)Burp11000010
C3(195)RightHandStrike211000011
C9(201)LeftHandSweep11001001
CC(204)TalkBack11001100
CD(205)LeftHandStrike111001101
CA(202)Whistle11001010
CB(203)LeftHandStrike211001011
(PageP.12)
C0(192)RightHandStrike311000000
C8(200)LeftHandStrike311001000
C6(198)Bulldozer11000110
C7(199)Opps!11000111
CE(206)Roar11001110
D2(210)Demo111010010
D4(212)Dance11010100
D3(211)Demo211010011
D0(208)AllDemo11010000
D1(209)PowerOff11010001
NOTES:
add$08togofromrightsidecommandstoleftsidecommands.
add$20tocommandbytesfortheGREENshift(ie.$Axand$Bxrange)
add$40tocommandbytesfortheORANGEshift(ie.$Cxand$Dxrange)

=============================
Example#1
SubRoar()'Roar'11001110(name,command,binary)
CE(206)Roar11001110(hex,decimal,Command,binary)
SubLHandSk1()'LeftHandStrike1'11001101(name,command,binary)
CD(205)LeftHandStrike111001101(hex,decimal,Command,binary)
=============================
Example#2
TutorialonBinary:thoughtitmightbegoodsurehelpedme)
Humanshavetenfingers,andsoit'snotsosurprisingthatmanyculturesthroughouthistoryhaveused
base10.Digitalcomputersusebase2orbinarynumberrepresentation,eachdigitofwhichisknownas
http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

3/7

6/3/2015

BasicX24

abit(binarydigit).Here,eachbitisrepresentedasavoltagethatiseither"high"or"low,"thereby
representing"1"or"0",respectively.Torepresentsignedvalues,wetackonaspecialbitthesignbit
toexpressthesign.Thebinaryadditionandmultiplicationtablesare
0+0=0
1+1=10
0+1=1
1+0=1
0+0=0
0+1=0
1+1=1
1+0=0
(1)
Acarrymeansthatacomputationperformedatagivenpositionaffectsotherpositionsaswell.Here,
1+1=10isanexampleofacomputationthatinvolvesacarry.Notethatifcarriesareignored,
subtractionoftwosingledigitbinarynumbersyieldsthesamebitasaddition.Computersusehighand
lowvoltagevaluestoexpressabit,andanarrayofsuchvoltagesexpressnumbersakintopositional
notation.Logiccircuitsperformarithmeticoperations.
oksoweregoingtofindoutwhereeachbinarybitisplacedontheBX24basicXcoding....

AC(172)LeftHandPickup10101100(hex,decimal,Command,binary)
itisreallysimpletosortout1beinghighbit,and0beingthelowbit
thecodingissimpleontheBXasasimple1isrepresentbya"HighBit"name....
CallPulseout(Sapien,HighBit,1)'Thisequals1Binary
CallPulseout(Sapien,Clockbit,0)
The0isrepresentedby
CallPulseout(Sapien,LowBit,1)'ThisEquals0Binary
CallPulseout(Sapien,Clockbit,0)
============================================
REFERTOTHISEXAMPLETOSEEHOWEACHBINARYBITISPLACED
SubLHandPick()'LeftHandPickUp'10101100wouldbedisplayedsomethinglikethisonthechip
CallPulseout(Sapien,startbit,0)'bittostartsendingcommands
CallPulseout(Sapien,HighBit,1)'7bit1
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'6bit0
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'5bit1
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'4bit0
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'3bit1
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'2bit1
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'1bit0
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'0bit0
CallPulseout(Sapien,Clockbit,0)
=======================
DefinitionoftheseValues.....andhowtheyadduptoonefullcommand(walkforward)
Thiscodelistedbelowisinsertedatthebeginningofyourprojectsoeachbitofbinarycanbeproperly
convertedandusedtomoveyourRobosapienrobot.
PublicConstStartBitassingle=0.006664'Timeittakesforthestartbittostartacommand
PublicConstLowBitassingle=0.000833'Timeittakesforthelowbit=0
PublicConstHighBitassingle=0.003332'Timeittakesforthehighbit=1
PublicConstClockBitassingle=0.000833'Clockbittime'second#inthe1binarybitcode=0
youplaceastartbitatthebegginingofeachcommandyouaregoingtocreate..soyouwoulddothisby
CallPulseout(Sapien,startbit,0)'bittostartsendingcommands
nowwehavetocalltheHIGH/LOWandClockBitforeachbitofBinarywehavetodealwith.Wehave
http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

4/7

6/3/2015

BasicX24

8peicesofBinary,whichmeansthatwewillbasicallyhave8questions,withana)anb)valuemaking
thefinalvalueforthatbitofBinary....
Thisisaveryeasythingtodo,aswecansortout1or0foreach8oftheBinaryvaluesbyseingifithas
aHighBitoraLowBitValueinit....
CallPulseout(Sapien,HighBit,1)=1binarybit
CallPulseout(Sapien,LowBit,1)=0binarybit
followedbythenextcommandwhichgivesa0binarybittotheClockBitValue...
CallPulseout(Sapien,Clockbit,0)
Fullcodewouldlooklikethis
CallPulseout(Sapien,HighBit,1)'7bit
CallPulseout(Sapien,Clockbit,0)
andoncecalculatedusingthislittlechartbeloworbinarytutorialabovewewillget1fullbinarybit
Valuetothe8BitValuethatisneededtodoacommandonRobosapien
0+0=0
0+1=1
1+0=1
0+0=0
0+1=0
1+1=1
1+0=0
sothatexampleabove:
CallPulseout(Sapien,HighBit,1)'7bit
CallPulseout(Sapien,Clockbit,0)
WouldbeaBinaryvalueof1

***********TEST*****************

TESTYOURSKILLS
==========
(QUESTIONA)HOWMANY1AREINTHISBINARYDATA?
SubLHandSk1()'LeftHandStrike1

CallPulseout(Sapien,HighBit,1)'7bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'6bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'5bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'4bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'3bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'2bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'1bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'0bit
CallPulseout(Sapien,Clockbit,0)
(QUESTIONB)whatistheBinaryvalueofthisCommand

CallPulseout(Sapien,HighBit,1)'7bit
CallPulseout(Sapien,Clockbit,0)
http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

5/7

6/3/2015

BasicX24

CallPulseout(Sapien,HighBit,1)'6bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'5bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'4bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'3bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'2bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'1bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'0bit
CallPulseout(Sapien,Clockbit,0)
(QUESTION3)whatistheBINARYREADINGforthisValue?
CallPulseout(Sapien,HighBit,1)'7bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'6bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'5bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'4bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,LowBit,1)'3bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'2bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'1bit
CallPulseout(Sapien,Clockbit,0)
CallPulseout(Sapien,HighBit,1)'0bit
CallPulseout(Sapien,Clockbit,0)
[b]
**************ANSWERSATBOTTOMOFDOCUMENT*******************

http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

6/7

6/3/2015

BasicX24

[Index][Contest][AboutMe][AboutRS][MyRSMods][Projects][BasicX24]
[Autonomousv.1.1][Autonomousv.1.2][MyPics][robopet][MyVideo][RSHelp!]
[RSV2][2006WowWee][NewsArchives][Links][==v2home][===Evosapien]
[===CES2006][USBVisionpics]

http://www.evosapien.com/robosapienhack/knitsu/html/basicx24.html

7/7

Das könnte Ihnen auch gefallen