Search results

  1. S

    Pin change interrupt - minimum duration?

    I'm wanting to do some Piezo TDOA detection using a Teensy LC (if it matters). I'm planning up to about 5 piezos - 3 for TDOA and 2 others for external noise rejection. The 3 TDOA sensors are spaced 120 degrees around the perimiter of the detection zone (ie, all hits are inside). The 2 noise...
  2. S

    Audio lib hanging

    I hooked it up to pins AGND, 3.3V, and A9. Yes it's biased to 1/2 VCC but A9 reads that range anyway - it can't read negative. Raw reading shows bias reads 512 over time, as I'd expect it to. The Audio Librarie's AudioInputAnalog doc says "signal range is 0 to 1.2v" which looks about right for...
  3. S

    Audio lib hanging

    The source in the first post will do it - removing the analogread for clarity will result in the app running as expected, but never going below 10 once the mic clipped. #include <Audio.h> #include <Wire.h> // GUItool: begin automatically generated code AudioInputAnalog adc1(A9)...
  4. S

    Audio lib hanging

    Thanks for clarifying that it makes sense - I was just trying to independently verify what was going on. AudioAnalyzePeak however still seems to get stuck with a non-clearing peak value of 10 in the example if the mic clips, which does not seem to happen if I do my own analogRead & peak...
  5. S

    Audio lib hanging

    I'm hesitant to say it's the audio library hanging, but on my Teensy 3.0, I have a couple problems with this simple program (below). I've got an Adafruit MAX4466 board wired up to pin 9, running off 3.3v. If I read raw analog values, I see more or less what I'd expect. But with the peak meter...
  6. S

    fast peak detection

    Doh. and thank you.
  7. S

    fast peak detection

    Ok, still getting poor sample rates (about 345 Hz on a 96 Mhz Teensy 3.0) Here's my code: #include <Audio.h> #include <Wire.h> AudioInputAnalog microphone(A9); AudioRecordQueue rq; AudioConnection patchCord2(microphone, rq); void setup() { AudioMemory(32); Serial.begin(9600); } void...
  8. S

    fast peak detection

    Thanks - that's sufficient for the audio analysis portion of my project. But .. I looked at the AudioAnalyzePrint class, and besides verbage saying not to use it - I couldn't seem to get it to tell how many samples had been read. (I'd still like to have a sanity check of the resulting sampling...
  9. S

    fast peak detection

    I'm doing an SPL meter stoplight, and using analogRead() with a Teensy 3.0, I'm only getting about 390Hz sample rate. I've got analogReadResolution(6) and analogReadAveraging(0), running open loop for 50ms. I'm not trying to do FFT or anything super fancy - I just need to make sure I don't...
  10. S

    Audio Reactive Teensy - any open source code or guidance?

    You could, but that's actually more complex if the circuit already has a teensy involved.
  11. S

    Audio Reactive Teensy - any open source code or guidance?

    You're just wanting a noise activated trigger? You can just sample, rectify, filter and level trigger off that. Doesn't require anything as complex as FFT unless you want to trigger off specific frequencies.
  12. S

    Current Measurement robust against massive overcurrent

    Yes, I'm familiar with the Hall Effect, and did look at a couple Hall effect sensors I was familiar with from past projects - but nothing I was familiar with would survive hundreds of amps while measuring a couple amps. Thinking some more about the problem - I'm thinking ignoring the starter...
  13. S

    Current Measurement robust against massive overcurrent

    I'm thinking about throwing a teensy on my car battery - I have something which appears to be draining the battery, but it's not always on. (Charging, Starter, Battery all check out fine). So I want to monitor battery voltage and charge/discharge current while off in addition to while the car is...
  14. S

    Audio - 2 octave down pitch shift

    I've been doing some more thinking, and I like the per string processing rather than just doing 2 octaves down on a summed mix. The highest frequency I'd need to detect is 784 Hz, the lowest possible would be about 110 Hz. The options I've thought of are: 1) Feed a highly clipped square wave...
  15. S

    Audio - 2 octave down pitch shift

    I was looking to do an octave pitch shift, and I have a couple teensy 3.0's laying around. Basically this is supposed to be a polyphonic octave effect, and I'd like to shift down 2 octaves, fixed interval. My toddler son loves music and playing with daddy. He just got his first toy acoustic...
  16. S

    ChibiOS/RTand FreeRTOS for Teensy 3.0

    I can build frBlink inside the arduino IDE. I can build a simple arduino blink from a makefile. But I can't seem to build frBlink from a makefile. It builds if I insert a main, but it doesn't run. What's puzzling is that I would expect behavior to be more similar since my makefile can build and...
  17. S

    FreeRTOS on Teensy (GCC, Linux)

    A google search brought me to Freescale's web site, and found MK20DX128VLH5 in the K20_50 family, but I too came up blank on any sort of SDK to make spacewrench's makefile happy.
  18. S

    multivariable pid

    Is this a multi input single output system, and is that three nested loops, orthree parallel loops, selecting the most restrictive output? Describing the problem sounds like the latter case, but it also seems like you could mess up a control loop yanking its value around to some arbitrary value...
  19. S

    Black Friday Sale, Nov 29th

    It's on! (Like Donkey Kong, since there's a 10 character min post limit)
  20. S

    multivariable pid

    I'm using a teensy3 as a glorified power supply monitor/controller/logger. One of my outputs is a 0-450V linear supply, limited to 20mA or 8W, and I'd like software control of the limits. I'm using PWM -> opto -> rc as an analog output to drive the gate of the pass FET, output voltage is read...
  21. S

    Teensyduino 1.16 Released

    Linux loader is giving me fits. At least one "you should never see this error, contact Paul" error, plus numerous infinite waits that can't be killed with even kill -9.
  22. S

    Using teensy to interpret guitar pickup signal as smooth data curve

    Another approach might be to just LPF at 1.5 khz, sample at 3khz, and do your envelope tracking in software.
  23. S

    Teensyduino 1.14 Release Candidate #1 Available

    I have really limited cycles right now (with a baby in the house). But it frustrates me enough that I end up using my available cycles trying to get a makefile working to build it as static libs rather than actually working on my project. It's like an attractive nuisance I can't leave alone any...
  24. S

    Teensyduino 1.14 Release Candidate #1 Available

    I thought it was a simple overlay. However, I don't use the arduino executable either. It's klunky and frustrating for anyone used to a real editor. But Arduino source is downloadable too. The bigger point is that the exe is completely blind trust, there's not even a source tarball that you...
  25. S

    Teensyduino 1.14 Release Candidate #1 Available

    Is there a reason that it's only delivered in an executable? I know this is common place in the Windows world, but it's really disturbing for some of us ingrained this way.
  26. S

    Teensy 3.0 with NiHM voltage range

    I'm still in the sketching phase, but I'm planning to run NiMH instead of LiPo because I can run boost converter and avoid the futzing that comes with extracting 3.3v out of a battery that can range either side of the output voltage. Drop in switching regulators are pretty slick these days...
  27. S

    Teensy 3 CRC

    Thanks, I'll check out the AES lib. Up until recently I was under similar impression about CRC. I'm not sure how I picked up the idea that it could work for authenticating the sender. (Seed perhaps) It's not National Security stuff. The project is a accelerometer on a guitar headstock driving...
  28. S

    Teensy 3 CRC

    I've looked over the docs on the CRC module a few times, (mostly on the tiny phone screen, which never helps). I think I can figure out how to feed it stuff and get results out. I'm a bit unsure of ther bigger picture though. I'm wanting to use it for message authentication, rather than simply...
  29. S

    Tips for protecting a microcontroller? (Second dead teensy 3)

    If you do run it of an ATX power supply you might want to consider running off the 5V standby (purple) line instead. This is designed to run low power devices while the primary 5V and 12V rails are off - so I wouldn't expect minimum load conditions to affect it. Either the spec doesn't specify a...
  30. S

    Threading in Teensy3

    In the microcontroller world this is usually done with interrupts, but its not a 1:1 translation from multithreading. I'm looking at rewriting my arduino app to be driven off the IntervalTimer library, something like: 10ms timer for things that fade between values, 100ms for scanning inputs...
  31. S

    Teensy3 - fast multichannel adc

    On more reflection... The oversampling is way over. Even if i did attempt the extraction of harmonics... The higher the frequency goes, the less important it becomes. In standard tuning, a 24 fret guitar has a fundamental range of 82.4 hz to 1318 Hz. Right now I'm strung lighter than normal...
  32. S

    pull-up/down and analog inputs

    I figured it was a simple divider. http://joflaherty.org/MidiExprPedal/Midi%20Pedal%20schematic.png A couple options - you treat the input pin as a capacitive sensor at startup, see if it's hooked up, then read it as an analog input after that. If you try driving the input pin - make sure...
  33. S

    pull-up/down and analog inputs

    Sorry - I meant an unused (but non switching) pin on the connector, not the micro. You could use the ring for it if you weren't already using it for signal. Of course, if you have need of that info, you could just bring the 'plugged in' signal, however you derive it, to a pin on the micro if...
  34. S

    pull-up/down and analog inputs

    It's common (no pun intended) to just short them to ground, though a series resistor can reduce switching transients. I've seen some amazingly clever things done with just a humble switching jack. Depending on how much you need to accomplish - it can ground out the input, or it can be tied to a...
  35. S

    pull-up/down and analog inputs

    I'd strongly consider a switching jack over a pullup on an analog pin, especially if the other end isn't really low impedance
  36. S

    Zombie Detector

    I have a stockpile of them I use for more mundane purposes. The pullup (or pulldown, if its active low) swamps the power dissipation calculation. However... You really should also consider a companion project. RTC + Photocell + PIR. If dark, between 12am - 530am, on motion detect emit a random...
  37. S

    Zombie Detector

    Last reply dissapeared. I've read of someone doing something similar for their child. For an adult you strongly need a slight but nonzero chance of detecting zombies just far enough away that you might not be able to detect them yourself. And oh yeah, to accurately detect zombies takes a lot...
  38. S

    Teens3 Makefile

    It works, but only in the installed directory (in this case /usr/local/arduino-1.04/hardware/teensy/cores/teensy3). Thanks - that's helpful. I see now (with a bit o sleep and that clue I had missed) that this here isn't even the issue I'd been grappling with, but rather a simple path/build...
  39. S

    Teens3 Makefile

    I'm trying to get my program building via Makefile. I've stripped it down to this amalgamation of modified sample code.#include <unistd.h> #include "mk20dx128.h" #include "usb_serial.h" #include "core_pins.h" extern "C" int main(void) { // To use Teensy 3.0 without Arduino, simply put your...
  40. S

    Teensy3 - fast multichannel adc

    Yes. They're buffered and go out the 13 pin jack. The number of frets doesn't really help unless you're doing something like a capacitive or resistive input sensor, and that doesn't get you velocity or pitch bend. (Not a bad way to do it at all though, just doesn't work well as a retrofit.) Zero...
  41. S

    Teensy3 - fast multichannel adc

    No - but I do have hex pickups (piezo). Actually, in an effort to get pitch tracking latency down, I was thinking something like 96khz sample rate 96khz [BUFF] ... rollover shifts average into ---> 48khz [BUFF]... ... ... down to say 375 Hz (pick a number). Min frequency detected only needs to...
  42. S

    Teensy3 - fast multichannel adc

    Ah drat. I actually bought it for more mundane project, but the idea of way more power than an AVR based Arduino sorta got to my head, and I started having delusions of grandeur. Especially when I noticed it would fit in the bottom of a Stratocaster's jack route. Autocorrelation seems a little...
  43. S

    Teensy3 - fast multichannel adc

    Most microcontrollers with multiple analog inputs mux a single adc. How fast can i sample if I need to switch between inputs? I'm not certain exactly how much precision I need. The source is audio, but I'm only doing pitch detection on it, so 10 or maybe even 8 bits might be enough with...
Back
Top