Thomas Müller <[email protected]> writes: > there is one thing I would really like to see in future versions of > TeleMetrum or TeleMega. It is the possibility to control a > servo.
> It is very useful for controlling servo releases for serial dual deploy > like spacetecs SRM2. They are pretty common in Europe. Interesting .. I've never actually seen someone using an RC-style servo for deployment before. As you say, there's no conceptual reason we couldn't do that... but in practice there are some issues I'll address below. > In principle you need only a analog/digital output which can be freely > controlled. To drive an RC-style servo, you need to be able to PWM an output pin, which is easiest to do if that pin is connected to a timer with PWM support, but of course also possible to do with a GPIO and software PWM generation. That part isn't hard. The difficult part is that all the servos I know of run at 5V, and all of our products are 3.3V using single-cell LiPo batteries with 3.7V nominal and 4.2V fully charged. So at minimum, you'd need a separate battery / regulator to generate the 5V that is required, and you'd need a level shifter (transistor) on the PWM output to enable it to drive a 5V input. My son and I are actually working right now on a board to control 12 such servos for a robotic arm project using the same STM32L151 part that's on TeleMega. I haven't loaded the first prototype boards yet, but once we do, we'll be generating an RC servo PWM driver for AltOS that could potentially be used in our rocket firmware on boards like TeleMega using that chip. > Is there some output accessible? As far as I understand the companion > port it is only a SPI interface. The SPI clock, miso, and mosi pins on the companion connector are shared with other devices on the board, but the chip select line is a unique GPIO (P1_2) that could be re-tasked with a firmware modification. > Port 3 and 4 on the debug port seem for me to be regularly unused > digital IO ports. Can they be used? Yes. We've avoided using them for anything "active" simply because it's nice to be able to do source-level debugging of the firmware without having to compete with some active function... but there's no hard reason you couldn't re-task these. They are P2_1 and P2_2 on the cc1111. Any of these three pins would require software PWM generating code, and the biggest problem with that is that the existing TeleMetrum build uses almost all of the available memory, and so anyone wanting to create custom firmware to drive servos would have to choose something to live without... It would certainly be easier to implement this in TeleMega where we're not yet so resource constrained... but even there some solution to the 5V interface problem needs to be devised. Thoughts? Bdale
pgpXb17HEn8zB.pgp
Description: PGP signature
_______________________________________________ altusmetrum mailing list [email protected] http://lists.gag.com/mailman/listinfo/altusmetrum
