View Single Post
  #23  
Old 05-23-2003, 09:59 AM
BlueJeeper BlueJeeper is offline
Registered User
 
Join Date: Jul 2002
Posts: 524
Well, I think I will toss my stuff into the fray since I now have a working software proof of concept. It is nowhere on par with the ORO-type stuff (yet), but given that I probably have around 16 hrs. into this project over the past 9 months, I don't feel so bad.

The system consists of a Basic Stamp II microcontroller on a test board, and 3 Analog Devices ADXL202EB 2-axis accellerometers.

More info:
http://www.parallax.com
http://www.analog.com/Analog_Root/pr...L202%2C00.html

The contraption on the right is the microcontroller and board, with power source and an RS232 serial port hookup cable attached. There is also one ADXL202EB attached on the breadboard. When the project becomes more robust, this will be the unit inside the vehicle, that measures pitch and roll of the body and frame, and does all of the signal processing from the other ADXL202EB's.

The breadboard on the left tentatively holds 2 ADXL202EB's. Each would represent a unit that would be placed on an axle. These would each measure roll of the axles.



There are so far 3 code files for the project. One is the Basic Stamp code for managing the accellerometer output (Tilt_sensor.bs2) which needs to be flashed to the microcontroller over the serial port.

There are 2 Java classes. One handles the serial port communications with the hardware (eSpotter.java), and the other handles the GUI output (Jeep.java). I am truly embarrassed to show the code at this point, as it needs to be broken down into more subclasses, commented, and the serial flow control needs to be rewritten as it is *barely* adequate, but it is at a working point now, so there you go.

http://home.insightbb.com/~r.bernota...ilt_sensor.bs2
http://home.insightbb.com/~r.bernota.../eSpotter.java
http://home.insightbb.com/~r.bernota...tter/Jeep.java

This is an example of the output:



Excuse the rinky-dink Atari graphics please... I worked the GUI only to the point so that it was basic, fast, and demonstrable. I recently migrated the code to Java 1.4, which is where I wanted to get it so that I had what I wanted in terms of a graphics API. From here out, the GUI will dramatically improve.

The top left represents the front of the Jeep with 2 objects, one being the body and the other being the front axle. The bottom left represents the rear in the same manner (body/frame and rear axle). The right side of the screen represents the pitch of the vehicle from both sides.

The part that is not demonstrable in this post, is how well the software mirrors the tilting motion of the ADXL202EB sensors. The software mirrors my movement of the hardware almost perfectly, even at speed with no noticable lag.

I wrote the porgram in Java, so that it would be easily portable to many platforms. It is currently running in Windows, but can be ported to your favorite flavour of Unix by changing one line of code (the location of the serial port). I intend to eventually port this to PalmOS. There is a Java environment for Palm that supports serial communications. I don't have a laptop but am currently looking to acquire one cheap, so that I can wire it all up in my Jeep to try it out. The next step would be to port it to Palm, so that the form factor of the whole setup is better.

The hardware also needs a lot of work. I need to solder everything together, come up with durable enclosures for the hardware that will work, and come up with wiring and routing of the wiring. Among other things.

In the near future the plans are to integrate an improved GUI, GPS, Frank's ideas on COG and display, etc.

I am not that big into the project as far as cost goes. Each ADXL202EB is about $30, and I am borrowing the Basic Stamp hardware, but it could probably be acquired used at about $50 or less, or new if you were willing to go with a more basic board. There will be additional hardware cost only insofar as a portable display (old used laptop/used Palm), and enclosure and wiring. Everything else will pretty much be improvements in software from here on out, which only costs time.

Just tossing this out there to think out loud.

Rick
Reply With Quote