586,036 active members*
3,564 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Relay control with BOB - parallel port pins are always +5V until CNC software startup
Results 1 to 14 of 14
  1. #1
    Join Date
    Nov 2009
    Posts
    38

    Smile Relay control with BOB - parallel port pins are always +5V until CNC software startup

    I was trying to make my first "extra" by controlling a water pump (flood) with a relay hooked up to my C10 breakout board. I thought it would be as simple as wiring a N.O. relay to any available output and be done with it.

    Unfortunately, all my output pins are set to "1" (+5V) anytime the PC is restarted and so the water pump turns on and pumps like crazy until I enter EMC2 (or Mach3) and toggle the flood control.

    I was about to build a negating gate and tell the software to invert the output but I don't think this is the way to go. Please let me know of a simple solution - THANK YOU!

  2. #2
    Join Date
    Nov 2007
    Posts
    197
    this is where a charge pump circuit comes into play. Mach outputs a frequency on one of the pins, which turns the power on to the board. This way you don't get any unexpected outputs while rebooting, etc.

    I always loved it when i pulled into my driveway, and could hear that my router had been running all day long due to a power outage, or computer reboot.

    since you are using a C10 board, you are already familiar with cnc4pc.

    http://www.cnc4pc.com/Store/osc/prod...products_id=51

  3. #3
    Join Date
    Nov 2009
    Posts
    38
    I was afraid that a charge pump would be the only solution. Thanks for the link; though I think the price is a little steep... I need 4 - a little over $100. And besides, it shows it's on backorder as of today (2/8/10).

    I'll be looking for alternatives, maybe a multi-I/O unit, but if you readily know of something other than cnc4pc, please let me know. Thanks again.

  4. #4
    Join Date
    Nov 2007
    Posts
    197
    i'm not sure you need four, however i haven't implemented one yet.

    i'm assuming the charge pump would switch the 5v that is going to the c10 board. therefore, all outputs will be dead.

    I usually get some twitching on my stepper outputs too.

  5. #5
    Join Date
    Nov 2009
    Posts
    38
    That's right, only one is needed, I realized that in the meantime. Still, the ones from cnc4pc are on backorder and I can't find anything anywhere else. It would have been nice if I could just close up my control box and put it away sooner, but if I have to wait it out, then I will.

  6. #6
    Join Date
    Dec 2003
    Posts
    24221
    This is why you have a hard wired E-Stop!, if the system is off on initialization or restarts, all power devices are off including servo's/steppers and require a manual reset of the E-stop to restart.
    This is Standard industrial control practice.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #7
    Join Date
    Dec 2003
    Posts
    24221
    BTW, if you need to build a discrete watchdog timer using the Mach charge pump signal, it can be done for a $1.00 or so using a 555 (25¢) timer, the principal has been used for many decades, the timer runs at a frequency of slightly slower than the 12khz Mach signal, if not kept reset by the the 12khz signal, then the timer times out and sets a relay, the idea is to constantly reset the timer if Mach is active.
    The 555 applications by Google are endless.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  8. #8
    Join Date
    Nov 2009
    Posts
    38
    Quote Originally Posted by Al_The_Man View Post
    This is why you have a hard wired E-Stop!, if the system is off on initialization or restarts, all power devices are off including servo's/steppers and require a manual reset of the E-stop to restart.
    This is Standard industrial control practice.
    Al.
    This Taig mill was built 10 years ago when E-Stops were probably not very common practice
    I'll give it a shot with the 555, I'm sure I have one around. Thanks!

  9. #9
    Join Date
    Dec 2003
    Posts
    24221
    E-stop circuitry has been around and mandatory by code on industrial control for many decades now.
    Often overlooked or skimped on home built equipment though.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  10. #10
    Join Date
    Mar 2009
    Posts
    106
    Hmmm. The 555 charge pump sounds interesting. Can you point me to a schematic?

  11. #11
    Join Date
    Dec 2003
    Posts
    24221
    I will see if I can dig one up, in the mean time here is a PDF for general information, the 555 would be used in the monostable mode and the in coming 12khz pulse would reset the 555, (pin 4).
    Set the time out to around .1ms.
    There is probably more information out there on the 555 than any IC made to date.
    This uses the 12khz Mach signal as a Watchdog timer not a charge pump, the technique is different but the results are the same.
    Al.
    Attached Files Attached Files
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  12. #12
    Join Date
    Dec 2007
    Posts
    468
    Quote Originally Posted by FXC View Post
    Unfortunately, all my output pins are set to "1" (+5V) anytime the PC is restarted and so the water pump turns on and pumps like crazy until I enter EMC2 (or Mach3) and toggle the flood control.
    Interesting. Mine does the same thing running under Windows 2000 and Mach3.

    I think I bought a charge pump for the system but I never installed it. Might be time to look for it and make that a priority.

    Mike

  13. #13
    Join Date
    Dec 2008
    Posts
    226
    Try changing your outputs from pull up to pull down on the c10 (or vice verse)

  14. #14
    Join Date
    Jun 2004
    Posts
    6618
    Another way is to install switches on the extra's. I have one on my coolant and spindles on each machine.
    It may seem like a lot to deal with when starting up, but it becomes easy. This will help when trying to troubleshoot stuff as well as trying other things out and you don't want the things coming on inadvertently.

    It is not a replacement for the charge pump though. I will be getting some of those. I wasn't aware they had those out.
    Lee

Similar Threads

  1. Parallel port control software
    By slinger1010 in forum CNC Machine Related Electronics
    Replies: 4
    Last Post: 04-27-2009, 11:46 PM
  2. Parallel port+ input pins for use with EMC
    By visky in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 10-26-2008, 10:18 PM
  3. Printer Port relay control
    By Sieg in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 12-08-2007, 08:39 PM
  4. Configuration Of Output Pins In Parallel Port FOR 4 AXIS
    By Khalid in forum Open Source Controller Boards
    Replies: 2
    Last Post: 05-20-2007, 07:55 AM
  5. Parallel Port / Relay Control Question
    By Verboten in forum Computers / Desktops / Networking
    Replies: 7
    Last Post: 12-21-2004, 11:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •