inglewoodpete
Senior Member
I am (voluntarily) working on a project which is to network over 60 PICAXEs using i2c. The network has an master 28x1 controlling up to 60 28x1s via i2c. The slaves use hardware i2c (hi2c) to control the positioning of a 12v dc motor controlled through a L298 H-bridge (dual 2 amp).
The project is not for monetary gain: it is partially funded by a government grant.
The slaves are about 1 metre apart and have a 12 volt feed for power (on-board 5v regs) and low impedance i2c bus using P82B715 i2c bus extender chips. The bus uses 470 ohm pull-up termination resistors at either end. Each slave borad has the standard 4.7k ohm pull ups on the i2c leads between the P82B715 and the 28x1.
The i2c works reliably until 1 or more motors are run. The motors each pull between 1 and 1.5 amps. Due to the positioning required for the motors, pulsing and PWM are used to drive them.
Once a motor is run, its 28x1 controller's i2c locks up. Note that the 28x1 DOES NOT restart: it continues to run (and continues to send debug data to the PC). The i2c simply stops working. A hard reset (power cycle or reset switch) is required to restore the i2c. Note that a fresh download DOES NOT restore the i2c, although the freshly downloaded code runs normally otherwise. This suggests that nasties are getting into the i2c hardware of the 28x1 and locking it up.
I suspect that the motor current in the supply leads is upsetting the i2c signalling bus. Obviously, the i2c bus is unbalanced and there is up to 1.5 amps pulsing through the earth return, possibly causing the upsets.
Has anyone had similar problems? Better still, does anyone have a possible solution? How should high currents be used in conjunction with i2c?
-Peter
The project is not for monetary gain: it is partially funded by a government grant.
The slaves are about 1 metre apart and have a 12 volt feed for power (on-board 5v regs) and low impedance i2c bus using P82B715 i2c bus extender chips. The bus uses 470 ohm pull-up termination resistors at either end. Each slave borad has the standard 4.7k ohm pull ups on the i2c leads between the P82B715 and the 28x1.
The i2c works reliably until 1 or more motors are run. The motors each pull between 1 and 1.5 amps. Due to the positioning required for the motors, pulsing and PWM are used to drive them.
Once a motor is run, its 28x1 controller's i2c locks up. Note that the 28x1 DOES NOT restart: it continues to run (and continues to send debug data to the PC). The i2c simply stops working. A hard reset (power cycle or reset switch) is required to restore the i2c. Note that a fresh download DOES NOT restore the i2c, although the freshly downloaded code runs normally otherwise. This suggests that nasties are getting into the i2c hardware of the 28x1 and locking it up.
I suspect that the motor current in the supply leads is upsetting the i2c signalling bus. Obviously, the i2c bus is unbalanced and there is up to 1.5 amps pulsing through the earth return, possibly causing the upsets.
Has anyone had similar problems? Better still, does anyone have a possible solution? How should high currents be used in conjunction with i2c?
-Peter