What's it do?
The Protean PWM logger is a nifty little board for decoding/generating PWM signals meant for R/C servos. It helps to lift the burden of decoding/generating multiple servo signals from your project's main controller so it can spend its cycles attending to more important tasks. The logger is built around Parallax's 8-core Propeller chip which devotes 20 MIPS of processing power to capturing each channels' signal. This device is open source and free from hardware up, and you're encouraged to modify the designs and firmware to meet your needs!
How do I use it?
Here I present a tutorial that walks you through the setup, and use of the PWM logger in concert with the ever popular Arduino. Let's get started!
To follow along with this walk through, it'll be helpful to have the following things.
- 1x Protean PWM logger
- 1x Arduino
- 1x Standard R/C servo
- 1x R/C transmitter and receiver
- 4x hook-up wires
- Soldering iron
- A computer with the Arduino IDE installed
First, let's become acquainted with the PWM Logger a little bit. In the photo above you can see a closeup of the input pins for the logger. These pins are intended to sport headers which allow you to plug into an R/C receiver or another source of PWM signals. Notice that the pins are organized as columns, labeled at the bottom as (S, +, -) those labels are there to help you identify which way your receiver will need to be oriented.
You can check the orientation by plugging your servo into the receiver. The white
wire on the servo is the signal line. That pin column on the receiver should be
matched up to the 'S' column on the PWM logger.
Note: Before going further, you must also make sure the + and - columns match up to the appropriate wires on your servo. Otherwise your servo or logger could be damaged
Similarly to the input pins, the PWM Logger also sports mirrored output pins (shown above). This bank of pins is where you will plug in your servo.
The PWM Logger also has 3 pins for connecting it to an I2C bus. All the board's features can be accessed or controlled through I2C using the Protean-PWM-Library.
Now, let's get to the tutorial itself. In this case, I'm using a 3 channel receiver we really only care about one of them, but just for completeness we will setup headers for all 3 of the channels.
First let's setup the input headers. I've found it to be easiest to plug them all into the receiver. It will do a good job at keeping them all aligned while you are soldering. Here the signal pin is pointed to. Line those pins up with the 'S' column on the PWM Logger and insert the pins into the inputs IN0 - IN2.
Next, fire up your soldering iron and melt a little solder onto your iron's tip. Use that solder to tack one of the pins (left). That will keep the headers from moving around on you. Then finish by soldering the remaining pins.
The solder joints on the pins should be clean and complete with no solder bridges. Notice that in this photo channel 1 on the receiver actually lines up with IN2. I only soldered it this way so that the PWM Logger lies on-top of the receiver neatly.
Now lets install the output headers. Another good alignment trick is to plug the male headers rotated 90 degrees into two female headers.
Use the same trick as before to solder the output headers.
Lastly, solder a female header into the I2C pads.
Now we move on to wiring the whole thing up. First connect hook-up wire to the 5 volt, and GND pins on the Arduino board.
Next, connect the 5 volt wire from the Arduino to the '+' pin column on the PWM Logger. Similarly connect the GND wire from the Arduino to the '-' pin column on the PWM Logger. Here I'm using Hook-ups that have little test clips on them. Which makes it a lot easier to grab those little pins. In a real-world scenario, the PWM Logger would be powered by the positive and negative lines coming out of the R/C speed controller.
Once you've done that. it should look something like this.
The next step is to connect wires to your Arduino's SDA and SCL pins.
Then connect the same wires to the corresponding pins on PWM Logger.
Finally, connect the servo to OUT2. Make sure that you line up the white signal wire with the 'S' column, and make sure the polarity of the '+' and '-' columns matches that of the servo's red and black wires.
Take a look at a detailed walkthrough here.
- Operating voltage: 3.3V - 5.5V
- Current consumption: 10ma
- Communication: I2C
- PWM channels: 6 (firmware modifiable up to 8)