When I got home today, my child was proudly telling me how they had managed to make AND, OR, and NOT logic from his snap circuits electronic kit and was asking me how they could make exclusive or.
Has anyone any suggestions for a simple (and hpefully educational/entertaining) circuit that would do this?
The kit only has simple push switches (i.e. no SPDT switches) and the usual variety of basic electronic components. It does have PNP and NPN transistors but I would prefer something simpler (they haven't used transistors so far). Diodes would be okay as they are easier to understand and more familiar.
One idea I had was something like this:
but it is not ideal as it uses two battery packs and ends up driving the lamp through a potential divider that has to be matched to the current battery voltages. Any better suggestions?
To clarify, they want to make a circuit which has two push buttons, and the lamp will light if either (but not both) switch is pressed.
In particular, there is no requirement that the circuit has digital inputs and a digital output (the way we would normally think about digital logic).
How about this?
simulate this circuit – Schematic created using CircuitLab
To light the lamp, one of the switches must be closed and the other open. Note that if both switches are closed, a lot of power will be wasted in the resistors but the light will be fully off. Note further that one may have to use a very small bulb and may have to use a higher voltage or reduce the resistors to get much light, but one should ensure that the voltage squared divided by the resistance does not exceed the resistor's power rating (for example, if you used 12 volts and 22 ohms, you would need to use 5-watt resistors). Alternatively you could replace the resistors with light bulbs and shelter them so their light isn't visible.
If you want a transistor circuit, here's half of a circuit I designed for my parents' car some decades back when I was about eight (I don't remember the actual resistor values; the transistors were some sort of TO-3 package and not 3906's; the components given should be suitable for demonstration purposes--the real one used a lamp rather than an LED and resistor). An electrical engineering grown-up friend helped with the design, but I designed the overall concept.
simulate this circuit
The left-side input is wired to one of the turn signal flashers on the car; the right-side input is wired to the brake light. The lamp is the left light of a trailer. The right-side flasher and trailer lamp are wired similarly. Note that positive is on the bottom. Your son's challenge is to figure out what the diodes on the bottom are for (consider the above description of what the circuit was connected to).