Integrating wii motion plus i2c

westaust55

Moderator
so do I need decoupling capacitors or not and if so what capacitance
It is good practice to install a decoupling capacitor across the power supply as close as practical to the PICAXE power supply pins.
In general consider adding such a capacitor at each IC package.
The Wii modules may already have decoupling capacitors
The typically recommended value is a 100 nF ceramic or poly type capacitor.


I think I might rewire it just in case there is a dry solder or bad connection
I might have wired it up wrong or the Scl line might be connected to the Sda and sda to scl
if the clock and data signal lines were crossed, that would prevent the circuit working but is unlikely to cause damage.
 

Madtom

Member
I have already got one across the power supply for the 18m2 and I am using the same power source so that should be fine
I thought it might have been i2c specific.

can get at it until 1 tomorrow so I will have a really good look then.
 

tony_g

Senior Member
madtom try this if you have not already
this is what hippy posted on the last page and i have just connected the wmp to a 14m2 and its giving me data back.

im running both the chip and the wmp @3.3v with the 4k7 pull ups and the 100nf decoupling cap, there is so much conflicting info on various different sites saying you dont need the pull ups or the wmp has a built in 5v reg but i thought i would play it safe and run both at 3.3v.

Code:
i2cslave $A6, i2cslow, i2cbyte
Pause 25
writei2c 0xFE, ( 0x04 )
Pause 25
i2cslave $A4, i2cslow, i2cbyte
pause 10

retrieve:
writei2c (0)
pause 10
readi2c (b1,b2,b3,b4,b5,b6)
pause 10
debug
goto retrieve
 

Madtom

Member
maybe I just had faulty wiring

I will give it another shot.
I was actually surprised there was no other threads on this topic for picaxe

DO NOT!!!!! run it at 5v you will fry it almost instantly
there is not a regulator in there. the wiimote has a regulator (in case of a spike or something) and then gives that clean 3vs to the accessories
it is designed to be run of 2 AA batteries

I Damaged my first one lucky I had another. as I sold my wii but not some of the extra stuff
 

tony_g

Senior Member
hopefully you should get some results back to work with now from the wm+,the code definately worked for me.

as for 5v yes i understand, i was not gonna risk running at 5v like some people apparently did whilst reading through forums, i had plenty of 3.3v regs so decided to use them to be safe and to reduce part count by not having to do level translation for the i2c lines.

im playing with the nunchuk for another future project but thought i would try hippys code as i had a motionplus available to try.
 

Madtom

Member
could the mosfets on my breadboard be damaging the signal
i made a board specifically for it now but could that be a problem
 

tony_g

Senior Member
have you got any extra voltage regulators to hand? i just used a 3.3v to power both the 14m2 i used and the wmp.

can you draw a picture either by hand and take a photo to upload or with paint just so people can look over and double check it for you just incase.
 
Top