RoboCup: Reflow Soldering Oven

From RoboJackets Wiki
Revision as of 21:23, 5 December 2014 by JonJones (talk | contribs)
Jump to navigation Jump to search

Project Summary

Introductory Concepts

Arduino Capabilities
The arduino brought electronics to the hacking population. It has been credited as the device that started the DIY project boom. The device allows one to easily interface with Atmel's ATmega328 microcontroller (some arduinos are based upon other chips that provide different capabilities). The rest of the board consists of power regulation (5V and 3.3V), an FTDI for serial communication over USB, connection headers (make it easy to use with a breadboard), and a clocking crystal. It actually is not too much of a challenge to integrate all of an arduino's parts to the reflow oven's circuit board.

Pins:
There are many types of arduinos, and each one has advantages and disadvantages from the others. The standard models of the Arduino UNO and Arduino Nano will be discussed for this project. It is very easy to search Google for a diagram showing what the connection pins are attached to on the board. Additionally, the ATmega IC chips have datasheets if you are interested in the IC's pin diagram. Below are the basic pinnouts for each arduino. Notice that some pins are able to do multiple things.

UNO : http://goo.gl/NW93MP
: 6 analog I/O pins - [pins A0 - A5]
: 14 digital I/O pins - [pins 0 - 13]
: Rx and Tx - [pins 0 and 1 respectively]
: 6 Pulse Wave Modulation (PWM - allows for simulated analog output by turning the signal on and off really fast) pin - [pins 3, 5, 6, 9, 10, 11]
: SPI interface - [pins 11, 12, 13]
: I2C interface - [pins A4, A5]
: 3.3 Volt and 5 Volt power

Nano : http://goo.gl/qtWSuh
: 8 analog I/O pins - [pins A0 - A7]
: 14 digital I/O pins
: Rx and Tx
: 6 Pulse Wave Modulation (PWM - allows for simulated analog output by turning the signal on and off really fast) pin - [pins D3, D5, D6, D9, D10, D11]
: SPI interface - [pins D10, D11, D12, D13]
: I2C interface - [pins D4, D5]
: 3.3 Volt and 5 Volt power

The nice thing about working with microcontrollers is that some pin functionality can be synthesized by other pins using code. For example, the SoftwareSerial library (http://arduino.cc/en/Reference/softwareSerial) can synthesize Tx and Rx pins on pins other then 0 and 1.

Communication Protocols

SPI:
SPI is the fastest of these three protocols. It requires 4 wires which makes it more cumbersome to implement in large circuits, however, due to the size of this project, SPI shouldn't be an issue. SPI allows for direct two way communication between the Master device (such as an arduino) and the Slave device (such as a display or sensor).

Here are the four signals (From wikipedia): 
SCLK : Serial Clock (output from master).
MOSI : Master Output, Slave Input (output from master).
MISO : Master Input, Slave Output (output from slave).
SS : Slave Select (active low, output from master).

A nice visual representation of this setup can be found here: http://goo.gl/Yv06RM

I2C:
I2C (Pronounced I-Squared-C or I-Two-C) Is one of the slower communication methods however it requires only two signal pins to implement and any new devices can be added to any location along the system. This makes it extremely useful for large circuits (like motherboards) because it keeps things clean and simple. The difference between I2C and SPI is that I2C does not support simultaneous two way communication.

The system works with two wires that all devices are connected to (the master and all the slave devices). 
SDA : Line of communication between master/slave and slave/master.
SCL : Clocking signal (from the master)

Here is a good visual representation: http://goo.gl/UUdTko

One very important point to note about I2C is that the SDA and SCL pins must both be "Pulled up" to Vcc with pull up resistors. The reason for this is tricky, and it is why I2C is able to do what it does. A quick google search should help you understand exactly why this is or if you would prefer, talk to myself or Keenan and we will go into it in more detail.

The master device sends out an address over the SDA signal wire corresponding to the target slave device. I2C slave devices are coded with an address that should be specified in its datasheet. All devices on the I2C chain receive the address and the device whose address was called responds to let the master device know that it is listening. Then communication can occur between the master and slave over the SDA signal wire in one direction at a time. Again, all the devices receive data from the master but only the device whose address was called listens.

This system is sort of like a group of people standing in a room. The leader (the master device) calls out the name of his or her assistant and then they communicate openly with each other. Everyone in the room can hear the conversation but only the leader and the assistant are engaging in conversation because it is understood who is being addressed.

Serial:
Serial communication is one of the easiest to understand from a wiring standpoint and it is widely used with arduino projects because of the supporting libraries for the arduino. The difference between this form of communication and the others is that it does not make use of a clocking pin. The baud rate, or the clocking speed for the serial connection, must be specified and each device handles clocking independently. On each device, Rx and Tx pins are present. Data is transmitted from Tx on one device to the Rx on another. This allows for two way communication between only two devices. To communicate with additional devices, new com ports must be implemented (either through hardware or software. See http://arduino.cc/en/Reference/softwareSerial) or the appropriate com ports must be reconnected.

Tx : Transmit pin 
Rx : Receive pin

To wire up a serial connection, connect the Rx of one device to the Tx of the other and vice versa. Here is a diagram of the basic process: http://goo.gl/R0G53Z

Miscellaneous Acronyms

PCB : Printed Circuit Board.
IC : Integrated circuit. Basically a fancy packaged circuit, often to complex to recreate on a custom PCB, that can be easily implemented.
PWM : Pulse Wave Modulation. Signal pins that support PWM have the ability to switch between high and low (on and off) at very high speeds. This allows them to synthesize a fake analog output.

Parts

http://www.adafruit.com/products/1770