The first thing that went wrong was the temperature reading from the thermistor started to become erratic. I decided this may be due to a bad connection as my breadboard layout was getting a bit messy.
The hot resistance of the thermistor is only about 12Ω so I was willing to think a bad connection could be possible as I had not used the breadboard for over 10 years. I was also getting a lot of noise from the motor so I decided to rebuild the circuit on vero board and shorten all the connections.
I paid careful attention to the layout to keep the high power stuff away from the sensitive inputs and the micro, and route the ground currents sensibly. The connectors on the far left are the outputs for the heater, motor and possibly a fan. Next is the power in connector followed by 3.3V and 5V regulators. The shaft encoder is 5V but the micro is 3.3V, the four resistors handle level shifting. Next are the input connectors for the shaft encoder, thermistor and filament exhausted sensor. The far connectors are for the I²C bus.
I mounted it on the z-axis together with my spindle controller so that the only moving wires are a 12V feed and the I²C bus.
All the wires are now much shorter and screened. I also earthed the casing of the motor. On testing I was very disappointed to find :-
- The thermistor was still erratic.
- The I²C bus did not work much at all.
- The noise around the circuit was just as bad if not worse. Until I added the earth connection to the z-carriage the micro crashed when the motor was running.