- LiFePO4 Speicher Test         
Ergebnis 1 bis 1 von 1

Thema: robosapien für 50 euro mit avr steuern

  1. #1
    Erfahrener Benutzer Roboter-Spezialist
    Registriert seit
    11.11.2005
    Beiträge
    321

    robosapien für 50 euro mit avr steuern

    Anzeige

    Praxistest und DIY Projekte
    Hallo, man kann den Robosapien direkt am Anschluss Ir-out an der Platine fernsteuern. Gesendet werden müssen 8Bit.
    Also ein Pinanschluss vom AVR ( auf 3,3 V) an den Ir-out des Robosapien.
    Man setzt eine AVR-Platine mit AVR-8 auf den Rücken.

    Die zweite Lösung ist : Eine Ir-Sendediode vom AVR-8 vor die Empfangs-Diode setzen, dann braucht man nicht an der Robosapienplatine löten.

    Unten sind einige Auszüge zum Proggen.

    Castle

    Code:
     
    
      This file describes how to interface the RoboSapien's IR Input and Sensor
    Output to the BasicX 24.
    
       A word of Caution... DO NOT try to drive 5V TTL levels from the BX-24's
    Outputs to the Controller Board's Inputs or you will Damage the Controller IC!
    The following schematic is a simple SCHOTTKY Diode Clamp which will 'Clamp'
    the BX-24's Output to within 0.3V of VCC (3.3V):
    
    VCC (3.3V) <---------+
                         |
                        ---  <- Cathode
                        / \       
                        ---  <- Anode
                         |
            IR <---------+-----/\/\/\/-------< From the BX-24 Output
                                 2.2K
    
               Diode Marking
                +---------+
       Anode ---|       | |--- Cathode
                +---------+
                        ^
                        Note the Band/Stripe
    
       You can use most any SCHOTTKY Diode (DO NOT use a Silicon Diode!). I'd
    recommend the 1N5817, 1N5818, or 1N5819 since they are easy to find. The
    following describes how to install it. Refer to the diagrams below:
    
       Looking at the back of the controller board with the longest side on top,
    note the 10-pin connector that connects to RoboSapien's Head. The third pin
    from the left is the IR input and there is a blank pad just to the lower left
    of the pin labeled "IR" or "IR-OUT". Connect the diode's Anode to either the
    pin or the pad.
    
       Now, looking at the upper left 4-pin connector, while it's not labeled, the
    third pin from the left is VCC. On my board the left pin is labeled "M4+", the
    next is "M4-", the third is not labeled and the fourth is labeled "P1.6".
    Slide some heat shrink or other tubing over the diode and connect it's Cathode
    to this pin.
    
       Next add a 2.2K resistor from the BX-24's Output (I use Pin 10) to the IR
    input where the diode's Anode is connected. You can use any wattage resistor
    like a 1/8W or 1/4W or even an SMD package.
    
       To isolate the IR Sensor, remove the 3rd wire from the Female connector
    that connects to the IR Input on the Controller Board. In my case, it's a
    White wire. Connect this wire to pin 12 on the BX-24. The reason for this is
    that pin is used for the InputCapture() procedure.
    
       In my interface, I used Male and Female 'break-away' headers based on 0.1"
    centers and ribbon cable. These are real common and easy to obtain. I used a
    2-pin Male header connected to the resistor above and GND on the Controller
    Board header. Next, I used a single wire soldered to the IR Sensor wire with
    Heat Shrink tubing, connected to a single Female header. That allows me to
    either connect the two for normal operation or isolate them for connecting to
    the BX-24.
    
    ______________________________________________________________________________
    |                                                                             |
    |      [oooo]              [oooooooooo]                           [oooo]      |
    \         |                  ||                                              /
     \   __   +-VCC              |+-IR                                      __  /
      \  \o\                     +--GND                                    /o/ /
       \  \o\                                                             /o/ /
        \  \o\                                                           /o/ /    
         \  \o\                                                         /o/ /    
          \  \o\                                                       /o/ /      
           \  \o\                                                     /o/ /       
            \  \o\                                                   /o/ /        
             \  \o\                                                 /o/ /         
              \   __                  Bottom View                  __  /          
               \  \o\                 ===========                 /o/ /           
                \  \o\                                           /o/ /            
                 \   __                                         __  /             
                  \  \o\                                       /o/ /              
                   \  \o\                                     /o/ /               
                    \                                            /                
                     \      [ooooooo]             [oooo] [oooo] /                 
                      \________________________________________/                  
                                                                       
    ______________________________________________________________________________
    |                                                                             |
    | L    [oooo]                           [oooooooooo]              [oooo]    R |
    \                                               ||                  |        /
     \   __                                         |+-GND          VCC-+   __  /
      \  \o\                                        +--IR                  /o/ /
       \  \o\                                                             /o/ /
        \  \o\                                                           /o/ /    
         \  \o\                                                         /o/ /    
          \  \o\                                                       /o/ /      
           \  \o\                                                     /o/ /       
            \  \o\                                                   /o/ /        
             \  \o\                                                 /o/ /         
              \   __                   Top View                    __  /          
               \  \o\                  ========                   /o/ /           
                \  \o\                                           /o/ /            
                 \   __                                         __  /             
                  \  \o\                                       /o/ /              
                   \  \o\                                     /o/ /               
                    \                                            /                
                     \ [oooo] [oooo]              [ooooooo]     /                 
                      \________________________________________/
    Code:
    The IR Carrier is 39.2kHz. Data is modulated using a space coded signal with 8 data bits (data clock is 1200Hz, 
    but actual data rate varies depending on the data).
    
    You can skip the IR and IR modulation by wiring directly into the main PCBoard. This can be encoded easily by 
    almost any small microprocessor. For modulating the signals yourself, the signal looks something like this:
    
    Timing based on 1/1200 second clock (~.833ms)
    Signal is normally high (idle, no IR).
    Start: signal goes low for 8/1200 sec.
    Data bits: for each of 8 data bits, space encoded signal depending on bit value
        Sends the most significant data bit first
        If the data bit is 0: signal goes high for 1/1200 sec, and low for 1/1200 sec.
        If the data bit is 1: signal goes high for 4/1200 sec, and low for 1/1200 sec.
        BTW: The first bit (msb) is always 1 (valid codes are from $80 to $FF)
    When completed, signal goes high again.
    No explicit stop bit. Minimal between signals is not known.
    
    
    This is a list of IR Commands referenced to the RoboSapien manual. Values
    are in Hex and (Decimal) format. For a complete list of standard and secret
    commands as well as detailed IR timing information, check this site:
    
          http://www.aibohack.com/robosap/ir_codes.htm
    
    Movement Commands (no shift)
    
        * $80 - turn right (on left side of remote)
        * $81 - right arm up (upper left button on remote)
        * $82 - right arm out
        * $83 - tilt body right
        * $84 - right arm down
        * $85 - right arm in
        * $86 - walk forward
        * $87 - walk backward
        * $88 - turn left (on right side of remote)
        * $89 - left arm up (upper right button on remote)
        * $8A - left arm out
        * $8B - tilt body left
        * $8C - left arm down
        * $8D - left arm in
        * $8E - stop 
    
    Programming Commands (no shift)
    
        * $90 - P (Master Command Program)
        * $91 - P>> (Program Play, the one on the bottom)
        * $92 - R>> (Right sensor program)
        * $93 - L>> (Left sensor program)
        * $94 - S>> (Sonic sensor program) 
    
    GREEN shift commands
    
        * $A0 - right turn step
        * $A1 - right hand thump
        * $A2 - right hand throw
        * $A3 - sleep
        * $A4 - right hand pickup
        * $A5 - lean backward
        * $A6 - forward step
        * $A7 - backward step
        * $A8 - left turn step
        * $A9 - left hand thump
        * $AA - left hand throw
        * $AB - listen
        * $AC - left hand pickup
        * $AD - lean forward
        * $AE - reset
    
        * $B0 - Execute (master command program execute)
        * $B1 - Wakeup
        * $B2 - Right (right sensor program execute)
        * $B3 - Left (left sensor program execute)
        * $B4 - Sonic (sonic sensor program execute) 
    
    ORANGE shift commands
    
        * $C0 - right hand strike 3
        * $C1 - right hand sweep
        * $C2 - burp
        * $C3 - right hand strike 2
        * $C4 - high 5
        * $C5 - right hand strike 1
        * $C6 - bulldozer
        * $C7 - oops (fart)
        * $C8 - left hand strike 3
        * $C9 - left hand sweep
        * $CA - whistle
        * $CB - left hand strike 2
        * $CC - talkback
        * $CD - left hand strike 1
        * $CE - roar
    
        * $D0 - All Demo
        * $D1 - Power Off (drop snow-globe and say "Rosebud")
        * $D2 - Demo 1 (Karate skits)
        * $D3 - Demo 2 (Rude skits)
        * $D4 - Dance 
    
    NOTES:
    
        * add $08 to go from right-side commands to left-side commands.
        * add $20 to command bytes for the GREEN shift (ie. $Ax and $Bx range)
        * add $40 to command bytes for the ORANGE shift (ie. $Cx and $Dx range)
    
    SECRET UNDOCUMENTED CODES
    
    Several different launch codes (Executing the main program)
    
        * $B0 - standard "EXECUTE" on remote
          Robot says "uh-huh" before starting Main program
          No subroutines called [Execute sensor commands (Green Shift) cause error sounds to be played instead of what they should do -- bug or feature you decide]
    
        * $97 - appears to be same as $B0
    
        * $98 - Quiet execute main program
          Robot does not say "uh-huh"
          No subroutines called
    
        * $9A - Quiet execute main program with subroutines !!
          Robot does not say "uh-huh"
          Subroutines are called (as documented in the manual). This is the one to use.
          Execute feature appears to be same as $91 (regular remote Program Play). $91 button also does other things like end the current recording. $9A code doesn't. 
    
    Useful? secret codes
    
        * $F6 - feet shuffle
        * $FB - nothing (useful as NO-OP)
        * $FC - raise arm throw
        * $D6 - karate chop 
    
    WORK IN PROGRESS, not useful [or at least no significant difference detected]
    
        * $95,$96 - Program main again (like $90)
        * $99 - like $98
        * $9B - like $90 ?
        * $9C - do nothing
        * $9D,9E,9F - like $90 ?
        * $B5 - like $97 ?
        * $B6 - like $90 ?
        * others - looks like these repeat as well (eg: record/execute one of the program areas) or do nothing
    
        * $E0 - $EE (looks like the $A0 range)
        * $EF - nothing
        * $F0 - like $97
        * $F1 - like $98
        * $F2 - Execute right program
        * $F3 - Execute left program
        * $F4 - Execute sonic program
        * $F5 - like $F0/97 ?
        * $F7 - like $F0/97 ?
        * $F8,F9,FA - like $F1/98 ?
        * $FD,FE,FF - program main again (like $90)
    Miniaturansichten angehängter Grafiken Miniaturansichten angehängter Grafiken sapavr_wireup.jpg   dsc00051.jpg  

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

MultiPlus Wechselrichter Insel und Nulleinspeisung Conrad