PDA

View Full Version : DIY hamster wheel spedometer


starrylight99
02-20-2011, 04:07 PM
My boyfriend is very tech-savvy and likes to build things. This weekend he made up a little contraption that measures how fast the hamster wheel is spinning, and how far has been traveled. Chaos is demonstrating how it works.

Warning -- very very VERY slight adult language in the video. Chaos pooed and it was gross.

crJFrb5c8f8

I still think the software is a bit glitchy, and we don't trust it to be left on the wheel overnight, but its still very cool. If anybody would like to make one of their own, I could get my boyfriend to write a little tutorial.

wofunny
02-20-2011, 04:42 PM
Hehe, I just watched this befor I came on HC! Its really Cool :)

I may be interested in a little tutorial, but only if he is willing :) x

Gillzy
02-20-2011, 05:18 PM
What kind of sensor is it that your using? That's really quite cool :D My handy-man friend was gonna make me some sort of thing hooked up to the wheel (he was thinking of a light attached to it) but this is much cooler ;) Although I'm not sure what you'd do with the info. It'd be good to monitor wheel use though :)

starrylight99
02-20-2011, 05:57 PM
It's not a sensor it's actually a bump switch. He wrote up a little thing on how to do it if you're interested. It's got schematics and programming codes in it, so I don't really want to clog the forum with things that many people don't understand, but he did write it up, so if anybody is interested I can send it your way.

Luther
02-20-2011, 07:06 PM
I was thinking about one of these the other day. Thought I'd buy a cheap cycle computer from lidl and adapt it for Gina's giant Karlie Wonderland Wheel.

Iluvhamsters
02-21-2011, 02:31 AM
That's great!! I'd really love to know what 119.24 inches/second translates to in miles per hour :)

Gillzy
02-21-2011, 02:44 AM
Google does it for you :) 119.24 (inches per second) = 6.77500 miles per hour

He was normally running about 20 (inches per second) = 1.13636364 miles per hour

alexarcano
02-21-2011, 02:55 AM
Good job with the speedo. :) You can pick up magnetic sensors connected through a usb project board quite cheap, optical ones work good too, like a laser trip with counter and a bit of retro reflective tape on the wheel if you want to keep it minimal in the cage. This will count the number of revs per second and when you know the circumference of the wheel ( π r or π d 0.5) its easy to work out speed and distance covered. I'm not a programmer though so dunno much about the programming you would need to do, I've only ever used commercial programmes before.
A wireless cycle computer would do a good job too I think, providing it has settings for such a small wheel. Seen it done on youtube before.
Not dissing or anything, just pointing out a viable alternative ;)

Holy sh.... cow. I've just read this back and decided that I'm a geek.

Iluvhamsters
02-21-2011, 03:12 AM
Google does it for you :) 119.24 (inches per second) = 6.77500 miles per hour

He was normally running about 20 (inches per second) = 1.13636364 miles per hour

Thanks Gillzy, never thought of using Google to convert :)

starrylight99
02-21-2011, 05:29 AM
Good job with the speedo. :) You can pick up magnetic sensors connected through a usb project board quite cheap, optical ones work good too, like a laser trip with counter and a bit of retro reflective tape on the wheel if you want to keep it minimal in the cage. This will count the number of revs per second and when you know the circumference of the wheel ( π r or π d 0.5) its easy to work out speed and distance covered. I'm not a programmer though so dunno much about the programming you would need to do, I've only ever used commercial programmes before.
A wireless cycle computer would do a good job too I think, providing it has settings for such a small wheel. Seen it done on youtube before.
Not dissing or anything, just pointing out a viable alternative ;)

Holy sh.... cow. I've just read this back and decided that I'm a geek.

Yep, that's pretty much exactly what he did, except with the bump switch rather than magnetic or laser sensors. The bump switch was just what would be most minimal in the cage.

He is a programmer, so he was able to create a program to go with the Arduino USB project board, and that did all the calculations for us. He figured out the circumference of the wheel and created code so the program would calculate everything.

I'll mention the optical or magnetic sensors to him. I bet they are much more accurate than the bump switch, and the programming wouldn't be much different.

alexarcano
02-21-2011, 06:03 AM
It's not so much more accurate as less invasive as parts could probably be left on overnight without danger to hammie, most especially the laser (you should get away with a high intensity IR LED), as this can be left outside the cage with a slim strip of retroreflective tape on the 'back' of the wheel (surface towards the bars) basically all it does is count 'flashes' as the tape reflects back the light. At high speed this may become innacurate depending on the quality/distance/type of the photo sensor used.
Hope this gives you the idea of what I mean. :)

starrylight99
02-21-2011, 07:01 AM
Ohh I understand. Yes, that's a very cool idea, I bet my boyfriend could set up something like that. The problem with the bump switch is that its large and sometimes trips twice in one rotation, giving inaccurate results. I'll mention it to him. If you're interested in seeing his coding (not sure how many, if any, programmers on here) I can share it.

alexarcano
02-21-2011, 07:25 AM
I'm almost exclusively hardware, except for some design/prototype software that I use. Only have basic/theoretical knowlege of programming I'm afraid (last time I did any real programming was college.. and that was in Basic :p ). However I'm sure that swapping out the hardware would be no problem for him as operationally it still basically just a switch, the light source does not even need to be on the same circuit for it to function. Oh, just don't use any TV remote controls near it :D

Gillzy
02-21-2011, 10:41 AM
My OH is a programmer but I mentioned it to him and he was like "NO. I'm not doing it." lol. :P

alexarcano
02-21-2011, 10:44 AM
Aww.. I'm sure you convince your OH that it's a good idea. ;)
Then you can share it with us :D
Umm... I don't mean how you got the programming done or anything. Just the programme.
Ahem.

starrylight99
02-21-2011, 04:24 PM
My OH is a programmer but I mentioned it to him and he was like "NO. I'm not doing it." lol. :P

I already have the code! My boyfriend wrote it already. All you would need to do is buy the project board and any necessary other supplies, and I can give you the coding for the program.

My boyfriend actually wrote up a nice tutorial of how to make your own, complete with code and schematics, if you or your OH would like to see.

Samantha
02-25-2011, 01:11 AM
Hey, I'm on a maths and stats degree and know a little about programming so i would really appreciate it if you could send me the tutorial and code etc. I have 2 syrians both with identical wheels so it might be interesting to apply some statistical analysis to the data i collect :P
I know that sounds really sad, but if you are on a maths degree then you start to grasp at straws lol.

starrylight99
02-25-2011, 05:35 AM
Hey, I'm on a maths and stats degree and know a little about programming so i would really appreciate it if you could send me the tutorial and code etc. I have 2 syrians both with identical wheels so it might be interesting to apply some statistical analysis to the data i collect :P
I know that sounds really sad, but if you are on a maths degree then you start to grasp at straws lol.

Haha I'm on a Immunology/Virology degree...I completely understand.

I'll be happy to send you the tutorial and coding. I can't do it until after work this evening, so maybe in 10 or 11 hours I'll send it to you.