Driving Servos with the STM32F0Discovery

My code appears to be working. I'm driving one of the cheap Chinese servos I bought from the STM32F0DISCOVERY board. I've verified with the Saleae Logic probe that all 8 channels are giving output, and I have one servo wired up and moving. You'll have to take my word on the motion part; I'm not going to dig out the camcorder and edit video just to show a servo horn moving. Note that I'm currently powering the servo from the host computer's 5V USB bus, and the servo's control pin is connected to the 3.3V output of the STM32F0. This probably isn't ideal conditions for driving this servo, but the quick-and-dirty test shows that it's working.

As always, click on the thumbnail for the full sized picture.

I apologize for the low-light photo; using the flash produced too much glare from my desk.

I'll eventually share the code; right now it needs a lot of cleaning up before it's ready to share.

Lab Notes 9/16/2012

As you can see, I've started publishing my GCC/Eclipse/ARM development tutorial series. I hope folks find it useful. I'm continuing work on future tutorials.

The USB-to-Serial cable and the R/C servos that I ordered from China (on aliexpress.com) arrived. The cable uses a Prolific 2303 chip, although there's questions in my mind about whether it might be counterfeit. It enumerates on my Win7 64-bit machine but the driver won't start. The driver will start in the WinXP 32-bit VM that I'm using for my ARM development. I haven't been able to test it yet.

The servos also arrived. I don't have the ability to test those; I plan on driving them with the STM32F0.

Lab Notes 8/28/12

Today I played around a little with the STM32F0Discovery board. I wrote a quick program with Atollic True Studio Lite to echo the system clock (SYSCLK) out the microcontroller clock output (MCO) pin. I had some bizarre results so I posted a question about it in the ST online forums.

I used my Saleae Logic Analyzer to view the waveform on the MCO pin. I had some problems getting the Logic program to run after installing it and called their tech support line. I'm happy to report that I got quick, knowledgeable support in a timely fashion and was up and running again quickly.

I'm finding that the STM32F0xx Standard Peripherals Library has a lot of useful stuff in it. Too bad there's no user manual; only an automatically generated .chm help file. I've been able to find what I need so far by searching and by relying on the organization of the functions.

I ordered some RC servos today that I want to drive with the STM32F0, and I ordered a clone FTDI serial cable to debug with. Both are coming from China so it'll probably be a few weeks before they get here.

Next, I'm going to continue looking at clocking various parts of the STM32F0, and use that knowledge to drive servos with the microcontroller.