Society Robots Axon Micro Controller User Guide

download Society Robots Axon Micro Controller User Guide

of 39

Transcript of Society Robots Axon Micro Controller User Guide

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    1/39

    AXON EXAMPLES

    Need examples of what the Axon can do?Check out these robots for designs and source code.

    Experimental Robot Platform (ERP)This Axon-controlled robot has two arms, pan/tilt cameravision, scanning sharp IR, and hopefully the intelligence of adog when it's done. It is being built as a platform for my

    future robot sensor/intelligence experiments.

    RoboRealm + Servo ControllerRoboRealm has partnered with SoR to allow forRoboRealms amazing free computer vision software tocontrol the Axon. It includes an interface to control servosfrom your PC - and its all open source.

    Robot FishA project I've been working on for the Navy for the last 3+years. Two research papers are currently posted, and video

    will come when the project is completed. No source ordesigns will be posted, but it demonstrates the power of theAxon (actually, an early prototype of it).

    IR Transceiver and Bluetooth DemoI custom made an IRDA compatible transceiver completewith encoding/decoding. I'm demonstrating it using theAxon microcontroller, and using Bluetooth to upload data tomy PC.

    X Robot ArmundocumentedI built this robot arm for a client of mine in mid-2008, butI'm not allowed at the moment to talk about it. It wasbasically an Axon controlled robot arm. I'll release moredetails and video maybe at the beginning of 2009. Sorry!

    Axon Controlled Laser Cat ToyAfroman's tutorial video and source code on how to use theAxon for controlling a laser to use as a toy for his cat,Pikachu.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    2/39

    Transformers ArtworkAfroman's tutorial video and Axon source code on how tomake some nice transformer logo artwork using PWM andLED arrays.

    Axon fits on BRAT biped perfectly!airman00 reports that by freaky coincidence the Axon fitsperfectly on the lexan plate screw holes that come with theLynxmotion BRAT biped. He also has a BRAT Axon videoup. Others have also gotten the Axon to work with the Brat(videos).

    Axon, Mac, Bluetooth, LEDsairman00 demonstrates the Axon being sent commands tocontrol LEDs from a Mac through Bluetooth. He also has anice video, some pictures, and source code.

    Axon with PS2 Controllerdunk shows how to interface a PS2 controller with the Axon.Additionally, he did this using a Linux virtual machinerunning Windows XP (not required, just shows it can bedone with no problem). Here is his demo video. If you haveany questions, check out the Axon with PS2 controllerforum post.

    NuisanceNuisance uses multiple scanning Sharp IR to generate a mapfor navigation decisions. It is driven with DC motors by

    interfacing with the Sabertooth motor driver.

    Vone"Based on the Lynxmotion Tri-Track, it has two 12 volt DCmotors, controlled by the sabertooth 2X10 and, of course,the Axon, which is incredible."

    Stampy Algorithm for AxonJdog converts my Stampy algorithm for use with the Axon.See his demo video. Download the commented source code.

    SoR Scope (USB oscilloscope)Free access to plug-n-play SoR Scope, software thatconverts your Axon into a 16 channel oscilloscope. Whowants to spend hundreds or thousands on a clunkyoscilloscope anyway? No programming necessary.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    3/39

    SoR Biped EngineThe SoR Biped Engine is simple to use software to get yourrobot biped walking within ~30 minutes by PC control.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    4/39

    Axon FAQ

    I have never built a robot before, is the Axon right for me?This really depends on two factors.

    First is your budget. If you have a very tight budget, the Axon will probably notbe right for you. The Axon comes with many features that you will probably

    never use for an ultra low budget project.

    The second is on your long-term plans. All of the cheap boards out there aredesigned to be cheap - they are not abundant with features. They tend to not havea power bus (meaning they require additional wiring), and they tend to support upto only 8 servos and 8 sensors maximum. The Axon however has 3x morefeatures available for your future growth and future robots. If you plan to buildmore advanced robots in the future, the Axon would be the better long termchoice.

    I am a very weak programmer, is that a problem?No, it is not! All the complicated programming has already been done for you.Almost any feature can be used by calling simple one-line functions, of which islisted in the Axon function list.

    Do you offer full customer support?SoR offers more support than any other controller or website on the market:admin's proven personal support, plus the fairly large and growing SoR forumcommunity. If you have problems or questions, there are three steps you should

    take:

    1) Check the guides and datasheets2) Search the forum for similar questions3) Ask your question in the forum, including 'Axon' in the subject line

    And if you have a more general 'how do I ...' question, remember to always searchthe SoR site first before asking in the forum. Its probably been already asked!

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    5/39

    You might also find the general robot FAQ and the must read robot tutorials listvery useful.

    Is there a warranty, or refund, for a damaged product?No. I individually test all Axon boards before shipping, and so I guarantee that noproduct is shipped damaged. If your board fails due to improper use, post aquestion in the forum for help to revive or at least partially revive your Axon.This may often involve soldering and/or replacing individual components on theboard, or modifications in software.

    GENERAL TROUBLESHOOTING

    The green LED is flashing but nothing is working, what's wrong?The green LED flashes when the Axon is reset - usually when battery powerdrops too low. Unpower your board, swap to a fully charged battery with theproper voltage, and try again. Note that the green LED could also flash if youwrite code to do just this, so if the battery is fine, then your code could be wrong .. .Or if you are using noisy electronics on the ADC line (like Sharp IR), resets canoccur.

    Why am I getting gibberish from the UART?Giberish means your COM port is correct but baud rate is set improperly. Here isyour checklist, basically three places to set it:

    hyperterminalhardware settings in device manager (step 3)axon software

    I usually just set *everything* by default at a specific baud rate for *all* of myprojects to avoid potential conflicts.

    What happens if I 'brick' the Axon?The term 'bricking' is what happens when you play around with the fuse settingsnot knowing what you are doing. If you set the wrong fuse, you could end uppreventing the Axon from reprogramming again - including preventing thechanging of the fuse settings. This is a very common 'stupid' mistake - all theexperts have bricked a microcontroller at least once in their lifetime! I definitely

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    6/39

    have. The most likely event is that you set the frequency clock wrong in the fuses,and that you will need to apply an external clock using a function generator.Unsolder the crystal and the two small capacitors next to it, apply a 16MHzsquare wave to XTAL1, then using a hardware programmer change the fusesettings back to a 16MHz crystal. Lastly, solder the crystal and caps back on.

    These are the correct Axon fuse settings and more instructions.

    What happens if I fried a port pin?The ATmega640 is very resilient to abuse. If for example you accidentally plug inground to an output pin while the pin is set to high, the pin will most likely fry.However, the rest of the microcontroller should still work - just use a differentpin. A very likely way to fry a port pin is plugging in the battery wrongly to it, ora device attached to it doesn't act as expected. If you are worried about damaging

    a pin, place a resistor of about 4kohm between the port pin and your externaldevice signal pin.

    I'm using the 3.3V line, and the USB isn't working!The 3.3V line can only supply a limited amount of current - please see CurrentTolerances. Make sure you aren't over drawing current. Also, add a 4.7uFtantalum capacitor (polarized) between 3.3V and ground. A ceramic capacitormay work for your application, so its worth a try if you have one on hand.

    The Axon resets often, what's wrong with it?Chances are this is a battery problem. First, use a multimeter to check the inputvoltage while your Axon is turned on. The original source code is designed toflash the green status LED during a reset - constant flashing means constantresetting. Also, make sure you do not have the WDT (watch dog timer) fuse set,and that your code isn't directly causing the reset.

    The Axon resets randomly on rare occasions, and the batteries are fine.This could be because electrical noise is causing a hardware reset on the reset pin.Flip the Axon over, and on the ISP header solder a 0.1uF to 1.0uF ceramiccapacitor between RESET and GND. This could also be because you are drawinghuge amounts of power when a motor is turned on, or perhaps you havesomething occasionally shorting power.

    I just saw sparks/smoke come from my Axon!This means something was shorted. Make sure everything is plugged in correctly.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    7/39

    The Axon is designed to resist damage, so you have a good chance it will stillretain functionality after you identify and rectify the problem.

    Why does the voltage regulator get really hot?

    There are two reasons it could overheat. First, something could be shorting.Unplug your power and check your wiring. The other reason could be you areover-drawing power - the voltage regulator is rated to not handle more than about1.5A of current. The voltage regulator has thermal shutdown features, meaningthat if it overheats, it will turn off until it cools down. If you'd like to push thepower limits, add a heat sink onto the back of the voltage regulator as shown here:

    What's up with that big capacitor on the Axon?!The Axon was designed to handle abuse and unpredictable noise environments.The big capacitor acts as a noise suppression device. Where does this noise come

    from? Well, your external hardware connected to the Axon! For example, supposeyou have 40 servos connected to the Axon, and suddenly it turns all 40 on at thesame time. A huge sudden power drain will occur! If your batteries cannot handleit, the voltage will suddenly drop, causing a hardware reset of yourmicrocontroller. The big capacitor is there to help mitigate this problem.

    How do I reconfigure the USB?

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    8/39

    The CP2102 USB to UART setup has been designed so that it can be poweredfrom both USB and/or a battery. However, sometimes you may wish to changethe internal configurations of the USB - such as define the power source, orchange the device name. To learn more, have a look at the general informationand app notes. For customization, please read the customization guide, and

    download the customization software. Make sure you have the USB plugged inand that no other software is using the USB port (such as hyperterminal) beforeconnecting.

    I deleted the bootloader, how do I reupload it?To reupload the bootloader, you will need a hardware programmer. I recommendthe ATAVRISP2 which you can buy for about $36 plus shipping:

    There are many benefits to using a hardware programmer over the includedbootloader - faster uploading, easier to change fuses, and much more.

    To connect it to your Axon, just match the triangle on both the ISP header and theAxon board:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    9/39

    Next, power up the Axon and open up AVR Studio. Click on the AVR button toconnect to the Axon:

    A new connection window should come up. Select MKII as the programmer.

    Then, browse for the bootloader.hex file and upload it.

    You can download the bootloader .hex to go onto the Axon here:Axon USB Bootloader

    Remember to power up your Axon *before* programming it. If you don't,sometimes it will program but the power delivered is not always enough to keepthe commands from getting corrupted. On very rare occasions it could modify thefuses, potentially the clock fuse, and thereby 'brick' your Axon (a bad thing).

    What fuses does the Axon use? How do I change them?

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    10/39

    The best way to change/set fuses is to use a hardware programmer (such as theMKII). Open up AVR Studio, connect to the Axon, and go to the fuses tab asshown below.

    Enter in the fuses as shown, then press Program.

    DO NOT CHANGE FUSES IF YOU DO NOT KNOW WHAT YOU AREDOING

    Is the Axon RoHS compliant and lead-free?Due to an unfortunate manufacturer error (not the fault of SoR), the first batch ofAxon microcontrollers (June 2008) were made using lead-based solder. All

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    11/39

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    12/39

    In configuration properties you have to set up the location where the object file(i.e. Axon.elf) is located in the filesystem if you use the Axon's makefile.

    Next, 'clean' before you build your object file.

    And then you build and debug away with jtag.

    The USB bootloader is really slow!If you are using Windows XP, do not upgrade to SP3. The bootloader takes about~6 seconds with SP2, and ~45 seconds with SP3. There are no actual benefits tousing SP3, however many problems with it have been reported.

    To remove SP3, go to:Start -> Control Panel -> Add Remove Applications -> Windows XP SP3

    and remove it.

    Got 'CRC-Error', USB stops workingDo you get a 'CRC-Error' from the bootloader and then the USB stops working?We aren't entirely sure the cause yet for this rare error, but we have a fewtemporary solutions you can follow at this forum post. It is believed that if youallow the Axon about ~5 seconds between resets that the problem won't occur.

    Axon resetting, and I'm using Sharp IRSeveral users have reported that simply placing three Sharp IR rangefinders on theAxon can cause constant reseting. The reason is because these sensors areextremely noisy electrically. There are two solutions, and I recommend doingboth. The first is to place a ~10uF or higher ceramic capacitor connecting ADCpower and ground. This will keep the voltage more stable. The second is to placea surface mount 10nF ceramic capacitor and a 530 ohm resistor directly on theSharp IR shorting ground and the sensor output pin (the capacitor and resistorplaced/stacked in parallel). This will greatly improve Sharp IR accuracy.

    Can I use Mac or Linux?The bootloader is not directly Linux/Mac compatible. You could use a Windowsemulator like wine or dosbox. You could also use an external hardwareprogrammer for programming - please see the FAQ on how to upload code with aprogrammer.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    13/39

    DATASHEET

    Technical details for those technically inclined.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    14/39

    Total weight is 34 grams.Four 4-40 screw holes make mounting onto your robot easy.

    VOLTAGE TOLERANCES

    The Axon is designed to be fully functional from a single battery source,although you can easily plug in additional parallel batteries to the powerbus.

    Absolute minimum required voltage is 5.35V, while the recommendedbattery voltage is 6V to 7.2V. Maximum voltage at 20V, however mostservos cannot handle above 7.2V before being damaged.

    There are two power buses. ADC pins 0 to 15 are regulated at 5V, whileall other pins are directly connected to your battery. There is also a 3.3Voutput pin (see current tolerances).

    The Axon has polarity protection features, meaning that it is designed toprotect itself if you accidentally plug your battery in reverse. However, itwill NOT protect any external component connected to the unregulatedbattery bus.

    This is how the pins are set up in terms of power and signal. Refer to yourAxon board for pin numbers.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    15/39

    Pins Voltage

    E2-E7 battery

    H2-H6 battery

    Batbattery (input)

    A0-A7 battery

    J6 battery

    C0-C7 battery

    0-15 5V regulated

    3.3V 3.3V (output)

    G ground

    + battery

    - ground

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    16/39

    CURRENT TOLERANCES

    All ADC power bus pins get power from the 5V LDO voltage regulatorwith maximum allowable current of 1.5A. Adding a heat sink to theregulator can raise this amount depending on various environmentalfactors.

    The Axon has been tested to handle at least 5A on each power bus, but canin theory handle ~13A. Placing your high current draw components nearthe battery can up this number. This limitation is entirely based on powerbus tracing thickness, meaning that if you require higher currents you must

    make your own separate power bus.

    Individual I/O pins can supply about ~20mA power, each. Exceeding thisnumber could damage the I/O pin.

    The Axon also has a special regulated 3.3V output connector if you haveany components or sensors that require this voltage. This pin cannotsupply more than about 73mA, or 90mA if you aren't using USB. If you

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    17/39

    find that USB becomes unstable or fails to work when using this output,make sure you aren't overdrawing current and place a 4.7mF tantalumcapacitor (polarized) between 3.3V and ground.

    You must also keep in mind the current tolerances of the included Hitec

    572125S on/off switch. These are the limits they quoted it at:"A conservative estimate would be in the 10 amp range for the 572125Sand 16 amp range for the 54407S. But again these are just estimates."- Hitec Sales Manager

    NOISE SUPPRESSION

    All electronics creates electronic noise and sudden voltage spikes/dropsthat can potential cause problems. The Axon has been intentionallydesigned to minimize this noise, and in fact during extensive tests I foundno detectable (non-negligible) noise. However, your needs may be

    different. If you find you are using highly sensitive sensors, Irecommended attaching additional noise suppression ceramic capacitors inparallel to the regulated power bus.

    GETTING STARTEDInstalling Software

    STEP 1: Install WinAVR

    While waiting for your Axon to arrive in your mail, here are several programs youneed to download and install to make full use of your Axon microcontroller.Follow the self-explanatory installers.

    WinAVR will install the GNU Compiler and a ton of useful utilities.WinAVR (22.8mb)You can also download the latest version, but it has not been tested.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    18/39

    STEP 2: Install AVR Studio

    AVR Studio is an IDE, assembler, and programming software all in one. Whenyou want to write and compile code, this is the software you will be using.

    (install in this order)1 AVR Studio, version 4.13, build 528 (73.8mb)2 AVR Studio 4.13 SP1 (build 557) (37mb)3 AVR Studio 4.13 SP2 (build 571) (45mb)

    Further AVR Studio upgrades (untested by SoR) can be found on the AVR StudioDownload page. Or for direct links to download tested upgrades go here. BecauseAVR Studio is not compatible with Mac or Linux, you might find this post andthis post helpful. If you use Vista 64 bit, read this.

    STEP 3: Download AVRlib (Optional)

    Procyon AVRlib is a "C-Language Function Library for Atmel AVR Processors."AVRlib has tons of simple to use source code for you to use.Procyon AVRlib (1.5mb)

    You will probably not use it right away, but its good to have available when youneed open-source help.

    STEP 4: Setup AVR Studio

    Now that we have installed all the essential software, lets set up AVR Studio.Find the new AVR Studio 4 icon in your start menu, click, and you shouldimmediately see this window come up:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    19/39

    Select 'New Project'

    The next window that comes up will look like this:

    Copy the options that I have chosen, but whatever file name you like.

    Make sure there are NO spaces in the file name.

    For example, do not do 'C:\Documents and Settings\User\Desktop . . .'

    Also, the project file name mustbe the same name as the initial file. These are'features' (bugs) in AVR Studio that will cause you problems otherwise!

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    20/39

    After clicking Next, another window should come up. Select AVR Simulator, andchoose ATmega640 on the right. Click Finish.

    AVR Studio should now load and look something like this:

    STEP 5: Download Axon Source Code

    The latest Axon code, and instructions on how to use it, can be found at the top ofthe Axon Function List page.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    21/39

    Unzip all source files into your project folder you just created using AVR Studio.

    For example, if your project is called Axon, empty all files into the newly createdfolder C:\My_Robots\Axon (or wherever it is).

    STEP 6: Add Source to Project

    Now we need to add in the source code that you downloaded for AVR Studio.

    Open up the file Axon.c (from the source code) in notepad, then copy/paste allcode contents of it into the .c file with the same name as the project. For example,if your project is called 'Photovore_v1', paste the code into Photovore_v1.c. Pushthe 'Save' icon at the top left in AVR Studio.

    Now, right click 'Source Files' and left click 'Add Existing Source File(s)...'.

    Locate hardware.c and control.c in your folder, and add it. You could also justdrag and drop.

    Just like with the source files, now right click 'Header Files' and left click 'AddExisting Header File(s)...'. Add SoR_Utils.h. You will probably not modify theother files, so you don't need to bother adding them.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    22/39

    To write your own code, just use the file control.c. By default it's a photovoreprogram to get you started, but you can overwrite anything in that file. The AxonFunction List page will explain more.

    Note: If you named your project something other than 'Axon', make sure you open

    up 'makefile' and change TARGET = Axon to TARGET = [your project name].

    STEP 7: Configure Make File

    Now we must set up the options to compile your source code. Go to Project ->Configuration Options.

    Check the box that says 'Use External Makefile' and then browse to locate themakefile (the file in the downloaded source code labeled 'makefile'). Then pushOK.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    23/39

    STEP 8: Compile Code

    The final programming step is to compile the code. This converts your codewritten in C to machine code in a .hex that only your specific microcontroller canread. You should do a Rebuild All the first time you compile the downloaded

    source code. But after that, if you only make changes to the .c source file, youonly need to do the faster Build command.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    24/39

    If all went well, you should see this message after compiling:

    The memory used in this example is 16016, or about 16kb. The Axon can store upto 64kb. If you run out of memory (highly unlikely), just comment out headerfiles that you aren't using in Axon.c. Note: if you run the latest beta software, youwill see the improved below message showing exactly how much memory youhave used:

    If you get errors, and you are new to programming, it may be a little difficult todebug at first. Go back and check to make sure you followed all the steps,especially properly naming the files (a common error).

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    25/39

    Note that a new .hex file can be found in your project folder. That is the compiledprogram. Whenever you modify your program, just click 'Build' and it willrecompile a new .hex for you.

    Note: A common error you may get is

    "gcc plug-in: Error: Object file not found on expected location C:\Documents andSettings\User\My Documents\My_Robots\[your project name]\[your project name].elf

    Make sure your makefile specifies the output .elf file as [your project name].elf"

    If you get that error, it simple means you made a mistake naming your files. Startat the beginning, and read instructions more carefully.

    STEP 9: Save Everything

    Lastly, save your project configuration.

    STEP 1: Install USB Drivers

    To use the USB for the first time you must first install the USB driver file. Simply

    download the .exe file appropriate for your operating system and install it.

    Next, plug in your USB cable (you do not need to power the Axon to do this).

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    26/39

    Your computer should now detect the new hardware and ask you about drivers forthe CP2102 (the USB converter chip on the Axon). Follow the installer directionsgiven until complete.

    STEP 2: Connect Power

    Now you must plug in your battery. Look for the pin labeled 'B' or 'Bat' on yourAxon at the bottom left side. The middle pin is for power, and the left pin is forground.

    A 6V NiMh battery with Hitec connector is recommended, but you can also use7.2V and/or a NiCad battery type. Be aware that some servos may over heat atgreater than 6V.

    See the Axon datasheet for more info on voltage/current tolerances.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    27/39

    STEP 3: Configure BAUD

    In Windows, click:

    Start->Settings->Control Panel->System

    A new window will come up called 'System Properties'. Open the Hardware taband click 'device manager'. A new window should then pop up:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    28/39

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    29/39

    Use 115200 for 'Bits per second' for this tutorial, although the Axon can handle allmain rates. When done, click 'OK'.

    Also notice the COM port that the Axon is plugged into for future reference.

    To learn more about BAUD rates, check out the UART tutorial.

    STEP 4: Test USB

    Download this hyperterminal config file, then double click it.

    For instructions on configuring it correctly, check out my hyperterminal tutorial.

    Select your COM port and baud rate (115.2kbps), then click connect. You shouldimmediately start seeing data.

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    30/39

    Remember, if your receiving junk data, that means you improperly set up thebaud rate but everything else is working fine. It also means you should read theFAQ on UART gibberish.

    If you don't like HyperTerminal, another popular terminal program to try is TeraTerm.

    note: The first 15 Axons shipped had an incorrect baud rate pre-installed on

    the factory installed test program. Nothing major, but if you want to test the

    USB before programming the Axon (not required), simply bootload up the

    newest test program to overwrite the old one.

    STEP 5: Connect Sensors & Servos

    Servos can be connected to any header on the left and right of the Axon. Ground(black wire) is always the outside row, and red (power) is always the center row.

    Analog sensors, such as the Sharp IR Rangefinder should always be connected tothe regulated 5V bus. The 5V bus is the first 16 (ADC #0-15) headers on the topheader row of the Axon.

    An example:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    31/39

    You can also take power from the Axon for other external devices as shown withthe red and black connector on the left:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    32/39

    A UART connection is demonstrated on the right.

    STEP 6: Connect UARTThe UART is a way for the Axon to communicate with other hardware throughserial, such as a camera, bluetooth, or GPS. It's as easy as plug and play.

    T is for transmit, R is for receive, and G is for ground (make sure external devicesshare a common ground!).

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    33/39

    STEP 7: Mount Axon to Robot

    It is recommended to mount your Axon to your robot using spacers at least .25"

    long. Here is an example with 1" spacers and four screws (not included):

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    34/39

    Here is an example of it mounted to the ERP:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    35/39

    STEP 8: Mount the On/Off Switch

    The included on/off switch has a plate that can be removed to help you mount it toyour robot in an easy to reach location.

    Here is an example of it mounted to the ERP:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    36/39

    note: If you are using Linux or Mac, please see the FAQ

    If you already own a hardware programmer, using the bootloader is optional. Justplug into the ISP header and program the Axon directly. The bootloader is justthere to save you the $36 of buying a hardware programmer.

    Note that the hardware programmer will overwrite the bootloader - but you canalways reupload the bootloader (or other program) if you wanted.

    STEP 1: Download Bootloader

    The bootloader is what you use to upload your code through USB to your Axon.Download and install the .exe into the same folder that you have your compiledrobot code.

    FBOOT v1.7 EXE (17kb)

    Optional: If you'd like to modify the bootloader, download it here:FBOOT17 Axon source code (63kb)latest beta bootloader software is available

    The latest FBOOT version and source code (not SoR tested) can be found on thefast tiny & mega UART bootloader project page. It comes with zero

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    37/39

    documentation, but I have instructions on how to use and adapt this bootloader foryour own use on the $50 Robot Bootloader Tutorial.

    If you are using Linux or Mac OS X, you may try this bootloader.

    STEP 2: Go to Code Folder

    Now open up a command prompt by going to

    start->Run...

    and typing in 'cmd' and pushing ok:

    A new command prompt should open up. Using the command 'cd', go into thedirectory that has your code and FBOOT17.exe. In this example, my code is inthe folder called ERP:

    STEP 3: Run Bootloader

    TURN OFF YOUR AXON

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    38/39

    With your Axon turned offand USB ready to go, type in this command:FBOOT17.EXE -b115200 -c1 -pfile.hex -vfile.hex

    115200 is your desired baud (9600, 38400, 115200, etc). The bootloader has an'autobaud' feature, so it's likely to work under most baud settings. Try a lower

    baud rate such as 38400 if it doesn't work.

    c1 is your Axon USB COM port (c1, c2, c3, etc) as shown in your DeviceManager (see step 3). The bootloader only allows c1 to c4.

    'file' is the name of your program you want uploaded. The filename MUST be 8characters or less or it will not work (a bug in the bootloading software).

    For example, if Axon.hex was your file, do this:-pAxon.hex -vAxon.hex

    (yes, you need to say it twice, with p for the first time and v for the second time)

    Press enter, and now you will see a \ symbol spinning.

    STEP 4: Turn On Axon

    Turn on your Axon, and it should now upload your .hex file.

    This is what you should see upon a successful bootload:

  • 8/6/2019 Society Robots Axon Micro Controller User Guide

    39/39

    Remember, the bootloader must always be activated BEFORE you turn on the

    Axon or it will not work.

    note: after typing in a command once into the command prompt, you do not needto type it again. Just push the up arrow key to cycle through previously typedcommands.

    note: if it takes more than about ~8 seconds to load your code, please see the FAQon how to speed up your bootloader.

    You can also set up a shortcut that stores your typed information. Checkthisforum thread for more info.

    It didn't work? Read the bootloader debugging checklist.

    STEP 5: Be Happy!

    Congrats, you just programmed your Axon successfully!

    The next step would be to write your own code. Check out the Axon Function Listfor programming help.

    If you want free webspace to post your project, check out the SoR Member Pages.If you make anything neat with the Axon, or want to see what others have done,send me a heads up and I'll post your project on the Axon Examples.