Magazines: AutoSpeed  |  Rallysport  |  V8X  |  Silicon Chip  Shopping: Property  |  Cars  |  Fishing
Email Address:
Password:

Lost your password?

Article Search

Circuit Notebook

(1)Electronic Conjuring Trick; (2) Adding An "RGB Flag" Output To The Component Video To RGB Converter; (3) Keypad Decimal Encoder; (4)Picaxe-Controlled Solar Fountain.

 Advertisement
Advertisement 

Electronic conjuring trick

This circuit was developed in response to a request from a Scottish conjurer. He wished to place four small, coloured balls on stage, each a different colour, and then invite members of the audience to come up and put one in their pockets.

He wanted to be able to tell who had which colour without actually seeing the balls they had taken. This he could do if he knew the sequence in which the balls had been taken.

The trick is implemented here with three balls instead of four, since this is simpler by an order of magnitude.

At first glance, three sets of three LEDs could be used to give an indication of the order in which each ball was taken. However, such a circuit would be complex, with a readout comprising nine LEDs in all. With a combined analog and digital approach, the number of LEDs can be reduced to just three.

There are six possible sequences in which three balls could be taken. Supposing that we label the balls A, B and C. Ball A could be taken before ball B and vice versa. Ball B could be taken before ball C and vice versa. And ball A could be taken before ball C and vice versa. If each of these orders of priority can be recorded with a single LED (the LED being illuminated if the second ball is taken after the first), the trick is complete.

The trick commences with the charging of the three 47μF capacitors through pushbutton switch S5. Initially, each of the reed switches (S1, S3 & S4) are closed by a magnet mounted inside each of the coloured balls. This means that as soon as S5 is released, the capacitors begin to discharge. With the component values shown, discharging takes almost a minute; therefore all three balls must be taken within this time frame (the capacitor values can be changed to suit). A JFET input op amp with high input impedance was chosen for IC1 so that discharging through the inputs of the IC is negligible.

When a ball is removed, the associated reed switch opens and the discharging of the capacitor in that circuit is "frozen", performing a simple sample-and-hold function. IC1a, IC1b and IC1c compare the remaining charge on each capacitor, with the resultant sequence appearing on the three LEDs.

The conjurer may either remember which sequence of illuminated LEDs corresponds with each sequence of coloured balls or he or she could work out the logic directly each time, perhaps "thinking out loud" about the three orders of priority displayed by the LEDs.

The conjurer might not wish to risk having the LED readout permanently "on", therefore the LEDs are enabled only when two metal points (perhaps pinheads) are touched with a moistened finger. Comparator IC1d provides this function, with its output normally "high" until the non-inverting input is pulled towards ground by finger contact on S2.

Since the trick relies on consistent discharging of the three capacitors, these capacitors, together with the associated diodes, resistors and reed switches, should all be matched.

If the trick is performed with only a moderate level of expertise, it should baffle and astound.

Thomas Scarborough,
South Africa. ($40)

Adding an "RGB Flag" output to the Component Video/RGB Converter

Some large-screen TV sets which are fitted with a SCART-type AV input connector need a positive ‘flag’ voltage fed to pin 16 of the SCART connector, to indicate when the input signals are in RGB component format. If this voltage is not present, the TV will not recognise the RGB signals and process them correctly.

The Component Video to RGB Converter design we published in the May 2004 issue of SILICON CHIP didn’t provide a DC flag voltage output for this purpose but it’s easy to add one if your TV set needs it. All you need to do is make an extra hole in the Converter’s rear panel, between CON6 and CON8, and fit a small ‘pin jack’ socket. Then a 220W resistor is connected from the pin jack’s solder lug to the +5V output of the 7805 regulator REG1, as shown in the diagrams.

If your main RGB cable taking the video outputs of the Converter to your TV set doesn’t have a wire connected to pin 16 of the SCART connector, you’ll need to add one using a length of insulated hookup wire. The Converter end of this wire (or the existing wire in the cable connected to pin 16) is then fitted with a pin jack plug, to mate with the added socket.

SILICON CHIP.

Keypad decimal encoder

This simple design can be used as part of a combination lock or other controller circuit, where an individual output for each button press is required. It uses a conventional keypad with 12 keys and 7 pins (eg, Jaycar Cat. SP-0770).

Pressing a button connects the associated row and column lines together. Each row and column output is connected in series with the LED of a 4N35 optocoupler. The optocoupler outputs drive a matrix of 4001 NOR gates, which in turn encode the button press to provide a logic high level on just one of the 12 outputs.

For example, pressing button "5" connects the LEDs in OPTO2 & OPTO6 in series. This completes a circuit from the +9V rail, through a 1.5kΩ current-limiting resistor and the two LEDs to ground. Both optocoupler transistors conduct, pulling the inputs of IC2a low.

The result is a logic high at the "5" output, with all other outputs remaining low.

Peter Howarth,
Gunnedah, NSW. ($40)

PICAXE-controlled solar fountain

Add a solar-powered fountain to your fish pond or garden water feature with this unique PICAXE design. The prototype was constructed with a low-cost 12V DC camping shower pump (available from Jaycar), a 2W solar panel and a 12V 7.2Ah SLA battery for energy storage.

A PICAXE-08 micro controls the fountain pump, switching it on for 30-second bursts whenever sufficient battery power is available. Pulse-width modulation (PWM) of the pump motor is used to reduce average current, providing a more appealing water flow as well as longer running time.

The voltage from the solar panel is divided down by 18kΩ and 8.2kΩ resistors before it is applied to a PICAXE digital input on P3 (pin 4). When the panel output is higher than about 8V, the input will read high, whereas lower voltages will read low. The program uses this input to differentiate night from day, eliminating the need for an LDR sensor.

Two resistors also divide the battery voltage down before it is applied to the PICAXE analog input on pin 1 (leg 6). The program periodically reads this input and using simple logic, chooses one of several strategies.

If the battery voltage is less than about 11.4V, the pump is not driven and the program "sleeps" for 10 minutes. Between about 11.4V and 14.5V, the pump is driven for 30 seconds followed by either 3, 5 or 10-minute rest periods.

Above 14.5V, the pump is again driven for 30 seconds but the previous rest period is halved. If the voltage is still above 14.5V the next time around, the rest period is halved again, and so on. This prevents the battery from being over charged, as the power used by the pump will always be higher than the power produced by the panel.

PWM output from the PIXACE on
P2 (pin 5) drives the pump via a BD681 transistor (Q1). The programmed speed is sufficient to pump water through the fountain at a pleasing rate, with an approximate current consumption of 200mA/h.

As you can see, the pump will turn on more often the sunnier it is. I have run this system for over
a week with the battery voltage sitting just below 13.5V and the fountain coming on every 15-30 seconds during the sunniest part of the day.

Robert Gatt,
Port Fairy, Vic.

'----------------------------------------------------------

' Solar Fountain Pump Controller

'----------------------------------------------------------

'pins:

'2 = output to motor driver transistor

'1 = input to read battery voltage

'3 = input to check for daylight

symbol volts_11 = b0

symbol volts_12 = b1

symbol volts_13 = b2

symbol volts_14 = b3

symbol sleep_time = b4

symbol read_volts = b5

symbol motor_count = b6

symbol counter = b7

symbol short_sleep = b8

symbol medium_sleep = b9

symbol long_sleep = b10

symbol day_status = b11

volts_11 = 117 'approx. 11.4V

volts_12 = 128 ' 12.5V

volts_13 = 138 ' 13.5V

volts_14 = 149 ' 14.5V

short_sleep = 80 'approx. 3 minutes

medium_sleep = 130 '5 minutes

long_sleep = 255 '10 minutes

motor_count = 30

wait 3

sleep_time = short_sleep

main:

debug b0 'use debug to check voltage

if pin3 = 1 then goto day

night:

day_status = 0 'useful for debugging

goto sleeper

goto main

day:

day_status = 1 'useful for debugging

readadc 1,read_volts

if read_volts > volts_14 then goto v_high_volt

if read_volts > volts_13 then goto high_volt

if read_volts > volts_12 then goto medium_volt

if read_volts > volts_11 then goto low_volt

if read_volts <= volts_11 then goto sleeper

low_volt:

sleep_time = long_sleep

goto spin

medium_volt:

sleep_time = medium_sleep

goto spin

high_volt:

sleep_time = short_sleep

goto spin

v_high_volt:

if sleep_time <3 then goto keep_same

sleep_time = sleep_time/2

goto spin

keep_same:

sleep_time = 2

goto spin

spin:

pwm 2,200,125 'kick start motor

for counter = 0 to motor_count

pwm 2,100,125

next counter

sleeper:

sleep sleep_time

goto main



Privacy Policy  |  Advertise  |  Contact Us

Copyright © 1996-2006 Silicon Chip Publications Pty Ltd & Web Publications Pty Limited. All Rights Reserved