Boosting 5Vdc output to 12Vdc output

I am trying to use an arduino to control a 12V photoelectric sensor. Im trying to use this sensor to detect an object and give an output of 0 or 1.

I have look at a few Step up circuits.

http://playground.arduino.cc/Main/RegulatedPositiveVoltageBooster

&

I have tried to recreated both using PSPICE and to no avail have been able to accomplish this.
I do see it is possible to spend 15$ and buy Step up , but I was trying to create one as this is for a school project.
https://www.google.com/search?q=5v+to+12v+step+up+converter&hl=en&tbo=u&source=univ&tbm=shop&sa=X&ei=HQgIUYnwDZC00AHwpIDQBw&ved=0CNQBELMY&biw=1280&bih=565

Anyone have any ideas or suggestions to why either of these wouldnt work?

I need an output of 12-24V.


This is for the first link


This is for the 2nd link

Thanks

Dugan:
I am trying to use an arduino to control a 12V photoelectric sensor. Im trying to use this sensor to detect an object and give an output of 0 or 1.

"to control" - meaning precisely to do what? Turn the power to it on/off?
Any links to this "photoelectric sensor"?

Why not use a 12 V power supply and use a voltage regulator to bring it down to 5 V for Arduino?
For the output, use something from the ULN family or similar.
For input an optocoupler.

To receive detection from the sensor. So that the arduino can use a timer circuit to turn off power to another object.

See if this link works

Shpaget:
Why not use a 12 V power supply and use a voltage regulator to bring it down to 5 V for Arduino?
For the output, use something from the ULN family or similar.
For input an optocoupler.

The only input to the system is 240V, I did think about storing a smaller computer power supply or such into the assembly and using one branch of the 240 to power it

A computer power supply? Why would you need such a monstrosity for an Arduino and one sensor?

Shpaget:
A computer power supply? Why would you need such a monstrosity for an Arduino and one sensor?

Just looked it up, Im just going off what I've used when I was a lot younger experimenting with 12V outputs and its all I had laying around. I can get small ones cheap I just saw.

there will be 4 sensors total along with a reed switch that will control a 240V relay and a timer circuit to cut power to an object after no detection for 60 seconds.

That "maill-attachment" link is a stinker.

To receive detection from the sensor.

Then the Arduino isn't "controlling" the photosensor at all, you just want it to result an action based on the photosensor's output?

[quote author=Runaway Pancake link=topic=150671.msg1131041#msg1131041 date=1361735735]
That "maill-attachment" link is a stinker.

To receive detection from the sensor.

Then the Arduino isn't "controlling" the photosensor at all, you just want it to result an action based on the photosensor's output?

Yes sorry, I want the arduino to receive information from the sensor and use it to control other devices.

OK - so how about a valid link to that photoelectric sensor?
Maybe it has an "open collector" output (and that'd really make things easy.)

The 12v rating of the photo sensor will be the max voltage the sensor will take. It may well be happy on 5v try it out. If not buy a new one they only cost pennies!.

Mark

Assume Nothing.

holmes4:
The 12v rating of the photo sensor will be the max voltage the sensor will take. It may well be happy on 5v try it out. If not buy a new one they only cost pennies!.

Mark

The sensor operates at 12-24V

Is it an M51 or M51P?
OK, those devices have "open collector" outputs (the P units are PNP though).
(Either way, the output is not a voltage hi/lo, it's a transistor.)
If it's an M51:
The easiest thing to do would be to connect the "black output" terminal to an Arduino input pin and use the "internal pull-up" - make the pin an input and then digitalWrite it HIGH (yes, digitalWrite to an INPUT).
The device's Ground ("Blue" / 0V) must be connected to Arduino Ground, too.]

So are you trying to get the sensor to input to the Arduino? If so you can use a simple 4N25 Optoisolator its a NPN type and you could use it either as a input from the 12 volts to send a signal to the Arduino or as a output from the Arduino to your 12 sensor. Best part is since its isolated you wont damage either device.