11 responses to “Rover 5: encoder speed control”

  1. DeathByCh0c0

    Great thanks for sharing,

    quick question thought, what’s the name of your digital compass device ? It wouldnt happen to be the HMC6352 ? if yes could you please help me ?


  2. Android

    Thank you for uploading this!
    I ran it now in my Rover and it really works great

    You have saved me a bunch of time!


  3. Chris A.

    You are only changing the PWM value by one if there is a difference between the current and target encoder pulse time. That works but you must know about PID controllers because I saw a PID used for the balance bot.

    What you are doing is adjusting the PWM value by 1. Why not by a fraction of the error? and then the I and D values?

    Did you decide to use the change by one method because it works best or because it is easy to implement?

  4. Alex


    congratulations for your project. Very interseting and well documented. I am trying one similar rover myself.

    I would like to indicate, if you don’t mind, that I think there is a mistake in the whell speed calculation. Or maybe I don0t understand how it is working exactly.

    As I see, the speed calculation is done, in the loop, substracting the last interrupt time to the current time. As the loop and the interrupt are not synchronized, this difference can be any value from 0 to the actual period time. the actgual speed to use shouldn’t be “PulseM”? This is really the period of the encoder change…

    Again.. I may be wrong, correct me if I am, but I don’t understand how can your approach work correctly.


  5. Al

    Hello! I’ve recently purchased a Rover 5 and the control board, but I’m having a lot of trouble getting a good idea of how to connect the encoder motors. I have the 4 motor, 4 encoder model. I get where the motor output plugs in obviously, but I don’t understand the rest of the connections. If the board is held so the encoder connections are on the right, I believe (for each encoder) it’s ground, yellow, white, red, from top to bottom, on the outside four pins, correct? I’ve searched for any pictures showing the connections and contacted Dagu, but I either get responses so far over my head or so vague they aren’t usable. The next question is… how is the connection to the Arduino made? From the inside four pins? I understand the board combines the two inputs (white and yellow) but then, why are there four outputs as well? Quite confused.
    If the encoders are connected on the right side of the board, will I still need the connections on the left for pwm, direction, etc?
    Thanks for any help you might offer.

  6. Al

    Thanks. Cause, you know, I’d not seen that. 😐 I’m apparently not bright enough to be able to make the leap from the two page ‘manual’ to a working robot, which is why I asked help from someone who HAS done it. My real shortcoming right now is my lack of schematic skills. Once I’ve got those down, I’m sure things like this very cryptic ‘manual’ will be of help.
    I get that folks want you to ‘do your own work’. I do. I’ve asked these questions of the folks at Dagu and Pololu and Sparkfun – all who’ve made the board at one time or another. I’ve been forwarded the manual by all but those at Sparkfun who’ve not bothered to respond at all. I’ve written to numerous folks who’ve created projects based on the Rover and the controller board, all to no joy. I often get the sense that people want me to try and fail and learn from that and again, I get it. Buying a few boards to fry isn’t my idea of a good time, but I do get it.
    I was a programmer for years and once the web became a real thing, I often asked for and offered help. Lots of folks willing to do that. From writing COBOL and JCL to VB and automating software loads, I often learned tricks and tips – and passed those along – from others. I rode a Harley for years. The forums were invaluable for learning and getting help with everything from seat choices to which cams to run depending on how you rode. My home theater was, in its time, incredible and very expensive. The HT forum members often knew my name and quoted my reviews of products. They also gave me ideas and help building that system.
    But dang, robots seems to be different. Do not know why. Somehow everyone expects you to have gone from complete beginner to knowing the acronyms and circuits and all the rest, all by yer lonesome. OK. I’m not sure if it’s cause so many of the makers out there did it just that way – by themselves – that they don’t respect those who ask before doing or if it’s because so many people just expect to copy someone else’s code and claim they built that. But man, it’s hard to get help as a noob in this hobby. I do get understand, though. Me? I’ll still offer any help I can to those who’re coming up. Would hate to be the one that turned away someone who had asked everywhere and got no support.
    But in the meantime, thanks for the suggestion.

Leave a Reply