Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I2c noise reduction or amplification

Status
Not open for further replies.

SimonTHK

Member
Hello Electro tech online

I am doing a project now with over 20 microprocessors. 1 is master, rest is slave in an i2c connection.

It seems to run smoothly, but few problems occour.
Most of the boards are build exactly similar and work like touch sensitive buttons. When I measure the buttons with oscilloscope, everything seems to be exactly equal on all boards and everything seems to be correct.
BUT!
Something is going wrong since the master doesnt receive correctly from all boards (which contains exact same components and program). I guess I use 3 meters of wire right now and the pull up resistor is at 100k internally inside my PSOC cypress Uc.

My quistion. How do I improve my i2c signal? Or improve my noise reduction on the lines?
 
It seems that I might got something improved abit now :)
I read alot around on this and heard that the power to the microprocessor had to be decoupled. I have used a bulk capacitance at 100uf for each microprocessor (bulk capacitance is just like a big capacitor right? Big enough to ensure some power).
I how now added a smaller decoupling capacitor between the power lines and it seems like it solved the problem. Everything else worked in the microprocessor before I did this, everything but the i2c connection (which worked partly with errors).
Can anyone confirm that a small decoupling capacitor can have been the solution for my problem? Because then I will buy me 1000 decoupling capacitors and put them everywhere I can ;D
 
Also I have been wondering what size should be used as a bulk capacitance and decoupling. With the 100 uf I am quite sure I have enough, so thats why I used it. I draw power from an external power supply and do not have voltage regulators for each board.

I draw a max of 50 ma from my microprocessors output pins. What kinda capacitors would work for this, and is there a standard?
Now I use a 100 uf and a 0,1 uf and I guess my 100 uf is overkill? and maybe my decoupling is also too big?
 
Last edited:
100 µF capacitors are no good for decoupling. Decoupling is about preventing spikes on the supply rails, so you need a low impedance for high frequency signals. 0.1 µF or 0.01 µF capacitors are what you want.

Put them as close as possible to the ICs that you want to decouple.

100 uF capacitors have a huge inductance. https://www.farnell.com/datasheets/14936.pdf shows the impedance not reducing beyond 100 kHz. I suspect that the inductance may cause the impedance to increase at higher frequencies.

https://www.farnell.com/datasheets/618123.pdf shows that ceramic capcitors have impedances that decrease as the frequency increases, but as you increase the frequency further, the impedance increases. The point at which it reverses is at a higher frequency for smaller capacitors.

All of the ceramic capacitors have graphs that start at 1 MHz, while the graphs for the electrolytic stop at 100 kHz.

So you don't need the 100 µF capacitors. You might need one to keep the regulator stable. You need lots of 0.1 or 0.01 µF capacitors, as close to the ICs as possible.

50 mA seems a lot to take from the microprocessor output pins. That has little or nothing to do with the decoupling.
 
I guess I use 3 meters of wire right now and the pull up resistor is at 100k internally inside my PSOC cypress Uc.

My quistion. How do I improve my i2c signal? Or improve my noise reduction on the lines?

Three meters is a LOT for I2C, which is designed for communication on the same board.

Also 100K pullups are far too high, I've never seen any that high used, and the lower the value the faster (and longer) the bus can be.
 
I second that. 100k just seems wrong especially if you have wires longer than a couple of inches, (which for 20 slaves I guess is the case). I2C datasheets normally list the recommended values for the pullup resistors.
 
Thanks for the help so far.

The 100k pullup was my mistake. I know it has 100k pullups on the other output pins but I dont know what is used on the I2C output pins on the microprocessor, but I guess it is probably not 100k.

Ive read that I2C can work over 8 meters distance, and I will be using aprox 5 meters in total when project is finished. Since it can be a problem, is also why I ask in here :)


Ill add better decoupling capacitors that match the microprocessor. Thanks Diver300. Since I am still newb, I didnt quite get if it could actually be worse using a 100 uf capacitor? Or if I should just let them be sstay on the board.

Ps: I found out that the pullup is 5,6 - 8k resistor. Maybe I could add one in parallel to increase the distance.
I also want to add a 100ohm resistor in series on the scl, should I also do this on the data line?

Thanks in advance
 
Try running the I2C bus at a lower speed.

Also your pullups (4.7K - 10K normally) should only be at the extreme ends of the bus (termination).
 
Last edited:
Ill add better decoupling capacitors that match the microprocessor. Thanks Diver300. Since I am still newb, I didnt quite get if it could actually be worse using a 100 uf capacitor? Or if I should just let them be sstay on the board.
Leaving the 100 uf caps already installed probably won't help much, but they won't hurt, so you can leave them installed if you want.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top