Search results

  1. J

    Dual plane dynamic crankshaft balancer build

    Are there any thoughts to find the balancing coefficients at different speeds? Or are you confident that you are always far away from resonance?
  2. J

    DIY-Thermocam: A self-assemble low-cost thermal imager based on the Teensy !

    I recently purchased the kit from Groupgets. Unfortunately Groupgets has decided that they will no longer source this kit. A few things I noticed. The slider switch (top switch RHS) is mounted on the inside of the panel. I assumed that it should go in from the outside and filed the hole in...
  3. J

    Bat detector

    As an intermittent teensy user, I just stumbled upon this thread. It is a fascinating project. As someone that is somewhat familiar with signal processing I thought I would add a couple of comments. If they are "out to lunch" please excuse me. 1) If you are interested in obtaining a more...
  4. J

    Debugging strategies

    I am curious what batch tracing is...
  5. J

    Matlab/Simulink Target

    This might be a good question to pose to Matlab.
  6. J

    Very Simple Project Idea

    Try looking up bed bug traps. One of the techniques is to get a one litre pop bottle and fill it 3/4 full of sugar water. Make sure there is a lot of sugar, since it is the carbon source for CO2. About a cup of sugar if I remember. Then mix water, sugar and yeast in a cup. Pour this mixture...
  7. J

    FreqMeasure and FreqMeasureMulti

    Thanks for the clarifications and suggestions. I put together an enhancement to the example for freqMeasMulti. It may be helpful to someone, and I would like to submit it for an official example for this routine. It uses the teensy to generate a waveform and then measures that waveform with...
  8. J

    Different-Range FFT Algorithm

    Just getting back to fft algorithms, as a long time user of the FFT, but having never coded the algorithm, it seems the code of choice is FFTW downloadable at This is the routine used in matlab and octave and is open source. It allows an arbitrary number of points in the...
  9. J

    A New Accurate FFT Interpolator for Frequency Estimation

    The Grandke paper looks interesting based on your description. Since I am not a member of IEEE, I don't have a copy. Quite possibly a similar scheme was developed by Bruel and Kjear and reported by Randall as shown in the attachment. I have used the scheme for more accurate frequencies, but...
  10. J

    FreqMeasure and FreqMeasureMulti

    And another question to someone more adept at programming than myself. In normal mode, ie rising edge to rising edge measurements, if my pulse train has 8 pulses per revolution (PPR), and I only want a 1 PPR signal, is there a way to change freqMeasureMulti to only fire the ISR on every eighth...
  11. J

    FreqMeasure and FreqMeasureMulti

    One more question, when I look at freqCount, I cannot find a ring buffer in it. So I assume if a measurement is not read and a new measurement comes in that the original measurement is lost forever in freqCount?
  12. J

    FreqMeasure and FreqMeasureMulti

    I have a project where I may need to measure the duty cycle of a tachometer signal as well as the rotational speed. After reading the pages on FreqMeasure and freqMeasureMulti, it appears that the latter program has a mode where it alternately measures the high part of the signal and the low...
  13. J

    Functional difference between timerone and timerthree

    I used the suggestion from another forum post and used a search engine outside of the forum and found this page It answered my question.
  14. J

    Functional difference between timerone and timerthree

    I can't seem to find the documentation which shows which teensy 3.1 pins map to which timer. I am sure that this impacts the use of the Servo library.
  15. J

    Teensy 3.x C-compiler

    My understanding is that some of the overview material is for the Teensy 2 and not applicable to the Teensy 3. And the teensy 3 does use GCC in the Arduino/Teensyduino IDE.
  16. J

    Real Time Linux

    You might take a look at QNX. This is a microkernal OS that has been used on factory floors for a long time. Many car Infotainment systems are built on this OS. Blackberry 10 also has QNX at the core. I am aware of it, have seen it on the factory floor in PC class machines, and just saw an...
  17. J

    Teensy 3.2 16 bit differential mode only returns 15 bits

    Any suggestions of chips or boards that work well with the Teensy?
  18. J

    Teensy 3.2 16 bit differential mode only returns 15 bits

    If you are limiting yourself to 16 bit integers (as I believe the library is doing, but it has been a while since I took a look) and doing differential conversion you need both positive and negative values. Thus the maximum you can have is 15 bits precision plus a sign bit. This is code that I...
  19. J

    DAC analogWrite Limitation

    I just tested again with both GND and AGND and my peak voltage is 3.24 V. I cannot seem to duplicate the problem, and am using the same Teensy 3.1. A second Teensy that did not have this problem continues to work well.
  20. J

    Pressure regulating idea sanity check

    I am wondering if totally reconfiguring the program to use IntervalTimer and interrupts for the timing portion, and then doing the pressure control in the loop. This will effectively make the system multi-tasking where the critical timing portion of the code is controlled by interrupts and all...
  21. J

    Rotating Torque Sensing

    One commercial way to get torque using the twisting shaft idea is at This uses a ~$100 strain gauge and radio transmission of the strain signal to the receiver. Expensive but accurate. Slip rings are a way to get around the radio...
  22. J

    ADC library, with support for Teensy 4, 3.x, and LC

    I have a non-blocking (interrupt) based MUX data acquisition working here. The ADC conversion is called and when complete it calls an interrupt. When the interrupt service routine has read the value into a ringbuffer, another ADC call is made. As many of these can be daisy chained together...
  23. J

    ADC library, with support for Teensy 4, 3.x, and LC

    I have put some code together to read the internal temperature sensor and/or an external thermister. First I read it with a non-blocking call and then with a blocking call with an interrupt. Trouble is the ISR to read the value when the non-blocking call is executed does not execute. The...
  24. J

    ADC library Apparent Pin Restriction

    Okay, I just figured out I should double click on the pin layout sheet in thread,, and I think I am learning how to interpret it, at least a little. That means for most pins we should not assign an ADC...
  25. J

    ADC library Apparent Pin Restriction

    Okay, thank you. I tried A2 and A3 and they do work. I will change my code to use only one ADC.
  26. J

    ADC library Apparent Pin Restriction

    I have a project where I am using the Pevide ADC library. Thanks for all the hard work in writing the library. I am using Ubuntu 14.04, Arduino 1.6.5 and and Teensyduino 1.25-beta2. I have tried both the teensy 3.1 and 3.2. I am attaching test code where I have limited the problem to. In my...
  27. J

    analogWriteResolution applied to DAC

    With the Teensy 3.1 having a 12 bit DAC, I assumed that I would need to send a number from zero to 2^12-1 to it. This worked well until I also started using PWM and changed its default resolution using the analogWriteResolution command. If I sent analogWriteResolution(N); then the number I...
  28. J

    Serial.print a NaN

    I spent the day tracking down a divide by zero error. (I know I am complaining.) I am using a teensy 3.1 on Arduino 1.6.5 and Teensyduino 1.25-Beta2 on Ubuntu. So this is a combination bug report and enhancement request for Serial.print(). What finally clued me in is that when my error...
  29. J

    Bearing Calculation and Ring Buffer

    Pedvide's ADC library has ring buffers. c`
  30. J

    Datalogger with S25FL127S SPI Flash Chip

    Reading your requirements, it seem that you only require the sampling of two channels. Fortunately the teensy can do the simultaneous sampling on the two channels without multiplexing. Presumably you have integrated anti-aliasing filters into the analog circuitry, or have determined that your...
  31. J

    Teensyduino 1.20 Released

    You may want to include the FASTRUN discussion above in the Wiki when it comes. And can it be used in conjunction with static inline void function()? An example of static inline is shown at
  32. J

    ADC library, with support for Teensy 4, 3.x, and LC

    Set RingBuffer size when declaring it In my project I am using the RingBuffer provided in the ADC library. However I wanted a value other than the default ring buffer size. So I asked a friend to help me and he came up with a modification. The only change to the code calling this function is...
  33. J

    Teensy 3.1 - "USB Device Not Recognized" - HELP!

    Not sure if it is related, but in using a T3.1 with Ubuntu 14.04, I often find that the first compile&download, does not load the code into the teensy. Immediately pressing compile& download icon again does download the code and reboot the teensy.
  34. J

    Complex Numbers

    Thank you all, with Pete's insight it is all working now. No compiler limitations at least for this test. And thanks Frank for your clarification on serial over usb.
  35. J

    Complex Numbers

    Sqrt(-1) = i ; However a complex multiplied by its complex conjugate is a real. Try FOIL on it. Program prints fine, my mistake above. I am curious when Serial.begin(9600); became optional It seems that basic complex numbers work but the code snippets Serial.print(cexpf(x))...
  36. J

    Complex Numbers

    Great News, Thanks a lot Paul, but always a couple of questions. 1. How did you get away without a Serial.begin(9600); command 2. Why is my program not printing? 3. Why does the conj command not work (I thought I would be fancy and used the sqrt of the number multiplied by its complex...
  37. J

    Complex Numbers

    I am wondering what is normally done when complex number math is required for the Teensy. There seem to be a couple of options: 1. Use Rob Tillaart's library found at 2. Perhaps gcc for Teensyduino already has a complex number library 3...
  38. J

    Teensy functionality controlled by DIP switches

    I am new to embedded programming and don't consider myself a programmer, but have done some. In the embedded world, I have only used the Teensy 3.1 with Teenduino. In effect, what I would like to do is to have a DIP switch connected to the Teensy to control its functionality. When the Teensy...
  39. J

    Serial Port Read with Matlab on Linux

    Thank you very much for the reply. I have it working now. According to the link you sent, the port should be '/dev/ttyS[0-255]. Thus I am using '/dev/ttyS99'. I have seen it work with the number being 999 in my testing and you got it to work, so perhaps matlab tests a larger range of numbers...
  40. J

    Serial Port Read with Matlab on Linux

    I am using Ubuntu 14.04, Arduino 1.6.5 and Teensyduino 1.25-beta2. I am trying to collect the serial port data with matlab R2014a. Using Serial.print commands I can see data on the serial monitor. I have also successfully acquired data with processing 3.0 using the serial port /dev/ttyACM0 as...
  41. J

    Strip Chart Recorder

    In some work I wanted to be able to continuously plot live data coming to the host computer from a teensy as shown below. Looking at Arduino forums it seems that the program called processing is a popular way to do this. From the processing forum I found a program that came close to doing...
  42. J

    ADC library, with support for Teensy 4, 3.x, and LC

    I am not familiar with C++, but when I review the RingBuffer code, I believe that to change the default ring buffer size, I need to change the define statement in the RingBuffer.h code // THE SIZE MUST BE A POWER OF 2!! #define RING_BUFFER_DEFAULT_BUFFER_SIZE 8 Is there a way to do this with...
  43. J

    Trying to read battery voltage

    You will have your input resolution set to 10 bits = 2^10 = 1024. If you go to line 397 in in ADC_Module.h it will tell you the allowable resolutions. It may well default to 10 bit single ended measurements. Thus full scale with your voltage divider will be 3.3 volts/2, and that will read an...
  44. J

    Teensyduino 1.25 Beta #1 Available

    I feel embarrassed, but thanks for the suggestions. chmod 777 teensyduino.64bit worked. The ldd command just tells me it is not a dynamic executable.
  45. J

    Teensyduino 1.25 Beta #1 Available

    I have 64 bit Ubuntu 14.04 LTS running Arduino 1.6.5 with Teensyduino 1.24. I thought I would load the Teensyduino software from this link. This would be only my second time installing it, or the first time updating. I assume that I should be able to install from this link without...
  46. J

    Pin AREF voltage level

    Thank you very much for the clear reply and the diagram pointing to pin 17. I ran the test program shown in the initial problem description on the teensy 3.1 and then connected the voltmeter to pin 17 and AGND. It shows 1.20 volts just like you suspected.
  47. J

    Pin AREF voltage level

    I have an application where we are using the PGA (programmable gain amplifier) and thus need to use the 1.2 volt reference. Currently we have analog circuitry using this voltage. Reading section of the manual, "The only reference option for the PGA is the 1.2 V VREF_OUT source. The...
  48. J

    ADC library, with support for Teensy 4, 3.x, and LC

    getMaxValue in the library says it gets 2^res-1. When I try it with a number of values with differential mode I always get 65535. I also notice that with differential mode, according to the manual on page 657, the value is stored in twos-complement output. Thus the max value should be...
  49. J

    Divide Problem

    Thank you very much, it is now working.
  50. J

    Divide Problem

    I am running Arduino IDE 1.6.5 with Teensyduino 1.2.4 on 64 bit Linux. I am having a strange problem with dividing a defined variable with another defined variable. When I add, subtract or multiply the two variables there is not a problem. When I put the defined variables into other...