Hamster Wheel Sensor – ElectroSchematics.com

Hamster wheels, or running wheels are exercise devices used primarily by hamsters and other rodents, but also by other animals when given the opportunity. Hamster wheels allow rodents to run even when their space is confined (https://en.wikipedia.org/wiki/Hamster_wheel).

Recently I had a request from a social media friend to make a compact hamster wheel sensor that can count (and register) the number of revolutions of the hamster wheel. The idea was not to mess with the hamster wheel (or cage). For that reason, I prepared a minuscule photosensor based front-end circuitry. Below you can see the schematic of that front-end hamster wheel. The sensor is made of a handful of budget components.

If there is a hamster wheel in its cage, you can do many things to make your hamster wheel better and more attractive by using this simple circuitry. For the prototype in my lab, I used a reflective infrared sensor ST188 (OC1). Nearly any other combination of infrared transmitter/emitter and receiver/collector will do. The photosensor and a small strip of marine reflective tape (stuck to the hamster wheel) are used to monitor rotations. See the reference drawing rendered below. You will need to figure out the individual challenges of mounting the photosensor on your specific hamster wheel.

The ST188 photosensor combines a high output 950nm infrared LED with a highly sensitive NPN phototransistor, and its typical detection range is 4-13mm (http://www.npnec.com/en_pdf/ST188-EN.pdf). It seems that ST188 is a close replica of the TCRT1000/TCRT1010 reflective optical sensor from Vishay Semiconductors (https://www.mouser.com/datasheet/2/427/tcrt1000-280041.pdf).

The NE555 (IC1) is wired to form a tricky Schmitt Trigger in this design. In principle,

the defining characteristic of any Schmitt Trigger is its hysteresis. In this case, it is 1/3 and 2/3 of VCC (5V), defined by the built-in resistor voltage divider on the 555. In idle state, output of IC1 (Pin 3) is in HIGH state, thus the green indicator (LED1) remains lit in normal state. However, when reflected infrared light from the sender part of OC1 falls on its receiver part, voltage at TP1 (Pin 2 &6 of IC1) raises above the threshold. This results in a LOW output at pin 3 of IC1 (TP2), and as a result LED1 goes off instantly. Note that the real output (Pin 3) of IC1 is used here to drive the ‘debug’ indicator (LED1), and the open-collector output (Pin 7) of IC1 is extended to the outside world through the 2-pin connector CN1 . With a suitable pull-up resistor (10KΩ or so) you can make this ‘floating’ output (TP3) ready to work with the I/O of any standard microcontroller.

The ST188 photosensor features an impressive daylight blocking filter. So, it would not be critical to use the optional capacitor C3. You do need to have a stable and smooth signal output from the photosensor – keep an eye on its cabling. Now to one 555 timer tutorial https://www.jameco.com/Jameco/workshop/techtip/555-timer-tutorial.html

Well, being a lazy old geek, I decided to rig up my quick test prototype on a mini breadboard. As you see, the ST188 sensor is not used now – my breadboard (Powered by a regulated 5VDC power source) the little master circuitry and holds nothing more.

This type of non-contact reflective optical sensor concept could be used in many different situations such as logging hamster wheel speed, keeping tracks of its rotation, switching a remote device when it’s active, etc. I felt the Arduino platform would be the perfect platform to continue. Needless to say, it’s pretty easy to interface my hamster wheel sensor with a microcontroller to see how far your hamster runs at day/night.

Now you can see the photosensor sticking out. The entire electronics assembly will eventually be mounted to the outside of a hamster wheel as clearly pointed in the reference drawing shown before. Since the hamster wheel will have a reflective tape attached to it, when it’s closest to the photosensor, they should be no further away than 10mm. When the hamster wheel starts running, the reflective tape will pass the photosensor, and this will deliver rhythmic pulses (HIGH→LOW→HIGH→LOW…) through the output connector (CN1) of the hamster wheel sensor.

And a casual closeup:

I’m sure you could come up with 101 ways to tweak on this hamster wheel sensor idea, but in case you need to simplify the setup further, here we go. To make a crude hamster wheel sensor you just need to replace the timer chip circuit with a ‘transistorized’ version as shown below. You know this descent of course has certain disfavors, right?

Preparing a microcontroller to connect to the hamster wheel sensor is kinda cool, may be for another winter night. As you see, I have already started to devise a toy hamster wheel. Next time I’ll connect it to a homemade datalogger. I’ll keep you updated about that.

So, for now it’s simply a breadboard prototype that works! In truth there’s not a whole lot of fancy engineering that went into this little project, and at present I’m not going to try to flaunt, nor will I make a tutorial on how to build one of these contraptions. That said, if you’d like to go farther yourself, the schematic, description and photos should be enough to get you started!

Leave a Comment