1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

12 simultaneous & unique frequencies (PWM)

Discussion in 'AVR' started by wip, Mar 20, 2014.

  1. wip

    wip Member

    Joined:
    Nov 20, 2013
    Messages:
    38
    Likes:
    2
    Location:
    Montreal, Canada
    This is how it is working:

    Code (text):
    12 PWM out -> 12 lm386 amplifier -> 12 coils (not speakers) just below the strings -> vibration -> guitar pick-up -> final out
    So we don't actually hear the PWM, instead what we hear is the strings vibrating recorded by the pick-up. The noise in the video is actually cause by the strings colliding with the coils (will need to make more space between the strings and the coils). The PWM frequencies are precise enough for my needs.

    Put some volume in your headphone and listen to the very end of the video. There's a tic tac tic tac. I think it's cause by the fact that I am scanning all ADC (for capacitive touch sensing). Also when connecting the USB cable I hear my mouse moving on my screen.
     
  2. NorthGuy

    NorthGuy Well-Known Member

    Joined:
    Sep 8, 2013
    Messages:
    1,218
    Likes:
    206
    Location:
    Northern Canada
    But you need to tune it up so that the frquency of the string would be the same as PWM.

    That's what it is! I thought that was electronic caused by off-frequencies.

    You probably also need some stops to prevent the string from vibrating when you turn it off.

    I see. This might be a grounding problem. If USB ground is somehow connected to your system ground, this creates a ground loop so that you can hear all the currents flowing through it. You can try an isolating USB connection, which may fix the problem.
     
  3. wip

    wip Member

    Joined:
    Nov 20, 2013
    Messages:
    38
    Likes:
    2
    Location:
    Montreal, Canada
    Yep and this is the fun part, you get all kinds of harmonics when you're off.

    Wow, 100$ for buying an USB isolator!?!
    Is there an alternative?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Wade Hassler

    Wade Hassler Member

    Joined:
    Jun 4, 2009
    Messages:
    152
    Likes:
    11
    ONLINE

    Next time you do this, consider using an FPGA to generate the PWM waveforms: one channel per pin and a hundred or so pins, nanosecond resolution.
    (Especially if you have from March to August to get it running.)
     
  6. wip

    wip Member

    Joined:
    Nov 20, 2013
    Messages:
    38
    Likes:
    2
    Location:
    Montreal, Canada
    I don't know much about FPGA and I think there's a reason why :) Using a FPGA for PWM output is overkill AFAIK (instead next time I could use a dedicated PWM driver or even a 555). Also my goal was to make a single "brain" for everything: USB (midi implementation), capacitive touch sensing and PWM.
     
    Last edited: Jul 27, 2014
  7. NorthGuy

    NorthGuy Well-Known Member

    Joined:
    Sep 8, 2013
    Messages:
    1,218
    Likes:
    206
    Location:
    Northern Canada
    On the same Amazon's page down below ADUM4160 for $33. Or you can build your own
     

Share This Page