Let's Make Robots!

connecting an i2c device with an AXE020 project board.

I've been thinking about playing around with i2c devices and I want to find a way to connect them to my

Axe020 project board. This thing.

After some initial problems with finding the pins on the project board that correspond to scl and sda

on my Picaxe 28X1, I finally found out that they are connected to the digital in 3 and 4.

Then I saw that all digital input pins have 10k pull down resistors on the project board, 

and I know that you need them connected to 4k7 pull up resistors to make them work with i2C devices.

This might be a really silly question, but will this be a problem, and if so, is there a way past it?


Lately I've been considering getting one of these to avoid future problems like this one.

Maybe I should get one before continuing with i2c?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hmmm. Yup, I guess this is another axe20 pitfall. I do like the idea of that SMT x2 with all the sync stuff on it's back. This would be ideal if you are breadboarding. Not to mention it, in any PCB or breadboard situation, you would never have to reproduce any sync stuff. --Much faster.

Another option --its a pain in the ass, but...

You can use your axe20 board to program the chip then transfer the chip to the breadboard for testing.

I'd probably be killing quite a few chips doing that.

It would have been nice if they had left some way to connect stuff before the pull-down resistor so you could still use the scl and sda if you chose to. but I guess you can't get everything.

I think I'll be getting the module then. I was going to buy the AXE031 servo controler anyway so I'll just throw the 28X2 module in with that order. 

Thanks for the input. 

I have used Devantech I2C Compass module with 28 pin project board. I had some problems with communicating over I2C, but it turned out power supply and faulty chip problems. Compass works well now. So, I believe you should give your project a shot with 28 pin board.
4K7 is less than 10K, so the lines will still be pulled up. As well, I2C manual does not say you should have exactly 4K7 resistors, it could be anything between 1K8 to 47K. In case of 28 board I would actually suggest lower options considering we have 10K pull down resistor on each line.

so what reistors should I go for? 2 -3k or something like that? I keep running into these problems because I know way too little about electronics in general.


I was thinking of other ways around this thing today and thought of something.

Since the Axe031 I'm thinking about buying comes with a picaxe 18X (at least if you order it from techsupplies), could I program the servo movements into that and let it comunicate with the onboard slave IC via I2C, and have my 28X talk to the 18X with a serial interface, telling it what to do?

for example my 28X sees that the road ahead is clear via a sensor and sends the command "forward" to the 18X and the 18X is programmed with the servo movements to move the bot forward so it communicates those to the slave IC via I2C until the 28X says otherwise. If this works it would take a load off from the 28X and let it worry about sensor inputs and whatnot instead. Would save some space in the 28X's memory too.

I'm not sure if this is a good idea or not. Please tell me if I'm barking up the wrong tree.



Yeah, I think 2-3K would do.

Regarding other stuff: for now, I would recommend to keep things as simple as possible and use, say, only Picaxe 28X or whatever. But this is just me. Serial Comunication: this another reason to work with one chip. You would probably fall in the same trap I did: Picaxe either drive servos or wait for serial input. That means if you will issue serin or whatever serial input command all proccessing in IC stops, including sending out PWM signals for servos.

I read about that, waiting for serial input, thing. You're right, it wouldn't work for this.

I guess I'll try doing it with a single 28X. I'm leaning toward getting the module for breadboarding and use that for this project and keep my 28X with the project board free for other projects that don't demand I2C.

 thanks for the advice.


I thought about that but wasn't sure. I figured that you could just vary the value of the resistor so that there was more up than down... I just didn't want to give out any wrong advice.

To be honest, I'm not sure if this has a drawback or not, I just know it worked for me :) When I were connecting compass module for the first time I did not even think about pull down resistors :) I wonder how I managed not to cook any ICs so far :) so far, so good :)) But writing that posts above I was feeling confident, about what I write, and it makes me feel good :) I have learnt something :) Thank you, LMR, for that!! :)) So, back to our question:

It works, but we would like our E-gurus to enlighten us if it is bad or not to have pull down and pull up resistors in same time :)

There are two things to think about here, firstly that lower resistance pull-up/pull-down resistors means more current is wasted through them, and when dealing with very weak signals the pull-up/pull-down effect may overpower the signal you want to measure. Normally neither of these two things make any difference, but when things don't work quite right they're good to keep in mind.

The main drawbacks of having a pull-up and pull-down resistor are that:
• current is always being wasted by the pair of resistors, although unless you're worried about a few milliamps that's not a big deal.
• the two resistors form a voltage divider, which means that the line will never be pulled fully up or fully down. If there's no signal being applied, and you're using the 4.7kΩ up/10kΩ up arrangement, then the voltage at the input will be ~3.4V when using a supply of 5V. This is still high enough to turn a normaly digital input 'on', but if you were using a Schmitt trigger input it probably wouldn't be enough. At the end of the day it's better to have just a pull-up or pull-down resistor, but if you really need both then it won't do any harm provided the extra resistor you add is no more than half the size of the already existing one, but still at least a few kΩ. If it works, then you don't have to worry about it =)