More crooks from China: Shenzhen Enbar

eBay isn’t the only place where bad companies and individuals hang out. Regardless of the market, a lot of them are in China. Here’s some information about how to check for Chinese scam companies.

I bought 100 ER34615 lithium batteries with custom pigtail connectors from Shenzhen Enbar on Alibaba. Within a year, all of them were dead whether they had been used or not. This type of battery has a 20+ year shelf life. Taking the generically marked shrink-wrap off the failed batteries, there were numerous spot-weld marks on the battery anode where a different tab had been mounted.

I understand that every company occasionally has a bad batch so I reached out to them to analyze the failures, but they had no interest in that and suggested that I just buy more batteries from them! Their “engineer”: Eric Lee insisted that their batteries must be used within 6 months or they will be destroyed by passivation (the normal process of building up a thin oxidation layer that is precisely what gives the batteries their long storage life). He sent me a datasheet with the specs for their batteries that includes “Long Storage Life”…and complained that I had embarrassed him by bringing up the failures! They are obviously not a legitimate or reputable company.

It turns out that a common scam in China is to take batteries that have been sent for recycling, put new shrink-wrap on them and resell them as new (at a discount of course). Buyer beware.

I won’t be buying from Shenzhen Enbar again.

XL6009 Switching Converter – Warning

The XL6009 is a nifty, inexpensive switching voltage regulator from XLSemi. (see datasheet). There is also the XL6019 (see datasheet). They are great parts and operate over a wide input voltage range at high efficiency and their internal switch can deliver substantial current. They can operate in boost and SEPIC/Buck-Boost configurations

HOWEVER you need to be cautious when using the ENable pin (2): the datasheet indicates that EN is a TTL compatible input and considers anything over 1v4 as High (Enable) – that’s good. It also mentions that if left unconnected, the pin floats high (enabled) – that’s also fine.

What wasn’t apparent to me, and certainly isn’t spelled out in the datasheet, is that when the EN pin floats high, it is at Vin and can source enough current to do damage. So if you are using the converter to boost say 12V to 24V, you’d better not connect that EN pin directly to a microprocessor GPIO because the processor pin will be at 12V and will be destroyed! (as I learned the hard way)

The solution of course is simple, just use the processor GPIO to drive a transistor in an open drain/open-collector arrangement to disable the converter. A common 2N2222 or 2N3904 should work just fine over the full input range of the XL6009. Live and learn.

Acer Chromebook 15 Windows

As I’ve gotten older, small screens have increasingly become a problem. I love the real-estate of a full-HD (or bigger) screen, but when they’re smaller than 15.6″, the fonts are getting hard to read for these old eyes.

There aren’t many 15.6″ laptops that met my requirements (1080p, long battery life, 4GB or more, core i5 or better, light weight), especially when you want it to be inexpensive: I prefer not to carry something that costs more than around $200 because laptops get broken/stolen/lost/etc.

So I bought an Acer Chromebook 15 on eBay for $180 and so far, I like it a lot. I replaced the stock 32GB SSD with a KingSpec 256GB SSD (M.2 2242) bought on amazon for $34.15 and installed Windows 10 Pro 64-bit from SCDKey using coolstar.org replacement BIOS. It’s a bit over budget, but still pretty close to the $200 target and it is now a very serviceable Windows laptop with decent battery life, speed (core i5-5200), and a screen I can read. The battery is replaceable and widely available so when that run-time starts to decline, that’s fixable too.

It could be a little lighter and I would have liked more RAM, but it runs all of the software I use and is pretty snappy. Overall, Acer chromebooks continue to impress me!

Windows Programming in C???

I usually use Java when developing desktop software, but I recently had need to develop code that provided both a Windows GUI and also supported low-level interface with hardware connected to the PC. Java is great for developing GUIs and I still like the ancient Matisse GUI builder for Netbeans/Java Swing – I can knock out GUIs really fast with it…however, Java apps can be big and slow and interfacing Java with custom hardware is painful..so I looked into developing Windows native GUI apps in C to give really fast and small code that can interface easily to hardware…and have been pleasantly surprised.

Two things helped:

The Pelles tool is slick, fast, and provides wizards for anything you’d want to build for a Windows target. The tutorial provides loads of compact runnable examples showing how to use each widget and feature of the WinAPI. There are other good WinAPI tutorials as well such as The Forger’s tutorial.

Next: find a GUI builder like Matisse for WinAPI. Pelles includes a resource editor but not a full GUI builder.

Mustool == Junk?

This is my second post about disappointing Mustool products (there won’t be a third).

I use stereo optical microscopes when doing surface-mount electronics (SMT) assembly and inspection. They work well, but are large and heavy. I decided to try one of the inexpensive “digital microscopes” that was reviewed well and looked like it had a large relief distance (the distance between the lens of the microscope and the item being viewed) which is important so you have room to work.  I ordered the Mustool G600 from Banggood.

Mustool G600

The good: the aluminum stand was easy to assemble and they even included the required Allen key.  The stand works well, adjusting the microscope height is smooth, and the relief is indeed quite good.  When I first turned it on, the buttons were a little unresponsive and it presented a menu that I couldn’t navigate, but after turning it off and back on, and adjusting the smooth focus knob, the microscope gave a clear, sharp picture.

Small bad: I didn’t realize how beneficial stereo is to SMT work.  With a mono image, even though it was sharp, I didn’t have any depth perception which made it hard to tell how high above the board my soldering iron and solder were.  It’s possible I’d get used to this but I’ll never know because…

Big bad: I played with the microscope for 5-10 minutes and then turned it off.  When I tried to turn it back on…nada: just a black screen.  I tried charging it, resetting it, pressing every button combo I could think of and it just remains unresponsive.  So it’s dead.

The worst: I received the package during the week and didn’t have time to play with it until the weekend which was past the Banggood 3-day warranty period – yes, you read that correctly: 3 days.  So any money I saved by purchasing on bangood is now easily offset by the $42 wasted on this piece of junk – not to mention the time and aggravation.

This is my second extremely disappointing mustool purchase; the first was their MT8205 scopemeter – which was also a complete waste and you can read about it in my blog. I will not purchase anything made by Mustool again; fool me twice…shame on me.

Until now, I’ve been a big advocate of banggood; they refunded my purchase price for the MT8205 – which reinforced my faith in them as a seller.  It’s a shame they are now carrying such junky products and chasing them with a ridiculous warranty.  I’m going to have to re-think purchasing from Banggood since the same products are usually available on amazon with reasonable warranty and return policies.

eBay crooks: flyxy2015, 3c_topstore

I buy a lot of gear on eBay and the overwhelming majority of sellers are excellent, but every now and then you meet the crooked ones.  This post is to help others avoid getting scammed by two bad sellers: flyxy2015 and 3c_topstore:

1) Seller flyxy2015 sold me a 10MHz OCXO distribution amplifier.  However, the OCXO I received was far off frequency and not within the correctable range.  The seller offered to ship a replacement for the internal Dapu OCXO; I took him up on this and of course what he really did was wait out the eBay return period without ever sending the replacement part.  Scam artists like fly-xy are part of why people are reluctant to use eBay.

2) Another seller (3c_topstore) sold me a scam graphics card.  The card had been altered to appear to be a more expensive card so it sort of worked, but it crashed whenever the driver tried to use the more advanced features or full memory of the card.  It was tricky to figure out what was wrong so by the time I understood the problem, the eBay return period had expired.  Fortunately, PayPal has a longer return period, but they require shipping the card back which would have cost 3c both the shipping and the original price in order for him to get his useless card back.  I thought I’d be a nice guy and offered instead just to split the loss with him…and sure enough, after I’d declined the PayPal return, he went silent and left me stuck with the card.

So in short, a popular eBay scam appears to be to sell you bad product that is either not obviously bad (so it takes you a while to discover it) or to otherwise stall until the return period expires.  eBay needs to do something about this because it is a growing problem that will ultimately hurt their reputation.  Until they figure it out, if you want to avoid crooks, stay away from eBay sellers flyxy and 3c_topstore.

Caveat emptor.

MT8205 review – piece of junk

I’m always looking for bargain test equipment, and sometimes I get burnt; hopefully this review saves you from wasting some time and money.

I bought the Mustool MT8205 from Banggood who advertise it as a “2 in 1 Digital Intelligent Handheld Storage Oscilloscope Multimeter AC/DC Current Voltage Resistance Frequency Diode Tester”; it sells for just under $50 shipped.  I love Banggood and have had lots of good experiences with them, but buyer beware: this product is a waste of money at any price.  (Update: Although this product is something to avoid, Banggood is wonderful and I highly recommend them.  They took this product back at their cost just because I was unhappy with it…now that’s great customer service!)

Mustool MT8205

While it looks good, feels solid, and comes with nice probes and case, it simply isn’t useful for making measurements as my tests below will show.

Let’s start with how it works as an oscilloscope since that’s the interesting feature of this device.  When I ordered it, the ad said 200ksps which would suggest it is useful to look at signals up to at least 20kHz…not great, but at good enough for looking at audio and PWM waveforms.  However, as the ad now says, the analog bandwidth is limited to 10kHz.  A 15kHz signal is severely distorted and it won’t even try 20kHz.  A 10kHz ramp looks just like a 10kHz sinewave.  See the pictures below where I feed it a 15kHz sinewave and a 20kHz sinewave from a Rigol signal generator showing that the bandwidth is indeed limited to 10kHz (i.e. useless).  There are other issues too: there is no trigger control, the signal is always AC-coupled (so you can’t measure anything DC), there are none of the controls you’d expect to find on an oscilloscope and it’s too slow for virtually anything these days.  The scope feature is a complete bust.

To add insult to injury, the multimeter functionality is useless too!  The readout is only 3 digits and even those aren’t accurate!  I hooked the meter up to a lab voltage standard and checked the output with a calibrated 7-digit HP bench meter.  The 10.0000V standard was dead on with the HP meter, but read 9.95v on the Mustool.  What’s worse, when I used it to measure 2.5v and then used it to measure 10v again, it took several (I’m talking 4-5) seconds for the readout to gradually climb to 9.95.  Useless.

Summary:

  • Large/heavy/manual-ranging multimeter
  • Only 3 digits, only 2 of which are accurate (see 10vdc lab standard)
  • Incredibly slow: takes several seconds for voltage to read properly
  • Limited to 10kHz analog bandwidth
  • AC coupled only
  • Oscilloscope has no controls so not even useful as a teaching tool

10VDC from Lab Standard

15kHz sinewave

20kHz sinewave

PlatformIO/Atom/VSCode

I’ve been looking for a relatively lightweight cross-platform embedded development environment for some time.  I target mainly STM32, ESP8266, and ESP32 platforms and use both Linux and Windows development machines.  For various reasons I’m not satisfied with the existing solutions:

  • Arduino – too primitive
  • EmBitz – very nice but no linux and no version control integration
  • VisualStudio+VisualMicro – nice but no linux support
  • Eclipse/NetBeans – too heavyweight and poor embedded integration

So I tried the Atom editor with the PlatformIO-IDE plugin on Windows workstations and on a low-end linux laptop and it works nicely!  I’ve since switched to the VSCode editor which I prefer over Atom.  The install, initial test build using the Arduino Core, and download/run worked well for an ESP8266 target.  I have since used it for Java projects as well.  VSCode is cross platform (Windows/Linux/Mac), and lightweight/fast.

I consider several features essential for an IDE:

  • code completion
  • source-level debugger integration with svn
  • version control integration
  • serial upload/monitor integration (especially for EspressIf platforms)

The community (free) version supports code completion, version control integration, and a rich set of plugins although it clearly prefers git; the subversion plugin doesn’t work very well (see below).  The debugger is not available in the free version and requires the Basic paid version ($10/mo).

The version control integration is spartan and on Windows relies on TortoiseSVN (which is good to install anyway).  Tortoise really needs PuTTY installed too if you use an svn+ssh server.  The right way to do it is to generate a signed certificate and install it on your servers so ssh access is seamless as described here or you can do it in cygwin:

  • ssh-keygen -b 4096 -t rsa -N ”
    (creates private & public certs: id_rsa and id_rsa.pub in ~/.ssh)
  • ssh-copy-id mylogin@foo.bar
    (install your public certificate on server foo.bar)

Once your certificate is installed (puts public cert into ~/.ssh/authorized_keys on your server), logins no longer require password authentication.  Note that if you use cygwin or linux you’ll need to convert your key to be PuTTY compatible…see here.

The serial monitor isn’t as friendly as I’d liked, but is actually quite effective using hotkeys.  See the bottom of this page.

A good video on installing for ESP8266 is here and another on installing external libraries here. Information on managing the Arduino Core is here.

A video on STM32 support is here.

 

Home Automation

2020 UPDATE: Staples/DLink abruptly discontinued service, making their product useless, and Wink abruptly started charging a stiff monthly fee to keep using their product…I don’t support crooked companies so I pitched both in the electronics recycling bin and won’t patronize either anymore.  I now use the Samsung SmartThings hub which works better than either of the prior products and does not involve a monthly fee.  You can read more about it in my Home Automation 2 post.

Several  years ago, we had a water leak in an upstairs bathroom that did a surprising amount of damage overnight.  We had it all repaired, but I resolved to put some automation in place so I would know much earlier if something was going wrong in the future.  I wanted a way to monitor my home remotely using my cell phone and to receive push notifications and an audible alert (even when I am home) if something’s going wrong.

I had experimented with home automation years ago using X-10 which was neat, but their current-carrier and wireless technologies weren’t quite mature enough and the system was problematic.  Technology has come a long way since then so I decided to try home automation again.

I didn’t want WiFi devices for a host of reasons including security, wireless range, and battery life, so I chose Z-Wave for the wireless technology and deployed a Staples Connect hub (made by D-Link).  That worked well for several years until Staples discontinued support; they handed support off to another company, but they are gone too and DLink won’t support it so the Connect Hub is now a $99 brick.  My lesson: don’t buy Staples branded products…and shame on DLink for allowing Staples to use their brand; I bought it because I trusted the DLink brand.

Fortunately, since Z-Wave is a standard, I only needed to replace the hub, not all of the sensors and controls.  I replaced it with a Wink Hub which is also multi-protocol (Z-Wave, Zigbee, WiFi, Lutron, Kidde,…). It was incredibly inexpensive ($34 on Amazon Prime), but I had some challenges getting it going (see below); it’s saving grace is that Wink tech support is the best I’ve ever encountered.  More than once during the first week of ownership, I was ready to ship it back to amazon, but each time, a call to support quickly solved my problem and left me enthusiastic about Wink; they answer the phone right away and their techs are patient, knowledgeable, and get the problem solved quickly; I’m impressed.  If it continues to work well, I’ll buy their newer Hub2.

I installed water leak sensors in the bathrooms and in the basement by the hot water heater and then added motion and door switches, light controls, door locks, etc..  The Z-wave devices work well, with long battery life, excellent wireless range, and very low latency.  So far I have the Wink hub working with:

As mentioned above, the Wink Hub has had some foibles too:

  • Initial Firmware Update was a bear; although my hub was brand new with a blue dot on the box, it needed to update its firmware and couldn’t do so using my access point.  Even though it was connected to the WiFi network (solid yellow light), it couldn’t reach the Wink servers (which would yield a solid blue light).  I eventually succeeded and it worked fine after that, but here’s what I had to do:
    1. turn off my wifi access point to force the hub to disconnect (blinking purple light)
    2. set up a cell-phone hotspot configured for 2.4GHz
    3. Run the wink app on another cell-phone and use it to configure the hub to connect to my hotspot and through it to their server (blink yellow->solid yellow->blink blue->solid blue)
    4. Allow the hub to download its new firmware (blinks all sorts of colors as it updates…when finished, it returns to solid blue).
    5. Turn off the hotspot to force the hub to disconnect (blinking purple)
    6. turn my wifi access point back on
    7. Use the wink-app to reconfigure the hub to use my access point wifi (blinks yellow->solid yellow->blink blue->solid blue)
  • Adding Devices: Initial paring of new sensors/devices can also be finicky; once a sensor is paired, it seems to stay paired and work well; the magic formula seems to be:
    1. use the wink app to put the hub in exclusion mode (blinking blue light)
    2. press the z-wave button on the new sensor once every second or two until the hub light turns green
    3. use the wink app to put the hub in incusion mode (blinking blue light)
    4. press the z-wave button on the new sensor once every second or two until the hub light turns green
    5. If the above doesn’t work, try power-cycling the hub and then trying again.
  • The Wink App: seems to stop working once in a while and I have to shut it down via Android and start it again.

Frequency Counters

Although less exotic than the SA and VNA tools I use during development, I find I make use of basic frequency counters pretty often (mainly to calibrate equipment).

A frequency counter does only one thing: measures the frequency of an RF signal.  What’s important for a good counter is frequency range, timebase accuracy, speed of measurement, and of course cost.  I try to only purchase counters with an OCXO frequency standard although a good TCXO is often sufficient.  An external reference input is very useful when you need very high precision so you can slave the counter to a higher accuracy lab frequency standard (OCXO, GPSDO, or Rubidium).

Having had quite a few counters, I’ve concluded that if you need more than ~200MHz, the older HP/Agilent counters offer the best value, especially if you’re willing to spend $200-250 on eBay for one with their excellent OCXO timebase option (4).  If you aren’t buying a counter with an OCXO, I would make sure to get one with an external 10MHz reference input so you can slave it to an external high-accuracy standard.  If a counter isn’t accurate, what good is it?

I have a couple of HP5385A counters that work to 1GHz; one has the TCXO timebase and is quite accurate; the other has the superior OCXO timebase; both are excellent.  I also have an HP 5386A with OCXO that is good to 3GHz.  For higher frequency measurements, I have an HP 5347A that integrates a power meter and frequency counter up to 20GHz, its maximum frequency resolution is 1Hz (plenty for higher frequency measurements); it only has a TCXO timebase so I almost always use it with an OCXO or rubidium lab standard; it is larger/heavier than the other counters, but it’s hard to get an affordable counter with that much bandwidth.

For counters that are no longer officially in calibration (per certificate), I use a Trimble Thunderbolt GPS-disciplined oscillator (GPSDO) to calibrate them annually.

Recently, many companies have started adding bonus frequency counter functionality to their arbitrary waveform generators; for example, my SDG2042X has a counter input that is good to 200MHz.  The counter’s internal reference is better than 2ppm, but it supports an external 10MHz reference so I slave it to an external DOCXO standard for higher accuracy.  It requires around -10dBm (200mV) at 200MHz, less at lower frequencies: -20dBm (63mV) works at 35MHz.  Overall, it does quite well up to 200MHz and has some nice features lacking in older counters such as min/avg/max and sdev, duty cycle reporting, deviation from a reference in ppm, etc.