Monday Jun 02, 2008

completed setup

So was thinking about putting together a small autoimous vehicle (rc car size) with a SunSPOT as the main processor.. Issue number 1: how do you know where the car has gone or is going? So far I am thinking an optical mouse sensor would be a reasonable solution (coupled with a compass, but that will be next week :)). I realize the whole additive error issue when trying to dead reckon, but what the hey..

So I decided that I would give it ago and hookup a mouse long story short, asked Al and scored a sweet apple wireless mouse to destroy.. Few minutes later it was part and simply by reading the serial number on the main chip, A2030 and a quick google i found the data sheet and was away.. The chip is actually a Agilent ADNS-2030 Low Power Optical Mouse Sensor and the data sheet had an example circuit for the chip, with some closer inspection and conferring with Mark we figure that the apple mouse has this functionality, but what was interesting was that everything we need was on the small board, and all the stuff we didn't need was on the top board.

And chances are that we could hook straight up to the connecting wires.. After some more hardware guidance from hardware man mark, i ohmed out the chips pins that i was interested in (from the data sheet) to the connecting wires see the diagram below. 

pin out

From there it was quite straightforward really.. We hooked it up to a scope to check it was working.. it was :) then hooked it up to a SunSPOT (using the EDemoboard which comes as standard with a SunSPOT).

Gnd -- > Gnd

Vdd --> +3

SDIO --> D2

SCLK --> D3

PD --> D4

It was then a simple software problem... Started bit banging away and with some adjustments of the old toggling high low and once again conferring with the data sheet to get the operation addresses and SCLK SDIO timing, i have a functioning SunSPOT mouse.. And the cool thing is it seems pretty accurate with zero jitter (sensor is 1500fps with res at 400 or 800dpi), and by using the serial port it can be queried to get a number of properties, e.g. has there been motion since last time i checked and if there was then I can read the x delta and y delta.. This is cool because i don't need to monitor the sensor constantly to check for movement (although i can if i want as it has quad outs as well).

So hopefully this just goes to show how powerful a SunSPOT is.. I had no knowledge of optical mouse sensors however was easily able to hook it up and drive it with a SunSPOT. This just means that pretty much any sensors you can think of should be able to be driven by this crazy powerful little hog a computer which is just brilliant for prototyping these problems. What is also cool is that now it is hooked up I can process this onboard to control other functionality like motors/servos, and even radio this info home or to other devices (think swarms :)).....

EDIT: here is a link to the code to get this working...

Thursday May 22, 2008

So I we were thinking about creating a small autonomous vehicle, the first thing that sprung to mind was how do we know what direction the 'mobile' is going? One of the cool things about using a SunSPOT is the ADC so found a Dual Axis Magnetic Sensor Eval Board with a Honeywell (HMC1052L) magnetometer and hooked it up.

honeywell magnetometer

The process was extremely straightforward to setup, simply connected to two out pins from the magnet-o breakout to the analog inputs of the spot, power, and ground, and then the reset/set pin to a digital IO on the SPOT. done :)

 
So was instantly able to read values, they weren't making a whole lot of sence at the start.. the range is not the greatest (i figure something as small as this honeywell chip is doing pretty well to pick up the magnetic field of the earth).. So i found that to boost accuracy the reset set pin needs to be pulled low then high and the readings need to be calibrated to tighten up the range. Then added a filter to smooth things out.. Added a tiny bit of trig to calculate a direction in degrees (0-360) and low and behold a compass.. below is some diagrams from the honeywell data sheet on how the two readings x & y are transformed into direction in degrees.


Thursday Apr 17, 2008

So I have just been playing around with some muscle wire with some average success, so thought i would say how things have gone so far.. For those who haven't used or seen muscle wire it is a nick name for shape memory alloy, the wire that I have is called Flexinol. Basically this alloy is set into predetermined shape and when heated it transforms into another predetermined shape. So with repect to this muscle wire the room temperature shape is a thin wire, and when heated the diameter of the wire expands and as the volume of the wire has to be the same the result is that the wire contracts and gets shorter.

So i wanted to try this using a sunspot and decided that i would make a small test setup. By toggling the H0 pin on the eDemo board to drive a N-CH Mosfet i am able to control the armature. Here is a shot of the test setup:

Results are that the setup that i have the muscle wire contracts roughly 3mm, I think if i keep the power on a bit longer (allow it to get hotter) I could squeeze a few extra mm, but I have already burnt out a few pieces as there seems to be a fairly fine line between working once really well and then not working that well. I had a look at the spec and it says that it can consistently expand and contract millions of times if kept within the temperature range (under or max 100C), however going over this and the wire wears out after only a few times.

so this isn't the greatest amount of movement that i am getting however for the size and weight of the wire it has a surprising amount of power :) I am thinking that with some clever use of leverage this small movement should be able to be amplified to produce a more usable amount of movement.. so I guess next will be to control more than one wire and possibly create a little vehicle... 

oh and here is the schematic for the mosfet, if anyone wants to give this ago.

Monday Apr 14, 2008

 

So a bit of background info as to what is Ravenswood. This is a project that we (the sunspot team) have recently starting gathering momentum.  This is a conservation inititive created by by the USGS to help preserve native wildlife and aid in the rehabilitation of the salt lakes in the South San Fransico Bay area (i.e. Ravenswood). 

 The goals of this project are to be able to help automate some of the data collection processes that the USGS currently have to do manually, which are to physically visit the salt ponds to program their current sensors, download data from the previous week and change the batteries to last through the next week or so.

We are in the process of helping develope a set of tools to automate this and help provide both higher quality data, and easy of use of the data as it will be able to be used by the scientists in semi-real time :)

The main parts will consist of nodes (which i have previously shown here) running our new and developing open source software Yggdrasil, which is a collection framework for scheduling sensor tasks and communicating/forwarding data with a central host. The aim is to provide a mesh network of self sustaining SunSPOTs accross the salt ponds and provide an interface to both interact with the SunSPOTs and view their data.

 

This so far has been an awesome project to work on and last Friday we were taken on a grand tour of the salt ponds to have a look at the site for when we are ready to deploy, so here are a few images from the tour. More to follow on the story soon..
 


Friday Mar 28, 2008

ok so as you all possibly know by now we are launching a new creation into the sky code name EDGAR1, so we have been working late to put him together. A quick run down, we are attempting to lift a sunspot, array of sensors, gps, cell modem, transmitter and camera 10-20km straight up (and maybe over a bit :) ) then with an automated altitude cut off mechanism, release the giant whether balloon and float down on a parachute where we ( chase team ) will hunt down the payload somewhere neer  Fresno and recover the images and data collected. So with a bit of micro-controller wizardry from Tennessee and some code to write and the finishing touches on edgar things are looking on target for launch..

 edgar1

this is the transmitter, more pics to come soon, or you can check out the project wiki..

http://wiki.java.net/bin/view/Mobileandembedded/Ninety9SpotLuftBallons 

 and the group page

http://groups.google.com/group/spotballoon?hl=en&lnk=li


 


Monday Mar 17, 2008

gps spot

so i have also just started testing out hooking up a gps to the spot, so far it has been pretty smooth.. I haven't started using or persisting any data, but i can just read the NMEA strings from the uart and print it out so should be onto it soon :)

so here goes.. well for the last three weeks i have had a great intro into the SunSPOTs project. and have been involved in setting up some SPOTs with solar panels. The aim is to enable the SPOTs to be self sustaining, so that they can be deployed on a semi permanent basis and bounce sensor data home to a base-station. As you can see above we connected SPOTs to solar panels via a charging circuit (to prevent frying of SPOTs if it gets too sunny :)). We have so far a few different panels that we are testing.

 

  this is the smallest one

 

 

this yellow

this is the medium one, which bounces the big ones samples home to the base-station

and here it is the big one installed in the field, so far its been running for about a week.. Anyway i have been working on creating a jee back-end to house the data, and a simple web interface to display some data.. will keep posted...

This blog copyright 2009 by Lachlan Gregor