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.

temp_sensor_led_off

threshold_85_LED

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%.

closeup_of_threshold

 

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)

setting_the_threshold_with_dimmer

 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.

set_threshold_with_cloud

 

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).

oscillator_threshold_speaker

 

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 3: You light up my life

Introduction to Arduino Programming A series of based on New York University’s Introduction to Computer Programming class fr...

Tips & Tricks
Tips & Tricks: Microphone

The Microphone module is kind of like a translator for your littleBits circuits. It takes vibrations (like sound) and translates t...

Tips & Tricks
Storage Solutions for the Pro Library

This Tips and Tricks is all about how to install and customize your Pro Library! We’ll show you how to mount your Pro Librar...