Enviro PHat affected by motor and motor drivers?


We were planning on using the motion sensing capabilities of the Enviro pHAT for a project (in which we are also using two Adafruit motor drivers), but we weren’t entirely sure of the accuracy of the compass and the accelerometer. It’s worth mentioning that the Enviro pHAT is on top of the motor drivers, and is about 7cm away from 2 N20 motors. Is there a way to make these features more reliable? We were considering moving the Enviro pHAT away from the motors and drivers, but were unsure how to connect it in such a way, and whether it would help. Thanks in advance for any help!


They should not affect the accelerometer, as far as I’m aware, but putting large magnets next to the magnetometer most definitely scuppers it.

If you wire it with jumpy jerky and move it as far away from the motors as possible, it should help.

See: https://pinout.xyz/pinout/enviro_phat for wiring. Take note of the small pips on ground pins which should also be wired. You may get away with not using all of the ground pins since the ground plane on this board is pretty consistent.