Advertisements

Siglent SDM3045X Screen Shot File

As with the Siglent SDS2304X oscilloscope, the SDM3045M multimeter delivers broken screen shot files over the network: the actual file size doesn’t match the BMP file size field, causing kvetching in subsequent use:

[ed@shiitake tmp]$ lxi screenshot -a 192.168.1.41 -p siglent-sdm3000 test.bmp
Saved screenshot image to test.bmp
[ed@shiitake tmp]$ convert test.bmp test.png
convert-im6.q16: length and filesize do not match `test.bmp' @ warning/bmp.c/ReadBMPImage/831.

Files stored on a USB stick jammed into the meter’s front panel have the correct size, so it’s not clear where the fault lies.

Because the files contain extra data following the (intact) image, it will display correctly:

Astable - 2N7000 - IDSS cal
Astable – 2N7000 – IDSS cal

The BMP header contains the correct size at offset +0x02:

lxi screenshot -a 192.168.1.41 -p siglent-sdm3000 test.bmp
hexdump -C test.bmp | head
00000000  42 4d 36 fa 05 00 00 00  00 00 36 00 00 00 28 00  |BM6.......6...(.|
00000010  00 00 e0 01 00 00 10 01  00 00 01 00 18 00 00 00  |................|
00000020  00 00 00 fa 05 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

The horizontal image size at +0x12 and vertical size at +0x6 are correct: the screen is 480×272 pixels. Each pixel has three bytes = 24 bits, as specified at +0x1C.

So the file should contain 0x0005fa36 = 391734 bytes, but, as delivered, it’s much, much larger:

ll --block-size=1 test.bmp
-rw-rw-r-- 1 ed ed 1152054 Dec 26 08:45 test.bmp

Oddly, 1552054 bytes is exactly the size the oscilloscope files should be. I have no explanation, although it looks like a copypasta error.

As before, the simplest solution is to truncate the file and be done with it:

#!/bin/bash
lxi screenshot -a 192.168.1.41 -p siglent-sdm3000 /tmp/"$1".bmp
truncate --size=391734 /tmp/"$1".bmp
convert /tmp/"$1".bmp "$1".png
echo Screenshot: "$1".png

And then It Just Works:

~/bin/getsdm3045x.sh testfix
Saved screenshot image to /tmp/testfix.bmp
Screenshot: testfix.png

Sheesh & similar remarks.

Advertisements

Leave a comment

Astable Multivibrator: 2N7000 MOSFETs

Some poking around revealed an astable multivibrator using now-obsolescent ZVNL110A MOSFET transistors. The key idea seems to be large gate resistors putting the DC operating point exactly at the voltage required to hold each transistor in the linear region, pretty much guaranteeing the astable will eventually start up.

A bit of simulation suggests this variation ought to work:

Astable - 2N7000 buffered

Astable – 2N7000 buffered

Well, after the kickstarter in the lower left shorts the transistor for millisecond to enforce some asymmetry, whereoupon the simulation ticks along just fine.

The yellow trace shows the voltage across C2 ramping back and forth between ±1.3 V, with a period just over 4 s and almost exactly a 50% duty cycle: much better than the bipolar version, with sensible component values. As before, the cap sees both polarities, so an electrolytic cap isn’t appropriate.

The red trace is the drain voltage at M2 (presumably, “M for MOSFET”, rather than a plebeian “Q” or “T”), which is firmly at 0 V when it’s ON and ramps upward as R4 pulls C1 higher to turn it even more firmly OFF.

The green trace shows the LED current pulse when M2 turns ON at the end of each cycle. Rather than contort the astable into a very low duty cycle, I generate the pulse by dumping current through a smallish cap into the gate of M4. A few tens of milliseconds makes a perfectly serviceable blink and keeps the average current drain down around a milliamp or so.

In between, M3 buffers the astable’s output to deliver enough current to C4. Without the buffer, the cap draws enough current to mess with the oscillations; that’s how I got backed into this corner.

Figuring the LED at 20 mA for 50 ms, the astable at 10 µA, and the buffer at half of 40 µA, the average current of 1 mA comes entirely from the LED, so even a weak lithium camera battery should last a good long while.

If the low average drain ekes 1000 mA·h from the battery, the LED should blink for a month or two before the battery shuts down.

Leave a comment

Astable Multivibrator: 2N7000 MOSFET IDSS and Vthr Tests

Building an astable multivibrator from MOSFETs for longer time constants and more reliable operation suggests I should know a bit more about their operation with minuscule currents and low voltages. I have a small stock of low-threshold ZVNL110A MOSFETs, but using something less obsolete seems in order.

Dirt-cheap 2N7000 MOSFETs have a maximum IDSS around 1 µA at room temperature, which would be way too high in this situation; there wouldn’t be much difference between their ON and OFF states.

The test setup is simplicity itself:

2N7000 IDSS - calibration

2N7000 IDSS – calibration

The initial reading from a 4 V bench supply was 0.00 µA on the Siglent SDM3045, my best low-current meter, so I put a 10 MΩ resistor across the drain and source terminals:

Astable - 2N7000 - IDSS cal

Astable – 2N7000 – IDSS cal

Close enough, particularly given the silver fourth band on that old carbon composition resistor and its no-doubt unclean surface.

The rest of the 2N7000 MOSFETs have IDSS ≤ 10 nA, which you can’t distinguish from zero on that scale.

The 2N7000 datasheet specs give a threshold voltage from 0.8 to 2.5 V for 1 mA drain current, bracketing a 2.1 V typical value, which would be too high for a nearly dead lithium cell.

I calibrated the VGS(thr) current at 11 µA with a 348 kΩ resistor:

2N7000 MOSFET Id cal

2N7000 MOSFET Id cal

Which produced 11.49 µA at 4 V, just as it should, so I plugged in a MOSFET and twiddled the trimpot for a nice round 10 µA:

2N7000 MOSFET Vthr test

2N7000 MOSFET Vthr test

Most transistors conducted 10 µA with the gate at 1.42 V, with a few outliers spanning 50 mV on either side. Close enough and low enough!.

Now, to conjure an astable.

Leave a comment

Stink Bug Haven

We hung a pine-cone wreath beside the back door (a.k.a. the only door we use), replacing a Welcome sign painted on a slate tile. Of course, the tile had long provided a sheltered spot against the house siding:

Marmorated Stink Bugs and Spiders

Marmorated Stink Bugs and Spiders

Reports from the garden suggest Brown Marmorated Stink Bugs aren’t as damaging as they once were, perhaps because something has developed a taste for them.

We hope whatever it might be eats well this year.

6 Comments

Cable Ports vs. Foot Traffic

Spotted this under a counter at Panera Bread:

Power and network cables - floor plates

Power and network cables – floor plates

You’re looking downward from the edge of the communal meal countertop at the power and network cable ports in the floor. The cables snake into the counter legs and emerge at the countertop to provide AC power, USB charging, and wired  network ports in addition to ubiquitous WiFi: all the conveniences of modern dining.

Alas, down at floor level, the poor cables get kicked against the edge of their cover plates, bent with no strain relief, and seem jammed under the sharp edges of the leg extrusions. I expect the connectors below the hatches also endure a nightly bath of gritty water, with bonus salt during the winter months.

And, yes, the AC power plug sits halfway out of its socket, with the blades exposed.

2 Comments

Multimeter Probe Cable: FAIL

A reasonably good silicone-wire multimeter probe set arrived last spring and has worked well enough (I thought, anyhow) for the usual voltage measurements, but recently failed while measuring a small current. We all know how this will turn out, but the details may be of some interest.

Measuring the resistance from tip to plug located the fault to the black probe, after which I poked a pin through the insulation near the plug:

Multimeter probe - diagnosis

Multimeter probe – diagnosis

The two leads near the bottom go to my shiny Siglent bench multimeter. Despite their similarity to the failed probes, I’m pretty sure Siglent has better QC (well, mostly).

The probe’s resistance was near zero from the tip (offscreen to the left) to the pin and megohms from pin to plug (on the right). Figuring the wire worked loose, I pulled it away from the plug:

Multimeter probe - disassembly 1

Multimeter probe – disassembly 1

Huh.

Although I wouldn’t have trusted those probes anywhere near their alleged 1 kV rating, seeing that exposed copper-like substance was disconcerting.

Hacking off the strain relief bushing around the wire got closer to the fault:

Multimeter probe - disassembly 2

Multimeter probe – disassembly 2

And, finally, the problem becomes obvious:

Multimeter probe - disassembly 3

Multimeter probe – disassembly 3

Yet Another Cold Solder Joint:

Multimeter probe - cold solder joint

Multimeter probe – cold solder joint

Pulling a black banana plug from the heap, I decided to drill a proper hole to anchor the wire:

Multimeter probe - drilling plug

Multimeter probe – drilling plug

Which looked like this afterward:

Multimeter probe - soldered plug

Multimeter probe – soldered plug

And produced a strongly mismatched pair:

Multimeter probe - repaired

Multimeter probe – repaired

Ain’t it amazing how much fun you can have for a few bucks, all delivered by eBay? [sigh]

, ,

Leave a comment

Darlington Transistor Sorting

A discussion of random numbers at Squidwrench brought those gamma ray detectors to the top of the heap, with the observation I probably needed a few more Darlington transistors:

Darlington transistor - hFE sorting

Darlington transistor – hFE sorting

Sorting two lots of 50 transistors by gain kept me out of trouble for a while:

Darlington transistors - sorted

Darlington transistors – sorted

Those are MPSA14 NPN and MPSA64 PNP transistors, with DC gains ranging from around the spec’s minimum 10 k spec all the way up to well over 100 k.

Leave a comment