24 April 2015

Battery upgrade for electronic keyboard

As most families with children, we happen to inherit toys and alike. We got an electronic keyboard (musical instrument) called "Miles Electronic Keyboard 3738". To my surprise it was built around year 2000, not earlier as the electronics inside would suggest. It works either on 220V AC or 9 V DC provided by six 1.5 V D cells. My older daughter is currently playing with it around home and I don't like her constantly looking for an AC outlet. But no way I buy six heavy D cells that are probably made of AAA on steroids.

Time for a battery upgrade!

First of all, the PSU board is very simple, with a bridge rectifier and a 78L09 9.8V zener: the required current must be low. In fact the current drawn peaks to 40 mA when emitting sounds, and 16 mA in stand-by. Why D cells?! Anyway, I decided to fit a rechargable battery in there, so I chose a recycled 18650 3.7 V Li-ion (originally 2000 mAh) followed by a boost step-up cicuit (I had bought a stock of them). The current requirement does not call for two cells in series.

So I rearranged wiring in a way that the on-off switch acts between the battery positive pole and the boost converter. The AC PSU was already always on when plugged in, only audio electronics were switched off. This fact gives me the chance to repurpose the PSU as a constant voltage Li-ion 1-cell charger. It is now voltage conditioned and fed through a diode (protection against reverse discharge) right to the battery.

The first circuit uses two LEDs (red and white in series) to step down from 9 V to 4.2 V max, but the current flow is too small to recharge in a decent amount of time. It's about 20 mA, as much as the stand-by device current consumption. We've got plenty of non-use time, but I don't want to have the keyboard around, keeping an AC outlet busy just for charging.

Second thought was to fit a Zener diode as voltage conditioner (Resistor - Zener to ground - Diode to battery). Still not optimal.

Third thought: replace the 78L09 with a 78(L)05 and drop voltage to 4.2 V with a couple of diodes in series. Make sure that the recharge current lies within the voltage regulator specs and let them play! Nope! There is no 78L09 in there, just a Zener. So, nevermind, I will leave it at 9V, keep the LEDs and the slow charge.

The messy area inside the keyboard.
The battery and the voltage boost are the red heatshrinked block, that has been superglued to the keyboard top cover.

Pixie kit - so cheap because ...

While buiding the cheap Pixie kit I came to a dead spot when placing few capacitors. So I did few investigations.

First of all, the 10uF felt too small for the marked 25V rating. I searched my junk box for an older 10 uF 16V cap and they are physically the same. See the picture:

Something else puzzled me: the value of C2, C4, C8, C11. It is specified 100 nF but the marking to look for is 103, 10*10^3, 10'000 pF = 10 nF. Which is the correct one? I will search online for other 40m Pixie diagrams and place the correct value.

Then I moved my study to resistors. I had felt something wrong when bending leads: too thin. The comparison with "old" 1/4 W and 1/8 W volunteer samples from the junk box confirms the anomaly. Even the 1/8 W resistor has thicker leads! (click the picture to get a larger version).

Same conclusion for the supplied "dummy load" (blueish resistor): much thinner leads than an old 0.5 W resistor (I have no idea when I bought it in the last 20 years).

Summing it up. I think the Pixie kit is so incredibly cheap most probably because the supplied components are not top quality. Electrolitic caps with wrong voltage rating. Resistors with wrong leads, at least from 3 dB ("one stop" in photography terms, or half) lower power rating. The print error on parts list would be even easier to correct. I wonder what's wrong with the supplied BNC socket (lossy? wrong impedance?) and transistors.

Nevermind. I have already soldered a socket for transistors so that I can try different, more trusted, parts. At 7 MHz the extra stray capacitance should not matter. The price paid is good for the PCB, if it is OK as well...

22 April 2015

Pixie kit - progress

I couldn't resist and started building the cheap Chinese Pixie 40m RTX kit the same day I received it. I looked for a modular route but there is no real block separation, so I decided to solder all passive components before the smoke test.

Building notes:
  • I got far more capacitors than needed, which can be confusing for the inexperienced builder,
  • components have very thin leads, it almost feels they fall apart when bent,
  • components themselves (mainly capacitors) seem too small for their value,
  • the PCB quality is OK but will probably not withstand solder heat applied too long

I am half-way soldering it. In the next building round I will probably reach the smoke test moment.

21 April 2015

Pixie kit, arrived

The Pixie QRP CW RTX has arrived. The PCB is really tiny, 5x5 cm. I am unsure if I should build it AS-IS or apply few mods to improve user experience, like:
  • tuning pot in place of the small resistive trimmer
  • improve the VXO
  • do not use onboard CW and earphone connectors, to ease installation in a repurposed aluminium candy box
I will certainly add a socket for the LM386 IC, for the XTAL and the two transistors. If I am able to swap transistors I can possibly improve TX power or RX sensitivity, or both. And a removable XTAL adds some extra frequency agility.

11 April 2015

Modding RTC DS1307 for non-rechargable battery

I wanted a stand-alone clock for my solar irradiance monitor. So I bought a batch of 5x DS1307 RTC modules for Arduino. The item description and pictures claimed their backup battery was a rechargeable R2032 cell, but they all arrived with a standard CR2032 battery.

Click to zoom
Not a bad purchase, considering the overall cost and how much I would pay for a single CR2032 battery here in Italy (the same price of the whole RTC module), or the stand-by current consumption of the RTC, in the order of uA (microAmps!) that equals the self-discharge current of most battery chemistry.

The problem is that the RTC board includes charging circuitry and when supplied with 5V it tries to recharge a non-rechargable battery. This process damages the backup battery and can cause all sort of troubles (failure to retain clock time, leak, fire). How to fix it?

This is the relevant portion of the backup circuitry:

You may apply two different mods, both valid.

First of all, the recharge can be disabled by removing the (voltage drop) diode. This is enough, but purists may wish to go further.

A fully charged CR2032 cell exhibits a voltage of 3-3.2 Volts, while a rechargable Lithium battery reaches 4.2 Volts. Therefore the module designer added a resistive voltage divider to drop 4.2 V to 3.2 V or so. That's what R4 and R6 do.

So, now you may operate in two different ways, both shown in the picture above. Either remove R4 that goes to ground or also remove&short R6 to feed the battery voltage directly to the DS1307 RTC chip. In the first case the current drawn is so small that the voltage drop across R6 is irrilevant. The second choice is obviously the best fix.

Please note that the procedure described above needs to be reversed if you want to use a LIR2032 in the future.

31 March 2015

Pixie kit, for fun

I read it on another blog. I checked the eBay item and I simply couldn't pass on this one ... for less than 5€@2015 shipping included. Most of all, I was interested to find out if the kit arrives with the ceramic capacitor sticking out of the BNC socket, since it is there in all the pictures showing the product.

Most likely I will have a simple QRPp rig to play with: add VXO and switchable XTAL, improve the RF bandpass filter, increase the output power.

23 March 2015

Breadboard power supply module destructive failure

If you have been shopping for DIY electronics lately, you have probably met the small board pictured here. It fits on the solderless breadboard and provides both 5V and 3.3V regulated output from a 6-12 Vdc input. My two specimens are marked "YwRobot Power MB V2 545043" and probably came from two online sources given that silkscreens look different.

/* If you are in a hurry, you can fast-forward to my conclusions right after the second picture. */

I used this one in my Arduino solar energy monitor and I noticed that AMS1117 regulators were getting pretty hot to touch. A Nano clone, an idle SD card adapter and an HD44780 display shouldn't drain that much current, and if they did they would be warm to touch too. [edit: the whole circuit draws about 50 mA except, I think, for those short moments it writes to the SD card once a minute.]

So I wanted to measure the input current, since that's the easiest point to insert an ammeter. I disconnected the positive lead from the 12 V PSU and inserted there my DVM ... the power adapter switched on but Arduino was behaving erratically. I did a power cycle and nothing happened anymore, no reassuring LEDs saying hello, not even on the YwRobot board.

The DVM internal fuse could have blown, so I restored the original 12 V positive lead and powered everything up.

Arduino LEDs were blinking awkwardly, or not blinking at all. Another wiring check confirmed that nothing had moved or shorted.

Just to be sure I measured if 5 V were still there and ... SURPRISE! I measured 12 V where I was expecting 5 V!

Since I was feeding 5 V directly to the Arduino board, it was fried (the FT232 USB-to-serial adapter survived, though!). The SD card adapter uses its own 3v3 regulator, so it was not damaged either.

I removed the power supply module and verified:
  • 5V output is now few hundred mV below input voltage, that's 12V or so
  • 3.3V output is not present anymore

What the heck is going on here? I decided to sacrifice my second power adapter module, that was equally heating up in my final application circuit.

This time I played it safer and removed the YwRobot adapter board from the solderless breadboard.

First of all, I wanted to know the idle current of the power adapter board alone. I removed it from the breadboard, added my DVM on the positive lead, fed 13V and the current drawn settled to ~20mA, which is fine according to AMS1117 datasheet (10 mA minimum load to keep regulating, and the board mounts two in series). After 5 seconds the board emitted the typical crackling sound of pine wood in the fireplace. And the unpleasant smell of burned electronics.

This time the DVM fuse didn't blow (10 A ;) ) and no other electronics were harmed.

The two broken adapters. Notice silkscreen differences... that don't make a difference!

Post-mortem analysis revealed that:
  • the AMS1117-5 (5V regulator) shows a resistance of 14 ohm between input and output pins
  • it passes through the input voltage
  • the first board's AMS1117-3.3 blew up, the second is still fine
I suspect that those YwRobot MB V2 boards go crazy if input lead lengths differ (I added about 100 cm of wire on the +V): both of them failed this way. What worries me is that failure breaks regulation and passes input voltage to the output pin instead of opening the circuit.

In both cases 220V AC to 12V DC was provided with a solid-state 5A PSU that mounts two 78M12 in parallel.

Curiously enough I find no mention elsewhere of this kind of failure. I do not own other YwRobot adapters and I do not plan to buy any more. Please let me know your thoughts in the comments.