Manual Servo

From DiyLightAnimation
Revision as of 22:19, 9 November 2011 by Dlhoppe (Talk | contribs)

Jump to: navigation, search

Notice

The PIC does NOT come pre-programmed from Microchip or any supplier. If you do not have a programmer then please see the PIC Programming Wiki page for a list of DLA users who can program the PIC for you. If you are programming the PIC yourself, download the hex file from the Wiki and program the PIC chip using the appropriate steps for your programmer setup. Check out this post for a helpful pdf on PIC programming. Some helpful tips on PIC programming can also be found on this You Tube video.



Introduction

This is the manual to guide you through the build process of the DMX Servo Controller.


WARNING! This device has been designed for personal use as a means of education and entertainment. As such it is not rated, tested, or approved for use in commercial environments and such use is forbidden by the designer. Improper use of this equipment could be hazardous to life and property and the suitability of use is your responsibility. I assume no responsibility in the use or operation of this equipment or for the accuracy of any information made on part of itself. This device has been designed for my use and my use only. This is simply an explanation of how I built my own personal dimmers for informational purposes. I make no warranties written or otherwise to it. It should be considered an experimental device with possible unknown characteristics.


Before you start the build, use the Mouser Direct link on the wiki page to verify you have the correct parts and quantity of parts before we go any further. Please use static electricity precautions in the handling of these parts (ground straps, etc.). If you are not familiar with them please research on the Internet prior to handling them. You can damage your parts with improper handling!


Ensure you are using the correct DMX Servo Controller PCB for this build.


Thumb



Preparing to Build

The next thing we want is to make sure you are up to speed on soldering and electrostatic protection of the components in your kit. If you are not an experienced printed circuit builder, visit the Curious Inventor website and review the How to Solder guides just below the video. The video on soldering correctly at the top of the page is extremely good to watch even if you are experienced at soldering.


Another issue you must be aware of is that some electronic components can be damaged easily by electrostatic charges that can build up in you or your equipment. We have all been shocked by walking on carpet and grabbing a doorknob. This is electrostatic charge in action. It takes much less than this to hurt some of the parts. If you are unfamiliar with procedures to protect from this, please use the Internet to research it before opening your parts up. You can damage your parts with improper handling!


You will need a few tools to build the DMX Servo Controller. You will need a good soldering iron. I cannot stress enough that a good soldering iron makes a big difference in these projects. The little 15w cheap irons are more apt to hurt your parts by taking too long to get the parts up to soldering temperature than a good iron which can bring it up to temp very fast. Remember, damage is a factor more in how long you keep the part hot than it is how hot you get it (within reasonable soldering temperatures). A good soldering iron is reasonable: You can purchase one for $30 to $60. Most any product that calls itself a soldering station that includes a temperature control separate from the iron itself will more than likely be fine, but make sure it is rated for more than 15 watts. I use a cheap Weller like this: Weller Soldering Station. It works fine and is very inexpensive. I even saw this model on sale at Sears. Radio Shack has a very nice looking digital model on sale but be careful: it does not allow you to replace the tip. Tips are a part that wear out and need to replace them from time to time. While we are on the topic of tips, get some. I recommend you get the smaller chisel shape as this works very well for all-around board building.


You need solder, so buy some. I recommend .032 size as the larger sizes tend to cause you to put too much solder on. How much? Go ahead and get a 1 lb spool as it’s cheaper in large volume and you will go through it faster than you think. Make sure you are getting rosin core for electronics; they make some solder for plumbing that has acid as the core and this is a bad mistake to make.


You need some work area to work with good lighting. Do not attempt to solder circuit boards in poorly lighted areas. If you wear reading glasses, go get them: you will want them I promise you. I also recommend getting a helping hands tool similar to this: Helping Hands Tool.



PCB Assembly

If this is your first build we have laid out the order for soldering the components to the board in a step by step procedure for you to follow. Components are outlined in red for each step as they are soldered to the board. Ensure that you orient the parts as shown on the PCB and in the assembly pictures.




Component Identification (for the ones not labeled on the PCB):


  • C1: .1uf (for logic bus monitor)
  • C2: .1uf (for servo bus monitor - currently not used)
  • C3: 10uf
  • C4: 470uf
  • C5: .1uf
  • C6: .1uf
  • C7: .1uf
  • C8: 100uf
  • C10: .1uf
  • C11: .1uf
  • C12: .1uf
  • C13: .1uf
  • C14: .1uf
  • U7: MCP100_315_D (for logic bus monitor)
  • U8: MCP100_450_D (for servo bus monitor - currently not used)
  • F1-F8: 60R030XU Fuse




  • Install the R1 and R4 (10k ohm - brown,black,orange) resistors at upper left.
  • Install the R2 and R3 (330 ohm - orange,orange,brown) resistors at middle left.
  • Install the R6 (120 ohm - brown,red,brown) resistor at lower left.
  • Install the R7 (1k ohm - brown,black,red) resistor at lower right.

Resistors can be installed in either direction. There is no polarity to worry about. However, it looks more professional to have the color bands all in the same orientation.

Special Note Regarding R7: The default 1k ohm resistor will produce 20mA output current for each LED channel. Please see notes towards the bottom of this manual for more details on customizing this output current.

(Please note that your component color and/or size may not exactly match what you see in these photos. Please verify component characteristics before installing.)


Thumb




  • Install all .1uf ceramic capacitors (C1,C5,C6,C7,C10,C11,C12,C13,C14)
  • Install the 10uf ceramic capacitor (C3)

Ceramic capacitors can be installed either way. There is no set polarity.

(Please note that your component color and/or size may not exactly match what you see in these photos. Please verify component characteristics before installing.)


Thumb




  • Install sockets

Be sure to orient the sockets so that the notch is at the correct end. Please note the printing on the PCB for correct orientation.


Thumb




  • Install headers
  • Install power connector
  • Install RJ45 sockets
  • Install electrolytic caps (C4 = 470uf, C8 = 100uf)

Electrolytic capacitors are polarity dependent. Please note the printing on the PCB for correct orientation.

Thumb


(Please note that your component color and/or size may not exactly match what you see in these photos. Please verify component characteristics before installing.)


Thumb




  • Install supervisory chip
  • Install regulator with printed side facing towards the power and RJ45 connectors
  • Install red and green LEDs

LEDs are polarity dependent. Please note the printing on the PCB for correct orientation.

Thumb


(Please note that your component color and/or size may not exactly match what you see in these photos. Please verify component characteristics before installing.)


Thumb




  • Install Ex/Rx headers
  • Install Diode (Note: final release version will have only one diode placement option at D1. This photo will be updated.)

Diodes are polarity dependent. Please note the printing on the PCB for correct orientation.


Thumb




  • Install fuses

Fuses can be installed either way. There is no set polarity.


(Please note that your component color and/or size may not exactly match what you see in these photos. Please verify component characteristics before installing.)


Thumb




  • Install ICs

Be sure to orient the chips correctly. Please note the printing on the PCB for correct orientation. Chips will either have a "notch" at one end that corresponds to the notch in the socket. Or they'll have a small dot near pin one, which also corresponds to the notched end of the socket.

Thumb



Getting Up and Running

Program the PIC and you're ready to roll. Please see the top of this manual for PIC programming tips.


Steps to get up and running:

  • Load firmware to PIC using your Pickit or whatever programmer you have.
  • Test the servo controller with Vixen or any other source of DMX data to make sure the firmware is loaded and functioning correctly.
  • Figure out your end point limits, directions and channel assignments.
  • Use the config tool to send the parameters from step 3 to the servo controller.


Please note, by default the DMX channel assignments are 1-8 for the servos and 9-16 for the LED outputs.


Remember, even though you may specify limited travel range for a given servo channel, you'll still get a full 256 discreet positions as related to the DMX intensity values. The controller will "scale" the servo travel range (as specified by the end points you set with the config tool) across 256 increments. So a DMX intensity value of 0 will correspond to the "Start Value" from the config tool, and 255 will correspond to the "End Value" from the config tool.


Let's walk through a simple example where we'll set the start and end points at 1/4 (start value = 63) and 3/4 (end value = 191) of the full range. The first illustration shows where we would like to have our servo travel start and end (see where 63 and 91 fall on the travel range). We want the low end point to start at the position associated with intensity value 63 (based on default full range). We want the upper end point to be equivalent to the intensity value 91 (also based on the default full range). The second illustration shows how the servo would behave after configuring those end point values using the config tool.

(servo travel distances are for example purposes only)

Thumb



Configuration Tool

Instructions for using the Servo Controller Configuration Tool


Thumb


  • Make sure dongle is connected to computer
  • Put the “programming” jumper in place on the servo controller
  • Power up the servo controller
  • Start the “Bobcat DMX Servo Controller Configuration” tool
  • Click the “Settings…” button and select the COM port of your dongle (click OK)
  • Specify the DMX channel assignments for the servo output channels
  • Specify the servo direction as either “Std” (standard) or “Rev” (reverse).
  • Specify any custom end point adjustments (default is max range). This will most likely require trial and error with whatever decoration you’re driving with servos.
  • Specify the DMX channel assignments for the LED output channels
  • Click the “Program Controller…” button. A message box will display reminding you to make sure the programming jumper is in place on the controller board. Clicking “OK” on the message box will send the programming information to the servo controller. You should see a fast series of flashes on the green LED if successful.
  • If you want to save your configuration settings, click the “Save Configuration…” button and specify location and file name.
  • If you want to recall a previously saved configuration, click on the “Load Configuration…” button and locate the file to be loaded. (Note, this device in uni-directional. You cannot read the configuration from the controller.)



Additonal Notes and Tips

  • You can gang multiple servos on the same DMX channel. This will allow you to drive heavier items that might be too much for a single servo.
  • The endpoint adjustments will automatically scale to the full 256 DMX “intensity” values. So the resolution will always be 256 steps (although extremely short travels may not produce the full number of steps due to the mathematics).
  • The LED outputs can drive RGB LEDs for color changing effects (requires "common-anode" RGB LED). Use one channel for each lead on the RGB node. This provides for two full RGB nodes and two additional LED channels. This might be useful for glowing eyes on skulls, etc.
  • The “R7” resistor on the board can be altered to allow for different output LED current. The range can be anywhere between 3mA and 120mA. The formula for calculating the R7 resistor is [mA =(1.25/R) x 15]. Set the value of R (R7 ohms) until you get the output current you want. Valid range for R7 is 157 Ω thru 6000 Ω. The default R7 value (1k Ω) in the BOM is designed to give approximately 20mA on the LED output channels.
  • Be sure to use a power supply that provides enough current to drive the servos without any “dips” that might cause a “brown-out” for the PIC. The 8 servos I'm testing with (2 mini, 3 high-torque analog, 3 high-torque digitals) are pulling an average of 1.3 amps running continuously with no load (using Vixen). Stalling one of the digitals takes the current up to almost 3 amps. It would be a good idea to consider larger power supplies if you can.
  • The design of the PCB allows you to split the power bus for the logic circuitry from the servo power bus thus eliminating the effects of brown-outs on the PIC. However, you still need to consider providing enough power for the servos to do their job efficiently. Under-powering servos will most likely shorten their life. I originally designed this for a single power-supply, but we added the “split” option for extra flexibility. My testing with a single power supply for both buses works just fine as long as you have a capable power supply. I would recommend at lease a 2 amp supply. Certainly larger if you’re running all 8 channels or heavy loads. The larger, the better. Buy once and grow into it rather than going small up front. NOTE: To use a single power supply, place the diode at position D4 and connect power to the “S” hole in P1 block. For dual power supply input, place the diode at position D1 and connect two separate power supplies to “S” and “L” holes in P1 block. Don’t use the same power supply for dual input. It’s redundant and would be the same as setting up the board for single power input.


Separate Logic Power Bus Supply Requirements:

  • 30mA in wired mode (without Ex/Rx)
  • 120mA in wireless mode (with Ex/Rx)


Separate Servo Power Bus Supply Requirements:

  • Dependent on servo size, use, and loads
  • Recommend at least 2A, larger for heavy loads


Combined (Single Power Supply Configuration)

  • Recommend at least 2A, larger for heavy loads


DMX Communications

  • The wired DMX out port can be either a “pass-through” or a “re-broadcast”. The option is yours based on the topology of your DMX chain. Mike (n1ist) should be providing more details on how to build with the different options.
  • The wireless option uses a standard build of the Ex/Rx board. Simply plug one into the headers and put the Wired/Radio jumper in the “Radio” position. The DMX out (RJ45) will still send a signal even if you’re receiving via wireless.


Servo Protection

  • We’ve designed in resettable fuses for each servo channel. I felt it might be a good idea rather than let a stalled servo just sit there a burn itself out. The default BOM fuses are rated at 300mA continuous load with a trip current of 600mA. If you end up driving some monster servos, you might consider a larger fuse. However, don’t forget that you can gang small servos together to drive heavier items. So the electrical load would be spread over multiple channels instead of one. Food for thought.


Enclosure

  • We have not done anything with enclosures for this device. If anyone finds something that works well, please share with the group.


Optional Power Bus Monitoring

  • Components U8/C2 are intended for servo power bus monitoring. U7/C1 are for logic power bus monitoring. You can decide to monitor one or the other, but not both. We feel that the logic bus is more important to monitor to help prevent continuous PIC reboots due to brown-outs.