User Tools

Site Tools


oak:tutorials:levelshift

Oak Level Shifter Shield Kit Tutorial

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 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

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. Note: The actual configuration of the headers provided may not match the parts list below but there should be more than enough header pins to complete assembly with some extra pins provided.

oak-level-shifter-shield-1.jpg oak-level-shifter-shield-2.jpg

Parts:

Part Quantity Identification
Oak Level Shifter Shield PCB1CC-BY-SA 3.0 digistump.com
1x40pin male 0.1“ pitch header (may be broken in transit) 47 pins worth
20 Pin DIP IC socket 1
Level Shifter IC 1 SN74HCT245N
N-Channel Enhancement Mode Field Effect Transistors 2 2N7000
100 Ohm resistor 1 Brown-Black-Brown
1K Ohm resistors 2 Brown-Black-Red
2K Ohm resistors 2 Red-Black-Red
10K Ohm resistors 4 Brown-Black-Orange
150K Ohm resistor 1 Brown-Green-Yellow
3.5mm Pitch Screw Terminal - 2 Pin 1 2 Pins
3.5mm Pitch Screw Terminal - 3 Pin 1 3 Pins

Resistor Values: For more information on how to identify the value of the resistors, we recommend these sites: A nice simple resistor calculator: http://www.ealnet.com/m-eal/resistor/resistor.htm A comprehensive article on identification: http://www.diyaudioandvideo.com/Electronics/Color/

Soldering: If you are new to soldering we recommend the following tutorials: Soldering Basics (http://www.sparkfun.com/tutorials/106) and Soldering Crash Course from the folks at Sparkfun (http://www.sparkfun.com/tutorials/354). How to solder from the Curious Inventor: http://store.curiousinventor.com/guides/How_to_Solder

Adafruit has this excellent guide that starts with the tools needed and then shows detailed pictures, including some of the common problems that beginners experience (http://learn.adafruit.com/adafruit-guide-excellent-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:

These are not provided but a good quality fine tipped soldering iron is required. A flush cut wire cutter is highly recommended to cut and remove any excess wire leads after individual parts have been soldered to the PCB. A solder sucker is handy but only necessary if you happen to make a mistake and/or need to remove a part from the board.

Assembly:

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).

oak-level-shifter-shield-3.jpg

Tip: Inserting the 9 pin headers into a breadboard (not provided) and placing the PCB board on top will make this process easier. Make sure the PCB is in the correct orientation before proceeding. These headers should sit be below the board and soldered from the top of the board. Be careful not to heat the header pins to the point that it melts the plastic surrounding the pin or the breadboard.

oak-level-shifter-shield-4.jpg oak-level-shifter-shield-5.jpg

If you do not use a breadboard, solder one of the pins on header. Make sure you let the solder dry, then flip the board and check the alignment of the header. If you don't let the solder dry and remove support for the header, you may be left with a solder filled thru-hole and not very happy. Correct the alignment if needed to ensure that the header is in the right position and is square to the PCB before continuing. Solder the remaining header pins.

Step 2: Insert the 3 pin header into the position marked VIN GND VCC on the Level Shifter matching the orientation of the 9 pin headers on the bottom of the board (these connect to the Oak's redundant pins for compatibility with Digispark shields). Solder the center pin first. Let it dry. Flip the board and check the alignment of the header. Correct the alignment if needed to ensure that the header is in the right position and is square to the PCB before continuing. Solder the remaining header pins.

oak-level-shifter-shield-6.jpg

oak-level-shifter-shield-7.jpg oak-level-shifter-shield-8.jpg

Bottom side header installation complete. All remaining components will be placed on the top side of the board and soldered from the bottom.

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.

oak-level-shifter-shield-9.jpg oak-level-shifter-shield-10.jpg

Flip the board and solder each pin from the bottom.

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.

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.

oak-level-shifter-shield-12.jpg oak-level-shifter-shield-13.jpg

Note the position and orientation of transistor on PCB.

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.

oak-level-shifter-shield-14.jpg 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.

oak-level-shifter-shield-15.jpgoak-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.

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.

oak-level-shifter-shield-17.jpgoak-level-shifter-shield-18.jpg 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.

oak-level-shifter-shield-19.jpgoak-level-shifter-shield-20.jpg Note topside placement of headers as indicated by the SPI 6 pin header.

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.

oak-level-shifter-shield-21.jpg Topside header installation completed.

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.

oak-level-shifter-shield-22.jpgoak-level-shifter-shield-23.jpg Level Shifter with IC installed.

Congratulations, you are done with assembly!

Using the Oak Level Shifter:

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.

Oak's VIN pin is shown as 4.5 – 12V tolerant in the Oak pinout diagram. However, VIN for the Oak Level Shifter shield should be limited to 5V. This is due to the fact that VIN on the Level Shifter shield directly supplies VCC (pin 20) of the level shifter IC (74HCT245N). This IC specifies a recommended operating voltage of 5V with 6V as the recommended maximum supply voltage. The absolute maximum supply voltage of 7V is not recommended.

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).

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.

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