MESA 6124 and pull-ups on power up or reset

More
01 Apr 2023 03:07 - 01 Apr 2023 04:28 #268007 by tropostudio
I am converting a Howa VMC with jig changer from a Mitsu Meldas 500 control to LinuxCNC, using the existing IO hardware and  a Yurtaev Interface Adapter for LinuxCNC to control 7 Mitsibishi MDS servos. Am currently finishing up wiring and hardware testing before I get into programming. I have fabricated custom optoisolated I/O boards to interface between the PC and Machine (5 vdc to 24 vdc conversion).  I am using one MESA 6124 PCIe board for inputs.  No issues there.

I have a second 6124 PCIe board set up for output.  Outputs are setup as sourcing on the PC side, to drive outputs that are all 24 vdc sourcing on the machine (because that's the Meldas 500 control was wired.).  I find on power-up of the PC that the all of my indicator LEDS on the machine side (24 VDC) light up, as do the indicator LEDS of machine relays and indicator relays on the machine control panel.  Indicator relays on the PC side of the optoisolator board do not illuminate.  Baffled me until I realized the MESA 6124  pulls up by default on power-up.  The minuscule amount of current at each pin is not enough to activate the indicator LEDs on the PC side, but just enough to allow optos trigger output on the Machine side .

I am looking for advice on the best way to keep the output pins low until the MESA card is configured. A timer interval (via Arduino or timer relay) after the PC boots before 24 vdc is allowed to the machine side of the output IO board? Monitor MESA I/) pin voltage until all outputs drop from high to low after power up and initial board configuration before allowing power to machines side of I/O board?  Other ideas?

 
Last edit: 01 Apr 2023 04:28 by tropostudio. Reason: I inadvertently posted this to the General forum, thinking it was going to post to Driver Boards forum.

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 10:29 #268012 by tommylight
If you have an output free, use that to control a transistor or relay that cuts power to all the optos.
You can activate that with estop out or machine is enabled from hal.

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 18:58 #268027 by JPL

If you have an output free, use that to control a transistor or relay that cuts power to all the optos.
You can activate that with estop out or machine is enabled from hal.
 

Or maybe use a charge pump...

But then it hits me.... This is non trivial... All those solutions involve using an output and the very source of the problem is that outputs are 'uncontrolled' for at power up...

 

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 19:09 #268030 by JPL
Here is a 'fancy' solution to this problem. This design is for a similar problem arising when using the parallel port but basically the same and certainly a possible solution to the OP.


 

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 21:58 #268036 by tommylight
Parallel port changes pin states during boot, always, Mesa does not, all IO are high at power on until LinuxCNC takes control.
Hence no need for charge pump or any fancy stuff, just a simple relay or transistor that cuts the common to optos, as long as the Mesa output is high. When LinuxCNC takes over, that pin can be brought down by any of the hal pins/parameters/functions restoring connection to optos common.

Please Log in or Create an account to join the conversation.

More
02 Apr 2023 02:02 #268045 by blazini36
Did you try disabling the FPGA pull ups with the W2 and W4 jumpers? I just glanced at the manual and it says that all pins have pull-up resistors but I don't know if that means external resistors or the FPGA's built in resistors which it describes as preconfigure pull ups

Please Log in or Create an account to join the conversation.

More
02 Apr 2023 02:19 #268046 by tommylight
Moved to "driver boards".
Thank you.

Please Log in or Create an account to join the conversation.

More
02 Apr 2023 17:42 #268093 by tropostudio
The MESA 6124 has 3.3k internal pullups that all go high at power-up or restart. No disabling them at that point via the jumpers.

I went through the existing safety relay and power-up hardware and put together a schematic. 24 VDC supply to safety and power-up relays coils is provided when the VMC main contactor is engaged. What I will call 'Safe' 24VDC to the old IO was (is) enabled via this circuit when the operator key switch at the control console is turned on.  This also powered up the old Meldas 500 control, with it's own IO cards. 

I've attached a pic of the new control cabinet, with the HP box running Linux CNC and my own optoisolated IO boards (green PCB's, upper left). Two PCIe MESA 6124 boards for IO and the Yurtaev PCI   Bootup and shutdown of the HP PC doesn't play well with the simple key switch power on-off for the Meldas CPU.  I also had to add a separate switched 12VDC supply for handwheel encoder and the new mini touchscreen. The red proto board with the Arduino Nano controls PC power up and power down by monitoring the power and HD LED states and activating the PC power pushbutton as required.  The 5VDC relay units on that board control the PC pushbutton and enable 'Safe' 12VDC to the monitor and handwheel. 

Seems like the best bet will be to add another relay to that board to switch 24VDC to the machine side of my optoisolated output board when LinuxCNC is up and running.  I don't think I have any concerns with active inputs being engaged as soon a the MESA board receives power.  It's the outputs that worry me.
Attachments:
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
03 Apr 2023 04:09 - 03 Apr 2023 04:09 #268143 by tropostudio
tommylight - for sure, not trivial. Since I already have an Arduino controlling power on/off to the PC, I think the way forward is to keep power off the 24 VDC to machine side of my optoisolation boards, send a command to LinuxCNC to pull an unused output pin at the MESA 6124 board low, and wait for the that state change to power up the machine side of the outputs. The Arduino would continually monitor the state of that 1 MESA pin and do whatever needed to be done if something 'bad' happened while LinuxCNC was in charge. Sound reasonable?
Last edit: 03 Apr 2023 04:09 by tropostudio. Reason: typo
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
03 Apr 2023 10:26 #268160 by tommylight
That should work, if you are using only 6i24.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.185 seconds
Powered by Kunena Forum