The JamSentry is a simple device. It consists of 3 main parts:
- A wifi capable processor (ESP8266)
- A luminosity sensor (TSL2561)
- A magnetometer (HMC5883) or alternatively (LSM303) – The LSM303 is both an accelerometer and a magnetometer, so it is a bit bigger and you pay for an accelerometer that isn’t used, but it works also.
The unit has two sensors. The luminosity sensor is used to make a rotary encoder. This rotary encoder presses against the filament and detects movement of the filament. The magnetometer sits against the extruder motor. It detects when the magnetic field of the extruder stepper is changing meaning that the motor is driving. If the motor is driving, but the filament isn’t moving, then you have a jam or have run out of filament.
The processor applies appropriate averaging and hysteresis to remove false positives and negatives. When a jam is detected, then appropriate actions are taken such as pausing the print or alerting the user. The processor also provides a web interface that can be used to configure timeouts and other aspects of the operation.
The wiring is fairly simple. The sensors interface using I2C.
The light blue box is the circuit for emulating a hardwired filament runout sensor. Some machines support a filament runout sensor. This normally uses 5V logic, so this circuit does the level shifting to support that function. If you are not using a hardwired runout line, then you don’t need the parts in light blue.
You can certainly wire the parts together using wires, but it is quite difficult to get all the wiring into the small package and can lead to a lot of troubleshooting. To solve this I designed a small backplane that you can find here. There are several fabricators that can make the board. I use oshpark.com. They will make you 3 boards for about $5 with shipping. The downside is that it takes 2-3 weeks.