Flame sensor with TinkerPie
Sees the infrared light of a flame: fire alarms.
| Type | Digital sensors |
|---|---|
| Connect to | any accessory pin (DO) |
| Gives | true when it sees a flame |
| Simulator | Yes: a control appears under the simulated board |
How it works
Flames give off a lot of infrared light. The flame sensor has an infrared receiver and a small comparator chip: when the infrared light is stronger than the level set by its blue knob, the output switches on.
How to wire it
Signal (DO / OUT / S) to any accessory pin: S1-S4, P10-P13, P43 or P44. Power from 3.3 V where the module allows it.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.flameDetected(Pin.S1)
// Arduino C++
sensors::flameDetected(Pin::S1) Good to know
- Senses a lighter flame up to about 1 m away, best straight ahead.
- Strong sunlight can also trigger it; test indoors.
- Turn the blue knob to change the sensitivity.
Projects with the Flame sensor
Similar modules
- PIR motion sensor HC-SR501
- IR obstacle sensor
- Touch sensor TTP223
- Push button module
- Tilt switch SW-520D
- Reed switch (magnet)
- Vibration sensor SW-420
- Hall effect sensor A3144
More projects to try
Questions
Can I try the Flame sensor without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Is it safe to test the flame sensor?
Only with an adult, using a candle or a lighter far from paper and hair. You can also test it in the simulator without any flame.