Wii IR camera as standalone sensor

edit again my schematic.i

edit again my schematic.

i use 74ls04 with normal crystal 24mhz

3 series diode ( because it still 3.9v if just using 2 )

here the scematic and PCB for it

http://www.mediafire.com/download.php?4vgj7mnl3rrkwbc

5v for 74LS04, 3.2V for IR Camera

use the sample program from here…

the thing is… when i connect SDA and SCL pin to my micro, the flow data from serial read is stop. not giving zero data, but just stop… connect to the driver without camera… the flow is stilll going… when put the camera… the flow is stop…

here the video

http://www.youtube.com/watch?v=ks5ce9vyM_0

question again :

1. Somethings wrong with my schematic?

2. What makes the flow is stoped when i connect the SDA and SCL line?

2. My original wiimote is korea version… is this the problem?

 

note : put this camera back to my wiimote… and it the wiimote is works fine…

>>1. Somethings wrong with

>>1. Somethings wrong with my schematic?

I encountered 2 problems.

1. The 74LS04 is a different logic family than 74AC04. FIrst is lower power shottky, second is advanced CMOS. This may cause problems to make the crystal oscillator swing. Better use the recommended 74AC04.

2. In general all unused input pins of ICs must be tied to a defined logic level. Let them open will lead to floating inputs that works like antennas catching noise. CMOS ICs will die because of the latchup effect. In this case Pin 3,5,11,13 should be connected to GND or VCC (via Pullup resistor).

>>2. What makes the flow is stoped when i connect the SDA and SCL line?

I2C is using a simple state change protocol. It’s not a plug & play bus like USB. Connecting/disconnecting of devices in a running system will cause problems like this.

>>2. My original wiimote is korea version… is this the problem?

nope.

Yes but…

I decided to buy a regular quartz oscillator because components from the 74AC family are not so easy to find and are reported to create some noise if they are not properly used. Also I am also not sure the 74AC04 could be replaced by a 74HC04 because ICs of the 74AC family have a faster edge rate.

I’ve used a 74HC04 with a

I’ve used a 74HC04 with a crystal to create a clock signal, but it was a different project so can’t speak to the rise/fall times.

1. Ok… didn’t know that

err… sorry to give a bad news… can’t find oscilator, 74ac04 and get 74F04 as subtitute… grounding pin 3, 5, 11, 13

the data is still zero…

1. Is it only clock that make my driver didn’t works? if it’s true, can i just take off the oscilator from wiimote board? it smd, but i guess i pull out the wire from it… can you share the pinout from it?

2. 74AC04 is cmos not gate type… and i have cd4009. its cmos to and not gate… can i use this?

3. it is silly but, is there any change i get the data from wiimote directly? from camera pin directly?

the condition is.

1. VCC from AVRprog is 5v directly from usb port

2. VCC after camera is put on the driver is 2.8v

3. using 5 v as vcc for pull-up 4k7 resistor, because i though 2.8 v not enough to pull-up

4. wii camera works fine, test by put to wiimote back again and use it in wii and dolphin emulator

5. all connection on camera is connected fine

here’s the preview

http://www.youtube.com/watch?v=Zzk1xAw6Ymc

and part

http://www.mediafire.com/download.php?a5lmq4u3quhwjpq

 

I think you need a CMOS

I think you need a CMOS inverter. Either a 74HC04 or (apparently) 74AC04. I think the clock is the biggest problem right now.

Try the CD4009. It can’t hurt to try. Maybe it will work.

If not, can you order from Newark, Digikey, Mouser, Jameco, Farnell, – or even ebay (from HK, Taiwan, China, etc)?  Check octopart.com for additional suppliers; search for 74AC04 and 74HC04.

Agree with botthoughts about

Agree with botthoughts about using the 74HC04 or 74AC04. The CD4000 series has a maximum toggle speed of 5MHz, see Wikipedia.  Don’t think it will work.

An alternative chip would be a hex schmitt-trigger inverter 74xx14. It is pin compatible to the 74xx04. A 74xx00 should be ok too, but is not pin compatible and you need to tie both input pins of the NAND gates together.

Do you have a chance to lean an oscilloscope. Than you can measure the clock and every signal.

What I have learned when building electronics. If you wanna build an oscillator, it will not oscillate. If you wanna build an amplifier, it will oscillate.

Good News!

Finally!! found the 74HC04 and i got the respond! its full of 1023 data flow…

i have to reset my atmega first to see the data… the next cycle will be full of 1023 data… like this

1023, 1023, 1023, 1023, 1023, 1023

1023, 1023, 1023, 1023, 1023, 1023 

<reset>

386, 452, 1023, 1023, 1023, 1023

1023, 1023, 1023, 1023, 1023, 1023

1023, 1023, 1023, 1023, 1023, 1023

… < repeated until reset >

<reset>

560, 301, 1023, 1023, 1023, 1023

… and so on…

cannot connect to wiiblobtrack either…

Question : why must i reset for got the data? or my driver is the problem?

anyway, thx guys for help until now.

New sensor, this time data are coming, but all zeros

Hello,

I’ve managed to dismantle another Wiimote properly and have soldered the sensor to a piece of perfboard.

This time, instead of having nothing, I have data flowing on my serial monitor but there are only zeroes. I have moved an IR led in front of the sensor but it doesn’t change anything.

I have no oscilloscope, so I can’t check precisely what’s coming from the sensor. All I could achieve was a test to know if there was some voltage coming out from pins 5 to 8 and there is indeed.

I have checked the circuit and I think everything is connected correctly.

What and how can I test to ensure it’s not the sensor which is broken again ? :frowning:

zero data flows means :1.

zero data flows means :

1. the clock is not sufficient to drive the camera ( in my case, using 24mhz crystal, kako schematic, 74ls14, just got 3 MHz), fixed by using 74HC04 and got around 22 Mhz with 15pF capacitor, 18Mhz using 22pF

2. the reset is not correctly connected ( it’s happen too. make sure you use the right 22k or 30k for reset and it got 3.3v ), fixed by make another pcb, but stilll cannot detected by wiiblobtrack, but read the position of IR correct

3. if SDA and SCL line pull up by 3.3v, use 2k2, but if 5v, use 4k7 ( yup… it happen that the data is still logic 0 because the pull-up is not sufficient )

this is my case so far about zero data flow.

to test the sensor, is put back the sensor to wiimote again… i did it about 7 times… just solder all 8 pins, not the side pin, and test it again. hope it works

o yeah. i test it using PC, connect using bluetooth, wii whiteboard v 0.3 from johnny lee

http://johnnylee.net/projects/wii/WiimoteWhiteboardv03.zip

Dead sensor ?

1. I have used the updated schematics with a 24 MHz clock oscillator so I don’t think there’s an issue here. I would need an oscilloscope to check that. Might be my next purchase…

2. I think the reset is correctly connected.

3. I am using two pull-up resistors from 3.3 V, so it’s 2k2 indeed.

I don’t want to resolder the sensor to the Wiimote, it’s a bit too hard to unsolder and resolder, I fear to destroy it.

I was first using the parts indicated in the schematics to get the 3.3 V (it was 3.36 actually) but to simplify I have modified the circuit and now I take it from the Arduino. Actually it’s 3.28 V (the Arduino takes its power from the USB connection). Could it be an issue ?

Did you checked the pinout

Did you checked the pinout of the clock oscillator? I remember CtC had a problem with his Wiimote boards using different types of clock oscillators.

Using the 3.3V from the Arduino board should be ok.

Now it’s much better !

I bought another Wiimote and this time decided to solder some cables directly to the back of the Wiimote’s board to test the circuit prior to unsolder the IR sensor. And it’s working ! So one must be really careful when unsoldering - this is yet my third dismantled Wiimote.

I can confirm that you can use the 3.3V output from the Arduino (Uno Rev. 2 in my case). Also, the pull-up resistors for SDA and SCL are not needed because the IR sensor is the only device on the I2C bus.

I’m going to try getting the blob sizes too.

Blob size

Getting the z position trough blob size is easy. However the resolution is 4 bits only. Also, I have a jump between a value of 6 and a value of 15 when getting closer to the camera. I think I’ll use two IR sources with constant distance and calculate the evolution of the tracked distance to infer the distance with a better resolution.

connector ports

I’m a little off-topic with this question, but this seems to be the most logical place to put this question.

Has anyone found a source for the female port of the wii remote control?

 

I’ve built an adapter to allow me to use the nunchuck as a USB mouse, and I’d like a more stable connector port than the breakout boards that are available…

Wii Remote IR Camera Hacks

Here Johnny Lee shows how he used the Wii Remote IR Camera:

http://www.ted.com/talks/johnny_lee_demos_wii_remote_hacks.html

http://www.johnnylee.net/projects/wii/

 

I2C voltage converter

Hi, it’s necessary to shift the I2C voltage between 5 and 3.3 V? I’ve been looking and a lot of people, including kaku, use a converter like LTC4031L, and it makes me think I’m missing something.

IMHO a level shifter for I2C

IMHO a level shifter for I2C isn’t necessary. The I2C specification says: all outputs must be open collector. The output can only be driven LOW by the controller or the I2C device. Driving HIGH is only done by floating outputs, using the pullup resistor to reach HIGH level. The pullup resistors connected to SCL,SDA and 3.3V VCC should be ok.

So if you put the pullups on

So if you put the pullups on the 3.3V side the 5V device will probably register a logic high at 3.3V (or even much less; the datasheet usually will tell you)

Laser pointer

Do you think it’s possible to track a laser pointer with this?
I’m think of buying a 808nm 300mW laser for the brightness or a 980nm 50 mW laser for the closer wavelength.
I also saw somewhere that it has a limit of 2 meters?

I’m just trying to make an arduino powered turret that will aim at the dot of a laser pointer so I have a remote of sorts. :slight_smile:

- Michel :slight_smile: