Difference between revisions of "PG31 GPS RS232 Dev Board"

From OpenCircuits
Jump to navigation Jump to search
 
Line 7: Line 7:
  
 
In this project we demonstrate how to:
 
In this project we demonstrate how to:
 +
*Setup an external power supply
 
*Setup 3.3V to RS232 circuit
 
*Setup 3.3V to RS232 circuit
*Setup an external power supply
 
 
*Simple PG31 GPS footprint
 
*Simple PG31 GPS footprint
  
Line 15: Line 15:
 
[[Image:PG31-PowerSupply.jpg|PG31 Power Supply]]
 
[[Image:PG31-PowerSupply.jpg|PG31 Power Supply]]
  
And here is the schematic:
+
Please note this is a relatively compact SMD version of the power supply. This can easily be obtained with through-hole components using a breadboard. Here is the schematic:
  
 
[[Image:PG31-PowerSupply-Schematic.jpg]]
 
[[Image:PG31-PowerSupply-Schematic.jpg]]
Line 33: Line 33:
 
So we've got a nice clean output of 3.3V from the regulator, let's look at the RS232 connection:
 
So we've got a nice clean output of 3.3V from the regulator, let's look at the RS232 connection:
  
 +
[[Image:PG31-SerialConnection.jpg|PG31 Serial Connection]]
 +
 +
This shows the DB9 connector(also known as a D-Sub 9-pin connector), serial cable, and MAX3232 IC and charge pump caps (all SMD, again, can be done with PTH components). Here is the schematic:
 +
 +
[[Image:PG31-SerialConnection-Schematic.jpg]]
 +
 +
Now read-up on the MAX232 IC. It could be the most common IC out there, at least for the embdded world. This IC will have many different model names (ICL232 for example) but all do the same thing, and will most likely have identical pin-outs. This IC is used to take low voltage signals from your micro or PIC or ARM or whatever, and converts those low-voltage signals to higher-voltage signals that the computer can understand. The voltage levels on TTL are also inverted for RS232 so the MAX232 takes care of that as well!
 +
 +
The MAX232 takes in TTL signals and sends out RS232 signals. It also takes the RS232 signals from the computer and outputs TTL signals to whatever microcontroller you are using. How does it do this magic? With charge pump capacitors. You'll notice four 0.1uF caps attached to the MAX3232. If you're reading closely, you'll also notice we have a MAX3232 not the MAX232. Difference:
 +
*MAX232 must be powered with 5V and converts 5V TTL<->RS232
 +
*MAX3232 can be powered from 3V to 5V and converts it to RS232
 +
 +
So in this application, the GPS unit is running at 3.3V. If we were to send 5V TTL to it, it would be damaged! So we must use the lower voltage MAX3232 part. No big deal, it's functionally identical to the MAX232. From here on out, I will only refer to the MAX232.
 +
 +
When you first view the MAX232 component, it can be a bit confusing. The pins label T1/T2 are the transmit channels (MAX232 has 2 TX channels and 2 RX channels). T1In/T2In will take *in* TTL and send *out* RS232 out T1Out/T2Out. So for our purposes, we need to connect the GPS unit's serial TX pin to the T1In pin of the MAX232. So when the GPS unit outputs some 3.3V TTL signals, these signals will be converted into RS232 and sent to the computer (TX1Out is connected to pin 2 on the DB9 connector).
 +
 +
Finally, when the computer needs to send info to the GPS unit, it will send RS232 signals down the serial cable, on pin 3 to R1In of the MAX232. This RS232 signal will be converter to TTL and sent out the R1Out pin. This TTL signal is connected to the RX pin on the GPS unit. Viola.
  
 +
I can't tell you how many times I've crossed TX and RX on different projects. Sit down, think about it, and once you've got it wired correctly, cut and paste into future projects.
  
 
<b>Documents:</b><br>
 
<b>Documents:</b><br>

Revision as of 13:45, 31 January 2006

PG31 RS232 Dev Board

Description:
Getting information from your project to your computer can be difficult at first. Once you discover how to setup an RS232 connection, it's really just cut-and-paste for future projects.

In this project we demonstrate how to:

  • Setup an external power supply
  • Setup 3.3V to RS232 circuit
  • Simple PG31 GPS footprint

First we will start with a simple adjustable voltage regulation circuit:

PG31 Power Supply

Please note this is a relatively compact SMD version of the power supply. This can easily be obtained with through-hole components using a breadboard. Here is the schematic:

PG31-PowerSupply-Schematic.jpg

Now let's discuss what's going on here. The barrel jack (J1) is a basic 5.5mm OD 2.1mm ID type jack. We get an unregulated 9-13V out of the wall wart.

The D3 large diode MBRA140 is for reverse protection. It can handle up to 1A and prevents damage to the board if a center-negative wallwart is attached. This diode will cause a ~0.5V drop from whatever the wall-wart is outputting.

C2 (10uF Tantalum Capacitor in this case) is a basic decoupling cap. 10-100uF is adequate but should be rated for 15-25V.

U1 is the LM317 (or LM1117 in SMD form) adjustable voltage regulator. It will take in some larger voltage and output a set voltage. The output voltage is set with two external resistors. R1 is historically 240 and value for R2 is different for different required output voltages. In our case, we want 3.3V out of the regulator, so R2 is set to 715. The LM317 is good because it is variable, the SOT-223 package is nice becuase it can take a relatively large voltage on the input (25V max I believe?) and has decent heat dissapation.

C1 and C3 are decoupling caps that help clean up the output transcients and noise.

J2 is just a two pin polarized header so that you can either 'steal' 3.3V from the board to power other boards, or have other boards power this board without the need for the external wall wart.

So we've got a nice clean output of 3.3V from the regulator, let's look at the RS232 connection:

PG31 Serial Connection

This shows the DB9 connector(also known as a D-Sub 9-pin connector), serial cable, and MAX3232 IC and charge pump caps (all SMD, again, can be done with PTH components). Here is the schematic:

PG31-SerialConnection-Schematic.jpg

Now read-up on the MAX232 IC. It could be the most common IC out there, at least for the embdded world. This IC will have many different model names (ICL232 for example) but all do the same thing, and will most likely have identical pin-outs. This IC is used to take low voltage signals from your micro or PIC or ARM or whatever, and converts those low-voltage signals to higher-voltage signals that the computer can understand. The voltage levels on TTL are also inverted for RS232 so the MAX232 takes care of that as well!

The MAX232 takes in TTL signals and sends out RS232 signals. It also takes the RS232 signals from the computer and outputs TTL signals to whatever microcontroller you are using. How does it do this magic? With charge pump capacitors. You'll notice four 0.1uF caps attached to the MAX3232. If you're reading closely, you'll also notice we have a MAX3232 not the MAX232. Difference:

  • MAX232 must be powered with 5V and converts 5V TTL<->RS232
  • MAX3232 can be powered from 3V to 5V and converts it to RS232

So in this application, the GPS unit is running at 3.3V. If we were to send 5V TTL to it, it would be damaged! So we must use the lower voltage MAX3232 part. No big deal, it's functionally identical to the MAX232. From here on out, I will only refer to the MAX232.

When you first view the MAX232 component, it can be a bit confusing. The pins label T1/T2 are the transmit channels (MAX232 has 2 TX channels and 2 RX channels). T1In/T2In will take *in* TTL and send *out* RS232 out T1Out/T2Out. So for our purposes, we need to connect the GPS unit's serial TX pin to the T1In pin of the MAX232. So when the GPS unit outputs some 3.3V TTL signals, these signals will be converted into RS232 and sent to the computer (TX1Out is connected to pin 2 on the DB9 connector).

Finally, when the computer needs to send info to the GPS unit, it will send RS232 signals down the serial cable, on pin 3 to R1In of the MAX232. This RS232 signal will be converter to TTL and sent out the R1Out pin. This TTL signal is connected to the RX pin on the GPS unit. Viola.

I can't tell you how many times I've crossed TX and RX on different projects. Sit down, think about it, and once you've got it wired correctly, cut and paste into future projects.

Documents:
PG31-RS232 Schematic


Footprints:
SFE Footprint Library

FP Name: 5-LEAD DD PAK

5-LEAD DD-Pak.jpg

Manufacturer Info:
Linear part # :
LT1528CQ (5-DD SMD Package)
LT1528CT (TO-220-5 PTH Package)

Supplier Info:
Digikey part # : LT1528CQ-ND
Single Piece Price : $7.13

Related Items:
GM862 Cellular Module
GM862 SMD Connector

Original Creator: --Sparkfun 22:18, 25 January 2006 (PST)