Fast Times
Time your sprints over and over again, so you can track your improvement.
Lead Image © David Grigg, 123RF.com
Time your sprints over and over again, so you can track your improvement.
The littleBits team recently came out with a new Number module that, in addition to the original two modes – which display either relative values entering the module from 0 to 99 or incoming voltage from 0 to 5V – now also counts up or down and has a reset snap on top (Figure 1). Briefly called the Number+ module, the new incarnation is now the default Number bit [1] included in kits or when you order the bit itself. The new functions make this bit much more useful in several projects, including any project in which you want to time or count something.
In the littleBits project in this issue, I'll show you how to build a system that times sprints. The starting block of bits (Figure 2) uses the Pressure sensor bit to sense when the runner has left the starting pad and sends that information to the timing block at the finish line via the Wireless transmitter bit. At the starting line, you also have a button that resets the timer before you start your next sprint.
Table 1
Starting Block Setup
Block | littleBit | Function |
---|---|---|
T1 |
p1 power and 9V battery |
Power for T1 block |
|
Button |
Sets system state (pressure LED on) |
|
Latch |
Maintains system state |
|
Wires 1/2 |
Isolate pressure sensor |
|
Pressure sensor |
Starts timer |
|
LED |
State indicator (on = ready; off = system state not set) |
|
Wireless transmitter |
Sends start signal via channel 1 |
T2 |
Coin battery |
Power for T2 block |
|
Button |
Resets timer to zero |
|
Wireless transmitter |
Sends reset signal via channel 3 |
The timing block (Figure 3) receives information from the starting block via the Wireless receiver bit and includes the timer (Number bit) and a motion detector that turns the timer off. The input from the start and finish lines is sent through a logic bit that determines whether the timer should be running or not.
Table 2
Timing Block Setup
Block | littleBit | Function |
---|---|---|
R1 |
Coin battery |
Power for R1 block |
|
Motion trigger |
Turns timer off when activated |
|
Buzzer |
Indicates when motion sensor is triggered |
|
Latch |
Maintains motion sensor trigger state |
|
LED |
Motion sensor indicator (on = triggered; off = not triggered) |
|
NOR |
Receives input from starter and motion sensor |
|
Wireless receiver |
Receives start signal via channel 1 |
|
Wire 3 |
Sends NOR output to R2 block |
R2 |
p3 USB power |
Power for R2 block |
|
Wireless receiver |
Receives reset signal via channel 3 |
|
Wire 4 |
Sends reset signal to Number module |
|
Wire 3 |
Receives NOR output from R1 block |
|
LED |
Timer indicator (on = running; off = not running) |
|
Pulse |
Sets timer speed |
|
Number(+) |
"Time (switch in "count up" position)" |
The first order of business after the bit design was settled was figuring out a way to isolate the Pressure sensor so it wouldn't be crushed by the runner's foot. I pulled out some of my Actobotics [2] materials to build a runner's block (Figure 4), but you could use other materials, such as Legos or wood blocks, or you could even 3D print a starting block if you have access to a 3D printer. A mouse pad over the sensor affords further protection (Figure 5).
Table 1 describes the function of the bits as they are used in this project. Each section (refer to Figure 2) has its own power supply. In section T1, the state button is followed by a Latch bit before it feeds into the Pressure sensor. The state button is described in the System State section later in this article.
A Button bit is often paired with a Latch bit. If you build a circuit with a Button and an LED, you'll notice the LED only lights up when you press the button. This is called a "momentary" switch. If you put a Latch bit between the Button and the LED, you have created an "on/off" switch. Now when you press the button, the LED stays on, and it does not turn off until you press the button again.
The Wireless transmitter and receiver each have three channels over which to send a signal. In the T1 section, the signal from the Pressure sensor goes to an LED and the Wireless transmitter on channel 1. The T2 section is just a Button bit that sends a reset signal to the timer on channel 3.
The timing block (refer to Figure 3) at the finish line is a bit more complex, because it comprises the timer circuit in section R2 and the Motion trigger circuit in section R1, with a logic bit that arbitrates between the signals from R1 and the starting block section T1.
Table 2 describes the function of the bits as they are used in this project. Starting with section R1, the Motion trigger bit feeds into the Buzzer-Latch-LED bits. Once the motion sensor is triggered, it maintains a signal for a few seconds before it goes off. That's fine for the buzzer, which I am only using as a trigger indicator, but I want the timer to stay off once the sensor has triggered, which is the function of the Latch bit in this circuit, turning the motion sensor from a momentary switch to an on/off switch. The LED indicates whether the sensor is in the triggered state.
In section R2, the output from the NOR bit goes into an LED and a Pulse bit to the Number bit. The LED indicates whether the timer is running or not, and the Pulse bit sends a pulsed signal that increments the count on the Number bit. The speed of the pulsed signal is adjustable; I adjusted it to approximately a pulse per second. Finally, in section R2, the reset signal from channel 3 of the Wireless receiver is wired to the reset snap on the Number bit (wire 4).
Pages: 4
Price $15.99
(incl. VAT)