Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
• 09-07-2020, 08:48 PM
Yes. The input signal is the resistance. You can power the sender from any voltage -- the 3.3 V supply on Teensy is convenient. In any automotive system, you need to protect against transients and noise. So, from the...
9 replies | 361 view(s)
• 09-04-2020, 04:42 AM
You don't really need an opamp. If you don't need perfect accuracy, connect 2 resistors in series between the +3.3 V and -3.3 V line that you want to measure. Connect the junction to the ADC input. Make the R to the...
9 replies | 282 view(s)
• 08-25-2020, 04:08 AM
for this part - "Also, the 1/15Hz = 66,666 us. (mark of the devil!) which is > 65,536." --could you have a timer for 1/30 Hz and then in the callback just skip every 2nd one ?
13 replies | 322 view(s)
• 08-24-2020, 02:39 AM
Try this -- connect one input to VDD (3.3 V), and the other to GND. Then run a small sketch that reads alternately between the two inputs -- see how slow you have to go to only (mostly) see codes near 0 and near full...
6 replies | 151 view(s)
• 08-23-2020, 05:03 PM
Jp3141 replied to a thread Checking ADC noise in Project Guidance
The reference for the ADC is the VDD (3.3 V) supply -- from a TLV75733P. This only has 1.5 % accuracy, about 200 uV p-p noise in the BW you are using, and probably a change of a few mV over the temperature swing. This...
50 replies | 846 view(s)
• 08-22-2020, 05:18 PM
Yes, that spike could be bad. Add 1k in series with the input, or just in series with the 10 uF. You don't need to use 1k & 220 Ω -- they make the cutoff frequency too high for audio (10 uF & (220//1k) = 10u&180 =...
13 replies | 367 view(s)
• 08-21-2020, 05:22 AM
Be careful -- a very large DC offset on the input (say 5 V) could damage the Teensy when it is initially plugged in because the initial step as the 10 uF is charged will be driven straight into the A2 pin. If this is a...
13 replies | 367 view(s)
• 08-17-2020, 12:52 AM
I looked at interrupt-driven ADC conversions some more. Using this ISR: FASTRUN void ADC_loop(void) { digitalWriteFast(admarkpin, HIGH); adc->adc0->startSingleRead(A9); // start a single conversion ...
47 replies | 1586 view(s)
• 08-16-2020, 06:25 PM
At 8 bits, quantization errors possibly make STDEV analysis inaccurate -- you may have a DC input that falls well within an ADC conversion step, thus giving 0 STDEV (even with some noise on the signal (LSB = 12.9 mV)....
47 replies | 1586 view(s)
• 08-16-2020, 06:17 PM
@borgerson -- yes, it compiles; I don't think the variable sizes are the problem. What seems to be happening is that at > 10 bits resolution, I can't run 1 ADC at 1 MHz - I need 500 kHz for 12 bits, and about 200 kHz...
47 replies | 1586 view(s)
• 08-16-2020, 06:26 AM
Thanks all. It seems like NVIC_SET_PRIORITY(IRQ_PIT, 1); and myTimer.priority(1); // set high priority have the same effect of raising the priority. Furthe looking through my code, it seems that the delay()...
9 replies | 206 view(s)
• 08-16-2020, 03:10 AM
@mborgerson, I can't get your 1st post to work on a T4.1 (with a PSRAM also) at anything other than 8 bits. Am I missing something simple ? I have tried changing these lines: adc->adc0->setResolution(8); // set...
47 replies | 1586 view(s)
• 08-16-2020, 12:24 AM
But how can I find what other interrupts are using priority 0 and move them to (say) 8 ?
9 replies | 206 view(s)
• 08-15-2020, 09:41 PM
But how do I do that specifically ? I don't know the interrupt number. I tried NVIC_SET_PRIORITY(IRQ_PIT, 1);? and ...,0); -- that helps and reduces the jitter from 10's of us to about 1us. I guess I need use...
9 replies | 206 view(s)
• 08-15-2020, 09:18 PM
I have a simple demo on Teensy LC that generates an interval timer interrupt nominally each 10 ms and toggles a pin. However the interrupts (or pin toggling) don't come at precise intervals. Here is a screenshot -- note...
9 replies | 206 view(s)
• 08-15-2020, 01:47 AM
It probably won't damage anything -- the '5 V' will rise to the highest of the USB voltage and the external supply. In the worst case, the USB power supply will current limit or shutdown (in some MacBooks, you'll have...
2 replies | 186 view(s)
• 08-14-2020, 05:08 AM
Where did digitalToggleFast() come from ? I can't even find it on Google. What other useful functions am I missing ?
22 replies | 424 view(s)
• 08-14-2020, 01:04 AM
Given that it is driving a mechanical system, the requirement to have the phase change smoothly by 'x' ns every single cycle isn't real -- it just requires that the average does this. It still does require that the...
22 replies | 424 view(s)
• 08-12-2020, 04:41 AM
There is only a single DAC output on the Teensy's. But your VOR probably doesn't really need a sine wave -- likely a square wave will do, and you can generate those from PWM signals -- to get your phase shift of 360...
22 replies | 424 view(s)
• 08-11-2020, 02:27 AM
There has been some interest in this question. I setup a test with a Teensy_LC where I supplied an external DC signal, and monitored it with both the Teensy and an Agilent 34410A DVM using USB for the Teensy and the...
35 replies | 814 view(s)
• 08-04-2020, 05:01 AM
5 replies | 186 view(s)
• 07-27-2020, 03:56 PM
My favourite tool :D For Windows users - here's a copy of AWK: https://sourceforge.net/projects/ezwinports/files/gawk-5.1.0-w32-bin.zip/download
9 replies | 673 view(s)
• 07-27-2020, 04:14 AM
I'm back on this again. I created a simple script that I run manually to generate a #include file. The script is: awk 'BEGIN{print "Serial.println( F( \\"}{gsub("\"","\\\"");print "\"" \$0 "\\n\""}END{print "));"}'...
9 replies | 673 view(s)
• 07-26-2020, 09:54 PM
Can someone please post an example of how to do this ? I'm confused over the number of endpoints I need; where the unique number is for each interface (is it 'PRODUCT_ID') ? Is DEVICE_CLASS necessary ? Also, I'm...
4 replies | 1093 view(s)
No More Results

Occupation:
Engineer

#### Statistics

##### Total Posts
Total Posts
485
Posts Per Day
0.17
Last Post
Teensy 4.1 ADC Accurecy 09-07-2020 08:48 PM
##### General Information
Last Activity
Yesterday 06:03 AM
Join Date
11-05-2012