In this Tutorial you will be simulating the starting of a car engine when the petrol tank is 75% full using one Kookaberry. You will then connect it to another Kookaberry and show how the engine can only be started when the tank is both 75% full AND an ignition button is pressed.
You will be using the Analogue and Logic apps.
The Analogue app displays a varying level of voltage from an analogue input and triggers a control signal at an adjustable threshold.
The Logic app illustrates the operation of the various Boolean algebra logic gates used to perform mathematical calculations in a computer. We will be using the AND and OR gates (the first two) for this tutotial.
Attach a fan module to one side of a Kookaberry handle using the small screws in your kit, and a potentiometer to the other.
Connect the fan to P2 and the potentiometer to P4
Run the Analogue app and set the threshold to 75% using the C and D buttons.
Rotating the potentiometer progressively alters the input voltage at connector P4.
When the voltage input is in excess of 75% of its total range (between 0 and 3v), an output signal of 3v is sent to connector P2 which turns on the engine (the fan…)
[Note: The angle readout in the middle of the screen is for a servo demonstration]
There are numerous DT content descriptions and outcomes illustrated by this single Kookaberry demonstration alone. Amongst them are
- ST3-11DI-T: Explains how digital systems represent data, connect together to form networks and transmit data
- ACTDIK014 : Examine the main components of common digital systems and how they may connect together to form networks to transmit data
- ACTDIP016: Acquire, store and validate different types of data, and use a range of software to interpret and visualise data to create information.
Unscrew the fan module from the side of the first Kookaberry and attach it to the side of a second one. Connect it to P2. Leave the potentiometer attached to P4 on the first one.
Attach a push-button to the handle of the second Kookaberry and connect it to P5. This will represent the ignition switch of the car.
Run the Logic app. The screen will show an AND gate.
Both the inputs (P4 & P5), and the output (P2), of the logic gate will show “0” which is the OFF state.
Operate the push-button. This turns P5 ON but P2 remains OFF.
Why is P2 still OFF? (See below Step 5)
[Note: P4 and P5 can also be turned ON and OFF by pressing buttons C or D]
Release the push-button connected to P5 (P5 will then be OFF), and press Button B once. The OR logic gate will appear on the screen showing all connectors as OFF.
Now press the ignition switch again and P5 will show “1” which is the ON state.
P2 will now show ON and the engine (the fan…) will start.
What is happening within the Kookaberry?
- In the AND gate, both P4 and P5 have to be ON before P2 is ON
- In the OR gate, P2 is ON if either, or both, P4 or P5 are ON.
The Logic programme continuously checks for the presence or absence (also known as the “state”) of an input signal at P4 and P5. If it detects 3 volts, it determines that the connection is in an ON state and shows a “1” against the appropriate connector on the screen. If there is no signal, it assumes the connection is OFF and shows a “0”.
In this demonstration, when the push-button causes 3v to be applied at P5, the processor changes its state to ON.
Join the two Kookaberries together with a three-core jst/jst lead between P2 on the first Kookaberry and P4 on the second.
An output signal at P2 of the first Kookaberry will now be presented as an input signal at P4 of the second.
Run the Analogue app on the first Kookaberry and the Logic app showing the AND gate on the second.
Fill up the tank in excess of 75% on the first Kookaberry and a signal will be sent from P2 across to the second Kookaberry turning P4 ON.
However, the engine (the fan….) will not start until the ignition switch (the push button) is pressed.
The introduction of logic gates to primary school years may appear premature, but they are interesting and should be easily understood when presented in this practical context.
The remaining three logic gates can be accessed by pressing Button B.