Using LV-MaxSonar-EZ Sonar with Picaxe
Recently I’ve had to develop a circuit using a picaxe 08M2 with MaxSonar-EZ1, and had a bit of difficulty understanding the output values from the sonar analog pin. Although the sonar have a really cool manual that comes in the package, it was still a bit confusing, specially if you don’t read the bellow quote carefully.
"Outputs analog voltage with a scaling factor of (Vcc/512) per inch. A supply of 5V yields ~9.8mV/in. and 3.3V yields ~6.4mV/in. The output is buffered and corresponds to the most recent range data"
It’s quite straightforward, but can be a bit confusing because the analog reading from picaxe is 0-255 range, which means 5v/255
The code for picaxe would be something like this:
main: readadc C.1, w1 debug w1 goto main
and the board would look like this:
When is all connected in the debug window you’ll see some values of w1 in the 0-255 range, so by using math rule of three, being X the sonar output voltage :
which is the same as:
example being w1 = 3:
So the output is 0.059v, but we know that 1 inch is vcc/512 (in this case vcc = 5v , but could be 3.3v) so is 5/512 (0.0098) and not 5/255 like what we got. So we do again a simple rule of three:
So we get 6inches which is the minimum value readable by the sonar. If we need centimeters we just multiply by 2.54 and get 15,3cm.
so the code will be something like this:
symbol range = w1 main: readadc C1, range range = range*5/255*98 'range = range*254/100 'convert to cm debug range
The values will be different mainly because we are working with integers here, so everything is rounded up.
Don’t forget that if your vcc is 3.3v you should change the constant 5 to 3.
ShareLight Sensitive leds
A few months ago I wrote a post with some light sensitive headlights for project .netRC, now I had time to implement the circuit on a prototype board to apply it to my new project. Here are some pictures and a small video. To check the circuit and code follow this link
And a small video of it in “action”:
Once again, the code and circuit in this link
ShareQuadroCopter Tenis…
When I think they won’t do anything else with the quadcopters, they decide to put them to play some sort of tenis…
This is in the Flying Machine Arena in Zurich and they really do awesome stuff there… check the video below:
ShareSmartBird
I’ve seen cool aerial devices, quad-rotors, UAV planes even some humming birds that try to fly very clumsily. Now I’ve seen the ultimate robot “bird” flight, very fluid and seems very efficient.
Will it be mass produced and what type of functions will it have, are questions yet to be answered. But made a heck of a cool video
You can check the full specs at the makers website Festo

Quadrotor Cooperative Construction Work
Previously I’ve posted some quadrotors making some incredible maneuvers, which can be seen here
Today I’ve seen a article in new scientist from the same research group, with even more incredible stuff.
In short, they used the cooperative quadrotors and special magnetic parts to construct structures. So check out the video below and see the full article at new scientist
Share

