SRF05 Ultra-Sonic Ranger

I’ve just spend a couple of hours preparing this ultra-sonic ranger and the necessary code to integrate it into my autonomous tank project.

Here’s a quick post briefly explaining the theory and providing some Arduino code for it.

SRF05 in all its glory

Read more of this post

WiiMote IR Camera with Arduino

This post shows how to extract the IR Camera from the WiiMote and connect it to a .NET micro framework board (FEZ Domino in my case).

The present blog is simply a porting of the C# code to Arduino code, in case anybody is interested…

It’s a very basic file, really showing just the minimum necessary to get it working.


#include <Wire.h>

const byte ADDR_SENSOR = 0xB0 >> 1;
byte buff[2];
byte recvBuff[13];

int x, y, s;

void setup(){
Serial.begin(115200);
Wire.begin();

send(0x30, 0x01 );
send( 0x30, 0x08 );
send( 0x06, 0x90 );
send( 0x08, 0xC0 );
send( 0x1A, 0x40 );
send( 0x33, 0x03 );
send( 0x30, 0x08 );

delay(100);
}

void loop(){
readData();
Serial.print(x); Serial.print(" / "); Serial.print(y); Serial.print(" / "); Serial.println(s);
delay(300);
}

void readData()
{
send( 0x36 );
Wire.requestFrom(ADDR_SENSOR, (byte)13);
for(byte i=0; i<13; i++) recvBuff[i] = Wire.receive();

// have no idea why the 1st BLOB start at 1 not 0....
byte offset = 1;
x = recvBuff[offset];
y = recvBuff[offset + 1];
int extra = recvBuff[offset + 2];
x += (extra & 0x30) << 4;
y += (extra & 0xC0) << 2;
s = (extra & 0x0F);
}

void send(byte val){
Wire.beginTransmission(ADDR_SENSOR);
Wire.send(val);
Wire.endTransmission();
delay(10);
}

void send(byte val1, byte val2){
Wire.beginTransmission(ADDR_SENSOR);
buff[0] = val1; buff[1] = val2;
Wire.send(buff, 2);
Wire.endTransmission();
delay(10);
}

Tiger 1 BB airsoft RC Tank – V2

It’s all about the same project as here, BUT with a different technology: instead of using the FEZ Domino (.NET micro framework based) board, I’ll be using the Lego NXT controller and an Arduino board for low level interaction with the electronics.

NXT + Arduino internals

Read more of this post

Quadcopter – home made

29 Mar 2011 – V2 is here !

Latest and greatest version, not that light but not too heavy either...

Quadcopter V2

Now I know it was all useless, but until 2 days ago, I still thought the only problem with my quad was the frame/motors and the huge vibrations they generated…

2 days ago, on Sunday night, I finally had the courage to face the truth : it could be my fault, it could be my code ! :)

Actually while looking at the http://www.multiwii.com/ site (huge thanks Alexandre, and really great stuff !!!) it occurred to me that their code should support my configuration out of the box.

To be honest, I’ve always though that it might be a problem with my code, but the only options to check this would have been:

  1. buy an ardupilot or some other verified system and install it
  2. modify the ardupilot or some other verified code to make it run on my configuration

None of the above options were easy and they could have introduced new problems by themselves…

But the multiwii code, looked like it should work with barely a few lines of change !!!

And indeed it WORKS ! Or at least it balances muuuuch more steadily on 1 axis !

This seems to prove that while I do have quite a lot of vibrations they don’t stop the quad from flying.

I still don’t know what the exact problem was with my code, I will have a look into the details once I manage to fly for real with the new code…

Read more of this post

Wii motion plus and Arduino

The Wii Motion Plus and a Solarbotics adapter for easy connection

As you might know from one of my previous posts, I’ve burned (I only now start to have an idea of a possible cause…) part of my Razor 9DOF IMU board. I can still use the accelerometer and magnetometer on it, BUT the gyroscopes (though I’m sure they are both fine) can’t be accessed simply because they are not on the I2C buss and it’s impossible for me to solder wires onto them…

So I’ve decided to explore the idea of using the Wii motion plus gyroscopes instead, especially that there are several people out there that have quadcopters flying with them !  (combined or not with nunchuck accelerometers…)

Read more of this post

Razor 9DOF IMU – I2C to Arduino

 

I2C bus "hijack" - glued with epoxy - one of them uses a via through whole, another is soldered on the back

This is obviously related to my endless post about the home made quadcopter

But it’s a much more generic problem, so here I am, talking about it in a post of its own…

The default way of interacting with Sparkfun’s 9DOF Razor IMU , as per its documentation, is through its serial interface.

Read more of this post

Lego NXT – Arduino Truck

New & improved NXT truck and LeJOS running brick !

The beast after the lifting...

Read more of this post

Electric remote controlled Tiger 1 Tank toy + arduino

It all started when I found this ex-display toy in a store, for “only” 30£ (rather than the initial 90£), because it was missing its remote…

Wow, something cheap and “not working” is the perfect excuse to open and hack it straight away…

Read more of this post

Twitter – PSP (java) – Arduino (Peggy2)

Pictures of the final installation, WORKING !

Final installation, on the kitchen table...

… so it all started, after I managed to make my Peggy2 LED board work, and I was wondering what to do with it…?

What else more obvious than display Twitter messages on it?

Now here’s the high level “design”:

- Peggy2 board with an Arduino microcontroller on it, should receive data serially, either over wire or IR

- how to get the data from the internet ? I don’t want to use a ethernet shield or wireless one, and it turns out I’ve been for so long annoyed that I have a PSP lying around and not being used… So let’s use it, it has wireless and can be programmed in Java (J2ME) be using the PSPKVM (greaaaat job guys !)

So there are 2 problems:

1) program the PSP to connect to the internet and download tweets from there

2) communicate between the PSP and the Arduino on Peggy

1) PSP to twitter.com

initial screen

Read more of this post

Peggy 2.2 LED pegboard

1hour and plenty of tinkering around the board…

When I press on the U4, all of a sudden the whole 1st row lights up…

But then it becomes very dim and FLASHES…. luckily I remembered what I read yesterday on the forum: to short L1 or L2… and it WORKS !!!

So to summarise there seem to be 2 problems, hiding each other:

1) the U4 has a connection problem. I don’t know exactly what, I’ll try to re-solder it, but when I press on one of the corners it works properly…

2) L2 that I installed seems to be causing very dim lights and flashing… just shorting L1 (as per the forum’s instructions) seems to fix it

Finally….

Now thanks to some (very) helpful and quick reply from one of the “gurus” at EvilMadScientist, I’ve started testing the U4, one of the 2 STP16DP05 LED drivers.

I switched it with U5 but the symptoms remained exactly the same.

I’ve checked the pins of the circuit and, with an OhmMeter, the connection between the front and the back, for every single one of the 24 pins…

Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 57 other followers