Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Triggering a laser using a relay causes false triggering on Arduino

Status
Not open for further replies.

rizni

Newbie level 2
Joined
Apr 11, 2017
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
36
I have got a tattoo removal laser that I am triggering using PC104. The PC104 sends a signal to a relay board which triggers the laser. There is a photodiode that is connected to Arduino and this photodiode detects laser light when the laser fires. The signal from PC104 that activates the laser also goes to the arduino digital input.

The process:
Since it is a tattoo removal laser, the time when you send the signal from PC104 to the laser to activate and when the laser actually fires (emits light) varies. I need to measure the exact time difference between when we send the pulse to the laser from PC104 and exactly when the laser fires. For this, I have connected the signal coming from PC104 to the relay board as well as to one of the digital inputs of Arduino. So, I start measuring the time when the Arduino receives this pulse and then the Arduino waits for the photodiode to detect light coming out of the laser. This tells me the time difference I am looking for.

The problem:
When the laser is powered off, and I send the pulse from PC104 to the relay board and the Arduino, the relay turns ON, since the laser is not powered ON, it does not trigger and the photodiode keeps on waiting for the laser light. As I bring an LED closer to the photodiode manually, it triggers and the process finishes.
The problem happens when the laser is Powered ON and the photodiode is intentionally covered with a black material so it does not see any light. It is kept physically away from the laser light too. THe PC104 sends a signal to the relay board, the relay gets activated, the laser fires, but the system does not wait for the photodiode to detect the light and it finished the cycle. Through Arduino's serial monitor I can see a HIGH on photodiode input when the laser shines. I suspect there is noise coming from the relay board which is causing the Arduino to trigger falsly.

Notes
I have connected a capacitor on the supply pins of the relay coil but it does not change anything.

Any help in this regard will be highly appreciated.
 

It sounds like the kick back from the relay is being picked up elsewhere. Please post a schematic of how you have it wired and also confirm you have a diode across the relay coil, a capacitor alone can actually make things worse!

Brian.
 

Please find the image showing the high level schematics.
The datasheet for the relay board can be found here:
**broken link removed**

IMG_4148.JPG
 

It probably has to do on how you have routed the ground connections, the ground connection to the relay should not be connected to the ground at any point other than directly on the output of the power supply, and the supply to the processor should also not be connected to the ground at any point other than directly on the output of the power supply.
 

I suggest you to use ADC pin of Arduino, instead of comparator, to detect the signal from photodiode. I believe that false triggering is happening for very short time(a voltage spike). You can read your ADC for longer time to confirm that it triggers due to laser.(you can deduct the extra time to get accurate result)

Note: This is not a permanent solution. You should identify the reason behind the false triggering to avoid problems in future.
 

Hi,

besides of GND wiring (I recommend a solid GND plane) and proper signal wiring you may need filters.
Fast decoupling capacitors very close to each IC´s supply pin.

An RC filter, with the C close to the comparator, and a well chosen time constant should improve the situation.

But maybe there are other problems like:
* maybe the use of too slow OPAMPs as amplifiers may cause the input stage to overdrive
* maybe the use of OPAMP instead of comparators (with the increased recovery time from overload)
* unstable power supply
* signal coupling
* switching of capacitive or inductive loads (relay contact side)
...

Klaus
 

The old trick, is throw a capacitor at it...

try a 100 pf cap across the input to the arduino from the photo diode .
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top