XRP Robot Gun Hat
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
Your robot can be “packing” a rubber band gun.
- Ocena
- 0 / 5
- Polubienia
- 23
- Pobrania
- 38
- Wydruki
- 0
- Wyświetlenia
- 704
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- RC & Robotics
- Licencja
- Creative Commons — Attribution — Noncommercial
Materials Needed
1 – Rubber Band Gun – with Selectable Semi- or Full Auto- Mode
1 – 20Kg-cm rated servo
1 – SW5513-6MA Winch Servo
4 -- M3-0.5x3mm hex socket head cap screws
14 – M3-0.5x10mm hex socket head cap screws
1 – M3-0.5x20mm hex socket head cap screw
8 – M3-0.5 nuts
2 -- 25T 20mm round servo horns
CA glue (super glue)
Additions that can be added to this Model
1 – XRP Robot Thermal Motion Tracker
2 – XRP Robot LED
Useful Tools and Additions
2.5mm ball end Hex driver or Allen wrench
Knife for cleaning out support material
Gun_Hat_Servo_Test_Driver (Printed Circuit Board)
Servo_AUX_Power_Controller (Printed Circuit Board)
Discussion
The supply chain issue at Sparkfun that caused the XRP robot kits to be back-ordered is both a blessing and a curse. The blessing part is that designs can be generated using the 3MF files for the robot chassis. The curse is that final testing “in place” is not possible. If course that’s partially a blessing since, that limits the time and effort that can be productively spent on the project. No control software is provided leaving that (fun) exercise to the builder (although broad suggestions are supplied).
This design is self-contained, in that it sets on top of the XRP robot (like a hat), and, the servo motors just plug in (directly to the XRP board or through an auxiliary power board). The rubber band gun is held in place by a spring loaded latch for easy removal and reloading. Of course, there are finishing details that can be added like: clamps to hold “the hat” in place, a mount for a remote viewing video camera, a board holder for an auxiliary power controller PCB, a battery holder for an auxiliary servo power supply, and other features that may become obvious once robot hardware becomes available.
Finally, what’s this model good for? Well, it might be a pretend Star Wars AT-AT, a pretend WWII tank, or a roving gun platform. It’s expandable. This design is intended to be a starting point for additions and improvements. Load the STL design files into your favorite CAD software and start making modifications.
An interesting enhancement would add a video camera like those on quad-copters for remote viewing. The WiFi on the Raspberry Pi could be configured to provide a remote control. By adding the Thermal Motion Tracker Printables model you could program your XRP to track or home in on any warm body. You could thermally track and terrorize the cat.
Servo Discussion
Normally to control a rotation you would use a stepping motor, and, the Raspberry Pi could be used to “bit-bang” the control sequences. But, there is a better way, a development for the model sail boat hobbyists. It’s called a “Sail Winch Servo”, a servo that will produce a rotation output of many degrees (or turns) proportional to the standard PWM servo control pattern. This type was selected for the elevation servo.
The “SW5513-6MA Sail Winch Servo” for elevation control can provide up to 6 complete turns. Most of the PWM (1-2ms pulse) range will be used for the fraction of a turn needed in the “gun hat” elevation rotation with the 9:1 gear ratio. This brings up another point. No stops are provided to limit the rotation/elevation range and the angular section of the elevation gear is less than 180 degrees. Thus nothing serious will happen if servo rotations attempt to run the elevation beyond its design bounds.
The servo selected to pull the trigger has a torque rating of 20 kg-cm. This means that the servo can provide a pull equivalent to the weight of 20 kg (44 pounds) at 1cm out from the axis. The servo arm distance will be about 2.5 cm so the force available to pull the trigger will be about 17 pounds (the weight of 8kg). This is judged to be sufficient and this alternate servo was chosen over the one supplied with the XRP kit.
Which brings up an important design issue. These digital servos have reasonably low idle current (the current used when they are at rest and not moving). But, they do contribute a continuous drain on the robot’s power supply battery even though the servos are not changing the gun’s elevation or pulling the trigger. However, when you do change elevation or shoot, the current drain increases. The winch servo has an unloaded run current of about 300mA with higher spikes during acceleration (start and stop). The trigger servo has current spikes of an ampere or more during start and stop. (Note: the stall current specification for the trigger servo at 4.8v is 2.1 amperes). One of my previous experiences, using a different robot, occurred when the Raspberry Pi turned on the drive motors. This caused the battery voltage to drop, leading to the Raspberry Pi becoming an idiot, at which point it rebooted. This was a fatal design flaw.
Servo AUX Power Controller
It’s unknown if these servo’s current will disrupt the Raspberry Pi controller without the XRP Robot chassis for experimentation. An auxiliary power supply PCB was designed to mitigate this possibility. The “Servo_AUX_Power_Controller” PCB may prove to be a useful interface for controlling any high current servos. It can be employed in two different ways. First, to provide a separate power supply to the servos. Second, to disconnect (turn OFF) that power supply under computer control.
It’s obvious that when servo motors are not powered they don’t move. They still have resistance to motion due to gearing and internal friction. This can be used to advantage in extending battery life. The gun mount platform is reasonably well balanced and the print-in-place pivot bearings provide additional friction to the internal friction in the sail winch servo. The trigger pull servo has no external force while in the rest position.
The “Power_Controller” PCB may be obtained through the shared board link at OSH Park. They will provide 3 standard thickness PCBs for $5.70. Refer to the instructions and files in the Printables Model “Rainbow LEDs in a Ring of Power” for assembly guidance if you are new to building PCBs. A Bill_Of_Materials (BOM) text file is included for DigiKey as a source for components. Copy the DigiKey part number from the BOM and past it into the “Enter keyword or part number” box in the DigiKey web page for ordering parts.
In constructing the Auxiliary Power Controller PCB I would recommend the right angle or straight connectors be used for the two servo outputs. The servo input connections use pigtails made from servo extension cables (cut off the male connector and you have wires with a servo connector on one end). They are soldered into the board for the servo inputs. These input signal pigtails would plug into the XRP servo control outputs. The signal wires in a different pigtail (Qwiic) from an “expansion connection” can be soldered in to the board and used to plug into the “EXTRA Expansion Connector” socket on the XRP for ON/OFF power control. The “AUX POWER” input can be either a connector or a pigtail at the user’s preference to be connected to a 5V supply or auxiliary battery. Do an internet search for “5v rechargeable battery pack” for ideas on this auxiliary battery (just note the current capability so you don’t have a fatal design flaw).
The Ver-2 of the Auxiliary Power Controller PCB has 47uF capacitors added. They are located close to both of the servo connection ports to minimize transient voltage drop as the servos start or stop. The SOT-23-3 P-FET shown on the schematic can provide 6 amperes to the servos. The resistors are 0402 size. Two LEDs are included (just pick a 0603 size) to indicate that: first, “AUX POWER” is available and second, that power is now switched ON to the servos.
As can be seen in the schematic the ground and control signals are passed directly through from input to output. If a wire jumper is soldered from PIN-1 to PIN-3 the external power supply is directly routed to supply the servos. If no jumpers are used, a connection to the “Extra” expansion connector and IO22 allows the servo power to be computer controlled. (If this configuration is used the XRP board jumper “USER_BTN” should be disconnected). Note: that putting a jumper from PIN-1 to PIN-2 supplies the servos with power from the XRP but, you could have just plugged the servos into the XRP directly.
Another application of the “servo AUX power controller” would be to power the drive motors of the XRP itself. This would allow a larger battery capacity for moving the robot while saving the onboard batteries for the computing and control functions.
Servo Testing and Control
It will be useful to be able to control and test the servo operation while assembling the XRP Gun Hat without resorting to writing control code. This project’s development required that sort of function since the Sparkfun kits were back ordered.
The purpose of the “Gun_Hat_Servo_Test_Driver” PCB design is to aid in assembly and testing. It consists of a 3 stage ring oscillator where the 2 input NAND gates are configured as Schmitt input inverters and the 2 input NOR gates form a “one shot” variable pulse width generator and output buffer.
This “Gun_Hat_Servo_Test_Driver” PCB may be obtained through the shared board link at OSH Park. They will provide 3 standard thickness PCB’s for $6.00. The bill of materials file in this model provides component ordering information.
Printing
I used a 0.25 Z-step, 15% honeycomb fill, 2 perimeter shells and 4 top- and bottom layers. Support should be turned on for the rounded edges and the screw head pockets in the spur7 gear.
Print two copies of the “XRP_Gun_Axle_Support” file and make sure the pivots are free to rotate before final assembly.
Download and print the components for the Rubber Band Gun – with Selectable Semi- or Full Auto- Mode from the printables model.
Coding Discussion
If you plan on using the “Servo_AUX_Power_Controller” PCB plugged into the XRP “extra expansion header”, the first coding task in the set-up routine is to switch the IO22 GPIB pin from input to output. Having removed the “USER_BTN” jumper means that accidentally pressing the USER button won’t mess up this control line.
Note: If the servo has the PWM pulse train present when the power is turned off it may twitch to a new position as it dies. So, the servo control operating sequence is: First, turn off the PWM signal (to make sure). Second, turn on the servo power, i.e. output a “1” to GPIB IO22. Third, turn on the PWM signal (note: if you maintain the same pulse width/duty cycle that was present when the servo was previously turned off it won’t twitch). Fourth, output the desired duty cycle PWL control to the servo. Fifth, wait for the servo(s) to move. Sixth, turn OFF the servo PWM signal. Finally, turn off the servo power, i.e. output a “0” to GPIB IO22.
To shoot the rubber band gun, the output sequence would be: PWM OFF, apply servo power, PWM ON, pull trigger (i.e. rotate), wait, release trigger (rotate back), wait, PWM OFF, and then turn off servo power. Note: if there is no PWM signal the servo can be powered and unpowered without moving.
Servo code
I found a generic subroutine to operate the servos. Outputting a value from 0.0 to 1.0 runs the servos over their full range of rotation. This may or may not be useful.
Assembly
Do an internet search for “M3 socket head cap screws eBay” to find a selection with the screw and nut sizes you need. EBay has a better sorting routine for the various ads than Amazon. Then search for “25T 20mm round servo horn eBay” to find the 20mm diameter servo horns that fit the 25 tooth splines on the servo motors.
Screw four of the M3x3mm screws into the servo horn for the winch servo. The heads of these screws fit into the sockets in the spur7 gear for a positive driving force. An M3x10mm screw will attach the spur7 gear onto the winch servo. Make the attachment to the servo one of the last steps in assembly once the servo can be controlled and the “gun_axle_platform” is rotated out of the way. The trigger arm is attached to the other servo horn using 4 M3x10mm screws. And, another M3x10mm screw will be used to attach it to the trigger servo. Wait until you’ve centered that servo then attach the trigger arm so the finger is pointing straight ahead. (This allows convenient removal of the rubber band gun for reloading).
Seat the M3 nuts in the nut traps located in the “winch servo yoke” and the “gun_axle_platform”. (Insert a M3 screw, start the nut, and cam it into place using the hex driver). Slide the gun latch into its channel in the “gun_axle_platform” then carefully work the spring into its pocket. Using CA (super glue) glue the spur63 gear onto the “gun_axle_platform” using the position guides (make sure its square vertically).
Slide the “gun_axle_platform” tabs through the slots in the “gun_axle_platform supports” and glue the “gun_axle_platform supports” tabs into the base slots using CA glue. Glue the winch servo yoke into the slots in the base board (note: the orientation of the nut traps away from the spur63 gear).
Mount the servos using 4 M3x10mm screws for each but don’t mount the control arm on the trigger servo or the spur7 gear on the winch servo. You will need some code written for the robot controller or use the “Gun_Hat_Servo_Test_Driver” PCB to put the servos at a convenient orientation. After rotating the platform so the spur63 elevation gear is out of the way of the winch servo, the spur7 gear may then be attached to the winch servo. The “Gun_Hat_Servo_Test_Driver” or a section of code can rotate the winch servo to mesh the spur63 gear with the spur7 gear on the winch servo. Then the trigger control arm may be installed into the open/safe (rotated) position such that the rubber band gun can be snapped into place.
Now comes the fun part. Writing the code that makes everything operate.
Enjoy !!!