i have a circuit in with an rp2040 zero is connected to mpu6050 , drv8833 module and some other things…
when there is an n20 motor connected to the driver , the circuit works fine , I get the pitch and yaw all correct…
but when I changed the motor to tt motors and then I tried again, when I give more than 50% power to motor I get EIO error don’t know why…
i tried many things like -
1.adding capacitors to power lines
2.connecting the i²c lines with a pair of twisted wire
3.connecting the mpu to another pins
The main problem is there are two tt motor connected to the circuit though motor drivers and all this is powered by 2s 18650 cells but the problem is when ever the motors turn on the generate a lot of noise on the power lines of pico and mpu6050 resulting in error , i tried adding capacitors (electrolytic + ceramic) to the motor drivers , pico,mpu6050 ,the problem is reduced slightly , but still happens if I give motor more than 60-70% power
Are you sure it is noise, or is it possible that the motors are drawing enough power to cause the supply voltage for the Pico to drop? What is the arrangement for powering the Pico from the 2S 18650 pack, and are the motors using the same source or are they driven directly from the batteries?
Hi brkauto292984
Ah, “Noise”. The magic all encompassing description.
I am afraid this term is pretty meaningless unless it an be clarified and better described could be anything and does not help in diagnosing the cause.
I think Jeff could be right on the money here. The motor change is the obvious cause and more current requirement is the obvious deduction from that. The small improvement in performance by the use of an electrolytic cap is probably the cap is like a small reservoir supplying a bit of the current the 18650 cells cannot.
One proof of this would be to use a larger capacity supply of the same voltage (7.4V??) and try that to see if it fixes the problem.
Situations like this are where an oscilloscope is an invaluable tool. Where you can have a look at exactly what this “noise” is and make a more informed diagnosis but you probably don’t have one of these.
So it all becomes guesswork. My money would be on power supply capacity or more correctly the lack of as Jeff suggests. It would be my first line of investigation anyway.
Cheers Bob
How did you setup your i2c pull up resistors? While I have seen I2c work without any, its not the way its meant to work and pullup resistors should be on the bus.
I have read a few posts where people have used the internal pull up resistors in the rp2040 for this, but found them to be too weak; if this is the case in your setup, then lots of things could push it from working to not working, so maybe check your pull up setup or add some external pull up resistors to both lines (4.7K seems to be a starting point)
Hi Michael
As I read it the only thing that has changed is the motor type. I think if the trouble was I2C it would manifest with both motors.
That is why I (and Jeff) believe that the problem is motor current requirement and the ability to supply that current. The motor, controller, battery or the combination of all.
Cheers Bob.
PS brkauto292984
What is wrong with the original motors.
Yes, I tend to agree, just thinking about what else could be going on.
The fact that they can get the error message stating the I2C has an error means the rp2040 is not rebooting. Of course the sensor on the i2c bus maybe.
But if the I2C pull up was too weak (or missing) “and” the power dipped a little I could see that affect the i2c bus, but everything else could keep working.
A full overview of all parts and how they are wired would help. the 2 x 18650 should have a fair supply current (but different versions have different outputs).
The quick look at what I think the two motors where (guess actual models) did not really show any considerable different in power needs; that said the over view hints at more things connected so may have been right in the power limits.
So in lew of more detail, it was just a thought of something to check.