Monday, September 22, 2025

LED Fluorescent Tube Replacement

 The once ubiquitous fluorescent light tubes are gradually being replaced by the LED light.  The once popular compact fluorescent bulbs are already near extinct.  Two of my 3' fluorescent tubes are not working right: they do not light up fully.  They are the F30T12 rapid start type (30W, 1.5" diameter).   The ballast is rated at 120V 0.65A and has eight wires: white and black for neural and live AC input, two tubes share one pair of yellow wires and one pair of red and blue go to the other end of the tubes with the so-call "tombstone" holders.  While I'm not sure if the tubes are or the electronic ballast are bad (I do suspect the ballast since the tubes work sometimes), replacing with LED tubes is less expensive than getting new ballast or fluorescent tubes.  

An 18W T8 (1" diameter) LED tube costs about $7 (at quantities of a pack of 4); it can be installed plug-and-play (Type A) or with the ballast removed (Type B).  It is rated at 100-277V 0.18A.  It claims 45W equivalent and 2520lm 6000K, which would imply 140lm/W, a little high (as a comparison, a Philips 18W puts out 2000lm 6500K). The tube is made of two rows of LEDs, total 120 individual LEDs (laid out on a PCB with groups of 5 in parallel).  The back side is aluminum, where the LED PCB is mounted on, and the front is transparent plastic cover (not frosted).  The two pins at each end are shorted.  The tubes work when plugged into the existing fixture without modification, but I could notice some flickering and humming of the ballast.  There was a slight delay for the LEDs to turn on when starting cold; once warmed up, it started instantly.  When I measured the input current, I was surprised that it read 0.9A (that is over 100W), not only it exceeded the LEDs current by a lot (should be less than 0.4A) and but also more than the ballast rating.  Also the ballast seemed to fail completely after a few times.  I definitely need to try bypassing the ballast, which is straightforward.  Each LED tube draws only 0.135A, 16W (measured by the multimeter and the power meter); it is much better without the ballast: instant start, no humming and lower power (reduction of more than 50% with at least similar brightness if not brighter).

The common electronic ballast circuit is a resonant half bridge with a capacitor bypass.  Initially the current flows through this capacitor and heats up the filament; a higher strike voltage is generated to start arc discharge through the tube.  Afterwards the current through the bypass capacitor and the filament is reduced and the voltage across the tube is also lowered. A transformer feedback sustains the oscillation, which is over 10KHz. Some include power factor correction. The question is how the LED tube is able to tolerate the high voltage from the ballast.  One possibility is that it has a low-pass filter to attenuate the high-frequency voltage.

When I took down the ballast, it felt rather heavy, 3.5 lbs.  I realized that it is not an electronic ballast; it is the magnetic type.  The ballast is over 30 years old (possibly manufacture in 1991 based on a marking on the ballast). The inductance measurements are: black-white 390mH (10Ohms), yellow 47uH (0.4Ohm), blue 48uH (0.4Ohm), red 109uH (0.4Ohm).  The coils provide heating to the cathode.  The coils appear DC isolated.  When 120V AC is applied to black-white, about 4V AC on each coils, across yellow and blue is 226V and yellow and red is 5V (something seems faulty here).  Between blue and red is 1.4H, yellow and blue is 1H, yellow and red no inductance.  So there is an additional coil that is connected through capacitors; it functions like autotransformer to generate the high voltage.  So I suspect a broken capacitor.  Unfortunately, the ballast is completely potted.


Another question is, does a Type A only LED tube work without a ballast?  Testing confirms it does not work.  This is because this type of LED tube requires higher voltage provided by the ballast.  Other explanations out there make no sense. 

Friday, September 19, 2025

NVMe Speed Test

 The computer peripheral bus is eventually settled on PCIe and one small form factor expansion card is M.2 which provides up to 4 PCI express lane.   NVMe SSDs are now widely used and getting inexpensive.  Coming in size 2280/60/42/30.  M Key.


- Patriot Memory P310 NVMe PCIe M.2 Gen 3 x4 480GB $29.49 (6 cents/GB) 11/24

- Patriot Memory P310 NVMe PCIe M.2 Gen 3 x4 240GB $18.99 (8 cents/GB) 10/24

- Western Digital WD Blue Gen 3 x4 M.2 2280 500GB $49.99 (10 cents/GB) 6/22

- Lexar E-series 64GB Micro SD 100MB/s U3, A1,  $6.13 (10 cents/GB) each (for a pack of 3) in 10/24, 

- UGREEN 10Gbps M.2 NVME to USB3.3 Gen 2 $15.99 in 11/24

- ORICO M.2 NVMe USB3.1 Gen 2 (10Gbps) $18.99 in 6/22


ORICO + Patriot 480GB + Macbook Pro Linux

gnome-disks benchmark, 100MB 100 Samples
Average Read 458.4 MB/s
Average Write 417.6 MB/s
Average Access time 0.22 msec

dd if=/dev/zero of=/media/davex/Pat480G/dump.bin bs=1G count=100 status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 1696.78 s, 63.3 MB/s

dd of=/dev/null if=/media/davex/Pat480G/dump.bin bs=1G count=100 status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 242.579 s, 443 MB/s


UGREEN + Patriot 480GB + Macbook Pro Linux

exFAT

dd if=/dev/zero of=/media/davex/PAT480GXFAT/dump.bin bs=100M count=4K status=progress
429496729600 bytes (429 GB, 400 GiB) copied, 956.569 s, 449 MB/s

sudo dd if=/dev/sdd of=/dev/null bs=100M count=4K status=progress
429496729600 bytes (429 GB, 400 GiB) copied, 974.971 s, 441 MB/s

UGREEN + Patriot 480GB + PC Windows 10

exFAT

winsat disk -drive d
> Disk  Random 16.0 Read                       215.03 MB/s          7.8
> Disk  Sequential 64.0 Read                   642.06 MB/s          8.2
> Disk  Sequential 64.0 Write                  661.92 MB/s          8.2
> Average Read Time with Sequential Writes     0.190 ms          8.6
> Latency: 95th Percentile                     0.321 ms          8.8
> Latency: Maximum                             0.610 ms          8.9
> Average Read Time with Random Writes         0.192 ms          8.9

UGREEN + Patriot 240GB + Macbook Pro 

gnome-disks benchmark, 100MB 100 Samples
Average Read 458.5 MB/s
Average Write 420.8 MB/s
Average Access time 0.08 msec

dd if=/dev/zero of=/media/davex/Pat240G/dump.bin bs=1G count=100 status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 718.181 s, 150 MB/s

dd of=/dev/null if=/media/davex/Pat240G/dump.bin bs=1G count=100 status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 242.159 s, 443 MB/s


ORICO + Patriot 240GB + Macbook Pro Linux

NTFS

dd if=/dev/zero of=/media/davex/Pat240G/dump2.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 811.527 s, 132 MB/s

ext4

sudo dd if=/dev/zero of=/media/davex/Pat240G/dump.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 240.032 s, 447 MB/s

tr '\0' '\377' < /dev/zero | sudo dd of=/media/davex/Pat240G/dump2.bin bs=100M count=1K status=progress iflag=fullblock
107374182400 bytes (107 GB, 100 GiB) copied, 261.163 s, 411 MB/s

sudo dd if=/dev/random of=/media/davex/Pat240G/dump2.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 429.978 s, 250 MB/s

exFAT

dd if=/dev/zero of=/media/davex/PAT240GXFAT/dump2.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 250.026 s, 429 MB/s

dd if=/media/davex/Pat480G/Lux2e/Lux2e.vdi of=/media/davex/PAT240GXFAT/Lux2e/Lux2e.vdi bs=100M status=progress
124962996224 bytes (125 GB, 116 GiB) copied, 422.505 s, 296 MB/s

UGREEN + Patriot 240GB + Raspberry Pi 5

exFAT

dd if=/dev/zero of=/media/davex/PAT240GXFAT/dump2.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 415.082 s, 259 MB/s

dd of=/dev/null of=/media/davex/PAT240GXFAT/Lux2e/Lux2e.vdi bs=100M count=1K status=progress
124962996224 bytes (125 GB, 116 GiB) copied, 327.183 s, 382 MB/s

Patriot 240GB + Raspberry Pi 5 (nvme)

exFAT

dd if=/dev/zero of=/media/davex/PAT240GXFAT/dump2.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 297.226 s,  361 MB/s

dd of=/dev/null of=/media/davex/PAT240GXFAT/Lux2e/Lux2e.vdi bs=100M count=1K status=progress
124962996224 bytes (125 GB, 116 GiB) copied, 278.538 s, 449 MB/s


UGREEN + Patriot 240GB + Jetson Nano

exFAT

dd if=/media/davez/PAT240GXFAT/Lux2e/Lux2e.vdi of=/dev/null bs=100M status=progress
124970336256 bytes (125 GB, 116 GiB) copied, 561.616 s, 223 MB/s

dd of=/media/davez/PAT240GXFAT/dump.bin if=/dev/zero bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 1405.02 s, 76.4 MB/s


UGREEN + WD 500GB + Macbook Pro 

ext4

gnome-disks benchmark, 100MB 100 Samples
Average Read 456.6 MB/s
Average Write 329.8 MB/s   (start off at 420 MB/s , drop to 260 MB/s after half way)
Average Access time 0.21 msec

sudo dd if=/dev/zero of=/media/davex/SYSTEM/dump.bin bs=100M count=1K status=progress
107374182400 bytes (107 GB, 100 GiB) copied, 401.139 s, 268 MB/s


WD 500GB + Raspberry Pi 5 (nvme)

ext4

sudo dd if=/dev/zero of=/media/davez/SYSTEM/dump.bin bs=100M count=1000 status=progress
104857600000 bytes (105 GB, 98 GiB) copied, 321.092 s, 327 MB/s

sudo dd of=/dev/null if=/media/davez/SYSTEM/dump.bin bs=100M status=progress
104857600000 bytes (105 GB, 98 GiB) copied, 116.73 s, 898 MB/s


The file format block size has a significant effect on the speed; it is a tradeoff between the speed and disk space utilization.