Swarm robots/Motor PCB & Assembly Instruction

From XinCheJian
Jump to navigation Jump to search


This Page is incomplete and has been replaced by Assembly-AFRON

>>>>>> The current and up-to-date information is on this page: Assembly-AFRON

ignore the rest of this page!



To Do for this page

!!!!! page name no longer correct - need to match the new naming scheme!!!!!! or just use a new page with all the comp entry pages AND also add to the Category:AFRON $10 Robot Competition


Add photos, BOM, ***BOM, schematic, pcb

proof read

TEST the actual assembly process and all the information!!!!

have translated.....


????????? Where do all the shield assembly info live + the other 2 Swarm Bots??????

  • Need to do a (git) package with ALL info - circuit, PCB, gerbers, BOM & suppliers, instructions, how to solder, ......


split into several pages - remeber parts list & phots still to be added!

... and more todo in teh relevant spot below!


Assembly notes

Notes on assembling the motor driver PCB - PLEASE ADD TO THIS PAGE AS YOU BUILD YOUR PCB!!

Part identification

Here are some links to help you identify electronic components. [Wikibooks Component Identification] [Pksec Electronic Components] [uC Hobby Identifying Electronic Components]

Parts list + photos

?? do a table like this one?? http://www.ladyada.net/make/usbtinyisp/parts.html Image, Name, Description, Part #, Qty images 200 x 135


links to schematic, PCB, pinout cross ref, to shields page(s) ??USE a DEDICATED REPO FOR AFRON!!!!!!! PCB/assembly photos


DISCUSS optional stuff - including how to program and connect IR LEDs etc if no headers...... ...PHOTOS of MINIMAL bot!!!!!!


Photo Quantity Part Remarks Projects Distributor Distributor URL
[[File:|100px|thumb|left|]] 4 1838B or TSOP1838B or VS1838B Swarm Robot IR Shield - prototype 1, Swarm Robot moving PCB (version 2012-08-09) Taobao http://item.taobao.com/item.htm?spm=a230r.1.10.19&id=14691731276
[[File:|100px|thumb|left|]] 6 LED 3mm Red Swarm Robot IR Shield - prototype 1: Optional - just for end user imapct/use! Good to use different colours!, Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL (Front skid can be replaced with bent wire) 1xPWR_LED1 LED, 1xUsed as Front wheel/skid Swarm Robot IR Shield - prototype 1, Swarm Robot moving PCB (version 2012-08-09) Optional - use for optional parts in a project! Set price to 0.001 if you want teh supplier to appear in project report!
[[File:|100px|thumb|left|]] 5 150 Swarm Robot IR Shield - prototype 1: used with the optional LEDs Swarm Robot IR Shield - prototype 1, Swarm Robot moving PCB (version 2012-08-09) undefined
[[File:|100px|thumb|left|]] 2 10x1 2.54mm Female Single row socket (SIL) Swarm Robot IR Shield - prototype 1: ** REVIEW, not sure if 10x1, or 8+2x1, or 6+2+2x1 Swarm Robot IR Shield - prototype 1, Swarm Robot moving PCB (version 2012-08-09) undefined
[[File:|100px|thumb|left|]] 1 AtTiny2313-PU Swarm Robot moving PCB (version 2012-08-09) Mouser (international)
[[File:|100px|thumb|left|]] 1 L293D h-Bridge Chip Swarm Robot moving PCB (version 2012-08-09) Taobao http://item.taobao.com/item.htm?spm=a230r.1.10.63&id=14698384627
[[File:|100px|thumb|left|]] 1 3x2 2.54mm Male Dual row header (DIL) Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL ICSP1 CONN_3X2 Swarm Robot moving PCB (version 2012-08-09) Taobao
[[File:|100px|thumb|left|]] 1 2x1 2.54mm Male Single row header (SIL) Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL - can all be wired directly. M1, M2, PWR_IN1 Swarm Robot moving PCB (version 2012-08-09) Optional - use for optional parts in a project! Set price to 0.001 if you want teh supplier to appear in project report!
[[File:|100px|thumb|left|]] 2 8x1 2.54mm Female Single row socket (SIL) Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL can wire directly Swarm Robot moving PCB (version 2012-08-09) Optional - use for optional parts in a project! Set price to 0.001 if you want teh supplier to appear in project report!
[[File:|100px|thumb|left|]] 1 SPST PCB mount Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL - can just plug battery in/out! PWR_SWITCH1 SWITCH_INV Swarm Robot moving PCB (version 2012-08-09) Optional - use for optional parts in a project! Set price to 0.001 if you want teh supplier to appear in project report!
[[File:|100px|thumb|left|]] 3 200R 电阻 1/4W Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL R1, 2, 3 Swarm Robot moving PCB (version 2012-08-09) Taobao
[[File:|100px|thumb|left|]] 1 LED 3mm Blue Swarm Robot moving PCB (version 2012-08-09): *Optional Rx Swarm Robot moving PCB (version 2012-08-09) Optional - use for optional parts in a project! Set price to 0.001 if you want teh supplier to appear in project report!
[[File:|100px|thumb|left|]] 1 LED 3mm Yellow Swarm Robot moving PCB (version 2012-08-09): *Optional Tx Swarm Robot moving PCB (version 2012-08-09) Recycled - Scavenged - item
[[File:|100px|thumb|left|]] 2 Wheel Swarm Robot moving PCB (version 2012-08-09) Recycled - Scavenged - item
[[File:|100px|thumb|left|]] 1 SwarmRobots PCB 2012-08-09 Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL - can use breadboard or deadbug wiring! Swarm Robot moving PCB (version 2012-08-09) Taobao http://store.taobao.com/shop/view_shop.htm?spm=a1z09.2.9.32&user_number_id=117902299
[[File:|100px|thumb|left|]] 2 Motor J928 Swarm Robot moving PCB (version 2012-08-09) Taobao 3.5Y http://item.taobao.com/item.htm?spm=a230r.1.10.163&id=13758597818
[[File:|100px|thumb|left|]] 2 screw - tiny Swarm Robot moving PCB (version 2012-08-09): to attach wheels to motors Swarm Robot moving PCB (version 2012-08-09) Recycled - Scavenged - item
[[File:|100px|thumb|left|]] 1 Hot melt glue Swarm Robot moving PCB (version 2012-08-09): 1/20th of a stick? to attach motors and??? Swarm Robot moving PCB (version 2012-08-09) Taobao http://item.taobao.com/item.htm?spm=a230r.1.10.38&id=9604073433
[[File:|100px|thumb|left|]] 1 Hookup wire Swarm Robot moving PCB (version 2012-08-09): *OPTIONAL about 100mm for motors and maybe for battery, or use two strands of Rainbow cable Swarm Robot moving PCB (version 2012-08-09) Recycled - Scavenged - item
[[File:|100px|thumb|left|]] 2 Tyres Swarm Robot moving PCB (version 2012-08-09): *Optional, can also use rubber bands, glue etc Swarm Robot moving PCB (version 2012-08-09) Recycled - Scavenged - item
[[File:|100px|thumb|left|]] 1 Lithium 180mA 3.7V Swarm Robot moving PCB (version 2012-08-09) Taobao http://item.taobao.com/item.htm?spm=a1z10.3.17.50&id=10651345659&
[[File:|100px|thumb|left|]] 1 USB lithium battery charger Swarm Robot moving PCB (version 2012-08-09): *Optional - Do not need 1 for every SwarmBot Swarm Robot moving PCB (version 2012-08-09) Taobao http://item.taobao.com/item.htm?spm=a1z10.3.17.22&id=10651070573&
[[File:|100px|thumb|left|]] 1 ISP Programmer Swarm Robot moving PCB (version 2012-08-09) Taobao http://item.taobao.com/item.htm?spm=a230r.1.10.9&id=5906065954


NOTE: Using a 3.7V battery to directly power the SwarmRobt without using the 78L05 voltage regulator works nicely, even though L293D data sheet says the min logic Vss is 4.5V. The build in photo leaves the voltage regulator out, so a jumper is required in bottom right of PCB. Further work will try to determine suitable voltage range, use of brown out fuses etc.


How to solder (multi-languages)

[how to solder (English)] plus 16 translations at bottom of page - including by Xinchejian!

[Soldering is Easy (English)] [Soldering is Easy (French)] Want to translate? Here’s the original comic artwork without text, 26.6M: [soldercomic_artwork.tif]

[More nice soldering tutorials via LadyAda]

Assembly Guide

The steps you undertake to assemble your SwarmRobot may vary if you do not have some of the optional parts, or if any parts you purchase or recycle vary from those in the parts list.

PCB

  • General soldering rule is start with the shortest height components then proceed to the tallest as this usually makes physically holding the components whil soldering easier.
  • All LEDs have longer lead (the positive anode = the 'bar' side) in hole nearest the resistor.
  • 2 motor connectors - you may find it better to just solder the motor wire directly to PCB - so exclude from shield (BEST), or solder to shield!
so best options is to make the shield connectors 8 pins, not 10 - so do not do like the photo!
2nd photo - don't do the wires like this - they will rub on the wheels and stop the wheels from turning
  • Investigation is underway to see if the 78L05 is required, as one prototype on breadboard works OK using 3.7V battery, even though L293D data sheet says the min logic Vss is 4.5V. The build in photo leaves the voltage regulator out, so a jumper is required in bottom right of PCB.
  • make motor wires about 90mm each+ update PartKeepr!!!!!!!!!
  • best to run motor wires inside the header, not outside as seen in photos
  • Do last (even after the motors glued on!): Power LED - mount UNDER board - it doubles as front wheel. Adjust height to match your wheel height!
Guide for soldering parts on PCB

Note mount power LED under the PCB AFTER the wheels have been mounted. This is allows for more convienent motor and wheel assembly and alos to adjust teh LED height for it's use as teh front wheel. SwarmRobot PCB front 1-800x.JPG

motor assembly

  • hot glue - is HOT and can stay burning hot for some minutes!
  • build up layer over header pins, let partly cool until farily solid
  • add another layer and hold motor in position until cooled
  • try not to move motor
  • try not to glue your wheel
  • If you do, best to cut excess before fully solid
  • if required, remove wheel - but best to wait until glue is strong
  • how to cut the female headers (find on web?), use side cutters or a saw, BUT you need to destory the next pin!
  • add a fillet of glue - along inner edge, and at end from top of PCB, over the edge and along end of gearbox

see photo

  • take care not to let the motor wires jam the wheel

- see photo

  • make sure motor outer edge is IN LINE with board edge or a bit outside

see photo

Untested method: Try - add 1st layer glue, cool then SMALL AMOUNT 2nd layer AND quickly place PCB vertical on flat surface position motor and add more glue on inner side of motor-PCB let cool, then do end this should get motor straight and give wheel clearance

You could also cut/bend header pins before 1st layer of glue

Note motor is mounted so that wheel is positioned as far to the rear as possible, to reduce the chances of the robot tipping backwards! The screw hole is aligned with the rear of the PCB.

Motor mounted with screw holes aligned to rear edge of PCB to increase stability
Motor wiring - better to run wires inside each header over the PCB to reduce wheel interference
Motor wiring interfering with wheels. Instead Place wires through PCB holes!
first layer of glue applied to PCB
Excess glue that rubbed on wheel
Excess glue trimmed


wheel assembly

  • small screw hole, try no to squash bottle cap
  • may need use larger drill to smooth hole
  • make sure screw is at right angles to surface
  • motors Xinchejian used have a locating lug, either cut it of, or cut matching hole in your wheel (preferred method)
  • can use small drill to start/mark lug cutout
  •  ?????????? washer - eg plastic to stop wheel rubbing on motor?
  •  ???? two other small lugs on gear body - remove??
  • may need to roughen or cut off the outer edge if it has a smooth ridge to enable wheel to grip.
  • Alternatively:
  • can add padding/washer - even a small piece of breadboard works
SwarmRobot underside battery and wheel spacer
        • GET PHOTOS OF: WHEEL + HOLE + SCREW

[[File:|440px|thumb|left|]] [[File:|440px|thumb|left|]] [[File:|440px|thumb|left|]]

Tools - will vary according to your construction method

   - sharp knife - to cut wheel lug holes
   - small screwdriver to mount wheel
   - hot glue gun
   - soldering iron, solder with flux, or seperate flux
   - small pliers, side cutters
   - ISP programmer (or use an Arduino as ISP prog) or make - eg LittleWire -> Attiny45 -> 2313?
       ... but still the first chicken & egg programmer!
       6 pin ISP programming cable
   - Multimeter - battery voltage, continuity
   - Note continuity tests - can do with battery, resistor & LED, or Battery & speaker
       eg to get ISP cable connections correct

Usefull Information

  • Connector pin numbers - pin 1 towards SAME end as both ICs! - ie towards power switch & LEDs
  • M2 connector is adjacent to Attiny, M1 adjacent to L293D
  • Power connector - Ground is closest to the corner, 2nd pin is +5v, or 3.7V from battery.
  • Should the power switch be mounted on the BODY instead of the PCB for easy access?
  • Sudden change of light - especially fluorescent can trigger IR LEDs briefly (in the simple shield - no signal decoding!)
  • Wires connected to the motor or the other end on the motor PCB, may need to be swapped to get the correct wheel direction
    • or you can swap these pin definitions in the code!

MAKE A SIMPLE PROCEDURE TO DO THIS!!!!!!


how to test and set the motor directions

If your motor(s) are going in the wrong direction, then just swap the paired IO pin numbers for each motor in the code.

For example change:

  1. define M_LF 2 // Motor Left Front
  2. define M_LB 3 // Motor Left Back

to:

  1. define M_LF 3 // Motor Left Front
  2. define M_LB 2 // Motor Left Back

or change

  1. define M_RF 4 // Motor Right Front
  2. define M_RB 5 // Motor Right Back

to:

  1. define M_RF 5 // Motor Right Front
  2. define M_RB 4 // Motor Right Back

Then compile upload and test!

Suggested improvements for the PCB

  • connector labels there are 4xcon2 & 2xcon6!!!
  • at least for con P2 & P4 - add at least pin 1#!
  • LEDs - names pwr(right), Rx(middle), Tx (left) instead of LED1 etc
  • ICSP - label pin1# (closest to corner) at least
  • add XCJ logo
  • Label +/- on all 3 power connectors
  • Two or four holes on each side of PCB to allow wires to go around motor/gearbox and strengthen the attachment/glue.
  • Also nice would be flatter area to attach motors AND more holes so glue can penetrate and have a stronger bond.

Swarm robot balance

The small Swarm robot balance can be a bit unstable and tip backwards if bumped. Ways to reduce this are to:

  • Mount wheels behind PCB by turning motors around as shown in assembly photos
  • Could also try solder wire to power LED (and/or something at sides of PCB), that extends in front of PCB, and can hold battery to help stability.
  • Mount battery or other weight under front of PCB.

Coding and Programming

  • make sep page??? - need add info on the Attiny core setup, setting fuses,

If your programmer supplies power to the board, then make sure switch is OFF, or battery disconnected BEFORE connecting your programmer, as many programmers also supply power to the system. If your programmer does not supply power then you need to leave battery connected and turned on!

The AtTiny2313 can be programmed from within the Arduino GUI, using an ISP programmer. The photo below shows a just completed upload, that blinks the Rx and Tx lights as well as loading the basic IR seeking motor driver code. Get the latest code from the [XCJ Git] repository.

The AtTiny2313 can also be programmed using an Arduino as an ISP programmer as documented on this page Swarm_robots/ATtiny2313.

The famous LadyAda has instruction on making an ISP programmer using an Attiny2313, but you will need some more parts. http://www.ladyada.net/make/usbtinyisp/ You also still need at least one ISP programmer to program the programmer program! So you need a programmer or at least get your attiny suppled with the ISP programmer code already loaded! ... and then you need at least two AtTiny - on for the programmer and one for the SwarmRobot. but for groups, this might be an effective approach.

Swarm Motor PCB flashing.JPG

.. and yes that sexy black PCB is hard to photograph :)