User Tools

Site Tools


oak:tutorials:levelshift

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
oak:tutorials:levelshift [2016/02/02 22:25]
exeng [Assembly:]
oak:tutorials:levelshift [2016/03/15 22:26]
exeng [Using the Oak Level Shifter:]
Line 1: Line 1:
-**//THIS TUTORIAL HAS NOT YET BEEN REVIEWED, PLEASE DO NOT USE UNTIL IT HAS//** 
  
 ====== Oak Level Shifter Shield Kit Tutorial ====== ====== Oak Level Shifter Shield Kit Tutorial ======
Line 5: Line 4:
 ===== Product Description:​ ===== ===== Product Description:​ =====
  
-The Oak Level Shifter shield provides ​5v to 3.3v level shifting so that you can easily use 5v devices with the Oak. The Oak is a 3.3v device. The classic Arduino Uno is a 5v device.+The Oak Level Shifter shield provides ​5V to 3.3V level shifting so that you can easily use 5V devices with the Oak. The Oak is a 3.3V device. The classic Arduino Uno is a 5V device.
  
- ​**Provides level shifting for:**+ **The Oak Level Shifter Shield ​Provides level shifting for:​** ​  
 +   * 5V I2C connections 
 +   * 5V SPI connections 
 +   * 5V UART connections 
 +   * Up to 3 5V outputs with pinouts optimized for servos 
 +   * 5V output with pinout optimized for a WS2811/2812 LED strip 
 +   * 5V input to the ADC pin
  
- 5V I2C connections 
- 
- 5V SPI connections 
- 
- 5V UART connections 
- 
- Up to 3 5V outputs with pinouts optimized for servos 
- 
- 5V output with a pinout optimized for a WS2811/2812 LED strip 
- 
- 5V input to the ADC pin 
  
 This is an unassembled kit and requires basic soldering skills. This shield is designed for use with the Digistump Oak development board (not included). Make sure all parts listed below have been provided before proceeding. This is an unassembled kit and requires basic soldering skills. This shield is designed for use with the Digistump Oak development board (not included). Make sure all parts listed below have been provided before proceeding.
Line 26: Line 20:
 [[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-1.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-1.jpg}}]] [[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-1.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-1.jpg}}]]
 [[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-2.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-2.jpg}}]] [[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-2.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-2.jpg}}]]
- 
  
 ===== Parts: ===== ===== Parts: =====
Line 32: Line 25:
 ^ Part                        ^ Quantity ​         ^Identification^ ^ Part                        ^ Quantity ​         ^Identification^
 | Oak Level Shifter Shield PCB|1|CC-BY-SA 3.0 digistump.com | | Oak Level Shifter Shield PCB|1|CC-BY-SA 3.0 digistump.com |
-| 1x40pin male 0.1" pitch header| ​7 pins worth| | +| 1x40pin male 0.1" pitch header ​(may be broken in transit)47 pins worth| |
-| 1x25pin male 0.1" pitch header| 25 pins worth| | +
-| 1x15pin male 0.1" pitch header| 15 pins worth| |+
 | 20 Pin DIP IC socket| 1| | | 20 Pin DIP IC socket| 1| |
 | Level Shifter IC| 1| SN74HCT245N| | Level Shifter IC| 1| SN74HCT245N|
Line 57: Line 48:
  
 ** **
-We assume for these assembly instructions that you know the basics of thru-hole soldering. If you don't, please check out the links above. These boards are easy to solder - we promise! This board does has a fair number of parts to solder. ​Because of that, we recommend that you take the time to go through the instructions at least once before starting. Do not rush the assembly. Be sure when placing a part that it is the correct part for the location and in the correct orientation with respect the PCB top, bottom, and required placement before soldering.**+We assume for these assembly instructions that you know the basics of thru-hole soldering. If you don't, please check out the links above. These boards are easy to solder - we promise! This board does has a fair number of parts to solder. ​We recommend that you take the time to go through the instructions at least once before starting. Do not rush the assembly. Be sure when placing a part that it is the correct part for the location and in the correct orientation with respect the PCB top, bottom, and required placement before soldering.**
  
 ===== Tools: ===== ===== Tools: =====
Line 64: Line 55:
  
 ===== Assembly: ===== ===== Assembly: =====
- 
-**Tip:** If you intend to place all the headers on the PCB, the following recommendation will yield the least amount of waste and provide extra header material. This is only true if you receive the headers as shown in the parts list. 
- 
-From the 15 pin header cut one (1) 9 pin header. This will leave one (1) 6 pin header. 
- 
-From the 25 pin header cut one (1) 9 pin header, one (1) 4 pin header and four (4) 3 pin headers. 
- 
-From the 40 pin header cut one (1) 4 pin header and one (1) 3 pin header. 
    
-**Step 1:** If you have not already pre-cut the headers, cut or snap a length of two (2) male headers 9 pins long and one (1) 3 pins long. Insert each 9 pin header into corresponding positions (on the bottom of the board) and solder each pin from the top. These headers connect the Oak Level Shifter to the Oak's female headers. (add reference to Oak tutorial here).+**Step 1:** If you have not already pre-cut the headers, cut or snap a length of two (2) male headers 9 pins long and one (1) 3 pins long. Insert each 9 pin header into corresponding positions (on the bottom of the board) and solder each pin from the top. These headers connect the Oak Level Shifter ​shield ​to the Oak's female headers. (add reference to Oak tutorial here).
  
 [[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-3.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-3.jpg}}]] [[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-3.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-3.jpg}}]]
Line 96: Line 79:
 **Step 3:** Insert the 20 pin DIP IC socket into the PCB making sure to match the orientation of notch on the socket with the notch shown on the PCB top side silkscreen. Installing this correctly will avoid confusion when placing the level shifter IC in the socket. Do not insert the IC at this time. **Step 3:** Insert the 20 pin DIP IC socket into the PCB making sure to match the orientation of notch on the socket with the notch shown on the PCB top side silkscreen. Installing this correctly will avoid confusion when placing the level shifter IC in the socket. Do not insert the IC at this time.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-9.jpg]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-10.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-9.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-9.jpg}}]] 
 +[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-10.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-10.jpg}}]]
  
 Flip the board and solder each pin from the bottom. Flip the board and solder each pin from the bottom.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-11.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-11.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-11.jpg}}]]
  
 **Tip:** You can use something that is about 3/16 of a inch high to keep the outboard section of the PCB from falling away while soldering the IC socket. **Tip:** You can use something that is about 3/16 of a inch high to keep the outboard section of the PCB from falling away while soldering the IC socket.
  
-**Step 4:** Insert the 2N7000 transistors one at a time making sure to match the silkscreen outline shown on the top of the PCB. This will require minimal bending of the BASE lead to match the offset of the BASE (center) thru-hole. Solder the leads from the bottom of the board. Remove (cut) any excess using a flush cut wire cutter.+**Step 4:** Insert the 2N7000 transistors one at a time making sure to match the silkscreen outline shown on the top of the PCB. This will require minimal bending of the GATE lead to match the offset of the GATE (center) thru-hole. Solder the leads from the bottom of the board. Remove (cut) any excess using a flush cut wire cutter.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-12.jpg]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-13.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-12.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-12.jpg}}]] 
 +[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-13.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-13.jpg}}]]
  
 Note the position and orientation of transistor on PCB. Note the position and orientation of transistor on PCB.
Line 112: Line 97:
 **Tip:** Once you have inserted the transistor leads into the thru-hole, you can gently push the transistor down until you feel some resistance. The bottom of the transistor will sit approximately 1/8 inch above the PCB. While holding it in place, flip the board and slightly bend each of the leads in opposing directions to help hold the transistor in place for soldering. **Tip:** Once you have inserted the transistor leads into the thru-hole, you can gently push the transistor down until you feel some resistance. The bottom of the transistor will sit approximately 1/8 inch above the PCB. While holding it in place, flip the board and slightly bend each of the leads in opposing directions to help hold the transistor in place for soldering.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-14.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-14.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-14.jpg}}]]
 Transistor installation completed. Transistor installation completed.
  
 **Step 5:** Insert each resistor one at a time making sure to match the resistor value indicated by the PCB silkscreen. If there is any doubt as to the value of a resistor due to a less than visible band marking (it happens) you can and should test the resistor value with an Ohm meter to be certain. Insert from the top of the board and solder from the bottom of the PCB. Cut any remaining excess lead wire. There are 10 resistors total spanning 5 different values. Take you time here and again be sure that the resistor value you are placing matches the PCB silkscreen. **Step 5:** Insert each resistor one at a time making sure to match the resistor value indicated by the PCB silkscreen. If there is any doubt as to the value of a resistor due to a less than visible band marking (it happens) you can and should test the resistor value with an Ohm meter to be certain. Insert from the top of the board and solder from the bottom of the PCB. Cut any remaining excess lead wire. There are 10 resistors total spanning 5 different values. Take you time here and again be sure that the resistor value you are placing matches the PCB silkscreen.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-15.jpg]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-16.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-15.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-15.jpg}}]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-16.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-16.jpg}}]]
  
 **Step 6:** Insert the 3 pin 3.5mm Pitch Screw Terminal into the 3 pin terminal position as shown on the PCB top side silkscreen. Make sure that the wire terminals are facing out. Solder the leads from the bottom. Solder the center pin, check alignment, correct as needed, then solder the remaining pins. **Step 6:** Insert the 3 pin 3.5mm Pitch Screw Terminal into the 3 pin terminal position as shown on the PCB top side silkscreen. Make sure that the wire terminals are facing out. Solder the leads from the bottom. Solder the center pin, check alignment, correct as needed, then solder the remaining pins.
Line 123: Line 108:
 Insert the 2 pin 3.5mm Pitch Screw Terminal into the 2 pin terminal position as shown on the PCB top side silkscreen. Make sure that the wire terminals are facing out. Solder the leads from the bottom one at a time checking alignment after the first pin is soldered. Insert the 2 pin 3.5mm Pitch Screw Terminal into the 2 pin terminal position as shown on the PCB top side silkscreen. Make sure that the wire terminals are facing out. Solder the leads from the bottom one at a time checking alignment after the first pin is soldered.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-17.jpg]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-18.jpg]]+ 
 +[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-17.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-17.jpg}}]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-18.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-18.jpg}}]]
 Terminal installation completed. Terminal installation completed.
  
 **Almost done:** At this point you are almost done and only need install the remaining top side headers and level shifter IC. Depending on the intended use for the Oak Level Shifter you may want to install all, some or none of the top side headers. **Almost done:** At this point you are almost done and only need install the remaining top side headers and level shifter IC. Depending on the intended use for the Oak Level Shifter you may want to install all, some or none of the top side headers.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-19.jpg]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-20.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-19.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-19.jpg}}]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-20.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-20.jpg}}]]
 Note topside placement of headers as indicated by the SPI 6 pin header. Note topside placement of headers as indicated by the SPI 6 pin header.
  
-**Step ​8:** From the remaining male headers if you have not already cut them to size, cut or snap the sizes that you intend to install. If you plan to install all of the top side headers this will require that you have one (1) 6 pin header (SPI), four (4) 3 pin headers (3 SERVO and 1 ADC), two (2) 4 pin headers (1 UART and 1 I2C). The short lead for each header should be inserted through the top of the PCB and soldered from the bottom. Again, solder one pin first, let the solder dry, check alignment, correct as needed, then solder the remaining pins. +**Step ​7:** From the remaining male headers if you have not already cut them to size, cut or snap the sizes that you intend to install. If you plan to install all of the top side headers this will require that you have one (1) 6 pin header (SPI), four (4) 3 pin headers (3 SERVO and 1 ADC), two (2) 4 pin headers (1 UART and 1 I2C). The short lead for each header should be inserted through the top of the PCB and soldered from the bottom. Again, solder one pin first, let the solder dry, check alignment, correct as needed, then solder the remaining pins.  
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-21.jpg]]+[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-21.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-21.jpg}}]]
 Topside header installation completed. Topside header installation completed.
  
-**Step ​9:** Carefully insert the level shifter IC making sure to match the notch orientation on the chip with the notch on the IC socket. You may have to gently bend the IC leads (as a group) to align them with the IC socket. This can be done by laying the IC on it's side and gently bending the leads as a group so that there are perpendicular to the case. Be carefully not to over bend the leads and make sure that all leads are properly aligned with the socket before inserting IC. Gently push the IC into the socket.+**Step ​8:** Carefully insert the level shifter IC making sure to match the notch orientation on the chip with the notch on the IC socket. You may have to gently bend the IC leads (as a group) to align them with the IC socket. This can be done by laying the IC on it's side and gently bending the leads as a group so that there are perpendicular to the case. Be carefully not to over bend the leads and make sure that all leads are properly aligned with the socket before inserting IC. Gently push the IC into the socket.
  
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-22.jpg]] +[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-22.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-22.jpg}}]][[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-23.jpg|{{https://​s3.amazonaws.com/​digispark/​images/​t/​oak-level-shifter-shield-23.jpg}}]]
-[[https://​s3.amazonaws.com/​digispark/​images/​m/​oak-level-shifter-shield-23.jpg]]+
 Level Shifter with IC installed. Level Shifter with IC installed.
  
Line 146: Line 132:
 ===== Using the Oak Level Shifter: ===== ===== Using the Oak Level Shifter: =====
  
-//**Power Distribution: ​(Needs to be reviewed by Digistump, do not assume this is correct)**//+//**Power Distribution:​ **//
  
 When using the Oak Level Shifter shield you must power the Oak via the USB power input at 5V or use another 5V source connected to the VIN and GND on the 2 pin screw terminal of the level shifter shield. Make sure that you observe the correct polarity when using the screw terminal. When using the Oak Level Shifter shield you must power the Oak via the USB power input at 5V or use another 5V source connected to the VIN and GND on the 2 pin screw terminal of the level shifter shield. Make sure that you observe the correct polarity when using the screw terminal.
Line 154: Line 140:
 Whatever voltage is supplied to the Oak Level Shifter shield VIN is distributed (directly connected) to each of the Level Shifter shield pins labeled 5V. As such, all external devices connected to pins labeled 5V will receive the actual VIN supply voltage. Whatever voltage is supplied to the Oak Level Shifter shield VIN is distributed (directly connected) to each of the Level Shifter shield pins labeled 5V. As such, all external devices connected to pins labeled 5V will receive the actual VIN supply voltage.
  
-Oak regulates VIN supplied at either of the Oak's VIN pins for use by Oak, but will pass through VIN supplied at the Oak's VIN 4.5-12V tolerant pin to the Oak Level Shifter shield VIN pin. Therefore, the Oak's VIN pin if used to supply voltage to the Oak (not recommended when using the Oak Level Shifter shield) should be limited to recommended ratings for level shifter IC (5V). +Oak regulates VIN supplied at either of the Oak's VIN pins for use by Oak, but will pass through VIN supplied at the Oak's VIN 4.5-12V tolerant pin to the Oak Level Shifter shield VIN pin. Therefore, the Oak's VIN pin if used to supply voltage to the Oak (not recommended when using the Oak Level Shifter shield) should be limited to recommended ratings for level shifter IC (5V).
  
 +//**Pinout Correction for the P1 Servo Header:**//
  
 +The pins labeled GND and P1 for the center servo header on the level shifter are reversed. GND is actually P1 and P1 is actually GND. This only applies to the servo header that uses P1 for signal output.
 +[TODO: Add photo indicating the corrected pin layout for this servo header]
 +[[oak-level-shifter-shield-24.jpg|{{oak-level-shifter-shield-24.jpg}}]]
  
 +//** Using with bi-directional sensors: **//
  
 +Since the level shifter IC used on this level shifter is not an automatic bi-directional level shifter, if you  you wish to use bi-directional sensors such as the popular OneWire DS18B20, you will need to use the I2C pins on the shield. SDA is P0 on the Oak, and SCL is P2. 
oak/tutorials/levelshift.txt · Last modified: 2016/03/21 16:17 by digistump