My project sometimes doesn't power up well if...

Hello. I have an arduino project which is a MIDI sequencer with some things more, i use 2x 4051, 2x4067 1x 74hc595 and 8 leds.
The other day I tried to power it with a DC adapter, no USB. 12V center positive 500mA. And sometimes it doesn't work. For example, if I power it three times, maybe one will fail, the leds are all on(no sequence) no MIDI, nothing.
Then i tried with USB but without the IDE open. And it happened sometimes... But when I open the IDE it starts working as it should... What could it be? thanks

Maybe your DC supply isn't sufficiently smoothed.

The IDE has absolutely no effect on power, so behavior changes when it is running is coincidental.

When your 12V supply is attached without USB, measure the voltage at the Vin and 5V pin. Report back what you find. Ideally see if there is a difference in either when your circuit "works" and "doesn't work".

The IDE has absolutely no effect on power, so behavior changes when it is running is coincidental.

It could be something to do with the reset on power up and when you open up the monitor on the IDE it sends a reset signal.
When it fails to power up does the power light come on, on the arduino but you get no functionality?

Some early models of the arduino had a problem of some chips not powering up, normally these were caught with a factory test but if it is intermittent then perhaps you have one of these. The solution was to put a diode across the pull up resistor on the reset line. Check the schematics of the model of arduino you have and see if this is fitted. I know it is fitted on the Uno R3. If it is not fitted it is easy to solder on a diode across this resistor.

I imagined the IDE doesn't affect the power. But I think it's the reset thing as Mike says... I mean, something does change when i open the IDE. For example if my project is running fine sending MIDI data to my synths, if I open the IDE they go crazy, I have to press the panic button on the synths.
I measured the voltage, Vin 11.3v V+ 5v.
The power led is on when it doesn't work. The sequencer just doesn't work, doesn't send MIDI, or anything, but the 8 leds are on at the same time, with different intensity. My model is one of the first UNOs i think, it's from 2010. I'll check now.
Now it's not working, I left it like this for ten minutes to see if suddenly it starts, but no. I'll try pressing the reset button, but it's kind of hard to reach

Well i shorted the reset pin to gnd and it started. So it seems sometimes i have to reset to make it work and I wonder why...

So it seems sometimes i have to reset to make it work and I wonder why

Yes it sounds like that reset problem especially as you said:-

The power led is on when it doesn't work.

So it is getting power but not running.

sending MIDI data to my synths, if I open the IDE they go crazy,

That is because you are using the same pins for the USB serial connections as you are for the MIDI I/O so your MIDI equipment is getting all sorts of rubbish.

My model is one of the first UNOs i think, it's from 2010

I think that is before they started fitting the diode.

Grumpy_Mike:

So it seems sometimes i have to reset to make it work and I wonder why

Yes it sounds like that reset problem especially as you said:-

The power led is on when it doesn't work.

So it is getting power but not running.

sending MIDI data to my synths, if I open the IDE they go crazy,

That is because you are using the same pins for the USB serial connections as you are for the MIDI I/O so your MIDI equipment is getting all sorts of rubbish.

My model is one of the first UNOs i think, it's from 2010

I think that is before they started fitting the diode.

Now it's mounted on a perfboard with sockets. A friend of mine gave me an UNO R3, will swap it and see if it changes anything... I don't mind about the diode, the board is just for prototyping, always on USB... i'll build the circuit for the atmega once it's finished... thanks