OpenWrt Forum Archive

Topic: Using GPIO to drive stepper motor?

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello.

I have an old Asus wl500g just sitting around.
Out of fun I made a webcam "mount" (glued 2 servos together and than to the webcam), that can act as a pan/tilt for the webacm.
I can operate the pan/tilt usin arduino and its servo library just fine.
But, as arduino would mean additional USB port the old WL 500g does not have, I am looking for some option to drive the 2 servos directly using GPIO.
Did anyone ever tried this? I googled, but did not found anything for now sad
Thanks in advance for any hints...

There is a gpio-pwm module available, so what is mentioned in this video should be more or less possible: https://www.youtube.com/watch?v=ddlDgUymbxc
I just don't know, how exactly the timing of the router will be. Have a look at PCA9685, that chip is connected over I2C and allows setting pwm duty cycles (it is actually a LED dimmer) - and has lately got a kernel driver (although not yet included in openwrt, AFAIK).

Thanks for the recommendation.
To be honest, I would not like to invest much more into it.
I can probably use some of the ATtiny85 I already have and try the suggested i2c communication - it makes a lot of sense from my perspective to let the exact timing on something else than the router itself.
I'll get into it now.
Thanks again.

The discussion might have continued from here.