18 May 2015

It's IoT time! Wireless online thermometer with ESP8266 and DS18B20

IoT, Internet of Things, is not rocket science anymore. Grab an ESP8266 WiFi module, a USB-to-serial adapter and few wires later you are programming it through the familiar Arduino IDE. The most annoying part is providing 3.3 V at 300+ mA as power supply. That's about 10 USD if you already have a computer for programming.

For this initial test I am uploading my shack room temperature to thingspeak.com in the "ZYW Home" channel.

The circuit reads temperature every 60 seconds (almost 62 seconds, actually) and uploads it to the cloud. The temperature sensor is a 1-wire DS18B20. The dashboard shows the average temperature in buckets of 10 minutes and how many measurements have been made since power-on.

Incidentally the latter number provides two more information:
  1. power outage at home if "cycles" restart from 1
  2. xDSL outage or problems if there is a gap or no data upload
 I want to add another temperature sensor for outside and, when ESP-201 modules will come, a solar panel for reading solar illumination. Since ESP-201 allows deep-sleep state, the whole thing could even be battery powered and solar recharged.

10 May 2015

PowerBook G4 ambient light

The Apple PowerBook G4 was a powerful laptop ... in year ~2002. I was given a non-working 12" unit in case I could salvage some parts for my projects. Well, besides the battery pack that still holds the charge and lots of small screws, not much in there can be reused. But I was intrigued to find out how the typical Apple cover pulsing light works. So I started carefully dismantling the laptop until I was left with the metallic cover only.
While I have not really understood where the pulsing light is, I had a bright idea: use the metallic cover as heatsink for 1W LEDs and create a diffused light lamp.

After four LEDs and a little wiring the object finally shone:

The lamp held at about 10cm from the wall
In the beginning I connected the 4 LEDs in series, requiring about 12V 300 mA, but that voltage was a problem for a battery powered object that had to keep the low and sleek profile of the original source. So I rewired LEDs in parallel, and now I can use a 3.7 V LiPo cell that can sustain 1.5 A of current. That's much easier to recharge and doesn't need a booster circuit either.

The lamp with other room illumination.

Battery and (mesy) wiring.

I am really satisfied with the result. In a dark 20 sq.m room the lamp produces enough light for reading. I need to find a simple way to hang it 10 cm or so from the wall and a convenient power switch (now it is a jumper, the blue one in the third picture).

Possible improvements: PWM the current so that intensity and current drain can be reduced; use a microcontroller to control each LED and put up a light show, ...

29 April 2015

Pixie kit - I give up

I have checked everything 10 times.
I have removed key components.


The 40m Pixie kit oscillator does not start, unless the varicap diode is shorted meaning there is neither frequency agility nor TX/RX shift.

I give up. In the time spent debugging I would have built the same circuit dead-bug style. Maybe I will. One day.

28 April 2015

Pixie kit - does not oscillate

The 40m Chinese Pixie replica does not work. The oscillator does not start. Can't get simpler than this.

Besides some capacitor values very different from most common designs, I cannot get the oscillator to start if the RIT/VXO arrangment is in place.

When the varicap diode (reverse polarized 1N400x) is shorted the oscillator runs smootly. Otherwise nothing happens. The supplied diode is OK, because I replaced it with no improvement.

The coupling capacitor to the PA stage isn't guilty either, since I removed it and still no oscillation.

There must be something wrong in the cap value at the RIT/XIT side. It is one of those capacitors where the documented value doesn't match.

Further investigation is needed. With a Manhattan/dead-bug layout would have been easier and safer.

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.