Hi Guys,
Hopefully a very easy question and this probably shows I dabble more in the code than on the electrical engineering side.
Excuse the crude mockup in the picture using 12v Milwalkie battery
What I am trying to do is hook up a 12v PNP laser sensor in to my Arduino Mega 2560.
I have used a voltage divider and when the beam is broken the output is .5v and when not broken it is 1v which is fine.
My concern is with this being PNP. How do I hook this up to the Arduino.
The reference is positive voltage. Do I hook the +ve in to the GND on the Arduino and the signal in to an analogue input, or perhaps the reverse of this.
I am concerned given i have other devices using the GND from common PSU and its negative it will cause something to break and potentially let smoke out.
It would be if you could provide some information. All I see is a heap of wires and components on the floor which is not very informative.
It would be good if you:-
Gave a link to the data sheet of the sensor.
Posted a diagram of how you connect the sensor and potential divider up.
Post a diagram of how you think you should wire this up, then we can check if it is correct.
I am concerned given i have other devices using the GND from common PSU and its negative it will cause something to break and potentially let smoke out.
On the face of it that sounds an unfounded fear, but then you might not have described your actual situation very well.