My sensor needs 18 ... 30 V DC..

Hi everyone :slight_smile: (sorry about my english)

Big noob here, it's my first Arduino project, and I'm stuck about the power supply for my sensor (Laser range). It's a Sensopart Smartrange FT92 ILA-PSL5

I just figured out that Arduino delivers 9V max and therefore my 12V external power supply is'nt enough. My sensor as you can see needs at least 18V. Seems like I need an industrial 24V power supply, but I have no idea how I'm supposed where to find this type of power supply and how to "use" it with my sensor's cables:

Any help would be very appreciated.. :slight_smile:

Thank you!!

The current requirement appears to be low. A cheap boost converter should do the job.

Search eBay for "DC-DC Boost Converter"
Here is an example:
http://www.ebay.com/itm/DC-DC-Boost-Module-3-34V-to-4-60V-Voltage-Regulator-Converter-LM2577-/300948008843?pt=LH_DefaultDomain_0&hash=item4611e62f8b

Also be aware that this is a current type output so you will need a resistor between the output and ground for the Arduino to read the voltage - E=IR or R = E/I or R = 5V / 20mA or R = 250 Ohms. Voltage reading will go from ~0.8V to 5V

Thanks for your help guys :slight_smile:

I managed to cut then isolate +/- cables from this power supply:

Pretty aweful, I know. It's delivering 19.5 V/DC 4.26A.

And now my sensor is ON and seems to react when I place objects on his road for example.

Also be aware that this is a current type output so you will need a resistor between the output and ground for the Arduino to read the voltage - E=IR or R = E/I or R = 5V / 20mA or R = 250 Ohms. Voltage reading will go from ~0.8V to 5V

Yup ! :slight_smile: I have a 250R. But now you're speaking about it, (I'm also noob in electronic..) I have now an empty Arduino. GND pin is not occupied anymore :relaxed:

Are you suggesting something like this ? (I have no breadboard neither straps :()

Thanks again!!

nice sencor.

The analog output as mentioned, is specified as a current output.

The sencor varies the current out of the pin, between 4 and 20 mA depending upon range.

To detect a current with the arduino, one needs a voltage between 0 and 5v.

using ohms law, as mentioned above, 250 Ohms between the output pin and ground will give a voltage up to 5Volts. If you go above 250 Ohms, then the sencor will output a higher voltage to give the 20 mA, which could blow the arduino,

Personaly I'd go for a smaller resistor, say 200 Ohms or even 100 Ohms, to give a lower impedance, less noise pick up, although less range into the arduino, and scale the arduino adc reading accordingly.

so stick a resistor between the signal pin and ground, gives u a voltage , that should be visible on a multi meter. On your picture your using Analog in 1 ? so your resistor is just fine, thought the gnd pin marked power is nearer,

out of interest, how much is the sencor ?

drjiohnsmith:
nice sencor.

The analog output as mentioned, is specified as a current output.

The sencor varies the current out of the pin, between 4 and 20 mA depending upon range.

To detect a current with the arduino, one needs a voltage between 0 and 5v.

using ohms law, as mentioned above, 250 Ohms between the output pin and ground will give a voltage up to 5Volts. If you go above 250 Ohms, then the sencor will output a higher voltage to give the 20 mA, which could blow the arduino,

Personaly I'd go for a smaller resistor, say 200 Ohms or even 100 Ohms, to give a lower impedance, less noise pick up, although less range into the arduino, and scale the arduino adc reading accordingly.

so stick a resistor between the signal pin and ground, gives u a voltage , that should be visible on a multi meter. On your picture your using Analog in 1 ? so your resistor is just fine, thought the gnd pin marked power is nearer,

out of interest, how much is the sencor ?

Thanks for your answer !! :wink:

I did this:

Link to big picture

Honestly, it scares me ahah. I don't really know if it's how it is supposed to be.
So basicly as you can see I put my 250R between the blue wire (GND) and green&yellow (analog output), then makes the resistor ending inside analog pin 0......

:.

Then with a basic program to read analog value and convert to voltage, I got some inconsistent results.. But I guess that's another problem. Let's stick to wires now :cold_sweat:

Voltage = 0.00 V
Voltage = 5.00 V
Voltage = 0.00 V
Voltage = 5.00 V
Voltage = 0.00 V
Voltage = 5.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 4.55 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage  = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 0.00 V
Voltage = 4.64 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage = 5.00 V
Voltage  = 5.00 V
Voltage = 4.76 V
Voltage = 0.00 V
Voltage = 0.00 V

do you have a multi meter ?

disconect the arduino, supply power to the sencor, and put a resistor between the sencors output wire and its ground wire.

you should see a voltage across the resistor.

I need to draw a picture to show you whats required, which I cant do for a while,

(this sensor costs around 400$ apparently :fearful:)

okey, so my multi meter display ~1.28V when the object is at distance 0% (supposed 4mA) and ~4.78 when at max distance (20mA). I saw, maybe twice ou 3 times, 5.05 and 5.09, but the voltage is mainly under 5V.

Sounds good for me XD, first time I get a signal !!
But not very accurate as you mentioned in your post, indeed.. :.

Thank you so much drjiohnsmith :slight_smile:

edit: hm, after some more tests, it appears that the true values are:
min distance = 1.37v
max distance = 5.10v !

drop your resistor to 200 ohms,
try that with the multi meter.

Roger that :slight_smile: I 'm about to buy them on internet. I will receive them tomorrow.

Do you think I should buy other resistors with different ohm? Just to be sure if I need to do some adjustments.

Between my last post, I made a better use of my sensor with a stable installation and I'm now positive.
With a 250ohm resistor, voltage is:

  • between 1.00v / 1.04v at min distance (sounds good because some other people on this forum told me I should receive a 1-5V with a 250ohm, right?)
  • always 5.10V when max distance reached !

I'll wait for your feedback before I order the resistors :wink:

Thaaank youu :slight_smile:

sounds about right

id go for the 200 ohm, dosnt have to be acurate, just predictable.
if you have five of the 250,
you could put two in parallel, to give 125 ohms
and another three in parallel to give 83 ohms,
which in series gives 208 Ohms.

near enough,

Yup, I ordered 10 250ohm resistors last time :slight_smile:
But I'll order some 200R for sure.

Time to use Arduino now :slight_smile: I will update this thread soon I guess.

And again, thank you very much man. You can't imagine what your help means for a TOTAL beginner like me who have to show something to his client next tuesday..

cya very soon

So, I directly plugged the resistor to analog PIN 0, and when I compile the arduino example (from IDE) AnalogReadVoltage, I got weird outputs:

5.00
5.00
5.00
5.00
4.66
4.30
1.55
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
2.34
4.99
5.00

Output is changing even if I don't move the object, and never gives the correct value displayed on the multimeter, which is also plugged. I keep on investigating.

ok, quick test.

make a voltage divider, two 250 ohm resistors in series.

one end, to 5v, one end to ground, the middle to your analog pin,
what do you read, should be constant,

I reckon you have a ground loop or a ground missing.

Hi drjiohnsmith :slight_smile:

The situation as changed in a good way since my last post.

ground missing.

Yes, that was exactly what I missed to do. I was then able to get the "correct" voltage in my program when I was playing with the sensor.
Values were corrects, voltage didn't go above 5V, and I had to substract 180 from analog signal..
Next problem I encoutered was the "noise" from analog output, always fluctuating, not really accurate and stable. Despite the fact that the multimeter in front of me displayed voltage without any change.

And because of that I decided to rebuild the whole installation from scratch, and now "catastrophe", my multimeter show me a maximum voltage = 7V... ^^

Anyway, I'll try what you say :slight_smile:

Hi all,

Just to keep updated this thread, and maybe close it.. It seems that it's impossible to get constant value output with this laser.
As mentionned in the PDF descriptor, we believe that the line showing "Linearity: < ± 40 mm" explain the fact that the sensor will always output a value fluctuating inside a range..

Too bad :frowning:

before u give up,

if the multi meter is reading correct, then assuming your wirring is good,
how about a simple alpha smoothing.

something like

X(n+1) = 7/8 X(n) + 1/8 new value

Hi dude,

Yeah I think it's all about maths & programmatic "solution" now.
Since my last post, I read a lot about Linearity concerning sencors, and it seems that it is a common problematic when it comes to get a "corect" value with fluctuating analog output. In fact, there's no way to find the exact value. It's just a question of interpolation.

Best way to stabilize signal might be, as you say, to smooth the value. And.. I tried a LOT of smoothing/filtering algorithms, even the one you gave me :wink:

One absolute fact with this sencor is: analog output can fluctuate a LOT. Say the corect value I should get is 950. Suddenly the signal can goes to a damn 961, then goes down to 954, 949, 953 etc.

If a try to interpolate all these values over the time, I have a pretty nice smoothed value. It's good for heavy distance changes (like 30cm in 500ms), BUT, then again, it becomes problematic when I want to catch very small changes of the distance..

Dunno if you see my point. Everytime I try something, I come to the same conclusion.

Thanks for your support

Interesting,

do you still need to get this working ?

if you do, you need to get a scope on the thing.

my theory is that what you are seeing is noise, at 50 / 60 Hz.
or it could be the program, lack of a buffer, et all.

I can appreciate your frustration.

Yeah, that's a shame XD

Result:

  • when I smooth values and move the object quite quickly, my program detect the movement. BUT if I move the object slowly, no movement at all are detected because values are "too smoothed".
  • when I don't smooth values, if I don't touch the object my program still detect some creepy movements due to BIG fluctuations.

I see the same fluctuations when I use Firmata_test.exe, so they come directly from the sencor.
My wiring is very messy, that's for sure, as you can see in my previous pictures. And you could say like some other people told me: "Instead of complaining to get stable values, build a correct wiring." But I'm pretty sure my wiring is correct. The multimeter tells me that there's 1V for the minimum distance, and 5V for the maximum distance. And that's exactly what I'm supposed to get with a 250R between GND and signal output.

Plus, this "Linearity" thing wich convince me that it comes from the sensor.
That being said, I'm very surprised that such a sensor is capable to give such fluctuating values.. :cold_sweat:

Anyway, yesterday I came to the conclusion that this laser is not appropriate for the purpose of our project. My boss ordered another laser for tomorrow, it's like "red alert" in our office right now.