Shorted encoder??
Hey guys, strange problem, hoping someone might have a solution...
The problem as it stands is: when the left encoder is plugged into the board (P13), and the PWR switch is set to 2, the servos jerk once and then all activity ceases. No lights, no running code, nada. Pressing reset does not have any effect during this state. When P13/left encoder is unplugged, all else works normally. When in PWR switch 1, everything works. Can run programs with terminal open and see everything reacting as it should.
Have tried the following:
-Re-run 'Test Encoder Connections' program
-Re-run servo calibration program
-run a blank program to EEPROM
-Switch batteries
-Check, disconnect, reconnect all electrical connections
-Remove all circuit components other than 2x 20k resistors
-Dismount left wheel and encoder and try to firm up connection
The history of the problem is the following:
1) Wrote a combo visible light follow + ultrasonic obstacle avoidance program
2) Tested for ~1hr with good to marginal success
3) Lost sensitivity on sensors (stopped following light, stopped trying to avoid obstacles)
4) Updated program; on deploy, lights on, but no movement (logical structure error)
5) Re-traced steps in program to working version, held reset button while setting power to position 2 - and then current problem ensued.
Has anybody ever run into something like this? I have another encoder en route, but am in a time-critical situation (class project) and would love to debug ASAP...
Thanks!
The problem as it stands is: when the left encoder is plugged into the board (P13), and the PWR switch is set to 2, the servos jerk once and then all activity ceases. No lights, no running code, nada. Pressing reset does not have any effect during this state. When P13/left encoder is unplugged, all else works normally. When in PWR switch 1, everything works. Can run programs with terminal open and see everything reacting as it should.
Have tried the following:
-Re-run 'Test Encoder Connections' program
-Re-run servo calibration program
-run a blank program to EEPROM
-Switch batteries
-Check, disconnect, reconnect all electrical connections
-Remove all circuit components other than 2x 20k resistors
-Dismount left wheel and encoder and try to firm up connection
The history of the problem is the following:
1) Wrote a combo visible light follow + ultrasonic obstacle avoidance program
2) Tested for ~1hr with good to marginal success
3) Lost sensitivity on sensors (stopped following light, stopped trying to avoid obstacles)
4) Updated program; on deploy, lights on, but no movement (logical structure error)
5) Re-traced steps in program to working version, held reset button while setting power to position 2 - and then current problem ensued.
Has anybody ever run into something like this? I have another encoder en route, but am in a time-critical situation (class project) and would love to debug ASAP...
Thanks!
Comments
If the resistors are too much, why did we get 2x 2hr+ functional testing sessions before things went haywire?
Also, if I lower the resistance by that much, don't I then risk passing too much current through and blowing more components? I have to demo this on Wednesday, and I really don't want to mess up any more hardware...
EDIT: I took it for granted that you had a BS2 BOE.
I myself was worried for a while that I had comprised the pin and/or entire board. Now pretty convinced it's the encoder, but still stumped as to why the encoder hardware would malfunction. I mean, it ran into a few feet during testing, but not excessively hard, and that's not what preceded the malfunction. Mostly I'm curious to see if anybody else has had this problem, or whether I really am just good at breaking things in novel and curious ways. Would be stoked if somebody knew of a hardware (or firmware?) fix. My old man thinks a transistor or something might be stuck in the wrong position, but we seem to have proven that the pin itself works just fine.
Thoughts?
Make sure the encoders look the same on both sides of the bot.
I think it would be a good idea to use some sort of diagnostic program which just shows the state of the I/O pin connected to the encoder. Can you write a simple program to display the I/O pin's state?
If you have the Propeller Tool installed, I could help you with a Spin diagnostic program. I could probably help with some C diagnostic code but it's much easier for me to write a quick program in Spin.
Besides checking the I/O pin state (of the encoder pin), you should also make sure you can make the CR servo spin in both directions. Can you write some simple code to spin the wheel?
-Phil
@everybody else: Definitely was a bad encoder. Received replacement today, took the connection apart to see what it looked like, and there was definitely a short there - see picture.
Good news is, having replaced the encoder and tweaked the code a bit, it works perfectly! Thanks for the help & suggestions, particularly MikeDYur!
Yes success! Really good to hear that you had no collateral damage, never seen anything like it, as serious a short that you can have, luckily you weren't working with VIN. Have fun with your robotics hobby, and good luck with your class project.
BTW: Welcome to the forum, you have been initiated.