![schematic](https://i.stack.imgur.com/6WpHj.png)

[simulate this circuit](/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2f6WpHj.png) – Schematic created using [CircuitLab](https://www.circuitlab.com/)

I have built a wooden clock that is powered by an electromagnetically driven pendulum. Circuit given above was originally developed by a chap called Dick Bipes. In principle it works by a magnet attached to the end of a pendulum passing over a coil which detects the passing magnet and after a short delay, sends power to the coil to repel the magnet and keep the pendulum moving. An MSP430 processor is used to do some clever calculations and keep the timing accurate.

The circuit works fine when powered by 6V battery but ceases to work properly when I replace the battery with one of those plug in variable voltage power supplies! The processor doesn't initialise and I get no output to the coil. I have checked voltages and everything appears to be fine - correct voltage to processor, etc.

However, when using the power supply, if I connect the negative rail from my breadboard to Ground on my Launchpad which is connected to my laptop via USB *and* the laptop is plugged into the mains, everything springs to life! (Doesn't happen unless laptop is plugged into mains!)

So sounds like some sort of grounding issue but why does it work OK on battery and not power supply? (Have checked power supply and it is providing the expected 6V). Any thoughts or ideas on how I can resolve this frustrating issue?