Single transistor touch switch built as a classroom teaching project

I was approached by my local maker space, Moore Makers, and asked if I wanted to do a talk or teach a class. I enthusiastically said yes! I offered to put together some kits to build a simple single transistor touch switch. The entire circuit has only three components and can be assembled on a small breadboard. The cost for each kit is $1 to $2 depending on where you source the parts from.

A transistor is a semi-conductor which means that it can vary a current flow from none to a lot. It is really just a switch. It has three leads; a collector, a base and an emitter. When a current is applied to the base the collector and emitter will conduct electricity. This is of course a VERY simple explanation of how a transistor works but it will suffice for the understanding of this circuit.

touch switch project 004

The circuit.
When your finger touches the two strips of copper wire a small current flows through the skin from the battery positive lead to the transistor base lead. This current can be varied in it’s resistance by how hard you press your finger on the leads and by how moist your skin is. DO NOT allow the full 3 volts of the battery to touch the base! This will destroy the transistor!

touch switch schematic

To make the kits for this project I cut up two breadboards into smaller pieces with a band saw. Each piece has 25 holes in a 5 by 5 pattern. This is all that is needed to assemble the project on. I cut pieces of foam board into 2″ x 2″ squares then hot glued the mini-breadboards to the foam board. I printed up the breadboard layout sheet on a laser printer 4 up on an 8.5″ x 11″ page then cut them into 4 sheets. The copper wire is a single piece of 20 gauge bare wire cut to about 3″. I’m allowing the builders to cut and bend the pieces themselves but you could also cut and bend them ahead of time. The kit calls for four pieces of wire cut to 1/2″ lengths and bent into a U shape. Two of them are for the contacts and two are to help hold the small wire of the battery leads in place. I ordered the parts from Tayda Electronics for about $30. The batteries and copper wire came from Radio Shack.

Assembly.
Refer to the breadboard layout diagram below for placement of wires and components.
Cut the length of bare copper wire into four 1/2 inch long pieces. Using a pair of needle nose pliers bend two pieces into a U shape the same width as the hole spacing on the breadboard. Bend the other two pieces at a right angle in the middle. Remove the batteries from the battery holder. Insert the black negative battery lead into the breadboard and in the same hole insert one of the right angle pieces of copper wire to help hold the battery wire in place. Insert the red positive battery lead into the breadboard and in the same hole insert the other piece of right angle copper wire. Install the transistor paying attention to the pin placement as shown on the breadboard layout diagram. Bend the leads of the resistor and insert them into the proper holes in the breadboard. Install the LED in the breadboard paying attention to the positive and negative pin placement as shown on the breadboard layout diagram. Insert the U shaped copper wires into the breadboard to serve as the contacts for your fingers. Check to make sure all the components and leads are in the proper place. Check all the bare leads and make sure none of them are touching each other. Once you are sure everything is OK, install the batteries in the battery holder taking care to put them in the right way!

Click the links below to download the Breadboard Layout Diagram and instructions in PDF format:
Breadboard LayoutDiagram
Single transistor touch switch instructions

breadboard layout

Making it work
Place your finger across the two bare copper wires. The LED should light up. If it doesn’t, moisten your fingertip and try again. You’ll find that the LED will glow brighter with more pressure and dim with less pressure. This is because you are changing the resistance of the current flow and the transistor is “semi-conducting. Experiment by touching one finger on each lead. Now the current is flowing through your entire body. Try touching one lead and have another person touch the other lead. Now touch each other skin to skin and watch the LED light up.

You can learn more about transistors and build other projects by visiting this website:

All the parts for this project were ordered from Tayda Electronics. Below is a list of the parts with the Tayda part numbers.

Parts list:

From Tayda Electronics:
1 – BC547 Transistor NPN 45V 0.1A Part# A-137 Price: $0.04

1 – 220 OHM 1/4W 5% Carbon Film Resistor Part# A-2119 Price: $0.01

1 – LED 5mm Red Super Bright Part# A-1554 Price: $0.03

1 – 2 x AA Battery Holder Part# A-746 Price: $0.16

1 – 830 Point Breadboard Part# A-2372 Price: $4.59

From Radio Shack:
Insulated hook up wire (must be stripped) Part# 278-1222 Price: $8.99 for 75 feet.

This week’s project video. Keep on hackin!

1973 Honda CB750 Cafe Racer Build Episode 7 – Front Fork Assembly

I received more parts this week from House Of Honda. I really love these guys as a parts source for the early Honda bikes. They have all the factory parts diagrams making it really easy to find the parts you need. I also use them as a reference for the sizes of certain bolts on this project. Searching through all the bolts I have and coming up with different lengths makes it difficult to choose which bolt is the right one. I did NOT take the bike apart so I have no idea which bolts go where. By looking at the parts diagram and the corresponding part number I can get the exact specs on diameter and length of the bolt I need.

Follow along as I assemble and install the entire front fork assembly on this 1973 CB750K3.

Keep on hackin…

All About Pulse Width Modulation

Pulse Width Modulation (PWM) is a very useful technique to control and modulate a device electronically. An example would be controlling the speed of an electric motor. One way to do this is through the use of a potentiometer to limit the current going to the motor by shunting some of the voltage to ground. The problem with this is the current induced heat that builds up in the potentiometer. PWM solves this problem by sending short pulses of current to the motor. By changing the width of the pulses we can make the motor go faster (longer pulse) or slower (shorter pulse). There are a few other ways to do this with electronic components such as a 555 timer or with switching transistors. A very simple way is to use a micro controller to send the pulses to a MOSFET transistor which then acts as a switch to deliver a separate current to the motor.

In this week’s video I’ve set up a simple demonstration using a breadboard to hold a few components, a small DC motor and an Arduino Leonardo micro controller. I connected the output from the MOSFET to my analog Tektronix 453 oscilloscope so you can see the square wave pulses as they change width. You can use the parts list, wiring diagram and code below to set up this experiment yourself.

Parts list:

1 – N-channel MOSFET transistor (used to switch negative voltage)
1 – 100K resistor
1 – 1N4001 rectifier diode
1 – Small DC motor
1 – Breadboard and some hookup wire
1 – Arduino compatible micro controller

About the circuit:

The MOSFET has three pins; Gate, Drain, Source. When a voltage is applied to the GATE it triggers the MOSFET to turn on. The SOURCE pin of an N-channel MOSFET gets connected to the negative side of the supply voltage. The DRAIN pin is what delivers the negative voltage to the device being controlled. A 100K ohm pull down resistor is usually connected between the Gate and ground to insure that the MOSFET turns off completely when no voltage is present at the GATE. A rectifier diode is connected between the positive voltage and the DRAIN to protect the MOSFET from motor induced back current. The potentiometer is connected to the micro controller and the code reads the resistance value to determine the pulse width that is sent to the MOSFET gate pin.

Here’s a picture of the setup I used in the video.
pwm breadboard actual  layout

Wiring Diagram:
pwm breadboard layout

Code:

/* Simple code to experiment with Pulse Width Modulation by Dino Segovis.
This code reads the variable resistor on pin 3 and stores it as a value.
The value is then converted to another value between 0 and 255 which is output on pin 9.

*/

int motorPin = 9; // motor connected to digital pin 9
int analogPin = 3; // potentiometer connected to analog pin 3
int val = 0; // variable to store the read value

void setup()
{
pinMode(motorPin, OUTPUT); // sets the pin as output
}

void loop()
{
val = analogRead(analogPin); // read the input pin
analogWrite(motorPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
}

This week’s video… keep on hackin!

Hacking RC Toys For Parts

Many of my projects use parts that I’ve salvaged form various devices. The Rumble Robot was an early project that used the entire toy and main board. The All Terrain Robot used the main board and drive motors from a Roomba vacuum robot. I really enjoy tearing these things down to find out if there’s anything that can be repurposed into another device. This particular toy came from a junk pile of abandoned electronics.

It turns out that there are some nice motors and a control board in this toy that I may use in a future project. This was an RC toy from Tyco RC called the “Tyco Shell Shocker”. The motors are driven through some relays so I’m not sure if I can vary the speed using a pulse width modulated signal. That’s for another video. :)

Keep on hackin…

1973 Honda CB750 Cafe Racer Build Episode 6

Wow! What a challenge this build is! Every part I need turns into a grand search through all the bags and boxes and sometimes I can’t find the part I need.

This week I managed to get the rear wheel bearings installed and did an initial tension on the rear wheel spokes. I found I was missing one of the spoke nipples so I had to stop with the tensioning until I can get another one. I’m also missing the rubber dampeners for the final drive flange. This is going to be a long build process, but it’ll be a good opportunity to record every aspect of a CB750 build.

Enjoy this week’s episode and…

keep on hackin!