Hello Guest it is December 21, 2024, 12:49:49 PM

Author Topic: Electronics experts - Why wont this work?  (Read 5609 times)

0 Members and 1 Guest are viewing this topic.

Offline Sweep

*
  •  150 150
    • pollz.co.uk
Electronics experts - Why wont this work?
« on: October 18, 2010, 05:04:00 PM »
Introduction
Building a circuit board for datums, overtravels, and spindle speed monitoring.
Will have seperate X, Y, Z homing inputs but single daisy chained overtravel.
See attached drawing of planned circuit.
CN1 = 24v taken from 250mA supply off one of my drive cards.
CN6 = 5v taken from PC parallel port
CN8 = loop to X++, X--, Y++, Y--, Z++, Z-- overtravels
CN2, CN3, & CN4 = X, Y, & Z home switches which are 2 wire type Baluff proximity switches
CN5 = Spindle speed monitor which is also 2 wire Baluff proximity switch
CN7 = Inputs to Mach3 via parallel port
Circuits for X, Y, & Z home, and spindle speed are copied from original Denford drawings but modified to accept my 24v supply.

Condition
PC on, Mach3 running, parallel port cable connected, input ports assigned, 5V supply to CN6 present, 24v supply to CN1 present.
Mach3 set to display 'diagnostics' screen. Test circuit built on breadboard.
I have tested the circuit on a simulator progam and everything seems to works fine!

Problem
When only overtravel loop is connected, osilloscope shows very clean switching of input pin on CN7 (pin1) from 0v when 'away from home' and a good 5V when 'at home.'
When only Z home is connected, osilloscope shows switching of input on CN7 (pin2) from 0v whilst in 'safe area' and a good 5v when the OT switch is triggered.
When I connect both Z home and Overtravels (haven't built breadboard with Y & X homes yet), and monitor on 2 channels of oscilloscope, both traces show 0v whilst in safe area, but when I move the Z axis towards home I only get 1v until I continue moving the Z axis to trigger the Overtravel at which point both traces hit 5v. Obviously 1v isn't enough to trigger an input to Mach3, so what have I done wrong or need to do to fix it?
As I have plenty room on my standard 100mm x 160mm blank circuit boards i'd prefer to keep all these functions on the same board.
I would also prefer not to use another 5v ouput if that is the problem as I am running out of pins and I plan a 4th axis in future.
And yes, i know I could use the Overtravels as homes but that's admitting defeat and I ain't doing that  >:D

So, and as usual, your guidance would be appreciated.

...Sweep

Offline Sweep

*
  •  150 150
    • pollz.co.uk
Re: Electronics experts - Why wont this work?
« Reply #1 on: October 19, 2010, 12:02:06 PM »
Sorry for 'bumping' this post but I don't seem to be able to edit it. I re-read the message and the paragraph 'problem' which seems a bit confusing ay the beginning and would be better read as:

When only the overtravel loop is connected, the osilloscope shows a very clean switching of input pin on CN7 (pin1) from 0v when in safe working area, and a good 5V when Overtravel switch is thrown.
When only Z home is connected, osilloscope shows switching of input on CN7 (pin2) from 0v whilst in 'working area' and a good 5v when the Proximity switch is triggered when homed.
When I connect both Z home and Overtravels (haven't built breadboard with Y & X homes yet), and monitor on 2 channels of oscilloscope, both traces show 0v whilst in the safe working area, but when I move the Z axis towards home I only get 1v when the proximity switch is triggered until I continue moving the Z axis to trigger the Overtravel at which point both traces hit 5v.

thanks ...Sweep

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Electronics experts - Why wont this work?
« Reply #2 on: October 22, 2010, 03:07:46 AM »
As far as I can see you have a wiring error which is causing a conflict of the logic signals. If there was no conflict then the levels would switch cleanly between high and low (5V and 0V).

All I can suggest is that you re-check all your wiring.

Tweakie.
PEACE

Offline Sweep

*
  •  150 150
    • pollz.co.uk
Re: Electronics experts - Why wont this work?
« Reply #3 on: October 22, 2010, 03:21:50 AM »
Hi Tweakie,

and thanks for adding your reply.
Are you saying that 'on paper' the circuit looks ok so the error must be in my wiring? If so i'll recheck everything. This could be a possible cause as breadboard wiring does look like a rats nest!

Thanks ...Sweep

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Electronics experts - Why wont this work?
« Reply #4 on: October 22, 2010, 03:57:32 AM »
Yes, re-check all your wiring.

I have one additional point of concern in that you really cannot expect to take your 5Volts from the PC parallel port - you must provide a proper supply for this. In fact this alone may be the root of your problems.

Tweakie.
PEACE

Offline Sweep

*
  •  150 150
    • pollz.co.uk
Re: Electronics experts - Why wont this work?
« Reply #5 on: October 22, 2010, 04:33:05 AM »
I did consider that the parallel pin 5V might not be sufficient, but it isn't powering anything only being switched by the output side of the opto-isolator between hi & lo on the input.
Thinking about that it might be the case that my resistors on the output side of the opto's (inputting to PC) arn't big enough as being 470ohm they would each allow 10mA to flow but the total available to source, i understand, is only 2.6mA!
According to the Mach3 manual which I have just re-read (page 4-4, logic signals), "the computer will need to be supplied with some current (less than 40 microamps) for 'hi' inputs and will supply some (less than 0.4 milliamps) for 'lo' inputs"
As such it might be worth increasing the 470ohms to something like 12k ohms as all my available current could be 'absorbed' from just one input.
The reason I didn't want to use a seperate 5v supply was I thought this was compromising my opto isolation of the PC.

I'll keep you posted but will double check all my wiring first.

...Sweep

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Electronics experts - Why wont this work?
« Reply #6 on: October 22, 2010, 04:39:41 AM »
Just a thought but you could take the 5V from your PC USB - this would preserve the isolation. Also increasing the 470R value would be good.

Tweakie.
PEACE

Offline Sweep

*
  •  150 150
    • pollz.co.uk
Re: Electronics experts - Why wont this work?
« Reply #7 on: October 24, 2010, 04:01:36 PM »
Hi Tweakie,
I have changed the 470 resistors for some of my stock 10k and have tested the breadboard and it works fine with overtravels and 1x home switch connected so it looks like i've sorted it. I will build a prototype board with 12k's where I can have all 3x home switches and the 1x daisey chained overtravel inputting at the same time and see how it goes

Many thanks ...Sweep