Electric Rain
New Member
Okay, this IS electronic related. I'm creating a digital speedometer for a bicycle. I plan to use a PIC to do the math, a four digit LED display to show the MPH in XX.XX format (E.G. 12.39 MPH), two buttons to select the tire diameter to make it universal and some kind of reed switch with a magnet on the tire or something like that to detect the tire rotation.
My problem is, the math part of it. Now, I don't mean to talk myself up, but I'm pretty good with algebra, and I'm still having a lot of trouble with this. I need to figure out the formula for this so I can put it into the PIC.
I need to calculate the MPH of the bike tire based on the diameter, and the seconds per rotation of it. I've come up with many formulas, tested them, and found out they were wrong. I know I have to multiply the diameter of the tire, to get the circumference. In my case, the circumference of the tire is the amount of distance the bike will travel in a full tire rotation.
I know it's possible to figure it out. The MPH of the bike based on the circumference and the seconds per full tire rotation. I just don't know the formula. I know the formula for it based on circumfrence and rotations per second however. But, that doesn't do me any good because it would be extremly inaccurate as the sensor can only detect ONE rotation and not 1.5 or even 1.99. It would only actually read once per second. So can someone please help me figure out this formula? Thank you very much.
Rain
My problem is, the math part of it. Now, I don't mean to talk myself up, but I'm pretty good with algebra, and I'm still having a lot of trouble with this. I need to figure out the formula for this so I can put it into the PIC.
I need to calculate the MPH of the bike tire based on the diameter, and the seconds per rotation of it. I've come up with many formulas, tested them, and found out they were wrong. I know I have to multiply the diameter of the tire, to get the circumference. In my case, the circumference of the tire is the amount of distance the bike will travel in a full tire rotation.
I know it's possible to figure it out. The MPH of the bike based on the circumference and the seconds per full tire rotation. I just don't know the formula. I know the formula for it based on circumfrence and rotations per second however. But, that doesn't do me any good because it would be extremly inaccurate as the sensor can only detect ONE rotation and not 1.5 or even 1.99. It would only actually read once per second. So can someone please help me figure out this formula? Thank you very much.
Rain