12V 1.5A Motor and Arduino Shared Power Supply, Opto-Isolate?

Hi,

I'm a little confused about the use of an opto-isolator. I'm trying to wire my Arduino Vin to the external power supply that I'm using to drive my motor. I'm using a 12V 3A power supply, this h-bridge, and I have this opto-isolator. I'd like to protect my Arduino from any weird voltage spikes, and a few people have mentioned opto-isolators, but I'm not sure how to use it, or if I even need to use it if there is enough power coming in from the power supply?

Everything works fine now, but I'm concerned that when I put a load on the motor that the Arduino my start acting up.

You're doing right things so far.
You can't opto-isolate V_in.

12V is nearly too much for V_in - it's pushing the envelope, but if you're not drawing a lot of current of the Arduino 5V then it's "ok". OK?

Yeah, I went to the top of the recommended voltage for the Arduino because I'm pwm'ing the voltage out to the motor and want to get the fullest range of speed. I was worried that sharing a ground and V_in with the Arduino and h-bridge would interfere with the board. Since the Uno has a voltage regulator on the V_in, do I not need to worry about any possible shift in voltage when the motor starts up, or suddenly pulls a larger load?

Yeah, I went to the top of the recommended voltage for the Arduino because I'm pwm'ing the voltage out to the motor and want to get the fullest range of speed.

This makes no sense.

Recommended voltage for Arduino is 7-12v. If Arduino and motor are sharing a power supply, when I'm using a full pwm duty cycle the motor spins faster than if I had a 9v power supply. Both power supplies can drive the motor to the same slower speed, but the 12v power supply can drive it faster, and so has a larger range of available speed.

An opto-isolator is useful when you have separate supplies for the Arduino, and motor.

It isolates one supply from the other, but if you only have one supply, it will have no effect.