Archive for June 18th, 2013

Mesa 5i25 + 7i76: First Light!

Rather than start with the stepper, I wired an LED and resistor between output bit 07 and Field Ground at the power supply:

Mesa 5i26-7i76 with LED

Mesa 5i26-7i76 with LED

It’s worth noting that the terminals labeled GND on TB2 and TB3 are isolated from the Field GROUND terminal on TB1. When Mesa says “isolated power supply”, that’s exactly what they mean.

The digital output bits connect +24 VDC Field Power to the load, which should then connect to Field GROUND. I picked a good-looking 5 V panel LED from the pile, simply because it had wires soldered to it from a previous life, and put a 1 K resistor in series to drop the other 19 V.

Then you start up HAL, load the Mesa drivers, and twiddle the bit:

halrun
halcmd: loadrt threads name1=th period1=1000000
halcmd: loadrt hostmot2
halcmd: loadrt hm2_pci
halcmd: addf hm2_5i25.0.pet_watchdog th
halcmd: addf hm2_5i25.0.read th
halcmd: addf hm2_5i25.0.write th
halcmd: start
halcmd: setp hm2_5i25.0.7i76.0.0.output-07 true
halcmd: setp hm2_5i25.0.7i76.0.0.output-07 false
halcmd: quit

The thread runs with a 1 ms period, mostly because it’s convenient. The .read and .write pins transfer data from and to the 5i25 FPGA each time the thread runs; if you forget those, nothing happens.

Setting the output bit true activates the output bit, turns on the MOSFET driver, and connects the terminal to Field Power = 24 VDC. The 7i76 outputs do not sink current, they source it.

A journey of a thousand 3D printed objects starts with a single LED…

The watchdog timer ought to be connected to something more fragile and UI-related than the main thread, but I haven’t figured out how to do that yet.

,

Leave a comment