Tips & Tricks: Threshold

Analog ---> Digital

Get started with the threshold module by watching this video:

The Basics:

The threshold module turns an incoming variable voltage signal into an outgoing digital signal (on/off). When the incoming signal rises above a threshold voltage (which you set using the knob on the bit), the outgoing signal goes from 0 volts (OFF) to 5 volts (ON).

Why would you want to do this? Let’s look at an example. Let’s say you are using a temperature sensor and you want to activate your circuit whenever the temperature rises above 85 degrees. As the temperature rises, the voltage coming out of the temperature sensor also rises. However, we want a signal that is OFF when the temp is below 85, and ON when it is above 85. This is where the threshold can work its magic. Using the potentiometer (the knob on the module) we can set the threshold to go from ON to OFF whenever the incoming signal rises above 85.



Setting the Threshold:

If you don’t need to be super accurate, you can set your threshold by turning the knob to the approximate trigger level you need (there are little tick marks to help guide you). Turning the knob to the middle means that it will send an ON signal whenever the incoming voltage goes above 50%.



If you want to be more accurate you will need a dimmer, a number, and an output like an LED, a buzzer, or a motor. Instead of the dimmer and number you can also use a cloudBit and the slide dimmer on Cloud Control. First, snap together your circuit in this order:

power → dimmer → number → threshold → LED (or other output)


 Now turn your threshold all the way down (clockwise). Next turn the dimmer until the number module shows the value you want (for our example above we would set it to 85). Finally, slowly turn the threshold up (counter clockwise) until your LED lights up. The threshold will now trigger any time the incoming signal rises above 85%.

If you are using a cloudBit, the process is the same, except you will be using Cloud Control to set the voltage coming out of the cloudBit.



Using it as a tone control knob for the oscillator :  

If you add a threshold in between an oscillator and a speaker you can modify the tone of the oscillator by varying the pulse width of the square wave (make sure the oscillator is in SAW mode).



Using it as an amplifier:  

Let’s say you have a signal that is very faintly flickering (for example, a light sensor which is jumping back and forth between 2.3 volts and 2.6 volts). You would like to turn this faint signal into a big, loud, easy to see-read-hear signal. Here is another place where the threshold can work it’s magic. If you place the threshold in the circuit and set it to 2.5 volts, your faint 2.3v – 2.6v signal will be transformed into a healthy 0v – 5v square wave.

Screen Shot 2015-02-12 at 11.51.59 AM



More Tips & Tricks

Tips & Tricks
Introduction to Arduino Programming: The Tutorials

So you’ve just unboxed your new Arduino Coding Kit and would like to get into the fabulous world of Computer Programming, or...

Tips & Tricks
Synth Tips & Tricks: Record your Music

When you make sweet beats with the Synth Kit, you might want to record them and share with your friends. This is a basic overview ...

Tips & Tricks
Tips & Tricks: Speaker

The Speaker module is kind of like a translator for your littleBits circuits. It takes electrical signals from the modules (or fro...