Hello,
I'm using a DC motor and I want to know how many rounds it makes. Is there something I can use for that? Mechanical?
Thanks in advance.
PMVisser
Hello,
I'm using a DC motor and I want to know how many rounds it makes. Is there something I can use for that? Mechanical?
Thanks in advance.
PMVisser
For high resolution feedback an optical encoder will be used. For lower resolution (and lower price) you could use a magnet attached to the motor shaft and a Hall effect sensor. The magnet solution is nice because it's fairly easy to just glue a magnet on, whereas it could be more difficult to interface an optical encoder with a motor. You can buy DC motors with an integrated encoder.
PMVisser:
I'm using a DC motor and I want to know how many rounds it makes.
Just be sure to use a big enough datatype to hold the number.
An int
will crap out at 32768. An unsigned int
will crap out at 65536.
A long
will get you up to about two billion (to be exact, it craps out at 2147483648).
An unsigned long
will get you up to a little more than four billion (it craps out at 4294967296).
Beyond that, well, there is a trick or two you can use, but better to get what you have up and running first.