12V solenoid only works when facing one way - not the other

I am doing a project in which I want to use solenoids for percussion - akin to this.

I am using 12V solenoids, set up like in the attached image, only with a 12V external power supply. I am using a TIP120 transistor and a 1N4001 diode (1A, 50V).

I am using a very simple script to test the solenoid:

int solenoidPin = 9;

void setup() {
  pinMode(solenoidPin, OUTPUT);

void loop() {
  digitalWrite(solenoidPin, LOW);
  digitalWrite(solenoidPin, HIGH);

My problem: The solenoid doesn't activate when I am turning it one way (spring end down), but it does when I turn it the other way (spring end up). I am hearing a clicking sound, but the "rod" doesn't move. I suspect this has someting to do with gravity, but I thought it would only have a negligible effect.

The solenoid works fine if I power it directly from the power supply, both ways.

Can anyone tell me what I am doing wrong? I have had a similar problem with a 5V solenoid, but it somehow worked itself out.

How to post an image.

Your Fritz shows the solenoid driven from the Uno 5V, but you sat that you have a 12V supply. The Fritz shows the transistor connected to pin 9. The code says pin 7. Would it not be better to show us exactly how the solenoid is connected?

What is the part number of the transistor? Is it a logic level MOSFET?

Karma for code tags on first post.

Thanks for the reply, groundFungus. I have added additional details to the original post that hopefully clarifies what I am doing.

The TIP120 will lose perhaps a couple of volts, being a darlington, but how much current does that solenoid use? Perhaps the wiring and breadboard aren’t able to handle it (I’d expect a breadbaord to be good to a few 100mA at best, its not designed for high current).

Thanks, MarkT! It will be a while before I can test it, but it would definitely make sense. As far as I understand, the solenoid is rated at 300 mA, so even though nothing else was running, that alone might have been too much.

I never thought to consider the characteristics and limitations of breadboards since they haven’t posed a problem for me in other small projects, but I will keep it in mind from now on.