Saturday, March 21, 2020

Teaching Electronics to Kids

My "Introduction to Practical Electronics for Children" course concluded successfully a few weeks back, before March break. Now, with schools closed for covid19, it would be a good time for the kids to practice soldering and learn by doing. At this stage, I think it is easy to expand their knowledge and skills in the field of electronics just by assembling kits.

Here are a few notes and observations from my teaching.
  • Each class had 6 groups of 3 students sharing a soldering station. This (not my decision) was probably based of space constraints (6 desks in a normal-sized classroom) and safety/supervision considerations. It worked pretty well: the 2 students (in each group) not soldering had time to observe, analyze, think and to ask lots of questions. Two professional teachers assisted, with supervision, helping the students and keeping discipline.
  • Each student had their own "HDSP clock" kit to assemble. It took 6 one-hour sessions to complete, with a success rate of about 95% (2 failures out of 38 assembled, because of solder bridges).
  • The intended "50% theory and 50% practice" ratio had quickly become 10/90. Still managed to introduce components (resistor, capacitor, crystal), electrical concepts (AC vs DC, voltage, resistance, current, frequency) and units of measures (Volts, Farads, Ohms, Hertz). We even talked about Tesla batteries :)
  • Some parts were lost (e.g. crystal) or damaged (dropped, then stepped on by accident) between or during the classes. The lesson learned is to have extras available.
  • Each student received individual instructions, guidance, assistance and supervision on soldering. We came up with the "3-second rule" to make a good soldering joint: hold the tip of the soldering iron in contact with the pad and the terminal for 3 seconds while touching and melting the solder wire on the tip.
  • Having students pay attention to the instructions was very important. It saves energy to talk once to the whole class, rather than answering the same question to each individual. (I also learned from professional teachers  the "1-2-3 eyes on me" attention-getter.)
  • Sockets for integrated circuits are a must in a beginner kit. Imagine fixing an IC soldered in the wrong orientation! (The "worst" that happened was that all 3 ICs in the kit were soldered directly onto the board, luckily in the correct orientation.) Also, silkscreen should be as detailed as possible, indicating the component's place. In case of the "HDSP clock" kit, the students were able to easily identify the placeholders for each component, just by using logic (except for the resistors; they learned quickly to bend the resistors' terminals).
  • Some of the most frequent mistakes were soldering bridges and filling empty holes with solder. Bridges were easily fixed (initially by me, then the students learned to do it themselves) using the copper wick/braid, and flux. To fix the solder-filled holes, I had to use a tailor pin (part of my EDC Swiss card).
  • Surprisingly, every student showed interest in working on, and completing, the kit. I think it was a successful experiment even for the school, in making "practical electronics" as part of their curriculum. Like in the old days of practical skills teaching (wood working for boys, sewing or cooking for girls), this course demonstrated that Grade 6 students are very capable and eager to acquire skills that may stay with them for life.

Sunday, March 15, 2020

Teardown of an Old Dimmer Switch

The 40+ year-old dimmer (made by Nortron Industries Limited in Milton, Ontario) in my attic broke down. Electronically, the dimming circuit still worked, but mechanically, the push button got stuck.
This is what's inside, for the curious.

The active component in the circuit is Q2006LT, a "quadrac" which, according to the datasheet, "is an internally triggered Triac designed for AC switching and phase control applications. It is a Triac and DIAC in a single package, which saves user expense by eliminating the need for separate Triac and DIAC components".

The "reversed-engineered" schematic looks like this:

For those who want to understand more on how the triac-controlled dimmer works, this article provides an in-depth explanation.

The 250V capacitors may be reused in a Nixie high-voltage (~170V) power source. For a hoarder, both the choke and the potentiometer (push button removed) look good.

I will report back on the internals of the replacement switch in 40 years or so, when it breaks down. I hope I/it last(s) that long.

Wednesday, March 11, 2020

Rothko Clock Nixie Shield with 6 IN-17 tubes

This compact 6-tube Nixie shield was designed by Tyler a long time ago, when kickstarter was young, and I was following closely and contributing often. Soon after the successful campaign, this open source project, together with its supporting documentation and web site, seemed to have disappeared from the internet.
I already reviewed the Nixie shield here (as part of the "Rothko" clock), and covered it a bit more in another post.
Since I found it appealing, both as a soldering kit and as a miniature Nixie board, I also:
  • modified slightly the original schematic (eliminated the under-the-tube LEDs)
  • redesigned the PCB
  • named the clock "Rothko", to accompany my other clocks in the masters series, "Mondrian" and "Kandinsky". Note that, in this case, the "Rothko" clock is the union of 2 boards: this 6-tube Nixie shield and wsduino (which itself can be replaced by any Arduino with an RTC).

A kit for the Nixie shield is offered on Tindie. The PCB was designed to be self explanatory, but some people prefer the safety of assembly instructions. The slides below, recycled from the original deck, show the sequence of steps.

Once fully assembled, plug the Nixie shield into your Arduino, then upload this basic clock sketch (reads RTC and displays hours and seconds; no setting buttons, no Bluetooth, no buzzer/alarm):

#include "Arduino.h"
#include "avr/pgmspace.h"
#include "Wire.h"
#include "DS1307.h"
#include "avr/io.h"
#include "avr/interrupt.h"

// global variables
unsigned char INDEX = 1;   /* 1 to 6 */
unsigned char HOUR  = 7;   /* 1 to 12 */
unsigned char MINUTE = 45;  /* 0 to 59 */
unsigned char SECOND = 23;  /* 0 to 59 */

boolean is12HMode = false;

// read time from DS1307 at intervals;

long timeReadingCounter = MAX_TIME_READING_COUNTER;

// timer2 used for nixie tube multiplexing

/* HOUR = 10, 11, or 12 or top of minute?*/
if ((HOUR / 10) || SECOND==0)
PORTB = 0x10;  // turn HOUR tens LED on
PORTB = 0x00;  // turn HOUR tens LED off


/* HOUR tens place */
case 1:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (HOUR / 10);

/* only turn anode on if one */

if (HOUR / 10)
PORTD = 0x04;    

/* HOUR ones place */

case 2:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (HOUR % 10);

/* turn on anode */

PORTD = 0x08;

/* MINUTE tens place */

case 3:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (MINUTE / 10);

/* turn on anode */

PORTD = 0x10;

/* MINUTE ones place */

case 4:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (MINUTE % 10);

/* turn on anode */

PORTD = 0x20;

/* SECOND tens place */

case 5:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (SECOND / 10);

/* turn on anode */

PORTD = 0x40;

/* SECOND ones place */

case 6:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (SECOND % 10);

/* turn on anode */

PORTD = 0x80;

/* reset index */

INDEX = 1;

void setup()
// configure pins
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);

cli();  // disable global interrupts

// timer2 1kHz interrupt

TCCR2A = 0x00;
TCCR2B = 0x00;
TCNT2 = 0x00;
OCR2A = 0xF9;
TCCR2A |= (1 << WGM21);
TCCR2B |= (1 << CS22);
TIMSK2 |= (1 << OCIE2A);

sei(); // enable global interrupts


void loop()
    if (timeReadingCounter > MAX_TIME_READING_COUNTER)
      timeReadingCounter = 0;

void getTimeFromRTC()
int16_t rtc[7];

RTC_DS1307.get(rtc, true);

SECOND = rtc[0];

MINUTE = rtc[1];
HOUR = rtc[2];
if (is12HMode && HOUR > 12)
HOUR = HOUR - 12;

void setTime(int hour, int minute, int second)
  RTC_DS1307.set(DS1307_SEC, second);
  RTC_DS1307.set(DS1307_MIN, minute);
  RTC_DS1307.set(DS1307_HR, hour);