Electronics Basics

From RoboJackets Wiki
Jump to navigation Jump to search

Overview

Electronics are an important consideration of all Combat bots. Robots without strong electronics can suffer from shorts and over-voltage, which can ruin components and disable the robot. Creating a strong electrical system is crucial to increasing the durability and maximizing the damage output of the robot. Additionally, compact electronics allow the designer to decrease the size and footprint of the robot, making it a harder target and allowing more weight to be distributed to the armor and weapons.This guide will offer a detailed explanation of the components used in a combat robot's electronics and describe how to assemble the components into a strong and small circuit.

3lb Circuit

Standard 3lb Circuit

The standard 3lb electrical layout consists of a 1000 mAh 11.1 V battery connected to a mechanical switch, which powers 2 drive ESCs and a Weapon ESC. The ESCs are each connected to a receiver and send power to the motors in 3 phases.

Parts List

Component Size Weight
DYS BE1806 2300KV (Drive Motor) 0.91x0.91x0.83in 0.053 lbs
DYS BL20A Mini 20A BLHeli ESC OPTO (Drive ESC) 0.91x0.47x0.18in 0.017 lbs
HobbyKing 2.4Ghz 6Ch V2 (Receiver) 1.75x0.53x0.88in 0.029 lbs
Turnigy nano-tech 1000mah 3S 45~90C Lipo Pack (Battery) 2.80x1.38x0.75in 0.21 lbs


Motors

Overview

Motors consist of a rotor (rotating part) and a stator (stationary part). The rotor is made up of an armature that drives the load which is surrounded by magnets and supported by a bearing to reduce friction. The stator is made up of a core surrounded by coils of wire connected to a power source that is used to drive the motor. The stator has a core made up of laminated sheets of metal to reduce energy losses. A commutator is also included in brushed motors to flip the magnetic field as the motor spins.

Brushless Motor
Brushed Motor

Brushed vs Brushless

Brushed motors operate by sending current through coils of wire to induce a magnetic field and cause the motor’s permanent magnets to turn. Once the magnets have spun 180°, the current is reversed using a communicator, and the magnets continue to spin another 180° and the process repeats. Brushed motors are more durable than brushless motors, but suffer from less control and slower speeds than brushless motors.


Brushless motors operate using three phase AC current generated by a switching power source or an ESC. The 3 phases of the current are 120 degrees out of phase, meaning that when one line has no current, the other lines have a current at plus and minus cos(120°). These wires are connected in loops around the motor in alternating phases so that at any moment, one wire is pushing the motor forward, one is pulling the motor forward, and the last has no current. Brushless motor’s have a higher power to weight ratio and higher speed than brushed motors. Battlebots uses brushless motors for its robots due to the control and speeds that they posses. Note that the direction of the motor can be reversed by switching any 2 of the wires.

Inrunner vs Outrunner

An example of Inrunner vs Outrunner Motors

Inrunner motors have the permanent magnet rotor inside a ring of electromagnets with the armature connected directly to the rotor. Inrunner motor’s have high rpm and are more efficient than outrunners, but have less torque and weigh more.

Outrunner motor’s have the permanent magnet rotor outside a core of electromagnets with the armature connected to a plate on the back of the rotor. Outrunner motors provide more torque than inrunners, but suffer from less rpm and a spinning body that can be constricted by wires.

Choosing a Motor

When choosing a motor there are several parameters that need to be considered to make an informed decision. These values will affect the speed and power output by the motor and will affect how hard your weapon hits, how long it takes to spin up, and could change how your robot drives. These are the constants you should be familiar with when you look for a motor.

Kv: How fast the motor spins per Volt supplied to it. A 1000 Kv motor will spin at 1110 rpm when supplied with 11.1 V. Note this is the unloaded speed and will be lower when your weapon is attached. Kv is inversely related to torque, which relates

Weight: Weight is an important consideration when choosing a motor. You may be tempted to choose the fastest and most powerful motor for your robot, however larger motors will quickly burn through your available weight and require you to use bigger and heavier ESCs.

Max Current: The max current will determine the ESC that you need to control the motor. Your ESC should be at least as large as the max current the motor can draw. Typically motors with a max current of 40 A or less are used to keep the ESC small and light. The size of the ESC tends to increase significantly at 50 A.

ESCs

An ESC with the shrink wrap removed.

Overview

An ESC (Electronic Speed Control) receives a control signal from the receiver that dictates how much power to output to the motor. It then generates a signal of the proper power and sends it to the motor. For brushless motors the ESC will generate a three phase AC signal, and for brushed motors the ESC will generate a constant signal. Click here to learn more about the difference between brushed and brushless ESCs. The ESCs adjust the phase of the output based on the motor rotation, which it measures using the back emf response from the motor. This allows the user to spin the motor at different speeds to control the speed and direction of the robot

Choosing an ESC

ESCs are chosen based on the max current they will experience. Generally the ESC’s rated current should be higher than the motor’s rated current. For example a 30A motor will generally require a 40 A ESC to prevent overvoltage. The ESCs will also need a Battery Eliminator Circuit (BEC) to step down the voltage sent to the receiver. The presence of a BEC will be listed in the ESC’s product specifications.

Flashing ESC Firmware

Often times ESCs come with firmware that differs from what is needed. The most common way this presents itself is that the motor has no reverse drive. To fix this, you have to flash new firmware onto the ESC. To do this, you'll need an Afro ESC USB Linker and a program called RapidFlash. First plug the white and black cable that typically is attached to the receiver into the Afro ESC USB Linker, being careful to line up the signal pin to the white wire, and the "-" pin to the black wire. Once you have that set up, plus the USB into your computer, power your ESC (either using a DC Power Supply or a battery), and launch RapidFlash. You'll need to set the port (there should only be one option on the drop down), the programmer (Afro ESC USB Linker), the release (using master is fine), and finally you'll need to select the firmware. To determine what firmware to use, consult this sheet to see what firmware is recommended for your ESC. Next you'll need to select which features you'll want to flash under the advanced tab. Uncheck "RC_CALIBRATION" because our motors do not calibrate. "RC_PULS_REVERSE" and "BEACON" are recommend. Finally, press "Flash Firmware" and wait until the terminal says that the serial terminal connection has been terminated.

Batteries

Lithium Polymer battery typically used by 3lb robots.
An example of a swollen LiPo. The battery on the right should not be used or charged.

Battlebots uses Lithium Polymer batteries to power our electronics. Lithium polymer batteries are compact rechargeable batteries made using a polymer electrolyte to reduce weight. LiPo batteries have high energy density and low weight, making them perfect for applications with weight restrictions. When selecting a battery, it is important to consider the voltage and capacity. The voltage is the level necessary to power the circuit and must be calculated using the power consumption of the components. The capacity will tell you how long the battery will run and is measured in milliamp hours. The 3lb robots use a 11.1V 1000mAh 3-cell battery which has enough charge to power the robots for their three minute matches.

Safety: LiPo batteries can be very dangerous if mishandled or punctured, therefore you should be careful when handling charged or charging batteries. Also remember that a battle bot with a battery plugged in should be treated as powered on with a live weapon. Below are some guidelines on how to safely handle and use LiPo batteries.

1. Never use a damaged battery. If you believe that your battery is damaged, bury it in a bucket of sand. The sand bucket at the SCC is the metal bucket outside the office. At competition, the officials will tell you where the bucket is at the drivers meeting. A damaged battery will puff up and/or keep heating heat up after unplugged. If a battery is visibly expanding, there is an extreme risk of exploding and it should be buried in sand ASAP.

2. Use the balancing board when charging. If the voltage of the cells in the battery become unbalanced, it could become unstable and explode.

3. Store batteries in a fireproof bag. Overcharged or damaged batteries can spontaneously catch fire, and should be stored properly to be safe.

4. Never overcharge or use an overcharged a battery. Our chargers should automatically stop when the battery is full, but the voltage should never exceed 4.2 V per cell.

5. Store batteries at room temperature. Hot temperatures can melt the battery and cold temperatures may result in condensation inside the battery, which can result in shorts and fires.

6. Never use an undercharged battery. Batteries last around 300 charges, throw out the battery when the voltage is below 3 V per cell.

Receiver

Overview

The receiver used by 3lb teams with the binding ring included.

The controllers that you will use contain a transmitter which broadcasts a control signal to the receiver on the robot. The receiver decodes the signal and transmits instructions through different channels that connect to each component in the circuit. These signals tell the ESCs how much power to route to each motor which allows the user to control the robot from a distance.

The receivers that Battlebots uses have six channels, but we only use three of them to control the robot. The first channel is connected to the weapon ESC which controls how fast the weapon spins. The control stick connected to this channel has a fixed position, which is useful for keeping a constant power to the motor. The next two channels connect to each drive ESC and are used to maneuver the robot. The drive stick uses the vertical position of the stick to control the power sent to both motors and the horizontal position to send more power to one motor when executing a turn. The final channel that is present in all newer receivers is the binding channel. This channel is used to bind the transmitter in the controller directly to the receiver int the robot. This step only needs to be completed once and lasts until the receiver is re-bound to a different transmitter. Note that when binding the receiver, the trim of the controller might need to be adjusted for the receiver to detect all channels. Trim are sliders that finely tune how much power is transmitted when the stick is pushed a specific amount. These will need to be adjusted if the robot lists to one side when driven forward.

How to Bind

Channel List
Channel Motor
1 Left Drive Motor
2 Right Drive Motor
3 Weapon Motor

Below is a step by step guide on how to bind your receiver to the transmitter on your controller.

1. Plug the binding clip into the BAT slot on the receiver.

2. Connect the receiver to a powered ESC in any slot. Make sure the metal prongs are facing the top of the receiver when you plug it in.

3. While holding the pair button on the controller, switch it on. You should see a solid light on the receiver.

4. Turn off the controller and remove the binding clip. The receiver is now paired with the controller.

Manufacturing

Wire Selection

AmpacityChart.png

When wiring your circuit together, you need to choose wires with a large enough diameter that they can conduct the current flowing through them without melting. However you also want wires that are thin enough to fit into the empty space inside your robot. Wires are graded by their gauge or thickness, with larger diameter correlating with a smaller gauge. To find the minimum gauge wires needed to effectively power the components, you can consult an ampacity chart. The ampacity of the wires should exceed the maximum rating of your ESCs.

Soldering

In general, the purpose of soldering is to heat the wire/connector up enough to melt the solder, rather than melting the solder onto the cool material, which ensures a solid continuous connection between the solder and the material it is attached to.

Setup

Desolder wick sucking solder from a circuit board.

When you are ready to begin soldering components together, first plug in the soldering iron's power supply and turn it on with the iron in its housing. Be careful, always treat a soldering iron as hot when it is plugged in and keep the iron in its holder when not in use. Keep the iron away from power wires and flammable materials. Begin by melting some solder onto the tip, which helps the heat transfer from the tip. This is called tinning and it should be done if the iron has not been used in several minutes. Clean the iron occasionally by rolling the tip in the brass shavings to deposit any solder, then a wet sponge to clean the tip. Once you have finished soldering, tin the iron before cooling to protect the tip.

Try to use lead-free solder, or wash your hands after handling solder. Use a fume extractor if possible or work in a well ventilated area as the fumes can be irritating. It is helpful to use solder that has 2-3% rosin flux, which is an acid that cleans the surface of the wires and forms a stronger bond.

If you put too much solder on a joint, take some desolder wick, put it on the joint, and press the iron to it to draw the excess solder up the wick.

Wire Splicing

When it is necessary to connect two wires without connectors, it is important to mechanically connect the wires to form a bond that is as strong as possible, rather than just globing solder on them. A short step by step procedure with images can be found here. To summarize, twist each wire in your fingers to braid the filaments and melt some solder onto them. Then, wrap the tip of one wire several times around the base of the other. Wrap the remaining wire's tip around the base of the first, then apply the iron to the splice to form a strong electrical connection.

Bullet Connectors

A step by step guide on how to solder on bullet connectors

Bullet connectors are used to attach components that may need to be replaced quickly, such as motors or ESCs. To solder a wire to a bullet, clamp a bullet into some helping hands/pliers and press the iron to the outside of the bullet for several seconds to heat up the metal. Apply solder inside the connector and build up a pool of melted solder. Place a stripped wire inside the pool and remove the iron to allow the solder to cool around the wire. When applying heat shrink, make sure it covers the entire female bullet and the thick portion of the male bullet. Keep your male/female bullets consistent between replacements so you don't have to re-solder all of the bullets.

Crimps

A terminal crimp with heat shrink applied

There are two types of crimps used in electronics. Wire crimps are used to attach two wires together securely with two female ends. Terminal crimps are used to connect wires to terminal blocks, or to each other, to easily make parallel connections. Terminal crimps have one female end that receives the wire, and a loop that can be screwed to a terminal. Make sure that you use the proper size crimp for the wire you are connecting. To attach a crimp, strip a quarter inch of insulation off the wire. For a stronger connection, apply some solder to the wire before inserting it into the crimp. Then use the crimping tool to compress the middle of the crimp around the wire. You may want to rotate the crimp 90 degrees and crimp it again to compress the wire on four sides. Be careful not to overcrimp the connector to prevent damaging the insulation. Once the wire is crimped, you can use a screw to attach several crimps together and a nut to secure them together. For larger bots, a larger terminal block can be used to screw several wires in an organized parallel connection. Here is a video showing proper procedure for crimping wires together.

Insulation

Once you've soldered your components to their respective wires, you will need to insulate them to prevent the exposed connections from grounding to your robot's chassis. Generally this is done by wrapping the component in heat shrink. Heat shrink is a material that, as the name suggests, shrinks as heat is applied to it. Simply thread a pre-cut piece around the component, then use a heat gun to shrink it until it is wrapped firmly around the part. Additionally, if heat shrink is unavailable or time is of the essence, you may simply wrap electrical tape around the joint to protect it. For extra insulation, it is recommended that you coat your metal plates in an an insulating substance, like spray paint, to further prevent your electronics from grounding to the chassis.


Bullet.jpg
Connector.jpg
SolderingIron.jpg