Very strange power supply problem So, I've put together my Christmas tree lights - a string of WS2811s driven by my Uno board. They are 12 volt WS2811s, so I have rigged a 12 volt supply to them and just using the Uno for the data channel, powered, initially by the USB port of the PC. So far, so good.

Then I take the whole arrangement to the tree and try to power the Uno from a USB charger - but that's where it all goes wrong! The LEDS start to flash madly, nothing like the pattern that I've programmed.

I've tried various USB chargers and various USB cables to no avail, I've tried powering with 6 volts to the DC in socket - same thing. When I go back to the PC and pick up the Uno power from the USB cable, all is good! I have no idea what can be causing this, please help!
[Turning my comment and other peoples replies into an answer to make it easier to read]

You are using two different power supplies? (PC + 12V or USB Charger + 12V) Have you connected the grounds from the two power supplies?  

I have a limited understanding of why, but I know that unless the two power supplies have a common ground level the values for 0V and 5V may not be the same across the two feeds and you get odd and unpredictable behaviour.

Gerban explained that the reason it works on your PC is that most PC Power supplies reference Gnd from the Earth.  If you 12V supply is an ex-PC PSU, or similar, that will be doing the same which is why that setup works, they share a common ground via the mains earth.  The 5V phone charge probably has a plastic earth pin, which means it doesn't do this and therefore the Gnds are not tied to each other.

Majenko's blog will provide a more detailed, less hand wavey explanation:
https://hackingmajenkoblog.wordpress.com/2016/12/06/the-importance-of-sharing-grounds/