I feel a little stupid now. I should have read up more before asking the question. I’m working on my first robot project and come from the Arduino hobbyist world of mainly electronic, rather than electromechanical, devices where wiring something up to the wrong voltage generally involves the immediate release of its magic smoke.
I’ve now read up a little on duty-cycle and looked at questions like this on the Electronics StackExchange, where someone asks if running a motor at 5V with 100% duty cycle is the same as running it at 10V with 50% duty cycle (short answer is “no”).
From all this, I’ve moved from worrying that you would damage a motor, with an intended operational voltage of 4.5V, if you ran it with a higher voltage source to thinking that it’s actually better to run it with a higher voltage source and use a lower duty cycle (on the basis that you’ll get better torque). Obviously, there’s an upper limit to how far one can take this.
I’ve looked at the code for
Romi32U4Motors::init2() and if I understand it correctly 400 is set as an upper bound such that it’s equivalent to a duty cycle of 100%. And 300 is then the highest allowed value, i.e. the 75% you mention, unless you call the
Is there a particular reason to choose 400 as an upper limit? As far as I can see one can choose any unsigned 16-bit value - so one could have chosen e.g. 10,000 or the upper limit of 65,535.
Also now I’m wondering about the lower voltage limit given for the gearmotors - on their product page it says they “should run comfortably in the 3 V to 6 V range.” Does this mean you shouldn’t try to run them at a duty cycle equivalent to less than 3V?
I.e. the motor will be at top speed at 6V and be at the lowest speed, that it’s “comfortable” with, at 3V and that below this one should turn the motor off? I.e. you shouldn’t use speed values other than 0 (off) or 150 to 300 (3V to 6V).
Sorry for such basic questions - and thanks as always for the amazing support I get here whenever I ask a question