Society of Robots
Search and Index Search Here

 Parts List
 Robot Forum
 Member Pages
 Axon MCU
 Robot Books

 How To Build
  A Robot




 Robot Journals
 Robot Theory

    Axon II Microcontroller

    Axon II FAQ

    What is the difference between the Axon and Axon II?
    What is the difference between the Axon and Arduino?
    I have never built a robot before, is the Axon II right for me?
    I am a very weak programmer, is that a problem?
    Do you offer full customer support?
    Is there a warranty, or refund, for a damaged product?
    The green LED is flashing but nothing is working, what's wrong?
    Why am I getting gibberish from the UART?
    What happens if I 'brick' the Axon?
    What happens if I fried a port pin?
    I'm using the 3.3V line, and the USB isn't working!
    The Axon II resets often, what's wrong with it?
    The Axon II resets randomly on rare occasions, and the batteries are fine.
    I just saw sparks/smoke come from my Axon!
    Why does the voltage regulator get really hot?
    How do I reconfigure the USB?
    I deleted the bootloader, how do I reupload it?
    What fuses does the Axon II use? How do I change them?
    Is the Axon II RoHS compliant and lead-free?
    The bootloader isn't working!
    How do I set up JTAG?
    The USB bootloader is really slow!
    Got 'CRC-Error', USB stops working
    Sharp IR has noise
    Can I use Mac or Linux?

    What is the difference between the Axon and Axon II?
    The Axon and Axon II both use the same microcontroller, the ATmega640. This means both the Axon and Axon II are 99% code compatible, minus a few additional features and pin # changes (see Axon II software manual). They are both equally easy to use.

    The Axon II however comes with more PWM, more hardware interrupts, more I/O, an LED numerical display for debugging assitance, higher voltage support, multiple battery voltage support, and an additional 3.3V output header.

    What is the difference between the Axon II and Arduino?
    The Arduino is a popular intro board. As hinted by its really low price, it lacks quite a lot in features. The Arduino does not have a power bus, meaning you can't just plug in servos or sensors directly (you must purchase wiring and protoboard). It has a cheap voltage regulator, thereby requiring you to use a larger more expensive 7V battery. It only has a single UART (Axon has four), six ADC (Axon has 16), and few digital I/O. You couldn't for example run a biped or hexapod using an Arduino. It also has few PWM, interrupts, timers, etc.

    The Axon however is a high-end microcontroller - ranking features, support, and quality over price.

    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 not be right for you. The Axon comes with many features that you will probably never use for an ultra low budget project.
    If you are on a tight budget, the $50 Robot would be more appropriate.

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

    Note that the original Axon is cheaper than the Axon II.

    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 is listed in the WebbotLib manual.

    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 forum community. If you have problems or questions, there are three steps you should take:

      1) Check the setup guide and datasheet
      2) Search the forum for similar questions
      3) 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 search the SoR site first before asking in the forum. Its probably been already asked! You might also find the general robot FAQ and the must read robot tutorials list very useful.

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


    The green LED is flashing but nothing is working, what's wrong?
    The green LED flashes when the Axon II is reset - usually when battery power drops too low. Unpower your board, swap to a fully charged battery with the proper voltage, and try again. Note that the green LED could also flash if you write code to do just this, so if the battery is fine, then your code could be wrong . . .

    Or if you are using extremely noisy electronics on the ADC line, resets might occur.

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

    Axon software (baud init)
    hardware settings in device manager (Step 3)

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

    What happens if I 'brick' the Axon II?
    The term 'bricking' is what happens when you play around with the fuse settings not knowing what you are doing. Or if you under-power your Axon II during programming, causing a fuse corruption. If you set the wrong fuse, you could end up preventing the Axon from reprogramming again - including preventing the changing of the fuse settings. This is a very common 'stupid' mistake - all the experts have bricked a microcontroller at least once in their lifetime! I definitely have. The most likely event is that you set the frequency clock fuse wrong, and that you will need to apply an external clock using a function generator or a second microcontroller.

    1. Unsolder the silver-colored crystal and the two small capacitors right under it.
    2. Apply a square wave to XTAL1 (say 125KHz, 250KHz, etc). Ground to ground.
    3. Using a hardware programmer, change the fuse settings back to a 16MHz crystal.
    4. 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 in ground 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 different pin. A very likely way to fry a port pin is plugging in the battery wrongly to it, or a 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 external device 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 Current Tolerances. Make sure you aren't over drawing current. Also, add a 4.7uF tantalum capacitor (polarized) between 3.3V and ground. A ceramic capacitor may work for your application, so its worth a try if you have one on hand.

    The Axon II resets often, what's wrong with it?
    Chances are this is a battery problem. First, use a multimeter to check the input voltage while your Axon is turned on. The original source code is designed to flash the green status LED during a reset - constant flashing means constant resetting. 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 II 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 II over, and on the ISP header solder a 0.1uF to 1.0uF ceramic capacitor between RESET and GND. This could also be because you are drawing huge amounts of power when a motor is turned on, or perhaps you have something occasionally shorting power.

    I just saw sparks/smoke come from my Axon II!
    This means something was shorted. Make sure everything is plugged in correctly. The Axon II is designed to resist damage, so you have a good chance it will still retain 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 are over-drawing power - the voltage regulator is rated to not handle more than about 1.5A of current. The voltage regulator has thermal shutdown features, meaning that if it overheats, it will turn off until it cools down. If you'd like to push the power limits, add a heat sink onto the back of the voltage regulator as shown here:

    Heat Sink on Voltage Regulator

    How do I reconfigure the USB?
    The CP2102 USB to UART setup has been designed so that it can be powered from both USB and/or a battery. However, sometimes you may wish to change the internal configurations of the USB - such as define the power source, or change the device name. To learn more, have a look at the application software on the manufacturers page. Make sure you have the USB plugged in and that no other software is using the USB port (such as hyperterminal) before connecting.

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

    AVR ATAVRISP2 Programmer

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

    To connect it to your Axon II, just match the triangle on both the ISP header and the Axon board. The cable should point towards the Axon II logo.

    Programmer Connection

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

    Connect with AVR ISP

    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 keep the commands from getting corrupted. On very rare occasions it could modify the fuses, potentially the clock fuse, and thereby 'brick' your Axon (a bad thing).

    What fuses does the Axon II use? How do I change them?
    If you ever need to redo your fuses, this is what you should set them as. The best way to change/set fuses is to use a hardware programmer (such as the MKII). Open up AVR Studio, connect to the Axon, and go to the fuses tab as shown below.

    Enter in the fuses as shown, then press Program.


    Axon II Fuse Settings

    Is the Axon II RoHS compliant and lead-free?
    Although the original Axon is RoHS compliant, the Axon II is not.

    The bootloader isn't working!
    If you are having trouble getting the bootloader to work, there are several steps you need to follow.

    Most likely, you simply selected the incorrect COM port. Go to the device manager to verify the comport you selected is the COM port your Axon is connected to. For an example, see STEP 3: Configure BAUD.

    If still no luck, read through the Bootloader Debug List

    How do I set up JTAG?
    A JTAG Debugger is useful for code debugging, but requires external hardware. Here are instructions on setting up JTAG as provided by an Axon user.

    TDI connects to ADC 7
    TDO connects to ADC 6
    TMS connects to ADC 5
    TCK connects to ADC 4
    nTRST connects to ISP pin 5 IRST
    GND connects to ADC 0 GND
    Vsupply connects to ADC +5V

    Enable the JTAGEN fuse in AVR Studio. Note that this will disable ADC 4-7.

    Warning: When finished using JTAG, disable the JTAG fuse before attaching sensors to ADC 4-7! Otherwise, you could potentially damage those pins (and maybe your sensors) permanently.

    setting up software:
    Under debug menu set the debug platform and device to JTAGICE MKII.

    Then, if you are using the original Axon code, change the following lines in the Axon makefile:

    # Debugging format.
    # Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
    # AVR (extended) COFF requires stabs, plus an avr-objcopy run.
    DEBUG = dwarf-2
    The option DEBUG='stabs' must be changed to 'dwarf-2' so that the object file can be used by the debugger.

    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.

    If you are using WebbotLib, contact Webbot. We need a tester.

    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 to using SP3, however many problems with it have been reported. See this forum post for more info.

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

    Got 'CRC-Error', USB stops working
    Do 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 few temporary solutions you can follow at this forum post. It is believed that if you allow the Axon about ~5 seconds between resets that the problem won't occur.

    Sharp IR is very noisy
    These sensors are extremely noisy. Place a surface mount 10nF ceramic capacitor and a 530 ohm resistor directly on the Sharp IR shorting ground and the sensor output pin (the capacitor and resistor placed/stacked in parallel). This will greatly improve Sharp IR accuracy.

    Can I use Mac or Linux?
    The bootloader is not directly Linux/Mac compatible. To learn more about programming with a Mac, check out this forum post and this one too. You could use a Windows emulator like wine or dosbox. You could also use an external hardware programmer for programming - please see the FAQ on how to upload code with a programmer. Finally, a new FBOOT version for OS X and Linux.

Get Your Ad Here

Has this site helped you with your robot? Give us credit - link back, and help others in the forums!
Society of Robots copyright 2005-2014
forum SMF post simple machines