Oak Development Technologies
  • IcyBlue
  • Oak Blog
  • Prototyping
  • Livestream
  • Open Source Projects
  • Contact
Tutorials, Announcements, and More from...

Oak Development 
​Technologies

Connect with us on Facebook, Twitter & Instagram!

(Tutorial) Getting Started With The TPS22917 Load Switch From Texas Instruments

9/7/2020

1 Comment

 
Picture
Trying to figure out how to reduce the power consumption of your project with multiple peripherals can be tricky, especially if these peripherals are operating off different power supplies than your main controller. This is where the easy to use TPS22917 Power Switch/Load Driver from Texas Instruments comes in.
Packed into a tiny SOT23 package, the TPS22917 is compact enough to fit into any project, requiring just four total components including the main IC. Combined together on a small breakout board, we then have an easy to use form factor that can be used to easily integrate it right into your project without the extra hassle.

In this tutorial we're going to show you how easily it is to use our TPS22917 breakout board in your project.

The Setup

The setup is super simple! Here's what you need to get started for this tutorial:
  1. TPS22917 Breakout by Oak Development Technologies
  2. A microcontroller and USB cable (We're using an Adruino nano clone)
  3. 1x LED (Any color will work)
  4. 1x breadboard
  5. 6x jumper wires
  6. 1x 330ohm resistor
  7. Arduino IDE software

We're then going to wire up the circuit like in the following picture and schematic.
  1. Connect pin D12 on the Arduino to the GPIO pin on the breakout.
  2. Connect 5V on the Arduino to VIN on the breakout.
  3. Then connect GND pin on the microcontroller to the ground rail of the bread board ( marked with a - ), and the GND pin of the breakout to the ground rail.
  4. Finally, put the LED into the bread board. Connect one end of the resistor to the short leg on the LED (the cathode), and connect VOUT on the breakout to long leg on the LED (the anode).
Picture
Picture
After the circuit is wired up, we will then go to the Arduino IDE to code what we need to operate the breakout and the LED together.

When you open the Arduino IDE, type in the following code into the editor, or download Tutorial.ino file from GitHub.
Picture
Here's what's going on in the code:
  • we set up a constant (const) integer (int) to set up our output pin that connects to the breakout. In this case, D12 is pin 12 on the Arduino Nano
  • next we set up an int which determines whether we are setting the output of D12 to 1 (HIGH) or 0 (LOW). 
  • Inside the setup() method, we need to setup the pinMode for our output pin. Since it's an output, we explicitly declare this in the pinMode() function.
  • Finally in the loop() method, we write our main code. A simple if else statement is what we need to change sw to change the output of D12. 
  • To make sure that change is sent to D12, we use digitalWrite() to change the output of D12.
  • Last, we put a 1000ms (1 Second) delay so we can see the state change.

We will the go to the tools menu and select our board, and the USB port the board is connected to.
Picture
After that, we will press the upload button. If you have any issues, try changing the "Processor" in the tools menu.

The final result should be the LED blinking on and off every second.
We hope you enjoyed this tutorial. Please leave a comment, share, and come back for new tutorials!

​-Seth
1 Comment
devoh
10/17/2020 01:18:03 pm

I am using one for my outside weather station to control power to all the different sensors. I LOVE it. Works great and sips on power. Which is exactly what you need for a solar/battery project.

Reply



Leave a Reply.

    Authors

    Seth is embedded software engineer and open source hardware developer. 

    Archives

    May 2021
    April 2021
    January 2021
    November 2020
    October 2020
    September 2020

    Categories

    All
    New Products
    Product Spotlight
    Tutorials

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • IcyBlue
  • Oak Blog
  • Prototyping
  • Livestream
  • Open Source Projects
  • Contact