Time and Memory for Wall-E2

Posted 01 April 2018 (not an April Fool’s joke)

Now that I have Wall-E2’s charging module and charging station working, I’ve moved on to some secondary, but still important, issues that need addressing.

  • Wall-E2 still can’t tell which way he is heading.  This isn’t necessarily a killer, as his current technique of simply following walls does fairly well.  However, when it comes to a human figuring out where Wall-E2 is or has been, distance to the nearest wall just doesn’t cut it.  A while ago I attempted to solve this problem using an onboard magnetometer, but ultimately concluded a magnetometer-based navigation system is doomed to failure in an indoor environment, due to too many interfering magnetic signals.  I have decided to try this again, but this time using a cheap solid-state gyroscope module from Sparkfun.   I should be able to initialize the gyroscope z-axis to an absolute heading each time Wall-E2 connects to a charging station, as their location(s) and headings are known.  As a bonus, I should be able to use the gyro to generate accurate 90º turns, instead of the current open-loop timing method.
  • Wall-E2 remembers how long it has been since its last recharge, but only if the main power hasn’t been interrupted.  If I turn him off for any reason, that information goes away.  I dicked around with writing the current value of millis() to EEPROM on power-down, but it turns out that EEPROM writes are way too slow for that.  After Googling around for a bit, I found a nice little FRAM (Ferro-magnetic Random Access Memory) module from Adafruit, and I believe I will be able to implement a power-down memory save feature using it.
  • Once I have a fast non-volatile FRAM solution, it occurs to me that I may want to write telemetry information to it, so it isn’t lost when Wall-E2 is out of range of the current Wixel link to my PC.  Maybe even set the FRAM (or at least part of it) up as a rate buffer between Wall-E2 and the Wixel.  The idea would be that telemetry data always goes to the FRAM at some rate A, and is then read from the FRAM to my PC via the Wixel link at rate B, where B > A.  When the link isn’t available, the telemetry data continues to be written into the FRAM, and is read back out again when the link becomes available.  As long as the link isn’t interrupted for too long, I won’t lose any telemetry data.  As part of this implementation, I would like to time-stamp the data with real date-time information, which requires a battery-backed RTC (real-time clock).  As it happens, Adafruit has one of these too, so I may be able to implement it quickly and easily.

I chose the I2C versions of all these modules, as I already have I2C implemented for acquiring steering cues from my IR Homing Module.  In theory, at least, adding three more I2C slave devices to an already existing setup should be trivial.

Stay tuned!

Frank

 

209 Total Views 4 Views Today

2 thoughts on “Time and Memory for Wall-E2

  1. Pingback: Capture Power Loss Data Using Adafruit FRAM Breakout Board - Paynter's Palace

  2. Pingback: Integrating Time, Memory, and Heading Capability - Paynter's Palace

Leave a Reply

Your email address will not be published. Required fields are marked *