-
-
Notifications
You must be signed in to change notification settings - Fork 282
Troubleshooting
Scott Bezek edited this page Sep 4, 2018
·
1 revision
Here are some general troubleshooting tips in case you're running into erratic or incorrect behavior, which should help pinpoint the issue. Please feel free to add or update these tips based on your own experiences.
-
Test the motor/mechanics in isolation: This is a good general starting point, as mechanical issues are a common cause of issues. I'd first disable the home position sensors entirely by setting
HOME_CALIBRATION_ENABLED
tofalse
in splitflap_module.h -- the reason for this is that a flaky/broken sensor can cause all sorts of strange behavior. Then, use the Serial Monitor to tell the Arduino to go to the empty space (i.e.= \n
) - check to make sure that the flaps turn smoothly, and remember which letter the module ends on. Do the same thing again and confirm that the module ends up on the same letter. Do this a few more times (at least 5) to make sure everything is working mechanically. If it doesn't return to the same letter and you've verified that there's nothing physically obstructing the spool from turning (e.g. sometimes flaps will get caught on the top/sides of the window), it may be an issue with the motor; please open an issue and I can try to provide some additional troubleshooting steps (most likely an issue with torque/speed, but could also be a different internal gear ratio in the motor) -
Test the IR sensor in isolation: If you have a volt meter (or ideally an oscilloscope), connect it to the sensor's output pin while the sensor is plugged into the Arduino/controller PCB. The voltage should be near 0V (or at least lower than 3V) when the sensor is NOT aligned with the hole. Then manually rotate the flaps carefully until the hole is aligned with the IR sensor (on the older design with gears I'd recommend rotating the motor gear rather than the spool itself). The voltage should increase to be near 5V. The change in voltage should be very obvious; if it's not, it suggests there's not enough contrast between the home position and everything else. If that's the case I would suggest cutting some white paper into a circle, making a black dot or line with a permanent marker, and then taping it to the gear's surface. If you don't have a voltmeter or oscilloscope, you can connect the sensor to an analog pin on the Arduino and check the voltage using a simple sketch that outputs the analog value over serial, though you'll need to make sure to enable the internal pull-up when you do this (i.e.
pinMode(X, INPUT_PULLUP)
).