Home
CNC Machining
RC Helis & Planes

On/Off Applications Via G-Code!


This board, connected through the parallel port of your computer turns on an LED via a G-Code command. The LED is sensed which trips a relay (opto-isolated), via external power, to turn on/off your application (spindle, coolant, etc.). Of course build and use at your discretion. If you do please send a note of thanks to my brother for it. That's it! 

Disclaimer: Please remember, My brother and I are amateurs and are not responsible for any damage or injury  to you, your machine,
others, property, etc. resulting from using any information on this PC board. Build and use at your own risk!

spindleschematic.jpg (67348 bytes)
Schematic

Click Picture

saftylight1.jpg (41335 bytes)

Connecting Small l1 and l2 causes the
spindle to shut off on the Sherline speed control.. This is where you will need to connect the switch.


You can also buy one from CNC4pc (great stuff and great prices!)


PARTS NEEDED (Most can be found at Radio Shack)

   7805  5 volt regulator
  TIP141  NPN transistor
  Relay  Double pole, double throw (DPDT) 5 volt relay (get a tiny, low current one)
  Toggle switch  A single pole, single throw switch
  1N914  A silicon diode
  Red LED  One rated at 5V and at a low current
  IR detector  Infrared light detector from
  Motor "On" LED

 Any LED rated at 5V you want to use to indicate that the computer is trying to turn the motor on

  Connectors

 Get 2 terminal screw connectors for attaching wires to your control board


HOW TO MAKE IT

Power supply stuff
Get a small prototyping board from radio shack. Assemble the power supply components on one side of the board.
Apply a 12 to 24V DC voltage to the input and make sure the output measures 5V.

Computer signal
Find the signal wire that will signal the input/output for the program your using and this will be probably be considered (+) signal. In CNCpro you can use pin #1 for example and it is (+).
Find a ground wire from the computer connector or driver board you’re using (check the voltage).
Connect the ground wire to the RED led on the negative terminal of the LED
Connect the (+) signal wire to the RED through R1 to the positive side of the LED

Use the computer to signal the wire on/off. The RED LED should turn on/off.
If it does turn on/off, congratulations! Now go to the sensor section.
If it doesn't, check the following:

Make sure the (+) signal is connected to the positive side of the LED through R1.
Use a voltmeter and connect it to the (+) signal and ground, and signal the motor to turn on/off using the computer. The voltmeter should read around 5V or so when the motor is supposed to be ON and about 0.6V or so when the motor is supposed to OFF. If that's not happening, the signal wire is not correct or the computer is not sending the signal.

If the voltmeter shows the correct changes, then try another LED that uses less current.

Sensor section
Add IR sensor and resistor R2. Make sure the Positive side of the sensor goes to the +5 volts!
With the signal from the computer turned off, the voltage at the side of the IR sensor connected to R2 should be very low, close to 0 volts.  With the signal form the computer turned ON, the voltage should increase... to maybe about 3 volts. If the voltage doesn't increase to at least 3 volts, change R2 to 33K ohms and try again... you might need to play with the value to R2 depending on the IR sensor you are using.

Transistor section
Connect the transistor TIP141 and the diode 1N914 (make sure the diode's negative side is connected to +5V... so it's connected backwards).  Connect the voltmeter's (+) side to +5V and the negative side to the transistor's collector.
With the computer signal ON, the voltmeter should read +5V
With the computer signal OFF, the voltmeter should read 0V

Relay
Now connect the relay and see if it works! If it works, hook up the MOTOR ON LED and the toggle switch.

The toggle switch is used to over-ride the computer. The switch must be closed to let the computer turn the motor on-off. If the switch is open, the motor will run regardless of what the computer signal is so do make sure you check this. Be careful, if the computer is keeping the motor off and you over-ride the computer using the toggle switch, the motor will turn ON!

Safety and Risk

Please use common sense and safety. Don’t rely on the computer to keep the motor off when changing setup, endmills, or having the machine at idle …turn off the power to the machine- be safe! Also, as you know, make this at your own risk J

Questions, and feedback, let me know!

Email: zaigtahir@msn.com

Good Luck,

Zaig Tahir 



Questions? Comments? Ideas? I would love to hear from you!
Contact Me
2001-2009 Cuttingedgecnc.com; All Rights Reserved