Is it possible to solder USB to AC Power cord?

I just bought a new speaker, but the only down side is that it needs an AC power to work. Wondering if it woudbe possible to solder these 2 cables together (AC and USB) somehow to get power for the speaker by then plugging it into a power back?

i know you can do it with a different speaker (sonos play 1) but it was a different AC power cable than this one.

if so do you know which wires would be connected to where?

above is the cable i got with the speaker, here is the diagram for the wire inside


and then a USB wire diagram

First off why are wanting to make a custom wire? Did it not come with one and if it didn’t have you contacted the MFG to see if they will send you one or if you can buy one?

Second remember how dangerous this kind of stuff is and without the proper knowledge you can easily short the speaker and cause a fire in your house. Yes this is possible to do but you will need resistors(assuming that it isn’t 120v if it runs off usb).

well as far as i know there isn’t such a cable. i know it can be done since someone did something similar with a sonos speaker, but idk how he wired it is all.

from the looks of it, he didnt do anything but connect the wires together then used a battery backup that you use for phones to charge to power it and it worked.

i figured if i got a 20k mah power supply i could get maybe 2 hours or so out of it which is perfect

I think I understand now. The USB is coming from the battery pack. Those battery packs use DC so you would also need an inverter to make it work. But red is going to be positive, and black is going to be negative not that it should matter with AC. If there is a dedicated ground on the speaker you also consider grounding it to something metal.

This post was flagged by the community and is temporarily hidden.