making distance sensors: trigger the touch board with proximity

by:UMeasure     2020-06-16
Learn how to trigger the TouchPad by distance.
Touch pad out of the box, detection . . . . . . Good touch!
But it is also possible to trigger the sound from a distance, which we call proximity mode (
This really just increases the sensitivity of the board).
This tutorial will take you through an example and explain the principles.
For more project ideas, please visit www. bareconductive.
ComTo start you need: 1 x electric paint 50ml1 x touch pad-
1 x usb a to USB Micro B cable1 x computer running Mac OS, Windows or Linux1 x speakers or headphones-
1 x A4 paper (
Better than 260 sm)
1 x mask tape1 x paint brush with masking tape, first place a close pad of approximately 10 cm square meters on a heavy stock sheet.
Place a strap about 1 cm wide on the side for easy connection to the TouchPad.
Once you have the pattern glued, paint it with electricity and let it dry.
It takes about 15 minutes, but you can use a hair dryer to speed up if you are in a hurry.
In this case, be careful not to let it crack-the forced drying process makes this more likely.
When the paint is slightly wet, carefully remove the masking tape to avoid tearing off the paint.
Plug the touchpad into the computer via USB and plug in the headset or speaker.
Make sure the power switch on the board is set to on.
Open the Arduino IDE and open the proximity demo from your sketchbook-you\'ll find it under File → sketchbook → touchpad example → proximity _ mp3.
Make sure that the bare conductive touchpad is selected under the tool → board, and the correct serial (CU)
Select port under Tools → Port.
After selecting all the correct settings, click File → upload to push the code to the TouchPad.
The RX and TX LEDs on the TouchPad will flash and the Arduino IDE should say \"Upload done \".
\"Now that we have the code on the board, we can continue to connect (now dry)
Pad onto the board.
You can use the crocodile clip cable, or do cold welding with a small piece of paint and connect directly.
We like to use crocodile clips for prototyping because it is easier to remove if we want to make any changes.
No matter which electrode you attach it to, provided that there is a properly named file on the electrode on the microSD card.
Track 000, for example.
Mp3 if you connect to electrode 0 or track 0.
If you connect to the electrode 11, mp3.
For more details on naming tracks and uploading your own sound to the microSD card, click here.
Make sure your work space is neat and tidy, the connection between the board and the pad is short and will not bend on other cables (
This can cause an error to trigger).
Now press the reset button on the touchpad and wait about 8-
The motherboard leaves the boot loader mode for 10 seconds (
Red l led will pulse)
The board is adjusted to the new mat for another 2 seconds.
Try to slowly wave with your hands on the mat about 5 cm away from the mat to trigger the track-you should hear your track play!
Don\'t panic if you encounter difficulties at work!
Here is a checklist to help debug things:-is the code uploaded correctly?
If not, please check to upload FAQ.
-Is your speaker powered on if needed?
-Are your lines organized neatly and not overlapping?
-Is it correct that there is no gap on your mat?
You can check with a multimeter-the pads should read a few k Ω from start to finish.
This code is basically the same as the Touch MP3 code that comes with the TouchPad.
The only difference is that the threshold for detecting touch has been reduced (
Together with the threshold of detection release, used to balance).
You can see 75 lines if you have a touch MP3 code that can be compared
84 MP3s have been added nearby, but the rest are the same.
What we do is we take the touch threshold from 40 (default)
To 8, the release threshold is from 20 (default)to 4.
You can easily view the code line number in Arduino by selecting show line number in Arduino → preferences menu.
Note that the release threshold must always be less than the touch threshold.
You can reduce these further to increase sensitivity if you want, but be careful.
More sensitive means more noisy (
May be unstable)signal.
So now you have a pad that works by approaching, what about next?
You can draw a set of mats for the Kickstarter video like Bibi and change the sound on the microSD card to drum noise!
Or you can try to increase the sensitivity further and see what it can do.
You can also try setting a separate threshold for each electrode.
You can call mpr121.
Set threshold (0, 10);
Set electrode 0 to a touch threshold of 10 or mpr21.
Lease threshold (2, 5);
Set electrode 2 to release threshold 5.
Play around and see what effect you can create.
Different padding shapes and sizes will have different effects as well, so you can try it out.
Don\'t forget to reset the TouchPad every time you connect the new pad, though.
Please visit www if you like this tutorial. bareconductive. com for more!
Custom message


APP Umeasure---the must-have home decorating apps for iOS And Android which can connect with Mobile and Laser Distance Meter

Chat Online 编辑模式下无法使用
Chat Online inputting...
Umeasure here! Just in case you leave or we reply later,please leave your email,mobile or Skype. Will get back to you later. Contact us email:measure@measure.hk, skype:measure.zh@outlook.com, mobile/whatsApp/WeChat: 0086 166 7561 7862