Using a VU meter with an Arduino

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 65

  • @KX36
    @KX36 10 років тому +11

    you don't need a zener diode. a reverse biased signal diode such as 1N4148 should work fine for clamping the mechanism's back EMF.

    • @SwitchAndLever
      @SwitchAndLever  10 років тому +1

      Possibly, but you take what you have at hand, and I had a bunch of zener diodes.
      In all honesty, the likelihood that this would generate anything appreciable which would be even remotely close to damaging an Arduino, even if you run it straight into the atmega328 chip without the built in protection, is pretty slim. Still, it's good practice to have a diode there.

    • @KX36
      @KX36 10 років тому +3

      yes, I just comment as people will more commonly have something like 1N4148 at hand so don't need to go out and buy a zener which they're less likely to have.

    • @zeeshanwarsi3788
      @zeeshanwarsi3788 6 років тому

      hi send ur number

    • @farjanarahman2239
      @farjanarahman2239 5 років тому +1

      You just need a silicone diode

  • @mike_van_in
    @mike_van_in 4 роки тому

    Read up on the PWM function provided on the Arduino. It already provides the variable "duty cycle" (on-time/off-time) output which is what you're doing in code.

    • @SwitchAndLever
      @SwitchAndLever  4 роки тому +2

      That's exactly what the code does. It takes the potentiometer value (0-1023), maps it to a format (0-255) which is used for PWM duty cycle, and outputs it through analogWrite() which is quite literally how you alter the duty cycle of the PWM on the Arduino. 0 being 0 duty cycle, 128 being half duty cycle, 255 being full, and so forth.

    • @mike_van_in
      @mike_van_in 4 роки тому

      @@SwitchAndLever Sorry - I should have paid closer attention! ;)

  • @n8guy
    @n8guy 10 років тому

    THANK YOU! I love the explanation, which really helps make some connections in my brain. It's nice knowing WHY to put a resistor or a diode, not just that you should. Do a million more videos exactly like this. :)

  • @BigMjolnir
    @BigMjolnir 10 років тому +1

    Outstanding job! Folks with no electronics background may want to look up info elsewhere on why there's a reverse current when the meter is returning to the home position, or how a resistor limits current, or how the C code does what it does, but such sources are all available on the web with a quick search. Those with at least basic Ohm's Law, physics of conductors, and Arduino programming understanding should have little trouble following this very professionally done video.
    When will you be doing the video on making a knife with an Arduino-powered birdhouse in the grip? :-)
    -- Mike

    • @SwitchAndLever
      @SwitchAndLever  10 років тому +3

      Oh, you mean the Birdhouse Kill-o-Matic 2000? Yeah, I had to scrap those plans after a couple of guys in black suits and Ray-Bans from PETA showed up, they mumbled about cruelty to animals or somesuch before flapping their arms and flying away.

  • @Enigma758
    @Enigma758 11 місяців тому

    I think a standard diode should work as a flywheel diode just as would be done for any inductive load such as a motor or coil. No need to use a zener.

    • @SwitchAndLever
      @SwitchAndLever  11 місяців тому

      Use what you have, I had a bunch of zeners. I’d rather use what gets the project done rather than waiting for parts, which has no real functional difference for the end result 🤷‍♂️

    • @Enigma758
      @Enigma758 11 місяців тому

      @@SwitchAndLever I fully agree with that sentiment and often do the same. It's just that a standard or shottky diode is often more plentiful than zeners (especially at a specific breakdown voltage), so someone less experienced watching may erroneously think they need to purchase a zener to make the circuit work properly, when in fact they don't, and that was the point of my original comment. Thank you for your reply. (BTW subscribed)

  • @markcalabretta5457
    @markcalabretta5457 9 років тому +1

    The intro got a hearty laugh from me!

    • @NeverSuspects
      @NeverSuspects 7 років тому

      Looked like a waste of a decent old mechanical switch keyboard though.

  • @rgalete
    @rgalete 9 років тому +1

    How do you do the drawing of the connections on the Arduino? Do you use Fritzing?

  • @jacobhn2
    @jacobhn2 6 років тому

    I leave the diode and use two resistors a 1K ohm .trim pot. over meters and another on 20K ohms in series with meters maybe a small cap over meters. when the digital output becomes high it takes some time to charge the capacitor(voltage), and if longer the digital output is high the higher the voltage over the meter.

    • @SwitchAndLever
      @SwitchAndLever  6 років тому

      Wouldn't that result in the meter being less sensitive though, with more sluggish movements as the cap takes time to charge and discharge? Or are you talking small cap as in pF rather than uF?

    • @jacobhn2
      @jacobhn2 6 років тому

      Switch & Lever : yes you are right, but with a small capacitor, mabe nf/pf, but in pwm to analog you have to use a capacitor to store , let say 3,7 volt, and the use of a resistor 10k , it take a little time to rise the volt on the capacitor, i think it will work just fine.

  • @gilgermano
    @gilgermano 3 роки тому

    this scheme is used to control the cla2a plugin ?

  • @dustyrhoads66
    @dustyrhoads66 2 роки тому

    how accurate is this meter compared to an actual VU found on older analog equipment

  • @gearbox7043
    @gearbox7043 5 років тому

    Thank you for the video. I apologise for the naive question, but will I need two Arduino Unos to work a pair of VU meters for a Stereo and how would it be connected from the stereo amp to the Arduinos? Thanks again for the video.

    • @SwitchAndLever
      @SwitchAndLever  5 років тому

      I don’t think feeding an amplified signal directly into the Arduino is a terribly good idea. If you’re going to be driving them from an amp why even use Arduino? You could just use the meters directly, that’s what they are designed for.

    • @tiborbogi7457
      @tiborbogi7457 4 роки тому

      @@SwitchAndLever Excuse me, but your answer is misleading, if somebody connect meters directly to output of an amp, VU meters will show exactly 0, because audio signal is alternating voltage. There is a lot of various circuits on the web how to hook up a VU meters to amps, lot cheaper then with Arduino.

  • @varunmehta1821
    @varunmehta1821 3 роки тому

    Any ideas on how can i use this for audio?? I want to make an actual vu meter

  • @mahlonkarpaiya252
    @mahlonkarpaiya252 4 роки тому

    may sound silly but were are the audio inputs plz?

  • @davelordy
    @davelordy 3 роки тому +1

    A VU meter is used to monitor audio levels, this tutorial doesn't even touch the issue - this is like a tutorial for cooking an apple pie that just shows you what an oven looks like.

    • @SwitchAndLever
      @SwitchAndLever  3 роки тому

      I guess you missed the point of the video then. It’s not about driving a VU meter to monitor audio levels, it’s to drive it with an Arduino do measure whatever you want with it. I have a video where I measure UA-cam subscriber count with an old oil cistern gauge as well, I guess you would have a similar problem with that 😂

    • @davelordy
      @davelordy 3 роки тому +1

      ​@@SwitchAndLever _"I guess you missed the point of the video then"_
      Basically, yes I did, I read the title expecting it be a tutorial on how to set up a VU with Arduino for it's standard/expected use . . . but I don't think that's an unreasonable assumption . . . to me 'using a VU meter' means getting it to respond to audio, of course you can use it as a doorstop or to measure temperature, but I think most people would think this was a tutorial about using it to track audio levels . . . anyhow, thanks for the tutorial nonetheless, there is some useful info in there regardless.

    • @SwitchAndLever
      @SwitchAndLever  3 роки тому

      Dave Lordy If you want to use the VU meter to react appropriately to sound using an Arduino would be entirely superfluous, it’s just adding a layer of obfuscation you don’t need in the circuit, not to mention as you have to do a analog to digital conversion on a reasonably slow IC to then actuate the small motor in the meter will both reduce fidelity and introduce lag. Hope that answers your question why this is not the tutorial you thought it was 🙂

    • @davelordy
      @davelordy 2 роки тому

      ​@@Twhite97 _"Your mistake is assuming a VU meter can only be used to measure audio amplitude levels._
      Nope, didn't assume that.
      _"Your third mistake is bashing Switch & Lever for not following YOUR assumption. In the end, he delivered exactly what was promised and did so it a clear, concise manner."_
      Are you wearing a feddora ?

  • @CrisHarrison
    @CrisHarrison 2 роки тому

    Your zener will never approach its knee or foldover value just use a small signal diode! You could have said "you need a signal diode, but a zener will work if that's all you have."

    • @SwitchAndLever
      @SwitchAndLever  2 роки тому

      Why? Then I'd never get nitpickers like you commenting!

  • @RichardT2112
    @RichardT2112 8 років тому

    Just for the intro I couldn't help but sub ;)

  • @mahlonkarpaiya252
    @mahlonkarpaiya252 4 роки тому

    does this VU meter work with music?

  • @PC-xj2mw
    @PC-xj2mw 2 роки тому

    This video is not for using VU meter for its intended purpose - monitoring music. This is rather an experiment.

    • @SwitchAndLever
      @SwitchAndLever  2 роки тому

      Yes? You summed up the video. Good on ya, I guess?

  • @AstroSam66
    @AstroSam66 7 років тому

    Nice. But i just dont get why u use a zener diode. Would not a normal diode do the same job?

    • @SwitchAndLever
      @SwitchAndLever  7 років тому

      Yep, but you gotta use what you have available, and that's what I had available.

    • @AstroSam66
      @AstroSam66 7 років тому

      Ah, ok. But a Zener can work as normal diode too. As far as i learned ;-) But hey, as long its working... who cares ;-)

  • @els1f
    @els1f 5 років тому

    Awesome! 👍 I wish I had the patience/desire to do even minimal coding. I've been trying to for YEARS but I just can't force myself to GAF😄

    • @SwitchAndLever
      @SwitchAndLever  5 років тому +2

      You need to treat it like a tool in your toolbox. You don't learn a tool just to learn a tool, you learn a tool to do something with it. It's by far easier to learn to code if you have a goal, a project to work on. In that sense it becomes just like any tool. If you have the patience to work on anything for a long time you can have the patience to code.

    • @els1f
      @els1f 5 років тому

      @@SwitchAndLever that's honestly a great point. I always had a hard time with math until physics gave uses that I could wrap my head around. I always treated it like boiled broccoli or something. Like, "this will be good for me someday." 😁 I guess I should find a problem to solve instead of making it 1/3 of the way through another "C++ in 30 days!" book. Thanks for the video, btw

    • @SwitchAndLever
      @SwitchAndLever  5 років тому +1

      @@els1f yeah, I can't learn like that either, I have to put it into practice.

  • @perandren9179
    @perandren9179 10 років тому +1

    I don't get it, but I love it.

  • @mijaba
    @mijaba 8 років тому

    can you just put a VU meter parallel to the output of an MP3 player without additional circuitry?

    • @SwitchAndLever
      @SwitchAndLever  8 років тому

      I'm afraid not, the audio signal is simply not enough to move the needle of the meter.

    • @mijaba
      @mijaba 8 років тому

      Thanks!

    • @E-FC3S
      @E-FC3S 8 років тому

      +Switch & Lever It actually is. It takes a very tiny amount of power to move the needle. Just hook it up to an audio output of a MP3 player or media player of choice, and it will run fine.

    • @SwitchAndLever
      @SwitchAndLever  8 років тому

      +Chicken Curry this one didn't at least. I tried hooking it up to the output of my laptop and the needle barely twitched even on full volume. Maybe there are VU meters that do what you describe, but this one ain't it.

    • @E-FC3S
      @E-FC3S 8 років тому

      It did come out of a higher-end unit that probably has a fine tuned drive for these guys, makes sense.

  • @croixtucker1757
    @croixtucker1757 5 років тому +2

    Smashing that silicone graphics keyboard hurts me

  • @stevewilson5546
    @stevewilson5546 2 роки тому

    Nice Post

  • @mahlonkarpaiya252
    @mahlonkarpaiya252 3 роки тому

    i want to monitor music with my meter .

  • @TheYoshifan12
    @TheYoshifan12 7 років тому +2

    You should have put a warning before smashing the keyboard. I'm scarred for life.

    • @palewriter1856
      @palewriter1856 7 років тому

      Didn't you see on the screen - it said: "Press ANY Key to Continue..."

  • @markoantesic4362
    @markoantesic4362 10 років тому +2

    You turned the diode the wrong way.

    • @SwitchAndLever
      @SwitchAndLever  10 років тому

      Gosh darnit, you are correct! I soldered it in correct (off camera) but I guess I made a booboo drawing up the schematic. Will make a small annotation to the video about that, thank you!

    • @markoantesic4362
      @markoantesic4362 10 років тому

      Switch & Lever No problem and for anybody that is wondering its a 5V zener diode.

  • @RexusKing
    @RexusKing 9 років тому

    This makes me want to make a Give-a-Fxxk-O-meter

  • @robpeters5204
    @robpeters5204 6 років тому +1

    Fail. Did not like the computer voice either.