Author Topic: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib  (Read 3578 times)

0 Members and 1 Guest are viewing this topic.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« on: September 27, 2011, 09:07:02 AM »
I'm trying to get an AHRS system going in WebbotLib to support the Sparkfun Razor board.

There are currently 3 hardware revisions of this board and the code that is 'linked' from their website is VERY out-of-sync with their hardware and is also in Arduino coding format. The reason for converting it to WebbotLib syntax is that  (once working) it will require very minimal change to work with all 3 boards and will also allow you to create your own IMU from any gyro, accelerometer, magnetometer supported by WebbotLib.

The 3 revisions are:
1. SF product ID SEN09623http://www.sparkfun.com/products/9623] [url]http://www.sparkfun.com/products/9623 [/url] using:     LY530ALH/LPR530ALH gyros,  ADXL345 accelerometer,  HMC5843 magnetometer. Many thanks to Invicta for lending me one of these. This board seems to have a fundamental hardware issue with the on-board capacitors meaning the magnetometer only works about 1% of the time. See http://forum.sparkfun.com/viewtopic.php?f=14&t=14756

2. SF Product ID SEN10125 http://www.sparkfun.com/products/10125 using:     ITG-3200 - gyro,  ADXL345 accelerometer,  HMC5843 magnetometer. Not sure if they fixed the hardware issue or not.

3. SF Product ID SEN10736http://www.sparkfun.com/products/10736] [url]http://www.sparkfun.com/products/10736[/url] using:  ITG-3200 -gyro,  ADXL345 accelerometer, HMC5883L magnetometer. New magnetometer is a drop-in replacement for the old one and hopefully they now got the hardware issue fixed ?!

I have now got some code running for revision 1 above based on the board from Invicta. But: due to the SF hardware problem the magnetometer is flakey about 99% of the time. Anyone else out there got one who is willing to receive a .hex file to test for me !!

If you've got a revision 2 or 3 board and are willing then let me know - should be easy enough to come up with a (untested) .hex file for you to test. The only 'known unknowns' to me are how SF orientated the devices on the board and so may need extra playing around to get the co-ordinate axes properly aligned.


Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Invicta

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 1
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #1 on: October 12, 2011, 09:32:51 AM »
Webbot is looking after the Razor firmware while I am looking into the problems encountered with the hardware. For at least 2 years there have been reports of problems with reading the magnetometer output on the Sparkfun 9DOF Razors and HMC5843 BoBs. Most websites report that it is an issues with some of the external capacitors that Sparkfun have used, but there also seems to be a potential issue with how the voltage regulator has been incorporated on the Razor. Before I go into detail I would be very grateful if any users of the 9DOF Razor could let me know what their experience has been with the Razor; good or bad.

Please provide:   

   >  9DOF Razor Version (use the date on the back of the PCB if unknown).
   >  If working ok, which AHRS firmware are you using?
   >  Any problems encountered with Magnetometer output? Please give details; a bit more than just 'yes' would be nice.
   >  Solution found, if any? ie What did you do to fix it? If this means 'returned it for a replacement' say so.

Thanks

Offline Invicta

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 1
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #2 on: November 02, 2011, 01:16:25 PM »
@Webbot

Testing of WebbotLib AHRS Firmware for the Razor. No significant issues identified so far.

Providing a Menu Selection for Outputs.  Your suggestion to use the EEPROM to remember the last output format command sounds a great idea. Could you please incorporate this when you have your 'stab' at the Mongoose Board; as a trial run for the Razor?

Proposed boot up flow:-

1.   Read last ‘mode’ from eeprom
2.   If mode is invalid goto step 5
3.   Else
4.   Keep sending data in the current output mode until it receives an Escape character
5.   Output the menu text and receive choice
6.   Set new choice into eeprom
7.   Goto step 2

Proposed Output Options:-

Role, pitch and yaw only (default - for use with robots)
Output as required for Python Interface.
Output as required for Mongoose Visualizer.

Out of interest, how would you know where to write the value for the format command within the EEPROM without overwriting something else, or does the MCU know what EEPROM has been used - like how a FAT is used on a PC hard drive?

Invicta (Guinea Pig)
« Last Edit: November 02, 2011, 01:20:09 PM by Invicta »

Offline Invicta

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 1
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #3 on: November 02, 2011, 02:28:48 PM »
Mag Output Issues with SF Razor 9DOF IMU (SEN-09623)

Some users of this board have reported problems with unstable output from the HMC5843 Magnetometer. In my opinion this is caused by a combination of reasons:

1.   High noise (ripple) levels from the output of the onboard voltage regulator.

2.   Within the HMC5843 a H-bridge driver circuit plus the external capacitors C18 and C21 perform a pulse shaping function to apply a set pulse followed by a reset pulse to the set/reset strap to create magnetically intense (>40 gauss) pulse fields to de-gauss the sensors and flip sensor polarities. Due to the low ohmic value of the set/reset strap, the C18 and C21 capacitors must be low-ESR (Effective Series Resistance) grade capacitors with only 100mΩ or less. The C18 and C21 capacitors provided for the Razor are not low-ESR.

By not using Low-ESR capacitors the high noise level from voltage regulator interferes with the formation of the set and reset pulses thus causing the output from the Magnetometer to lock up.

With my Razor I found that it works fine when powered by a 3.3v FTDI card. If I use the onboard regulator I get the above problem. I also tried the 3.3v supply from the Axon2 without success. My solution (which you are welcome to try at your own risk) is to use a spare FTDI card powered through a modified Mini-USB cable by the regulated 5v supply from my Axon2. I only connect the FTDI 3.3v and Ground pins to the Razor. The Tx and Rx pins from the Razor are then connected to the Axon2.
 
 This may seem excessive but it saves the risk of making modifications to the Razor itself and the FTDI cards are not expensive.

Invicta

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #4 on: November 02, 2011, 03:37:03 PM »
Out of interest, how would you know where to write the value for the format command within the EEPROM without overwriting something else, or does the MCU know what EEPROM has been used - like how a FAT is used on a PC hard drive?
Since the chip can only be programmed with one app at a time then you only run the risk of overwriting eeprom values from a previous app. So I don't see it as a problem. Unlike external drives that work simultaneously with many programs.
Hence: I would use either the first o0r last byte in the EEPROM address space. Last being preferable.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline amundsen

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #5 on: November 19, 2011, 10:13:13 PM »
Hello,

I have the Rev1 SEN-09623 version althought I bought it in march 2011.

I am still unclear with some aspects of those IMU boards.

The program I have is the Firmware 1.0. How do you see there are problems with the magnetometer ? What i see is a change of the yaw value over time for the same angles. Globally it has moved back and forth within a 60° angle in something like two hours althought the board has been left motionless most of the time. I am not experienced at all with IMUs. I bought this one to create an orientation and position sensor for a performer. This drifting got me discouraged a bit. Is it supposed to happen or not at all ? Should I look for another IMU ? Another firmware ?

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #6 on: November 20, 2011, 11:47:36 AM »
You could try my firmware http://webbot.org.uk/iPoint/49.page
It could be that the drift you are seeing is down to the magnetometer not working. Seems to happen more often if you are powering the Razor via the on-board regulator rather than with the 3.3v regulated input on the FTDI cable - but I've seen it happen with both.
At least my firmware will tell you if the magnetometer is working or not.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline amundsen

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #7 on: November 24, 2011, 12:36:47 PM »
At least my firmware will tell you if the magnetometer is working or not.

How do I upload yout firmware using Arduino on a Mac ?

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: Guinea Pigs for Sparkfun Razor AHRS code using WebbotLib
« Reply #8 on: November 25, 2011, 08:57:59 PM »
How do I upload yout firmware using Arduino on a Mac ?
Not sure to be honest - don't have a Mac/Arduino. Since I build a hex file (just like the Arduino IDE does) then there must be a way to upload it - unless its just buried deep inside the Arduino IDE and they only let you upload a hex file that they have built. Google may be your friend.

Edit:- This looks useful http://www.arduino.cc/en/Hacking/BuildProcess and suggests it uses avrdude for the upload.
« Last Edit: November 25, 2011, 09:03:01 PM by Webbot »
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here