BotShop Manual

Week 1: Electrical Assembly

PolyBot Board Assembly

Polybot Board

:botshop_manual:polybotboard2.jpg

:botshop_manual:board_layout.jpg

Procedure

Before you start: The following instructions will help you assemble the board and perform incremental tests. Use these instructions as a checklist as you install each component.

Step 1: IC Sockets and Headers

:botshop_manual:pcb_with_headers_and_ic_sockets_numbered.jpg

:botshop_manual:femal_header_installation.jpg

When installing headers, make sure they are attached at a right angle to the circuit board (when soldering the female headers, use the male headers to keep them aligned as illustrated above). The male headers need to be cut as they come attached in one row.

Solder in the following components:

1. All the IC sockets. Make sure the notch on end of the socket matches the notch printed on the circuit board. Make sure you install sockets in the correct locations – removal is very difficult. If you accidently install a socket with the notch in the wrong location do not attempt to remove the socket. The knotch is there to let you know what way the IC plugs into the socket. Just make sure the notch on the board and the notch on the IC line up when you install the IC. NOTE: Do not install any chips in the sockets at this point.

2. JP_SRV and JP_MTR headers. Each is a 2×2 male header.

3. JP_BL header. This is a 1×2 male header.

4. JP_PWR header. This is a 1×3 male header.

5. Relay header. This is a 1×2 male header.

6. A_INPUT headers. These are 1×10 female headers. NOTE: Make sure the 3 headers are aligned because you will be connecting sensors perpendicular to the connectors. Use the 2x male headers to keep the connectors aligned as you solder them. It is very important to keep the connectors aligned. Please see above illustration.

7. D_INPUT headers. These are 1×8 female headers. NOTE: Make sure the 3 headers are aligned as you did for the A_INPUT headers.

8. Servo headers. These are four 2×3 male headers.

9. SPI and CON1 headers. These are 1×4 female headers.

10. LCD connector. This is a 1×16 female header. Try to keep this connector as close to perpendicular to the PCB as possible since the LCD plugs into this connector.

Step 2: Power Supply

:botshop_manual:pcb_with_power_components_numbered_correctly.jpg

Note: IC Sockets and Headers are removed in picture for clarity.

Solder in the following components:

1. Red PWR LED. The longer leg goes into the hole closer to the center of the board.

2. R_PWR resistor. This is a 330 Ohm resistor (orange-orange-brown).

3. F1 Fuse, 1N5401 diode (silver band faces up), 7805 voltage regulator, and the 1uH inductor (looks like a fat resistor).

4. C15. This capacitor is polarized. Make sure the arrows point towards the F1 fuse.

5. The power jack.

The board should now look like this:

:botshop_manual:pcb_with_headers_ic_sockets_and_power_supply_correct.jpg

Install a jumper across the upper 2 pins of JP_PWR.

Note: Please read “Powering the PolyBot Board” section towards the end of this manual.

You are now ready to apply power to the board. Apply 7.2V (6xAA rechargeable batteries –- not alkaline) to the power jack. The Red power LED should turn on and stay lit. Leave the power connected for a minute or so; the LED should stay lit during this time. If power and ground are shorted, the LED should turn off while power is connected. Remove power and the Red LED should fade off. If the LED turns off immediately, check the C15 capacitor (470uF).

Step 3: Assemble the download board

:botshop_manual:usb_assembled_numbered.jpg

Solder in the following components:

1. Green (TX) LED to the download board. The longer leg of the LED goes into the left hole (the hole towards the 1K resistor).

2. 330 Ohm resistor (orange-orange-brown) and 1K resistor (brown-black-red).

3. 3 capacitors: .01uF (103), .01uF (103) (These are not polarized.), and 10uF (This one is polarized. Make sure the white stripe is pointed towards the edge of the board.) NOTE: The .1 uF and .01uF caps look exactly the same, except the .01uF cap has the number 103 printed on it and the .1uF has 104 printed on it.

Step 4: Downloading to the ATMega32

:botshop_manual:lcd_with_header.jpg

:botshop_manual:pcb_with_downloading_components_numbered_1.jpg

Note: Components from previous steps are not show in picture for clarity. The LCD and microcontroller are not shown as well.

Solder in the following components:

1. 1×16 male headers to the LCD display, make sure to mount the headers on the bottom of the LCD board. Install the JP_BL jumper.

2. Reset resistor (47K, yellow-purple-orange), R_RELAY resistor (1K, brown-black-red), R_BL resistor (10 ohm, brown-black-black), and R_LED resistor (330, orange-orange-brown).

3. RJ-45 jack.

4. 16 Mhz crystal This component is sensative to heat and needs to be spaced approximately 1/8 inch off of the board. This can be achieved by inserting it 1/8 inch off of the board and bending the leads on the back so that it hangs 1/8 inch when you turn the board over to solder it.

5. 22pF capacitors

6. C11 capacitor (0.1uF #104).

7. SW1 and RST switch, make sure the switches are pushed down flat against the board.

8. Green LED, The longer leg goes in the hole closer to the center of the board.

9. Install the ATMega32 microcontroller. Note the orientation of the chip.

10. Install the LCD display.

11. Install the a jumper to the male header labled JP_BL located in the far upper right of the board. This jumper turns on the backlight on the LCD.

Step 5: Download Basic Test Program

  1. Connect the PolyBot board and download board with an ethernet cable. Apply power to the PolyBot board.
  2. Connect the cable to the download board and to the USB port of the computer.
  3. Make sure the COM port is set to 57600 baud.
  4. if you get, “avrdude: ser_open(): can't open device “COM12”: The system cannot find the file specified.” Set your COM port to a low number (e.g. COM2) you can change it manually through “device manager”
  5. Hold down the SW1 button while pressing and releasing the RST. The green LED should turn on. The board is now ready to accept a program download.
  6. Open a command line terminal and type:
    cd c:\polybot
    make download

The board should reset and display the message 'PolyBot Board'. If you have problems see the troubleshooting section or ask for help from one of the instructors.

Step 6: Install remaining components

:botshop_manual:pcb_final_components_numbered_correctly.jpg

Note: Components from previous steps are not show in picture for clarity.

First: Remove the LCD.

Solder in the following components:

1. D1 diode. The silver band point toward the right side.

2. C14 (.01uF #103 capacitor).

3. UPDATE: In order to use the SHARP IR range finding sensor, you must only install the D_INPUT resistor network, and leave out the A_INPUT resistor network The side with the gray dot should point toward the center of board.

4. Knob potentiometer.

5. T1 transistor.

6. Three motor wire clamps. Make sure the sides with square holes are facing away from the center of the board.

7. C3, C7, C8, C9, C10, C12, C13 (all 0.1uF, #104 capacitors).

:botshop_manual:pcb_assembled_ics_numbered.jpg

Note: You may need to bend the ICs' leads inward in order to insert them into the sockets. A good way to do this is to hold the IC with both hands so that the leads on one side are flat against a table. Then carefully rotate the IC so that it bends the leads in contact with the table inward. Do not force the ICs into the sockets. They should slide in with minimal pressure.

Note: Make sure the ICs are inserted in the correct orientation. The notch on the IC should match up with the notches on the sockets and the white notches printed on the board.

8. Install both SN75441ONE ICs.

9. Install both MC74HC374 ICs.

10. Install SN74HC244N IC.

11. Install MC74HC04N IC.

12. Install CD4051BCN IC,

13. Reinstall the LCD.

Your PolyBot board is now complete! Make sure to test all inputs and outputs for functionality.

:botshop_manual:finished_boards.jpg

Important Information About the Polybot Board

Powering the PolyBot Board

Main power is applied to the PolyBot board through the DC power jack located on the lower right portion of the board. The center plug is the positive terminal. The voltage sent here is used to power the microcontroller, LCD, and support chips.

The board may be operated in one of 2 modes determined by the JP_PWR jumper. If the top 2 pins of JP_PWR are shorted, then the voltage sent on the DC power jack is regulated to +5V. Use this setting if you intend to use a battery with a voltage greater than 7V.

The other mode for JP_PWR is enabled when the lower 2 pins are shorted. In this setting the voltage applied to the DC power jack is directly connected to the microcontroller, LCD, and support chips. Use this setting only if your battery voltage is between 4.5V and 5.5V. This setting is optimal for use with 4 AA rechargeable batteries (4 x 1.2V). If you plan to also use an AC wall adapter with this jumper setting, make sure you use one which is a regulated type (like a Jameco 319986PS).

Stay under 5.5V: When sending the battery voltage directly to the board components, be careful not to apply more than 5.5V. Doing so will burn out a number of components on the board!

Using separate servo and motor batteries

The PolyBot board has jumpers that allow running the microcontroller at one voltage and the servos/motors at a different voltage. When these jumpers are connected, the voltage applied to the DC power jack is used to power the motors and the servos.

Removing both the JP_MTR jumpers allows a different voltage to be applied to the DC motors. There are 2 jumpers to handle more current. Once the jumpers have been removed, the motor power can be connected to the 2 right inputs of the screw terminal block located just right of the RJ-45 jack. Motor power should be between 5V and 36V.

Removing both the JP_SRV jumpers allows a different voltage to be applied to the servos. There are 2 jumpers to handle more current. Once the jumpers have been removed, the servo power can be connected to the 2 left inputs of the screw terminal block located just right of the RJ-45 jack. Servo power should be between 5V and 6V.

With all jumpers removed (JP_MTR and JP_SRV), you may run the motors, servos, and board logic at 3 different voltages.

If you plan to use a different voltage for the motors or servos than the voltage for the logic, then make sure the appropriate jumpers are removed.

Downloading a program to the PolyBot board

Before a program can be downloaded, the PolyBot board needs to be in download mode. Enter download mode by holding down SW1 while pressing and releasing RST. The green LED should turn on indicating download mode.

After you have compiled a program into a .hex file, use the 'avrdude' program to download the .hex file into the flash memory. For example, if you wanted to download a file 'test.hex' using com3, then use the following command:

avrdude -pm32 -Pcom3 -cbutterfly -b57600 -u -U flash:w:test.hex

If you have the default Makefile, you can just type 'make download'.

Over-current and reverse polarity protection

The PolyBot board comes with a resettable fuse. This fuse is rated at 1.85A. If the current drawn by the board exceeds this rating the fuse will trip. If this occurs, you will need to remove power from the board and then reconnect power. If your application requires greater current, you can substitute the fuse with one with a higher current rating.

The fuse will also trip if power is applied to the board with reverse polarity. If this occurs, again you will need to remove power and then reconnect with the correct polarity.

One thing to note is that when the fuse does trip, the fuse itself becomes very hot and stays hot until power is removed. When the fuse is operating normally, it is only warm to the touch.

The external motor and servo power inputs are not run through this fuse. There is no protection on either of those inputs.

Analog and digital inputs

The analog and digital inputs accept .1” spacing headers. Next to each input is a +5V and ground header port. You can make sensor connectors with 4 male header pins. Cut one of the pins and the header will plug into the input.

The digital inputs already have pull up resistors to 5V. Note: a pull up resistor ensures the port stays at 5V when nothing is connected. Similarly a pull down resistor ensures the port stays at 0V when nothing is connected.

DC motor outputs

On the board are two 754410 chips which provide a total of four 1-amp DC motor outputs. If you have a motor that needs more current, you can bridge 2 or more outputs for more of current. Just connect the corresponding outputs pins together to drive the motors. You must ensure that your software drives the motor outputs correctly, otherwise you will short power and ground.

DC motors generate a lot of electrical noise and one way to reduce this is to place capacitors across the motor terminals as close as possible to the motor itself. Do this if you find that operating DC motors affects the operation of the board.

Servo output ports

There are 8 servo output ports which can be used to control standard hobby servos. The 3 pins for each connector are the servo signal(yellow or white), power (red), and ground (black). If the servo jumpers are in place, the voltage sent to the servos is the voltage on the power jack.

Relay/solenoid output port

A relay or solenoid can be controlled using the 2-pin relay/solenoid port. Connect these pins to the coil of a relay or solenoid. The relay/solenoid port uses a 2n3904 to supply up to 200mA of current to activate a relay or solenoid.

If you find that you need more current than 200mA, you may substitute the 2n3904 transistor with one that supplies more current (for example, a 2n6427). 1000mA is the recommended maximum current to run through this output port.

PolyBot Troubleshooting

If you are having problems with downloading to the board and/or running the test program: These steps don't need to be followed in order and are not comprehensive.

  • Ensure that there is enough power going to the board (ie. the batteries aren't dead)
  • Inspect all the solder joints on the bottom to ensure good connections. If wiggling the component effects the operation of the board, the solder joints are probably bad. Heat them with the soldering iron to allow the solder to reflow. Also remove any flux residue from the solder joints. Flux looks like a glossy clear substance covering the joints and can be removed by simply scraping it with a small screw driver or other pointed object. The flux is corrosive and can be conductive.
  • Try removing all of the IC's (except the Microcontroller)on the board and trying to program the board again (The demo program doesn't require any of the IC's to be installed in order to work, except for the ATMEL microcontroller). If this works, then one of the IC's are probably burnt out and needs to be replaced. Replace the IC's one at a time to determine which one is burnt out.
  • Try another ATMEGA32 chip. If that works, then your chip is probably burnt out. If the new one still doesn't work, check the crystal and try replacing that.
  • Try re downloading the boot loader and setting the fuses. To do this, you need to find someone with an ICSP (In-Circuit Serial Programmer) to program it. This is a parallel port programmer and uses the avrdude programmer ID stk200.
 
Backlinks to: [[Week 1: Electrical Assembly]] · botshop_manual/week_1.txt · Last modified: 2009/05/12 19:39 by Elliot Tham
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki