May 16, 2015 at 4:44 pm #2242
I’ve been experimenting and it looks like the motor outputs are PWM? Could you confirm the expected output as we set the motors forward and back from 0-100%, including the frequency, please?
I’ve hit the problem that I have a little DC motor which won’t run on the motor outputs, whatever I set them to, but it runs fine if I just attach it to the 5V supply.
I would like to control it though, so I’m trying to work out the least possible hardware to do this through the crumble…
May 16, 2015 at 9:48 pm #2248
- This topic was modified 6 years, 5 months ago by Mike.
The PWM frequency is very close to 1kHz (it uses the same timer to measure ms). The percentage represents the duty cycle, so at 100% you should not see any PWM.
External power does need to be connected to run the motors (i.e. not just USB). If you have power connected (e.g. batteries), you can check connection by attaching the motor directly to the other, free, power pads on the Crumble. You may have already done this though?
JosephMay 16, 2015 at 10:30 pm #2251
Many thanks Joseph! I will try again in a moment. Maybe there’s a current limit on the motor drive pads or something else getting in the way of it just working… :/May 17, 2015 at 1:23 am #2252
There is over-current and thermal protection. It’s possible the startup current is too high, but I’d be surprised if it didn’t work and any power (%) level. Does it make any whining sounds?
The motor driver is a DRV8835, so good for up to 1.5A.
JosephMay 18, 2015 at 10:48 am #2258
Not working. It’s fine on 5v from the battery pack. On the motor pads it just whines with motor set to FORWARD 100%.
Hopefully you can see the setup in the picture. It’s just a little fan motor I ripped from a broken laptop…May 18, 2015 at 11:11 am #2259May 18, 2015 at 2:00 pm #2263
Hmmm… It sounds like the output is not reaching 100% duty, and still pulsing. I think those little fans have a brushless motor controlled by an IC, so a PWM output could mess it up. I will investigate tomorrow (not near my scope at the moment).
JosephMay 19, 2015 at 3:17 pm #2281
Looks like little bug, sort of. At 100% the motor isn’t quite full on. I said, ‘sort of’, because I now recall doing it on purpose: the motor driver overcurrent trip gets reset every PWM cycle, so it behaves better with larger startup currents.
I look at changing this in future version, but would like to do a couple of test first.
You can cheat however by using a variable to set the power to 101% 🙂
- This reply was modified 6 years, 5 months ago by Joseph.
Attachments:You must be logged in to view attached files.May 19, 2015 at 11:21 pm #2286
- You must be logged in to reply to this topic.