Skip to content

Krakkus.com

Electronics

Menu
  • Home
  • Posts
  • About
  • Author
  • YouTube
Menu

How to power a circuit from high voltage – Repurpose a wall adapter

Posted on December 3, 2022

Table of Contents

  • Repurpose a wall adapter
    • Extract the board
    • Add the 5V connections
    • Add the mains connection
    • Connect to the project
    • Or buy a power supply board

Repurpose a wall adapter

Most of us have wall adapters collecting dust in a box. We can crack these open and reuse the board in it. And then we integrate this into our project. We need to doe the following things

  • Extract the board
  • Add the 5V connections
  • Add the mains connection
  • Connect to the project

Extract the board

An old phone adapter that turns mains voltage into 5 volt for USB
The board is extracted from the 5V USB adapter

If you put the adapter in a vice, just clamp it and apply pressure until it cracks. Then use a screwdriver or spudger to properly open the device. In this case the board had two friction connections to the mains pins so the board came out with little trouble.

Add the 5V connections

We need to know the USB pin-out so we solder the correct wires
Soldered the power wires inside the USB connector
Reinserted the board in the casing so I can test the wires
When everything works, I hot glue the USB connector so the wires can’t break loose

I looked up the pin-out for the female USB socket, then I soldered two power wires inside the connector, this took a few attempts to get right.

With the board reinserted into its case, I could use a mains socket to test if both wires indeed delivered 5 volts, and they did.

With everything working as it should, I used hot-glue to fixate the wires in their socket.

Add the mains connection

Add two wires to the mains friction pins
I took an appliance plug and stripped the wires so I could test it on live
The board is still producing 5 volts
These connections also receive hot-glue to fixate the wires

At this point, things are getting a bit dangerous. Solder two anonymous wires to the mains friction pins, or whatever your board had to connect it to mains voltage.

Then, with the help of an old stripped appliance cord, we can hook the board up to a wall socket. Then once again, measuring if the boards still outputs 5 volts as it should.

Then if all is fine, we again apply some hot-glue to keep the wires secure to the board.

Connect to the project

My project switches mains power, so I spliced the wire
The power supply integrated in my project box

Because my project uses mains power to switch other devices on-or-off with a relay, I made a splice on the main power cable. Then in the project box, some hot-glue will hold these wires apart, to not cause a short. This was not the best decision so far. If the box gets warm, the glue will get soft and wires could touch.

Splice

I think these will be better for future projects.

Or buy a power supply board

Ebay has loads of them.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Other Posts

  • Hacking a DC to DC converter

    Hacking a DC to DC converter

    Introduction This is a follow-up of a proof of concept I made two months ago. I used an Arduino based DAC (8 bit 8 resistor) and an op-amp to create a signal...
  • How to add dead time to PWM

    How to add dead time to PWM

    There are situations where you absolutely want to avoid signals overlapping one another. This is when you get introduced to the term dead-time. I will give you an example of a circuit...
  • Ten ways to drive a MOSFET, with examples

    Ten ways to drive a MOSFET, with examples

    These are a couple of circuits that can drive a MOSFET. Each of them has their own pros and cons, so whether or not they are useful is highly dependent of what...
  • How to make an op-amp output PWM with duty-cycle control?

    How to make an op-amp output PWM with duty-cycle control?

    We can use a generic op-amp like the LM4562NA. We build an oscillator from the first op-amp in the IC. This produces a triangle-wave. We feed this wave into the second op-amp....
  • How does an op-amp work?

    How does an op-amp work?

    Op-amp is short for operational-amplifier. You can use it as a comparator, buffer a signal, or amplify a signal. These are some op-amps I have; they are the LM358 and the LM4562....

Tools

  • DAC generator
  • Ohms law calculator
  • Inductor calculator
  • Where to get MOSFETs?
©2023 Krakkus.com | Design: Newspaperly WordPress Theme