Sunday, October 21, 2012

Power Wheels Robo Magellan platform?

My 5 year old friend Adam has promised me his Power Wheels jeep to convert in to a robotics platform - no bribe and not sure how he even got the idea.

I did promise to drive him around in it when I convert it to R/C steering control first.  It has a decent amount of space for equipment without modifying the child compartment.

Lots of possibilities like after converting it to remote control, setting it up for Robo Magellan (although to big for competition) would be fun challenge.  Could then plop in my future kids and drive them around the park based on the GPS;  Technology enabled yes, however will that be wife approved?

7-bit vs 8-bit addresses in I2C

Discovered that my I2C device address was incorrect (at least my understanding).  After getting the compass working, I modified the Quickstarter code a but and hooked up the RGB LED Backpack.  No success, but then reviewed the Arduino  Logic Analyzer capture again.

Found that my 'address' appears to be 0xFE - not 0xFF as expected.  Also noticed that when it works, the LA tool I2C decoder is in 'READ' mode.  That little bit didn't make sense.  I changed the address in my modified compass code and the RGB LED Backpack came to life.

After a very confused Google search session, I contact Pierce at Logos Electromechanical asking puzzled questions.  He clued me in on some subtleties regarding addresses.  The key was this very clean high-level I2C tutorial that he shared.  THANKS!

Turns out the problem was that when I used the bit-bang method, it wasn't accounting for the 'WRITE' bit.  So when the L-A tool picked up the address it showed the address's 2-8 bits and the 'write' bit.  This accounts for the 0xFF = 0xFE on LA.  I need to do some more binary math to convenience myself... 

I2C with Compass module via Parallax Kickstarter

As mentioned on a prior post, lack of process understanding toward a working Propeller I2C interface and the RGB backpack is highlighting how little I know of I2C in general.  My career focuses on clinical application interfaces - so this is all in the same space right?  Nope!  My application interfaces are way up in the stack, no where near bit-banging stuff.  In the quest for understanding -- many mental cob-webs have been disturbed regarding byte and bit shift manipulation with a smattering of HEX based math.

This Parallax Kickstarter has been a good way for me to get back to the basics and provide that I can build an I2C interface and capture the output on the logic analyzer. Also this gave me a proven path to build up some logic glue around it with a NTE490 based level shifter based on the Philips I2C application note.

The other advantage of the kickstarter is that it right to the point in terms of basic functionality. Several I2C objects are out there, they look good, however setting them properly has been a challenge given that I don't know the basics.  Nice job Parallax!  There is a side effect as well given the examples range across 3 platforms.  I am brushing up on my C for Arduino and future work with the Prop GCC compiler.

Saturday, October 20, 2012

RGB Backpack - I2C on Propeller

Working with the Parallax Propeller Professional Development board and the Logos Electromechanical RGB Backpack.  Attempting to recreate the I2C connectivity I accomplished with the Arduino.  So far - NO LUCK.

At a high level I have attempted to modify a couple different I2C objects from the exchange, and use demos to communicate with the backpack - however the backpack pulls the SDA low and holds it there.

Without the backpack attached, my logic analyzer did report valid I2C data coming out of the Prop and decode it as I expected based on what I sent; this was uni-directional however - no ACK.

BTW - the Propeller also introduced the need for a level shifter, Frys had the MOS-FETs required so that looks good.

Next Steps - Focus on I2C understanding and perhaps other hardware to interface.  Checking out the 'kickstarts' examples next...

Tuesday, October 16, 2012

RGB LED Backpack - Logos Electromechanical

Playing with my old neglected Arduino Diecimila board. Had to refigure out how it worked (still managed to get it going without reading) after spending LOTs of time working on Parallax Propeller boards...

Built the Logos Electromechanical RGB Backpack tonight.  Required basic soldering and building a wire harness (had parts on hand - nice!)

Logos EM provided a demo Arduino file to test out the backpack.  After relearning how to compile and upload (stumbled on picking the right board config for the Ardino - forgot about that requirement), otherwise it worked first time.  PIN-Outs matches on my cable, soldering was good.

Noticed that Logos EM is using the WSWire lib, ended up flipping it back to Wire lib to avoid modifying additional hardware or code - looks like pull-ups R aren't enabled otherwise.

Its been while since building hardware on the StempleLABs bench, so this was a nice evening project.