Laser Woes

Hi All,

I've written a program that triggers both a motor and a laser. The laser is housed in a unit that senses a 5V pulse and turns the laser on accordingly. The issue is that the moment the motor toggles on or off, the laser fires, even if the part of the program that toggles the pulse that turns on the laser is removed. I have access to an oscilloscope, and it is clear that there is some electrical noise that occurs whenever the motor triggers on or off. Furthermore, when the positive lead to the laser was disconnected and the laser was only connected to the ground, I still noted the phenomenon occurring. I've tried this with two separated Arduino Uno boards. Any help/directions to forum posts regarding similar problems would be appreciated! I might not know the appropriate terminology that would lead me to the correct posting. Also, I apologize if this is the incorrect subforum, but it appears to be more of an issue with the board rather than the program.

Hi and welcome.

Are you controlling the motor directly from an Arduino pin by any chance ?
That would be a very bad idea.
And you didn't forget to use a diode to get rid of back EMF ?

It is always best to power motors from a separate power supply and to use some sort of motor driver. Be sure to connect the motor power supply and motor driver grounds to the Arduino ground.

Keep motor supply wiring well away from sensitive circuitry and use twisted pair for it.

I've seen toy rc cars with capacitors across the motor, i presume it's there to prevent a high voltage from the collapsing magnetic field ?

The capacitors on a motor are there to absorb the spikes while running that otherwise cause EMI (electromagnetic interference).

Thanks all for the replies!

I don't have the board directly driving the motor, instead I'm using a xantach AC1 outlet voltage switch that toggles on as long as it receives a 5v input from the arduino board. I am not currently using a diode. Could back EMF be responsible for the fluctuations in the other parts of the board?

If it is a household AC motor and switch, then interference could be radiated by the motor leads, AC switch wiring or could be coming through the AC line itself. In the latter case, an AC line filter for the Arduino power supply may help.

there a block over on the mach3 cnc forum who is doing the same thing he has it set to fire when the motor is moveing

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit?

Tom.... :slight_smile:

Attached is a screenshot of a circuit diagram. I didn't really know how to represent the Xantach AC1 or the laser driver. Sorry for my inexperience! Does anyone know a good source for MOV or TVS diodes? If I'm driving the motor with a 5V pulse, would I want to connect a 6 V MOV/TVS in parallel?

Thank you!

Edit: They aren't actually connected to a common ground, that was a quirk of Fritzing. (I don't have CAD available right now)

Timesweeper:
They aren't actually connected to a common ground, that was a quirk of Fritzing. (I don't have CAD available right now)

Who's "They" and are you sure about that ?
Why not ?

Sorry to not be clear. The proximity sensor, laser driver, and motor toggle are all connected to different "ground" pins on the board. I'm not sure if these are all linked together (I'm using an UNO).

All pins named GND are connected.
In case a pin would be named slightly different like AGND or DGND, those are not connected directly.
You only have GND pins on your Uno.

See my signoff.

Ah, my mistake. Thank you. Despite the common ground, shouldn't a flyback diode still resolve the issue?

A flyback diode might help, given that that fancy Xantech AC1 controlled outlet is probably nothing more than a relay in in some housing.
But also be sure to follow up on the other tips given.

Ok, so far I have:

  1. Ordered an AC line filter

  2. Used twisted pairs and moved the motor driver/fancy relay away from the Arduino board

  3. Recognize the need for a flyback resistor

In regards to 3, does anyone have suggestions as to what diode to get? Would a 1N4148 work? The signal to the relay isn't PWM, it's just a constant 5V from the board.

Ok, update:

I tried adding a flyback diode to the circuit (1N4148) and it did not mitigate the effect. Furthermore, I discovered that the back EMF only persists when something is plugged into my relay, even if the relay is being toggled off and on. Am I just not designing the snubber circuit correctly, or should I try moving to something like a photocoupler to isolate the circuits?

What are you plugging in your relay ?

Did you try different loads ?
Like a big glow bulb (not being a LED lamp or a tube light).

Alright, I gave a 40 watt desk lamp, soldering iron, and the motor a shot and I noted the back EMF/unprogrammed laser pulse on all of them.