Monday, 25 February 2019

Wiring up the Blidgeport limit switches

Background:

Mounting the switches on the machine was only half of the job. Actually wiring them all the way back to the controller is a bit more work. I need to collect the various switch connections together in some sort of junction box and then bring those signals back to the cabinet. Finally, the in-cabinet wiring needs to take the signals to the appropriate pins on the appropriate connector on the back of the controller.


I've gone to sensible(?) lengths to make the machine wiring reasonably fit for the purpose by removing the crappy (original) D connectors and nasty line driver from the DMM Tech servos, replacing them with a 3D printed housing on the motor, proper oil-proof drag cables and a more workmanlike line driver for the encoder. So I plan to make a half decent job of the limit switch wiring as well. 


I'm not a professional machine builder and this is not a professional machine installation but I'd like it to stand up to the coolant and swarf that I can reasonably expect it to encounter without malfunctioning.


Junction box:


Found a sensible looking IP66-ish box on the shelf. Looks like ABS or similar. And I have several bags of various cable glands.


I'll stick a large gland on the side of the box (for the main drag cable back to the cabinet). This is my temporary grinding booth, used for grinding / welding my steel gate posts:




I'm using some of the 9.5mm pitch barrier terminal for interconnections. The empty ways have been removed to make room for the fixings (stainless self tappers). And I'm using 4 smaller glands for the individual limit switch cable entries:



There you are. Just need to do a spot of wiring up now....



Inside each of the IMO limit switch assemblies is a switch module which simply lifts out. It has one set of NC and one set of NO contacts:



Here's one wired up (the Y L+ switch). I'm using the NC contacts, which are generally the recommended flavour for limit switches, e-stops etc:




Here's the first one terminated at the junction box. The large cable glands DO actually tighten down onto that small cable!



This wasn't quite right. In fact you can angle the crimps so the tuck into the slot between the screws. The specified crimp dimensions shown in the datasheet aren't the usual size of course.



Here they are, all switches connected up: 




It's a 4-core screened cable. Yeh, yeh, it's not proper drag cable but I don't have anything suitable on that front. At least it originally came from a proper machine (from the original Shiz cabinet). I've left the 2 spare wires in place in case I need to use them for the homing switch inputs. Didn't connect up the screens, given that these are 12V level signals (= high noise immunity) and all the other noisy connections elsewhere in the system have been screened at source:



The main (green!) drag cable in place and connected up:



The black bundles are unused screened pairs. May as well leave them, just in case they are ever needed.



Seems to be connected up correctly. They show up as NC until you actuate one of the switches. The X and Y axis +ve limit switches are in series, ditto the X and Y axis -ve limit switches.


  
Up and running:

That's working now. If you are jogging or homing and actuate the switch, a red message comes up and the machine stops until you press the reset button.

No homing switch as such (yet), although I think it's a fairly simple matter to use one of the + or - limit switches as a homing switch. Wouldn't be very repeatable or accurate but would allow me to home the machine until I figure out how to implement the proper home switches.

Resetting machine coordinates:

One problem currently is the machine coordinate setting. I expect it's simple enough to zero the coords but I can't see / recall how to. Once I have something connected up to the home switch inputs, I can probably rectify that. However, currently it shows the machine origin around 11m and 23m away from the current position(!!). As the soft limits are something like 0 - 350mm (X) and 0 - 250mm (Y) for now, it thinks the table is beyond its soft limits and will only allow motion in the -ve direction.

IMO limit switches for the Blidgeport - mechanics

Limit switches - the need:

Now that the table is moving about in X and Y, I need to fit some limit switches before I manage to run it into the ends of travel and break something. The servos are only 400W (1/2 HP) but with up to 3000rpm and peak torque of something like 5Nm combined with 2.5:1 stepdown, there's enough torque available to bugger something up.

IMO LR series switches:

The limit switches are just to stop movement beyond the software-defined extents. So they don't need to be precision limit switches. However, it's worth getting something that vaguely resembles industrial quality. You can spend what you want on these but I found some IMO ones at a half decent price at CPC (aka Farnell). Limit Switch, Roller Lever, 1NO / 1NC, 6A, 250Vac - LRC5A31 

These are of a configurable / modular design ie you can specify a wide range of actuation options, switch configurations, mounting positions, cable entries etc. They also claim to be IP67 or so, which seems sensible for this application. Link here to the datasheet. In my case, I've got a roller arm, a pair of NC and NO contacts (snap action) and an M20 x 1.5mm threaded inlet to take a standard cable gland. You can fit the roller arm at various angles and offsets. 




The switch module lifts out once you remove the cover, which makes wiring simpler:



Std cable gland fitted:



Let's not fuck about here. Here's the Y axis +ve limit switch ("Y L+") mounted at the end of saddle travel:



And the Y axis -ve limit switch ("Y L-"), actuated by the rear face of the saddle. Mounted but not wired up yet. 



This is how I plan to mount the X axis limit switches:



Boom. There you go - X axis -ve limit switch ("X L-"):



All 4 table limit switches mounted:




As for the X limit switches, these spring plunger blocks came with the Align power feed which I have now removed from the X axis. I'll be refitting it to the knee later but these blocks won't be much use there anyway and they are a convenient shape to work with my limit switches.



There. Just need to connect them up now, as they aren't wireless ones ;-)

Friday, 15 February 2019

Newker 990MDc parameter settings for Shizuoka machine

Before I took the Newker controller off The Shiz to replace it with the Acorn, I had it working pretty nicely. I'd reached the end of my capability when it came to translating the strong Chinglish manual and there were some functions I'd given up trying to implement. That was rather frustrating, given that is clearly a very powerful and fully featured system. It even has the capability to use encoder feedback to provide fully closed loop operation, plus the usual rigid tapping, auto tool measurement etc.

Now that I've moved the Newker controller onto my Blidgeport conversion, I'm going to have to reconfigure the parameters to suit the different system which comprises DMM Tech servos (X&Y), Leadshine closed loop stepper (Z) and 5mm ballscrews. Seems like a good time to note down the settings I had finished up with in the end before changing them.

Here it is on the Blidgeport machine:


And these are the settings I captured back in Jan 2018:

Speed Parameter:







Axis Parameters: 



Other Parameter:


User Parameter:



Other Parameter:













Monday, 4 February 2019

Active clamp / braking resistor circuit design

Circuit design - concept:

Here's my basic concept - it's how most braking resistor circuits work. Threshold comparator with hysteresis, driving a large FET or IGBT (depending on the voltage). It will self switch according to the load current, braking resistor value and hysteresis level.




Of course, the 431 is only rated for 20V, so wouldn't be happy in this circuit, seeing the full 60V or so. So that requires a lower voltage supply which can be provided by a simple zener / transistor follower. The voltage sense potchain obviously needs to come from the input voltage but for the hysteresis I need a voltage that goes high when the threshold is exceeded. Arguably I could pull the reference down with the power FET instead but we are talking small voltages (2.5V ref and getting that way with the FET on voltage).


Here's the simulator - SIMetrix Elements - which is free with "limited" number of nodes but in practice is pretty good for most stuff:


  • 140 analog nodes (internal and external)
  • 360 digital nodes
  • 720 digital ports
  • 300 digital components
  • 360 digital outputs


Some real component values:


Here's the schematic itself with some practical values. The servo is represented by a current source of 5A (~300W at 60V) and the bulk capacitance has an initial voltage of 50V. These values result in just over 1V peak to peak ripple and a frequency of around 30Hz at something like 40% duty cycle. Doesn't seem silly.


The braking resistor isn't a silly value at 4.7R and the quiescent currents shouldn't cause anything to overheat. Even with 100 duty cycle the "Q3" regulator device should be under 300mW and the other signal compts are seeing pitiful currents.

The hysteresis resistor is a bit high at 2.2MR but I don't want to reduce the impedance of the reference point and it's not worth the ball ache of splitting the feedback just to lower that resistor value. Besides, many people seem happy to use high values like that in their circuits so I'll join the slobs and have an easy life on this one.




The waveforms correspond to the voltage and current probes in the schematic:





The FET isn't going to be suffering from any significant switching losses, as it's only running at 10s of Hz, unless I've got such a shit drive waveform that it's going into a linear mode. Driving it through a 1k resistor and letting it bleed down through a 1.5k isn't a problem at these frequencies - with a device like the IRF530, it's switching in the 10s of microseconds range and it's a purely resistive load.


These look reasonable, so I suppose the next task is to build the damned thing. Obviously I won't be using the 2N2222, as it's only rated at 40V but that part simply came up in the simulator library as the default NPN transistor and the simulator doesn't seem to be upset by the excessive voltage across it - one potential danger of relying on simulations instead of proper circuit design.

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...