Switching a solenoid between 2 different AC/DC adapters?


I have build a circuit to turn a solenoid on and off with an Arduino (actually it’s 10 solenoids, but that’s not important right now), and now I would really like to make it possible to choose between 2 different AC/DC adapters because that would give me possibility to have 2 velocity levels that I can trigger from Max/msp. Of course I never want the positive side of the two different AC/DC adapters to connect, so I would have to make sure (in my Arduino code), that never happens.

Here’s a rudely made schematic hopefully spreading some light on what I’m trying to achieve:

As the picture shows, I am unsure as where to connect the positive side of the solenoid. At first I thought this was easy to do, but I don’t think connecting the positive side of the solenoid to each of the AC/DC adapters positive sides would work out, although I’m not sure.


For example: you may consider two high-side switches to switch between the 9V or 24V power source. The selenoid will be operated with a single low-side switch then.

I don't follow what that circuit is supposed to do. Aren't your diodes preventing any current passing through the transistors? And, if the diodes weren't there, the transistors would be short-circuiting the power supplies.

I get the idea that you're trying to operate the solenoid(s) with different voltages to control 'velocity' - I'm guessing this means the mechanical speed of the solenoid as it operates. If that's all you want then I suggest you simply use the voltage needed to provide the higher speed and PWM it to reduce the velocity for the lower speed. This would require one power supply, transistor and flyback diode - depending on the transistor you might well need a current limiting resistor on the base. In any case the circuit would be nothing like what you have drawn.

Use high-side switching. See attached schematic. I’ve added D1 and D2 to avoid damage if you turn on both outputs at once, or if you run the circuit with only one of the supplies powered up. D3 is the flyback diode.