Update the device/servo page (#1734)
This commit is contained in:
		
				
					committed by
					
						
						Peli de Halleux
					
				
			
			
				
	
			
			
			
						parent
						
							02554a6193
						
					
				
				
					commit
					d51eae9667
				
			@@ -2,124 +2,116 @@
 | 
			
		||||
 | 
			
		||||
## ~ hint
 | 
			
		||||
 | 
			
		||||
If you are running a class or activity, you should consider preparing all servos before hand.
 | 
			
		||||
If you are conducting a class or group activity, you should consider preparing all servos ahead of time.
 | 
			
		||||
 | 
			
		||||
## ~
 | 
			
		||||
 | 
			
		||||
## Using a microservo with the @boardname@
 | 
			
		||||
 | 
			
		||||
The @boardname@ provides just enough current to operate the SG90 microservo. 
 | 
			
		||||
The servo requires 3 connections: GND, 3V and a logic pin. 
 | 
			
		||||
In this tutorial, we will equip the servo with crocodile clips to make it easier to use. 
 | 
			
		||||
However, you could also use a shield or female to crocodile clips to achieve the same effect.
 | 
			
		||||
The @boardname@ provides just enough current to operate the SG90 microservo. This servo requires 3 connections: **GND**, **3V** and a logic **pin**. In this tutorial, we will equip the servo with crocodile clips to make it easier to use. However, you could also use a shield or crocodile clips with a male connector on one end to achieve the same result.
 | 
			
		||||
 | 
			
		||||
## The easy way: Alligator/Crocodile Clip to Male Jumpers #hintconnection
 | 
			
		||||
 | 
			
		||||
The easiest way to connect a servo to the @boardname@ is to use cables that have an **Alligator/Crocodile clip** on one end
 | 
			
		||||
and a **Male jumper (pig tail)** on the other end. You can purchase bundles of such cables from various electronic resellers or easily build yours as show below.
 | 
			
		||||
The easiest way to connect a servo to the @boardname@ is to use cables with an **Alligator/Crocodile clip** on one end
 | 
			
		||||
and a **Male jumper (pig tail)** on the other end. You can purchase bundles these cables from various electronic resellers or easily build some as shown here.
 | 
			
		||||
 | 
			
		||||
https://youtu.be/XtzsydSTXEg
 | 
			
		||||
 | 
			
		||||
## Materials
 | 
			
		||||
### Materials
 | 
			
		||||
 | 
			
		||||
  * 1 Crocodile clip cable
 | 
			
		||||
  * 1 male (pig tail) cable
 | 
			
		||||
  * Cutting pliers or wire cutter
 | 
			
		||||
  * 1 shrink wrap cables and a lighter
 | 
			
		||||
* 1 Crocodile clip cable
 | 
			
		||||
* 1 male (pig tail) cable
 | 
			
		||||
* Cutting pliers or wire cutter
 | 
			
		||||
* 1 piece of heat shrink tubing and a lighter
 | 
			
		||||
 | 
			
		||||
Simple cut the cables, strip them, thread the cables together and cover with the shrink wrap.
 | 
			
		||||
Simply cut the cables, strip them, twist the bare wires together, and cover the connection with some heat shrink tubing.
 | 
			
		||||
 | 
			
		||||
## ~ hint
 | 
			
		||||
### ~ hint
 | 
			
		||||
 | 
			
		||||
It is very **important** to ensure that there is a good connection between the 2 cables.
 | 
			
		||||
If the connection is weak, the microservo will not receive enough current and it will not work.
 | 
			
		||||
**If you have access to a soldering iron, we strongly recommend to solder this connection.**
 | 
			
		||||
 | 
			
		||||
## ~
 | 
			
		||||
It is very **important** to ensure a good connection between the 2 cables. If the connection is weak, the microservo will not receive enough current and it will not work. **If you have access to a soldering iron, we strongly recommend that you solder this connection.**
 | 
			
		||||
 | 
			
		||||
### ~
 | 
			
		||||
 | 
			
		||||
## Direct connection
 | 
			
		||||
 | 
			
		||||
You can also connect your crocodile clips directly to the servo.
 | 
			
		||||
 | 
			
		||||
## Materials
 | 
			
		||||
  * Cutting pliers or wire cutter
 | 
			
		||||
  * Tape (masking, duct tape, and/or packing tape)
 | 
			
		||||
  * 3 crocodile clips, yellow, red and black.
 | 
			
		||||
  * 1 micro servo 9g (SG90)
 | 
			
		||||
### Materials
 | 
			
		||||
 | 
			
		||||
## Step 1: cutout the connector
 | 
			
		||||
* Cutting pliers or wire cutter
 | 
			
		||||
* Tape (masking, duct tape, and/or packing tape)
 | 
			
		||||
* 3 crocodile clips, yellow, red and black.
 | 
			
		||||
* 1 micro servo 9g (SG90)
 | 
			
		||||
 | 
			
		||||
Using the cutting pliers, cut out the dark plastic connector.
 | 
			
		||||
### Step 1: Cut off the connector
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
With the cutting pliers, cut off the dark plastic connector.
 | 
			
		||||
 | 
			
		||||
## Step 2: strip out cables
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Using the plier or a wire stripper, strip the plastic from the cables.
 | 
			
		||||
### Step 2: Strip the ends of the cables
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
Using the pliers or a wire stripper, strip the plastic insulation from the cables.
 | 
			
		||||
 | 
			
		||||
## Step 3: threading the servo cablers
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Thread the servo cables.
 | 
			
		||||
### Step 3: Twist the wire strands together
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
Twist the strands of bare wire at the ends of the servo cables together.
 | 
			
		||||
 | 
			
		||||
## Step 4: crocodile clip
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Cut a crocodile cable in two and strip out the casing. 
 | 
			
		||||
If possible try to use the same cable colors as the servo!
 | 
			
		||||
### Step 4: Crocodile clip
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
Cut a crocodile cable in two and strip off the insulation. If it's possible, try to use cables with colors that match the cables on the servo!
 | 
			
		||||
 | 
			
		||||
## Step 5: thread cables together
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Place the cables next to each other
 | 
			
		||||
### Step 5: Thread the cable ends together
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
Place the cables next to each other...
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
... and thread them together.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## ~ hint
 | 
			
		||||
### ~ hint
 | 
			
		||||
 | 
			
		||||
It is very **important** to ensure that there is a good connection between the 2 cables.
 | 
			
		||||
If the connection is weak, the microservo will not receive enough current and it will not work.
 | 
			
		||||
**If you have access to a soldering iron, we strongly recommend to solder this connection.**
 | 
			
		||||
It is very **important** to ensure that there is a good connection between the 2 cables. If the connection is weak, the microservo will not receive enough current and it will not work. **If you have access to a soldering iron, we strongly recommend soldering this connection.**
 | 
			
		||||
 | 
			
		||||
## ~
 | 
			
		||||
### ~
 | 
			
		||||
 | 
			
		||||
## Step 4: protect the connection
 | 
			
		||||
### Step 6: Protect the connection
 | 
			
		||||
 | 
			
		||||
Protect the connection with shrinkwrap tubes, electrical or duct tape.
 | 
			
		||||
Protect the connection with heat shrink tubing, electrical tape, or duct tape.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 5: repeat for all cables
 | 
			
		||||
### Step 7: Repeat for all cables
 | 
			
		||||
 | 
			
		||||
Repeat the same process until all cables are connected.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 6: testing!
 | 
			
		||||
### Step 8: Testing!
 | 
			
		||||
 | 
			
		||||
It's time to test that your connection are all proper and that the servo will function **when the @boardname@ is powered by battery**.
 | 
			
		||||
It's time to test and find out if your connections are all secure and that the servo will function **when the @boardname@ is powered by battery**.
 | 
			
		||||
 | 
			
		||||
* Connect the microservo to the @boardname@. Black cable on ``GND``, red cable on ``3V`` and remaining cable on ``P0``.
 | 
			
		||||
* Connect the microservo cables to these pins on the @boardname@: black to **GND**, red to **3V**, and the remaining cable to pin **0**.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## ~ hint
 | 
			
		||||
 | 
			
		||||
When attaching the crocodile clips to the pins, don't hesitate to grab the side of the board with the jaws.
 | 
			
		||||
When attaching the crocodile clips to the pins, don't be afraid to clamp on to the edge of the board with the clips.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## ~
 | 
			
		||||
 | 
			
		||||
* Download the following code to your @boardname@
 | 
			
		||||
* Download the following code to your @boardname@.
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
basic.forever(() => {
 | 
			
		||||
@@ -133,14 +125,14 @@ basic.forever(() => {
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
* When powered by USB, make sure that the servo moves when you tilt the board.
 | 
			
		||||
* When powered by batteries **only**, make sure that the servo moves when you tilt the board.
 | 
			
		||||
* Test with both power sources and make sure that the servo moves when you tilt the board:
 | 
			
		||||
>* Connected with USB.
 | 
			
		||||
>* Powered by batteries **only** and not connected with USB.
 | 
			
		||||
 | 
			
		||||
## Calibrating
 | 
			
		||||
 | 
			
		||||
Using the [servo calibrator program](/examples/servo-calibrator) to determine the best angles to use in your make.
 | 
			
		||||
Use the [servo calibrator](/projects/servo-calibrator) program to determine the best angles to use for your make.
 | 
			
		||||
 | 
			
		||||
## Troubleshooting
 | 
			
		||||
 | 
			
		||||
If your servo seems to sutter and stay stuck at a particular position, it means that it is not receiving enough power.
 | 
			
		||||
This is probably due to a weak connection or low battery level. Check each connection and check your batteries.
 | 
			
		||||
If your servo seems to stutter and remain stuck at a particular position, it means that it's not receiving enough power. This is probably due to a weak connection or low battery level. Make sure that each connection is good and check your batteries.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user