Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 82 of 82

Thread: test code for piezo

  1. #76
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,386
    Quote Originally Posted by seayaker View Post
    I don't understand the connection to the 3v positive from board, all the examples I've seen are just analog inputs and gnd.
    If you're referring to Paul's circuit for the piezo, the diode to 3v3 is used "clamp" the voltage from the piezo to < 4 volts, preventing damage to the teensy analog port.

    the monitor output attachment in your post #75 is NOT from the sketch in post #23????? the sketch in post #23 prints two columns of numbers, DAC output and A0 input.

  2. #77
    I just ran it again freshly copied from #23 same result, 1 column printing rapidly 328 or so. I replaced the diodes and rebooted and now-
    Click image for larger version. 

Name:	nd1.PNG 
Views:	10 
Size:	29.9 KB 
ID:	12308
    Last edited by seayaker; 12-16-2017 at 06:44 PM.

  3. #78
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    1,386
    those numbers look promising, though in post #69 I indicated I was interested particularly in the high end numbers (4000 ... 4032). Is English not your first language?

    The sketch that was printing out 328 (presumably A0 values) is a mystery. That you couldn't get a fresh copy of sketch #23 to load and run is a mystery. That you had to reboot and replace diodes is a mystery. T3.6 damaged? poorly soldered?

    I fear I am out of ideas ... hopefully, others will have some fresh insights.

  4. #79
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    17,044
    I'm also running out of ideas here. The build in message #51 looks correct. The waveform in message #62 looks right, but at only 1/100th the correct amplitude. Wrong resistors are the main reason I can imagine it would be "working" but the signal far too low. But the resistors are measured as the right values, so I just can not know why it is not giving a strong enough signal.

    Maybe the piezo was damaged? Did you solder the wires on the piezo? They are very temperature sensitive. Maybe if it got too hot the material may have been damaged.

    If you buy another piezo, I highly recommend getting one which already has the wires connected.

  5. #80
    Senior Member
    Join Date
    Jul 2014
    Posts
    1,636
    Quote Originally Posted by PaulStoffregen View Post
    I'm also running out of ideas here.
    Well, I found it very unusual to have a piezo connected 'directly' (i.e. without any impedance transformation (FET or transformer)) to an ADC. It may only work for very slow sampling rates.

    If you buy another piezo, I highly recommend getting one which already has the wires connected.
    Agree,
    any piezo where the soldering iron is on for more than 1 or two seconds, may not work properly. The polarisation within the piezo is destroyed by excessive heat and the piezo does nor work anymore properly.

  6. #81
    I have at least 30 extra piezos all with wires, first thing I checked. When I connect one to+A0 and gnd. using Manitou's sketch in#55 I get exactly those numbers, 900-1100 with a tap and then flat line at 0. I have yet to see 1 example of a piezo triggering a midi note with the T3.6. It's time to cut my losses and move on. I have tested every connection on the board tried 1/2 dozen sketches that work with Arduinos but not with T3.6 The buttons sketch still works so maybe I'll find a use for the board sometime. Thanks for trying.

  7. #82
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    1,461
    Quote Originally Posted by seayaker View Post
    I have at least 30 extra piezos all with wires, first thing I checked. When I connect one to+A0 and gnd. using Manitou's sketch in#55 I get exactly those numbers, 900-1100 with a tap and then flat line at 0. I have yet to see 1 example of a piezo triggering a midi note with the T3.6.
    If you already get that beautiful 900-1100 peak, you are only a few lines of code away from triggering midi notes. Why then being so desperate? You aren’t really expecting others to do your work and to write the code for you?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •