I am currently building an SMD station. I have most of the electronics planned out expect for the auto turn off function...
Let me explain, when the user turns on the SMD station they will flick a switch and the system will power up, once the user has finished with the system they will flick the power switch to the off position.
Once this happens I would like the Arduino to register that the power switch has been put in the off position. This will then put the system into shutdown mode, it will wait for the temperature reading from the thermo-couple to go below a certain point and only then will it cut power to itself.
So I need a circuit that will turn on when the power switch has been put to the on position.
Some sort of detection should be present like an optocoupler.
And a separate power control should be present such as a relay which is controlled by the Arduino.
Could anyone please provide me with some example circuits that they might have ?
Perhaps a block diagram would help me understand what you have in mind. To me, SMD, is an acronym for "surface mount device". Are building surface mount devices? Seems strange, so probably not.
Are trying to build a temperature controlled soldering iron? They are pretty cheap and rather reliable, and readily available.
The way I'm reading this is he is looking to allow a cooldown of a hot air rework station before it is powered off by means of an arduino.
I think he's way overthinking the whole situation. My solution for this was to plug the rework station and solder station into a powerstrip, along with a simple desklight. The rework station wasn't a problem as much as the solder station, as the rework had it's cooldown while in the cradle and would go to sleep. The solder station only has a little led with no cooldown. The desklight was always left in the on position. If the light is on, I know the soldering equipment was also on, so it helped me from forgetting.
you forgot 5: The line voltage is connected to pin 3 Of the optocoupler. In that circuit diagram pin 3 Is not internally connected to the LED. And even if it was connected to something, Line voltage across that switch will not give you any voltage potential, In that configuration.
Consider too that since the optocoupler is AC driven, it will give a pulsating output if no other hardware measures are taken. Not too difficult to handle in software, though.
Neutral is not supposed to have any positive potential. Your optocoupler diode has its anode, "+", going to neutral through an AC coupled capacitor. You also have a standard diode in parallel, In the same orientation, as the LED. The LED needs about 1.5 V. A standard diode will conduct at .6 V or less. Electricity flows in the path of least resistance. Where is your power going. That is considering if you have a positive potential on the neutral.
Do yourself a favor, You have a power supply for the Arduino. A relay can turn this power supply on and off. A pushbutton can bypass the relay contacts and also turn the Arduino on. Once the power is on the Arduino will turn on the relay, and hold it on until such time as the Arduino is programmed to turn it off. Once it is off, everything is off.