#67 Vibration and other switches for your Arduino

Ғылым және технология

New! ralphbacon.blog
Sometimes you need to know when something (or someone) has touched, moved, jogged or otherwise interfered with your creation and this video describes a few of those detector switches. Whilst you might think that they are purely digital in nature this is not so. Watch the video and all will be revealed!
And we explore a new feature of the Arduino IDE, which was introduced in 1.6.6 but is under-used by most developers; it's probably still early days for this tool but it is still incredible useful. Yes, we're talking about the Serial Plotter which complements the Serial Monitor very well.
At the time of writing this I've just returned from my vacation, somewhat jet-lagged (=very jet-lagged) and my brain is not yet fully rebooted but by the time the next video appears I should be back to what I call 'normal'!
And if you're reading this as it is being published, a very Merry Christmas to all my viewers and subscribers and may 2017 bring yet more fun and games on the Arduino front.
If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)
My channel is here:
------------------------------------------------------------------
/ ralphbacon
------------------------------------------------------------------
How can I remember this? Memory tip: "See" Ralph Bacon, geddit?

Пікірлер: 31

  • @neilnagel9857
    @neilnagel98574 жыл бұрын

    Hi Ralph, thanks for pointing out the serial plotter. I didn't know it existed even though it's been in my tools the whole time! What a great feature. Had I known it was there I might not have purchased my Hantek a month ago. It is going to come in so handy for the project I'm currently working on. Thanks again for ALL your fantastic information and the work you do to educate us on Arduino tricks and projects. Hi to Benny also.

  • @RalphBacon

    @RalphBacon

    4 жыл бұрын

    Benny is purring like a traction engine; he loves being mentioned in comments! And thanks for your kind words about my channel, I'm just happy you like the videos. Thanks for posting. Benny says it was purrfect!

  • @DrexProjects
    @DrexProjects7 жыл бұрын

    I had no idea about the Serial Plotter or even knew it was there, Thanks, Benny steals the show, Nice...

  • @RalphBacon

    @RalphBacon

    7 жыл бұрын

    Yes, it was Benny who alerted me to this new feature, he'd apparently been plotting the frequency distribution of mice across the floor...

  • @SpeccyMan
    @SpeccyMan7 жыл бұрын

    Merry Christmas Ralph to you and yours and all the very best for 2017.

  • @RalphBacon

    @RalphBacon

    7 жыл бұрын

    I hope you had a good one Nick, and here's to an even brighter 2017!

  • @avejst
    @avejst6 жыл бұрын

    Thanks for sharing this👍😀

  • @RalphBacon

    @RalphBacon

    6 жыл бұрын

    Glad you liked this video too Asger, and thanks for posting here, appreciated.

  • @roberteliassen5020
    @roberteliassen50207 жыл бұрын

    Another great video. Thanks! At 26:54 you ask: "Why would you want someting that is so insentivie..." The first thing I thought about was a release-switch (trigger) for an airbag (in cars). And then I thought "No! Ralphs sensor is way too sensitive". :)

  • @RalphBacon

    @RalphBacon

    7 жыл бұрын

    Ha Ha, the last thing you want is an air bag deployed when you don't need it! And something tells me my car doesn't have either an Arduino or one of this sensors in it! Alan Powell also commented on these sensors, which apparently are good at detected vibrations but not shocks - see his post above. I'll revisit this topic one day as I have new sensors to test.

  • @alanpowell328
    @alanpowell3287 жыл бұрын

    Ralph, Got some of these. If you place it vertically on on a surface which actually vibrates, such as the top of a microwave or a food processor, the little spring starts to oscillate i.e sets up a pendulum like motion and accumulates energy to the point where it makes contact on most swings, detecting a vibration rater than a knock. . Probably need to average the readings to make anything sensible of it. There is another less sensitive version, a "knock Sensor", which responds to the more violent movements, such as a hammer tap. I've got some of those to make a "fall when hit" servo driven target for things like nerf projectiles. i.e. target falls when hit and picks itself up after a few seconds.

  • @RalphBacon

    @RalphBacon

    7 жыл бұрын

    Ah ha, the plot thickens. So the "vibration sensor" responds to vibrations but not sharp knocks. I've actually had a few different knock/vibration sensors arrive lately, I shall have to experiment further. Thanks for the update Alan.

  • @ZeedijkMike
    @ZeedijkMike5 жыл бұрын

    I use the last sensor you demonstrated as a _knock_ sensor for snoozing my alarm clock. One knock for snooze two for off.

  • @RalphBacon

    @RalphBacon

    5 жыл бұрын

    Which sensor was that Zeedijk? The vibration sensor? Sounds like an original implementation. Nice idea.

  • @ZeedijkMike

    @ZeedijkMike

    5 жыл бұрын

    +Ralph S Bacon : Yes it was the _springy_ one. It was in the so called "40 sensor" pack, listed as a "klopf" sensor (For som reason I got a German version)

  • @jeffbluejets2626
    @jeffbluejets26263 жыл бұрын

    Realise this is an old post but was wondering about the sw420 sensor. It appears to be based on the same sensor as in your post here. I was looking for a vibration sensor that I can mount under the front flange of a car differential housing to sense driveshaft vibration in rear wheel drive vehicle, however, I cannot see where this is particularly direction prone. My idea is to sense this vibration when it it either at the top of travel, i.e. the top of the diff housing , or at the bottom. Flash a timing light neon at this point so I can determine the vibration "high point". Monitor the flash via one of the elcheapo FPV camera/transmitters. Balance of the drive shaft could then be started using conventional means ( hose clamps) on the "low point" to minimise and eventually null the vibration. This essentally requires the sensor to have some "directional" characteristics. Not much info out there as far as I can muster and thought maybe you would have some idea. Cheers Jorgo Found your vibration sensor too....... www.learningaboutelectronics.com/Articles/Vibration-detector-circuit.php RS Components

  • @RalphBacon

    @RalphBacon

    3 жыл бұрын

    I don't think I've heard of a _directional_ vibration sensor, but mounting two (or more) at various angles might achieve this. Wouldn't take long for a man of your talents to knock up a test rig. Sounds interesting, so good luck with your project Jorgo.

  • @jeffbluejets2626

    @jeffbluejets2626

    3 жыл бұрын

    @@RalphBacon Thanks Ralph. With a little more digging I came across a module ADXL345 used with a prop balancer project over on RCgroups but they use a Teensy 3.2 which , over here at least, lightens ones pocket by at least $60-$70 before one gets started. The module itself can be had for a few dollars so will start and go from there with an Arduino Promini. Cheers Jorgo

  • @j1952d
    @j1952d3 жыл бұрын

    Bit late to the party here, but OI think those "shake" switches are used for detecting whether fragile packages have been dropped (or chucked onto the back of a lorry) in transit.

  • @RalphBacon

    @RalphBacon

    3 жыл бұрын

    You mean couriers don't gently place each parcel with loving care into the back of a DHL/ParcelFarce/Post Office/Yodel van? I'm shocked.

  • @luisfhm007
    @luisfhm0074 жыл бұрын

    For anyone still wondering about the vibration sensor it probably makes a contact for a very short time, so if you poll the state of the pin, it is not likely that you check it at the exact moment it does contact. You have to use an interrupt to detect the vibration, or add something like a peak detector circuit. How stiff was that spring by the way? I want to know how small a vibration can it detect

  • @RalphBacon

    @RalphBacon

    4 жыл бұрын

    It would be interesting to see whether this hypothesis is true, Luis. Although a vibration/tilt switch with such a short pulse is slightly less than useful. But if an interrupt works that would be good too.

  • @luisfhm007

    @luisfhm007

    4 жыл бұрын

    @@RalphBacon Sure It would be very interesting to see how long the contact time is, if you have an oscilloscope it would make for an interesting video... The inside contact will bounce a lot and so it is very random and short pulses. People be careful though using interrupts as the interrupt is called for every rising or falling edge and if there is a lot of vibration there will be a lot of rising edges and it can take a lot of the CPU time.

  • @bob-ny6kn

    @bob-ny6kn

    Жыл бұрын

    His code works fine, and it "only" reads the pin.

  • @abpccpba
    @abpccpba6 жыл бұрын

    Here is the vibration sensor you used with the brass eye. www.sparkfun.com/products/9198

  • @RalphBacon

    @RalphBacon

    6 жыл бұрын

    That's the one, Paul! I'm pretty sure I didn't get it from Sparkfun but that memory is surely faded now anyway so you never know. Clones are probably available from our Far Eastern friends but it might be too niche a product to find anywhere else. Thanks for posting, I'm sure others will also find this link very useful.

  • @midnightrizer
    @midnightrizer4 жыл бұрын

    a 1 meg ohm resistor is bigger than a 100k

  • @RalphBacon

    @RalphBacon

    4 жыл бұрын

    In value, certainly, in size, not at all. I don't know what reference this is to Eric, got a time code in the video?

  • @bob-ny6kn

    @bob-ny6kn

    Жыл бұрын

    @@RalphBacon 9:03 - 9:05

Келесі