How to measure speed and direction in high accuracy, low speed and low cost

Hi all (first post! be forgiving :))

I got a little toy car (about 6cm wheel diameter) running with small stepper motors at low speed. I'm trying to capture the movement. I'm currently using sort of reflection sensor and a little cardboard fan I made placed on the wheel axle. Though it's about the accuracy I want (it has 24 holes and 24 wings. ~8deg?), it's not very robust and it doesn't capture direction.

There are about a million ways to measure these (from what I've found, at least 3 optic ones, 3 magnetic ones, gyros and more) and for each I find myself reading for ages and then not being sure if it fits, or try to find parts and then find out they are super expensive. Most of the post I found are about bicycle which is very different. So I thought maybe here someone will have the experience and knowledge to tell me what's the best solution for me.

Thanks!

I find myself reading for ages and then not being sure if it fits,

this is called the learning curve, you should not be afraid of it.

It seems you found the right sensors and best way is to find one that has a library and start going through its examples.

Lot of the learning curve can be fun by actual building the thing.

Not afraid of the learning curve, but I got limited time and many challenges ahead :) I'm sure there are one or two option most fitting for this purpose and that even after knowing them there will be much more to learn.

If you are already using stepping motors on the wheels, you should know how far the wheels have rotated. If the wheels are not slipping, then the position and orientation of the vehicle can be calculated to a good approximation.

Wheel encoders won't help much, unless the stepping motors skip steps due to overloading or improper drive circuitry.

If the wheels slip, then some other approach is required.

Sorry, I wasn't being clear. While i'm measuring it's free running, moved by an external force, not the steppers. Is the a way to measure the power generated by the motors and determined by that?

If not, I guess we are thinking of this as if I'm building something on top of the existing car that I have no control over.

Sorry, I wasn't being clear. While i'm measuring it's free running, moved by an external force, not the steppers. Is the a way to measure the power generated by the motors and determined by that?

I have no idea what you mean by the above. What do you actually want to do?

Is the a way to measure the power generated by the motors and determined by that?

No.

But you can measure pulses coming from the motor and count them.

What I'm saying is that when I'm measuring, the car is not actually driven by the motors but pushed from outside. As I wasn't sending the command for the motors, I don't know how much they moved. I need to find a way to measure that.

Can I do that by counting pulses from the motor? Couldn't find any example of that (currently thinking some kind of an encoder should be the best way to go)

If the steppers are under power they should not move at all until you tall them to. a encoder connected to them would be hard. you could only have it on when steppers are off and off when the steppers are on or some way to reset it when you move it by control. other wise how are you going to be able to tall the difference between it being move with a controller or just being puched

That's not a problem in my case. The motors are disabled while it's being pushed, and when they are enabled I don't really need to measure (though it could be nice)

simple don't pouch it

daniellyall: simple don't pouch it

Can we all learn to spell "push" and "pushed" please.

Perhaps daniellyal meant to write “Do not put in in your pouch”.