Hey guys, im looking at this here:
Its a servo thing for gadgeteer, but it is not made by GHI. Would anyone be able to help me program it here, or would I need to bug their community to help?
Also, with the netduino not being Uber-Realtime, would it work with controlling servos well?
Hey guys, im looking at this here:
What type of help are you looking for?
That is almost an analog for this: https://www.ghielectronics.com/catalog/product/405
Cool, do those ship with cables or not?
I think that’s the DHRobot servo module:
Unfortunately, it doesn’t look like there’s much by way of documentation other than the wiki:
And it doesn’t look like they supply a driver, so you’d probably need to write some code to make it work.
As @ iamin noted, this is similar to a breakout, the difference being the convenience of being able to provide a separate power supply voltage for the servos via the screw terminals, where with a breakout you’d need to use a breadboard or perfboard to do that.
In terms of running the servos, if you want to try with a breakout module or extender module, I posted some code here that might help as a starting point:
It’s a couple years old, so it’s likely that some of the namespaces and/or APIs may have changed, but you can get started with some of the concepts, at least.
I believe that’s definitely the DFRobot module.
It’s also very close to Justin’s ServoTidy module. I wrote a quick driver for it not long ago but I think Justin may have one also but it doesn’t show up in his downloads currently. But, this would be a good starting point for you.
I think it is important to realize/mention that the “servo expansion” module doesn’t give you any extra PWM/servos. It’s essentially a glorified header, more than an “expansion.” You just have the ability to connect separate power, with a switch, and your servo(s) to whichever pin or pins are being used by the socket you choose… but thats it. If your socket has one PWM pin, you can use one servo… just like you could if you used a generic socket breakout.
I bought one a few months ago without looking closely at it. I didn’t realize that it didnt provide any actual “expansion” - so it sits unused in a drawer, ready to be thrown in my next ebay auction lot of regretted purchases.
I suppose it might be useful on socket 18 of the raptor - at least it would expose 3 of the raptor’s 4 PWM pins. But a standard gadgeteer extender or socket breakout would be just as useful really.
@ mtylerjr - Very good point. Just having the 3-pin headers that you can plug the standard servo plug into is good enough reason to keep one around, though. It takes a little more hackery to make it work with the Breakout module. “Rapid” prototyping is what Gadgeteer is all about. If you have to stop and solder to a Breakout then the gain is lost.
I’ve been thinking about this and built a ‘module’ that drives 3 servos using the DFRobot servo expansion module. All you do is plug in your servos, configure them as needed (min/max frequencies etc) and away you go as code is as easy to do as
for example or
I ordered some Continuous Rotation Servos tonight to see just how generic I can make this “module”. I also wanted to try indexing items as I know someone who like doing things that way.
Once I’m done I’ll post my driver/module and hopefully it makes it easy for someone else to start playing around with servos as its the joy of ‘expansion’ modules, they can become anything you want them to be and with Gadgeteer we can share those easily.
So given this module can control up to 3 servos, how would you like to reference them? Like this:
or like this
or some other way?
Movement wise I have:
and incremental movements
If I were picking, I would choose the second reference method. I understand why arrays start a zero, but I’ve never liked it.
I would prefer the zero-based array approach, where the Length property returns the max number of servos. In my opinion, the array approach makes it easier to visit each servo in a loop, without hard-coding the individual servo names (e.g., to center them all).
1-based arrays are bad and you should feel bad!
[dont take me too seriously]
Also, you might add a .Move(direction) function for continuous-rotation servos where you might want it to just keep moving without having to continually tell it to take small turns.
If there’s a continuous rotation Move method, then a Stop method would be handy.
@ mtylerjr - I’m an old COBOL developer with emphasis on the old.
@ rileysuit -
Won’t hold that against you. Ancient assembly language, Pascal, and Fortran programmer over here.