First night''s hamster data is in ...
Archiver
Posts: 46,084
Since there've been a few people interested in the "hamster"
experiment, I thought I'd post a brief note.
The stamp setup worked well. I decided not to use COUNT, but instead I
wrote a simple "state loop" that counts clock cycles (in effect) while
waiting for the reed switch to close and bring the input pin low. I
found that I got some bounce in the reed switch, but this was overcome
with a simple bypass capacitor across the reed swtich. The stamp setup
counts revolutions accurately and stably. I had to calibrate the cycle
counter, but this was simple: I simply ran the wheel by hand for a few
minutes and then multiplied the total number of clock cycles by a
conversion factor to get real time. The clock cycles ended up being
very close to 4 miliseconds, so even when the hamster was running his
fastest, I was getting a count of at least 120 per revolution. I can
post the code if anybody wants to see it.
"Smokey" (my daughter's hamster) was busy last night! He started
around 2130, and went to sleep this morning just after 0800. He ran a
total of 20580 meters--I was surprised; that's over 12 miles! He
averaged 0.9 m/s, and ran essentially all night. He took a couple of
relatively long rest intervals (11 and 37 minutes), but other than
that 1/2 of his rests were less than 30 seconds, and 90 percent were
less than 2 minutes.
I have a PPT with some data in it. If anybody's interested, e-mail me
at webbm@c..., and I'll send it to you.
experiment, I thought I'd post a brief note.
The stamp setup worked well. I decided not to use COUNT, but instead I
wrote a simple "state loop" that counts clock cycles (in effect) while
waiting for the reed switch to close and bring the input pin low. I
found that I got some bounce in the reed switch, but this was overcome
with a simple bypass capacitor across the reed swtich. The stamp setup
counts revolutions accurately and stably. I had to calibrate the cycle
counter, but this was simple: I simply ran the wheel by hand for a few
minutes and then multiplied the total number of clock cycles by a
conversion factor to get real time. The clock cycles ended up being
very close to 4 miliseconds, so even when the hamster was running his
fastest, I was getting a count of at least 120 per revolution. I can
post the code if anybody wants to see it.
"Smokey" (my daughter's hamster) was busy last night! He started
around 2130, and went to sleep this morning just after 0800. He ran a
total of 20580 meters--I was surprised; that's over 12 miles! He
averaged 0.9 m/s, and ran essentially all night. He took a couple of
relatively long rest intervals (11 and 37 minutes), but other than
that 1/2 of his rests were less than 30 seconds, and 90 percent were
less than 2 minutes.
I have a PPT with some data in it. If anybody's interested, e-mail me
at webbm@c..., and I'll send it to you.