Saturday, November 28, 2009

Arduino Struggles

After several periods of a bug presenting itself in the arduino, I finally sat down to try to get rid of it the other day. It seemed that at completely random points the heat sensor would fail and read hiccup and either output something incomprehensible, or out put a ridiculously high temperature, either of which would make the entire system take a few seconds to shut down and restart. I had noticed that this tended to happen a lot more after we had been running the system for 50 minutes than when we ran it from a cold start, so I suspected the actual heat of the system did have something to do with it.

I tried to program checks that would replace clearly wrong readings with more reasonable ones. This worked to an extent, giving the system up to ten minutes of uninterrupted running. However, I still found that when I heated it up to higher and higher temperatures it would fail more often, completely ignoring my failsafes.

I began to suspect that the problem wasn't with the heat sensor, but rather with the motor itself, as the problem was showing up when it got close to full power. To test this I changed the temperature for max power from 40 C to 60 C and found that the problem had very nearly disappeared. I could get the sensor as hot as I did before without the problem showing up.

What lead us to falsely believe that the problem was the fault of the temperature sensor is that the sensor does in fact have hiccups where it picks up temperatures much too high or much too low. This may still contribute to the problem, but with the expanded temperature range it rarely presents itself and should work well in the presentation. There is also hope that since we will be using a different motor, the problem may disappear entirely if the hardware can handle high power settings better than the one that we were provided with.

No comments:

Post a Comment