The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Electronics Workbench

Electrical & Electronic gadgets

  • Anonymous 5 Axis Parallel Port Breakout Board Pinout

    Parallel port breakout boards of this ilk run about $14, complete with cable, on eBay:

    5 axis parallel port breakout board
    5 axis parallel port breakout board

    The PCB has no part number and the inferred URL isn’t productive. The “driver CD” accompanying it has doc for every possible board the vendor might sell and, absent a part number, the file names aren’t helpful. An exhaustive search suggests it corresponds to the HY-JK02-M 5-axis interface board manual.doc file.

    Despite any implication to the contrary, the board does not have optoisolators between the parallel port pins and the outside world. The stepper driver bricks should, but the input signals from limit switches and suchlike connect directly to the guts of your PC.

    This overview (from the manual) shows the physical pin layout (clicky for more dots) and reveals the hidden silkscreen legend:

    HY-JK02-M Breakout Board - overview
    HY-JK02-M Breakout Board – overview

    It looks like the board I got added a spindle relay driver transistor, plus a few resistors over by the manual control connector on the right.

    Notice that the fourth terminal on each axis is GND, not the positive supply required for the optoisolators on the 2M415-oid driver bricks, which means you can’t just run a section of ribbon cable from the breakout board to the brick. You’ll need a separate +5 V (or whatever) power supply wire for each brick, with a common return to the system ground for this board. Those terminals are firmly bonded to the top and bottom ground planes on the board, so there’s no practical way to re-route them.

    The small switch in the upper left, just to the right of the parallel port connector, selects +5 V power from the USB port (which has no data lines) or the power connector in the lower left. The LED near the switch won’t light up until you have both the parallel port cable and the USB cable plugged in.

    The doc includes a timing diagram with no numeric values. I established that it can’t keep up with a 500 kHz pulse train and seems content at 100 kHz, but that’s conjecture. Setting the timing to match whatever the stepper driver bricks prefer will probably work. The diagram suggests the setup and hold times for direction changes are whatever you use for the minimum time between step pulses.

    This shows the functional labels:

    HY-JK02-M Breakout Board - function labels
    HY-JK02-M Breakout Board – function labels

    The parallel port connector output pins, sorted by function:

    Pin 9 1 2 14 16 3 7 8 6 5 4 17
    Function Spindle
    motor
    Enabled X step X dir Y step Y dir Z step Z dir A step A dir B step B dir

    The parallel port connector input functions, sorted by pin:

    X -Limit Y- Limit Z- Limit A- Limit Emerg Stop
    10 11 12 13 15

    The table uses Chinese for Pin 15: 急停.

    It’s not clear whether the pins on the manual control connector are inputs or outputs, nor what the three separate Enabled lines do:

    P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15
    B step B dir A dir Z step Y step X step X dir Enabled 5V/VDD 5V/GND A step Z dir Y dir Enabled Enabled

    The three white connectors in the middle drive an LED readout board that’s probably most useful as a DRO for CNC-converted manual mills using the pendant for positioning.

    The small white connectors duplicate the functions of the green screw terminals. They’re probably useful in a small machine that I’m not building.

    This isn’t the board I intend to use in the final setup, because I need far more I/O pins, but it’ll serve for the short term.

  • Stepper Driver Specs: 2M415

    Collected from various spots around the Web, including evanescent eBay listings, and reformatted to make sense, these specs describe the 2M415 stepper driver: a smaller sibling of the 2M542 family.

    Blurb

    • +15 to 40VDC Supply Voltage
    • H-Bridge, 2 Phase Bi-polar Micro-stepping Drive
    • Suitable for 2-phase, 4, 6 and 8 leads step motors, with Nema size 16 to 23
    • Output current selectable from 0.21 ~ 1.5A peak
    • Compact credit card size package
    • Optically isolated single ended TTL inputs for Pulse, Direction and Enable signal inputs
    • Selectable resolutions up to 12800 steps
    • Over Voltage, Coil to Coil and Coil to Ground short circuit protection.

    Electrical specs

    Parameters Min Typ Max Unit
    Output Current (Peak) 0.21 1.5 Amp
    Supply voltage 15 36 40 VDC
    Logic Input Current 7 10 16 mA
    Pulse input frequency 0 200 KHz
    Low Level Time 2.5 µsec

    Mechanical specs

    Cooling Natural Cooling or Forced Convection
    Space Avoid dust, oil, frost and corrosive gases
    Ambient Temp 0 °C – 50 °C
    Humidity 40 – 80 %RH
    Vibration 5.9 m/s² Max
    Storage Temp. -10 °C – 80 °C
    Weight Approx. 150 gram

    Dimensions

    2M415 Footprint
    2M415 Footprint

    Wiring diagram

    2M415 Wiring
    2M415 Wiring

    Notice that the driver requires a positive voltage for the optoisolators.

    Of course, the box from halfway around the planet contained HB-415M drivers. Should you go looking with the usual keywords, you’ll find that HB-number turns up mostly “House Bill number” citations from various state legislatures. Popping the top off the drive reveals www.sikesai.com, which eventually produces a description and PDF datasheet for the driver. It turns out to be an “Ultra Low Noise” driver, whatever that means, with reasonably standard specifications that correspond more-or-less to the 2M415 drivers I thought I was getting.

  • Kill A Watt: IEC Adapters

    I should have done this a long time ago:

    Kill-A-Watt - IEC plug and socket
    Kill-A-Watt – IEC plug and socket

    It makes measuring PC power consumption much easier!

    I picked up some cheap AC plugs and sockets, cut a short IEC extender cable in half, and wired ’em up. If the IEC extender link breaks again, search amazon.com for something like “computer power cord extension” and rummage around.

    IEC color code hint: brown = hot, blue = neutral (unless they cheat).

    US NEMA 5 plug / socket hint: the blade marked W is neutral. More expensive hardware will have dark brass = hot, light brass = neutral, but don’t bet your life on it.

  • RayTek IR Thermometer: Trigger Switch Replacement

    According to the sticker inside, I’ve been using my RayTek IR Thermometer since 2000. At some point in the last dozen or so year, Fluke Borged RayTek, which means yellow plastic instead of gray.

    The pushbutton switch behind the trigger has recently gone from intermittent to nonfunctional, but everything else still works fine: some simple surgery should suffice…

    The handle has a flip-down cover, for the battery compartment and °C/°F switch, that pivots on molded hinges.  The cover’s hinge pins are rectangular with a slight bevel and the case sockets have a notch that will just clear a properly aligned pin. Given this hint, you’ll get the cover off much faster than I did:

    RayTek IR Thermometer - handle joint
    RayTek IR Thermometer – handle joint

    Remove the obvious screw and press the latches while prying the two halves apart. A small screwdriver helps persuade the latches to release their death grip:

    RayTek IR Thermometer - case latches
    RayTek IR Thermometer – case latches

    The parts heap didn’t have any suitable through-hole pushbutton switches, but I managed to solder an SMD switch in place; the original switch is parked atop the IC for reference. Yes, the white button is slightly taller than the original black one, but it doesn’t matter:

    RayTek IR Thermometer - new switch installed
    RayTek IR Thermometer – new switch installed

    Then it’s just a matter of tucking everything in place:

    RayTek IR Thermometer - contents
    RayTek IR Thermometer – contents

    There. That was easy.

  • Hall Effect Sensors From eBay: Supply Current

    As a follow-up to those surprising (in an un-surprising way) magnetic field measurements, I measured each sensor’s current from a +5 V supply with no magnetic field applied:

    Seq 49E 231NB AH49E
    1 7.12 4.08
    2 6.98 4.11
    3 6.85 4.18
    4 6.93 4.04
    5 6.81 3.95
    6 7.00 4.02
    7 7.02 4.05
    8 7.00 4.00
    9 3.65
    10 4.15
    11 3.97
    12 4.05

    The sequence numbers do not match those in the field measurements, because the sensors spent the night in their respective bags and I didn’t want to re-measure everything from scratch. I may wind up doing it with a DC field, but not right now.

    The first column averages 7.0 mA, the second 4.0 mA. It turns out that the Honeywell specs distinguish between SS49 and SS49E sensors, with the “E” suffix denoting the “economy” line:

    • SS49: 4 mA typical, no max given
    • SS49E: 6 mA typical, 10 mA maximum

    The sensors in the first column have supply currents that are close enough for SS49E sensors, albeit with out-of-spec 1.8 mV/G sensitivity.

    However, I’d say the sensors in the second column should be marked 49 rather than 49E and, if that’s true, then the plot thickens. In-spec SS49 sensors have 0.60 to 1.25 mV/G sensitivity, which neatly brackets the average 0.875 mV/G I measured: it’s faintly possible those have incorrect markings, rather than being manufacturing rejects.

    But I wouldn’t bet on that

    I should pick up some genuine sensors from a reputable supplier and measure those, just for completeness.

  • Hall Effect Sensors From eBay: Variations On a Specification

    It seems that the “49E” Hall effect sensor I used to measure the field in the ferrite toroid was running at 1.9 mV/G, rather than the 1.0 to 1.75 range suggested by the perhaps-not-quite-applicable specs. Here’s a table of all the sensors in my collection, which came in two bags from the usual eBay vendors:

    Seq 49E 231NB AH49E
    1 41.1 18.5
    2 42.9 20.0
    3 39.5 19.9
    4 40.6 18.8
    5 43.3 18.9
    6 42.6 23.0
    7 40.7 20.0
    8 44.0 19.3
    9 18.9
    10 19.5
    11 20.0
    12 19.8

    That’s the RMS value in mV of the sine wave resulting from a 200 mA peak current in the 25 turn winding, measured on the scope with low pass filtering and 8 trace averaging. An unfiltered and unaveraged trace looks like this, which explains why I’m knocking back the noise:

    Hall Current Sense - 25T FT50-61 - raw
    Hall Current Sense – 25T FT50-61 – raw

    Even with that noise reduction, the variation between successive readings is about 5%, so trust only the first digit and half of the second; the fractional digit is worthless. Averaging the columns gives 42 and 20 mV RMS, which correspond to 59 and 28 mV peak. I estimated 60 mV peak from the filtered-but-not-averaged scope trace in the earlier calculations, which falls in the same ballpark. If you were doing this for real, you’d use a DC current and a static field, plus a simple RC filter to improve the noise rejection, but this was a quick-and-dirty measurement.

    The peak magnetic flux should be about 31 to 33 G; I’ve been using 32 G based on the nominal permeability and measured air gap. Assuming that’s the case, then the sensors in the first column run at 1.8 mV/G (1.75 + 3% or 1.7 + 6%) and those in the second column at 0.875 mv/G (1.0 – 9%).

    Here’s what I think: these are manufacturing rejects, sold cheap to extract money from suckers. Those in the first column came from the “too high” scrap heap, the second column’s contestants were in the “too low” pile. Note the tight clustering: they’re not random, they’ve been carefully selected! A quick-and-dirty histogram tells the tale:

    49E Hall Effect Sensor Histogram - 200 mA 32 G
    49E Hall Effect Sensor Histogram – 200 mA 32 G

    The nominal range, taken from the SS49E datasheet, runs neatly across the gap in the middle, with one sensor falling just barely inside. The SS49 range neatly brackets the data on the left, but that’s not what those parts are supposed to be.

    Now, I’ve often referred to eBay as my parts locker (at least for stuff I don’t have in the Basement Laboratory Warehouse Wing), but I know what to expect and am not in the least surprised at these numbers. If you or anyone you know buys parts from eBay in the expectation that they’re getting Good Stuff Cheap, then you should rethink that expectation.

    I’d say that, to a very good first approximation, anything bought directly from halfway around the planet via eBay (or any source like it) will be, at best, counterfeit. For my purposes, I can measure and use most of it (assuming it actually works and ignoring minor issues like, oh, reliability and stability). In an actual product application, eBay is not the way to get your parts.

    No surprise, right?

    I wonder what the supply current might be? They’re supposed to run around 6 mA, max 10 mA…

  • Hall Effect Current Sensor: Magnetic Flux Calibration

    With a wound ferrite toroid in hand, the next step involves measuring the magnetic field in the gap from a known winding current. I don’t have a calibrated magnetic sensor, so all this involves considerable guesswork and estimation.

    A ULN3751Z power op amp converts an input signal voltage into winding current:

    Ferrite Toroid Winding Test Driver
    Ferrite Toroid Winding Test Driver

    The 10 Ω sense resistor (5% tolerance, measured at 9.97 Ω on a typical 5% meter) sets the conversion at 100 mA/V, which should be good enough for a first pass. The ULN3751Z has 40 to 60 mA quiescent current and would cook at 1.2 W from ±12 V supplies, so I used ±5 V for this test. That’s not enough for a wide output range, but it’s OK now.

    Given that I already have a breadboard with a Hall effect sensor on it, I hairballed the winding driver in an empty spot:

    Ferrite toroid winding test driver - breadboard
    Ferrite toroid winding test driver – breadboard

    The green ring in the foreground surrounds the toroid, with the slot around the Hall effect sensor sticking up from the breadboard. The toroid cross-section is about the same size as the sensor and the field in the gap seems sufficiently uniform to make positioning completely non-critical. I should conjure up a mount of some sort, just to keep the toroid from flopping around, but that’s definitely in the nature of fine tuning.

    Driving a 200 mA peak current into the winding produces a rather noisy result from the Hall sensor:

    Hall Current Sense - 25T FT50-61 - raw
    Hall Current Sense – 25T FT50-61 – raw

    Applying the oscilloscope’s low pass filter cleans it up a bit:

    Hall Current Sense - 25T FT50-61 - LP
    Hall Current Sense – 25T FT50-61 – LP

    The peak current is 200 mA, so the MMF = 200 mA x 25 turn = 5 A·t.

    Assuming μ = 125 and a 0.172 cm gap, then the magnetic flux works out to:

    (0.4 π · 125 · 5) / (3.02 + 125 · 0.172) = 7.21 · 5 = 32 G

    The Hall effect sensor specs are, at best, hazy, but something like 1.0 to 1.7 mV/G appears on most of the datasheets, with a nominal 1.4 mV/G. The measured peak voltage from the Hall sensor is maybe 60 mV, which suggests a nominal B = 43 G with a range from 60 down to 35 G.

    Ferrite toroid datasheets give permeability to three or four significant figures, but also admit that the actual value can differ by ±25% from the nominal. However, the air gap dominates the equation, so B varies from 30.8 to 32.8 G over that range of μ.

    Assuming that B = 32 G, then the sensor is running just shy of 1.9 mV/G. Perhaps it didn’t quite pass final inspection; it’s not like I’m buying from an authorized distributor or anything.

    Anyhow, the results seems close enough to suggest the ferrite toroid and the Hall effect sensor actually do pretty much what they’re supposed to do. I’d have no qualms about calibrating the sensor output from a known current and running with that number…