Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
United Kingdom
Asked — Edited
Resolved Resolved by EEGbiofeedback!

Mma7455

My turn to ask a question for a change:)

My MMA7455 arrived today but I'm struggling to get them to register anything when connected. Just wondered if I had it connected up right or if I need to do anything extra.

My wires are about 1" long, connected to VCC, ground, SDA and SCL on the MMA and on the EZ-B.

I'm using a simple breakout board which uses the MMA datasheet here.

Schematic of the breakout board is;
User-inserted image



Update/Edit: I think I may need to set the CS pin high, i.e. 5v. Is that correct? I don't want to fry the EZ-B or the MMA.

AI Support Bot
Related Content
Synthiam
United Kingdom
#10  
Thanks, but that's for serial connection, although it did make me think that perhaps I need to try putting CS to ground, but alas no luck there either.

@Rural, no rush, I never intended to use these on the robots, I only got them to play with them and see if I can do something cool with them. I may get in touch with the people who made the breakout board and see what they say although they are Chinese which doesn't help as far as the language barrier is concerned.

FYI, it's made by LC Studio
#11  
If R1 and R4 are really 0 ohms that would short VCC to ground. Does the D1 led come on?
United Kingdom
#12  
Yes, D1 lights up.

I wouldn't have thought their circuit was wrong, they must have sold a lot of these without problems. I'm assuming I either need to connect it up correctly using the 8 pins on it or I need to initialise it - or the I2C address for the control is not the same as the I2C address of this particular module.
United Kingdom
#13  
I found this
User-inserted image

For basic I2C you leave the CS pin floating as its already pulled high in your circuit diagram. Note also the VDD and GND need to be common with the microcontroller or in this case the EZB
United Kingdom
#14  
Yeah that's what I thought, and it's what I have. I think the pullup resistors are also on the breakout board?

The board is connected to the I2C bus, vcc to vcc, gnd to gnd, scl to scl and sda to sda. I really can't understand why I'm having problems getting it working, it should be working out of the box...
United Kingdom
#15  
You are not wrong Rich. I would guess it needs initializing 1st
Ireland
#16  
@Rich
sorry gave you wrong link in previous post, as it dealt with the compass connections

Although that uses SDA & SCL inputs also, to get that to operate I connected both of these to GROUND using 2 x 10k resistors ( not to the + rail ) I am open to correction but I believe others have used this also to get the compass up and running.What I am saying is it possible it may also work for the accelerometer.
United Kingdom
#17  
I'll try the resistors to ground tomorrow although I really don't think they should be needed as it's a breakout board so everything should be taken care of on the board itself, and the schematic shows it is. But if I don't try I'll never know for sure.

I'm still scratching my head a lot over this one though, it should work!.. I can only think that I may need to send an I2C command to set the mode since it has a few modes according to the datasheet, but then again I would have thought the control in ARC would take care of this...

Looking at the Parallex version, the schematic is slightly different but basically the same configuration. I'm starting to think I may have got 2 bad ones after all but I wont give up just yet. Would be really good to hear from someone who has used one though to see if I am missing something.

More for my reference tomorrow when I play more, but also to check that the address of the sensor is 0x1D (correct or confirm if anyone knows).
#18  
Hello Rich, hum, did you take a look at page 19 ? If so you will see two errors in your drawing, the first is IAddr0, need to be at Vcc, the second is the output to the I2C bus, one of the out you use is not the good one and they suggest pull up resistors at 4.7K

$1D look like the good adress for me.

You did not take the easiest to deal Rich, lucky you are pretty good in scripting.
#19  
Rich and Co.,

I think your chips are bad. I just hooked up my MMA7455 mine up 2 inches wires for SDA and SCL and 4 inch wires for the ground and + and it works perfectly. The little green cursor in the latest version of EZ-B shows up and moves as the bot does.

No pull-up resistors were necessary. I'm working on a balancing bot next and will post a video upon success.



User-inserted image



Best,

Bill
United Kingdom
#20  
@Andre99 it's not my schematic it's the schematic from the manufacturers. I wouldn't have thought it was wrong.

@EEGbiofeedback thanks for the info, that is just what I needed to hear. I'll triple check my wiring, try both of the MMAs I have and try them on both EZ-Bs just to make sure. Thanks.
United Kingdom
#21  
@EEGbiofeedback can you tell us where you got your board from?

The Parrallax one Rich has a voltage level translator chip on the board and I cant see that on the pic posted be EEGbiofeedback? a pic of Rich's board would be useful. It just connects between pin 13 of the chip and the SDA output. The pinouts on the board seem to be different as well. Great to know it works
United Kingdom
#23  
So its identical then weirdness!

Although this isn't a pic of your actual board though? Looks like it was soldered by a Gorilla (apologies to any Gorilla's reading this)
United Kingdom
#24  
I noticed that, I'm sure my board has better soldering. I'll double check when I'm home and post a photo of the actual boards, use new jumper wires etc.

It does look more and more like I have 2 bad boards, which can happen I guess if I am extremely unlucky.
#25  
Winstn,

My board is identical to the image Rich posted. The best I can say is I got it from Amizon and China. :)

FYI I now have it hooked with all wires over 8 inches long and it's still working perfectly. I'm attaching it to two servos with two tires and am starting some balance testing now.

Bill
United Kingdom
#26  
Hi Bill I'm really interested to hear how you get on keep us posted
United Kingdom
#27  
I have no idea why but after making up yet another cable for this it is working fine. Nothing any different to the first 2 other than the length on the first attempt (that was about 1" this is about 4" long). I guess it's just one of those things.

Thanks to all for the advice and help on this.