You might have an oscillation. You'll never observe an opamp's settling time with a multimeter -- it's in the us range at worst.
You don't really need the extra input resistor anyway; opamp input...
Type: Posts; User: Jp3141
You might have an oscillation. You'll never observe an opamp's settling time with a multimeter -- it's in the us range at worst.
You don't really need the extra input resistor anyway; opamp input...
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...
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...
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 ?
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...
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...
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 &...
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...
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...
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...
@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,...
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...
@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:
...
But how can I find what other interrupts are using priority 0 and move them to (say) 8 ?
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...
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...
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...
Where did digitalToggleFast() come from ? I can't even find it on Google. What other useful functions am I missing ?
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...
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...
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...
Try load this file https://github.com/tloimu/adapt-ffb-joy/blob/master/downloads/adaptffbjoy-r54.hex by using the Teensy application (File..Open HEX File).
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
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...
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...
Thanks -- that works, but I agree it's quite twisted; I'll wait until I am really out of memory.
Thanks @JarkkoL -- that's closer to what I was aiming for, but I was hoping (for clarity) to have it all on one line without having to invent new names for all the intermediate variables like...
I am trying to initialize an array as part of a structure variable, but the compiler options in place on Arduino seem to require that the array size is predefined. Is there a way around this ?...
If you are just interested in the average current, then most measurement systems will actually do this by default -- they don't (instantaneously) sample the signal and then digitize it. For instance,...
I do that too, but with many computers of different vintages and locations, it's not unique enough for me.
I'd like something like (I know this won't work) where the #include basically loads the...
I suspect this is not possible, but is there a way (in the Arduino environment) to have a program print its own source code for documentation purposes ? I'd like to be able to do this as part of the...
what works really well is to run through the array, and with a probability p, change it from off to on. If you want 10 % of the LEDs on (on average), then p is 0.1 etc. This keeps the whole set of...
15 V might be a little too low for the TVS -- as the battery goes bad (but not failed), the voltage could approach 15 V -- together with the TVS tolerance, it could cause some current to flow and it...
You can't connect the 'A0 COM' connections together from the multiple rotary switches -- you won't be able to read the switches independently (or correctly). You can connect multiple Teensy analog...
If you have problems with signal amplitude, you could use this. It uses the analog comparator in the Teensy and can detect 200 mV 10 MHz signals.
Put your signal on pin23, and connect the...
1) jitter: you can't easily remove this. If you 'just' remove the last bit, you'll still have errors when the result crosses the next-to-last. For instance, say the numbers were 1..1000, and you had...
You are asking too much.
1) The ADC can always have a jitter of +/- 1 count -- imagine the input voltage is just on the border between two conversion codes -- depending on noise etc, it might...
0.1 mV for a 100 mV signal requires 10 bit resolution (log2(100 mV/0.1 mV)) -- the ADC can do that (it has 16 bits. but realistically only ~ 13 are 'good'). With a 1.2 V reference, the LSB is 0.14...
There is a sufficient amount of digital IO on T 3.2 etc. This IO is 5 V tolerant -- i.e. it survives 5 V being applied, but can only output 3.3 V. The ROM uses 5 V, but the datasheet indicates that...
See my code in thread https://forum.pjrc.com/threads/30822-Teensy-3-1-and-Flextimer(s)-Counting-external-pulses-accurately -- checking for 24 h with 15 MHz on pin3 and 20 Hz on pin A2 shows no...
I think I have this figured out. When the FTM overflows and an input capture occurs nearly simultaneously, it is difficult to know which occurred first, and therefore if the pre-overflow or post...
Thanks @robsoles. I see what you are doing, but that won't work for me -- I trigger a capture with the FTM Channel 0. I am leaning towards not generating an interrupt with a Channel 0 event, just...
@TelepnoneBill -- I am trying to do nearly the same thing, but I am not confident about the CH0 part. In your code, you can't guarantee that the CH0 event detect in the loop occurred before or after...
@robsoles -- I am also puzzled about the FlexTimer. I am trying to build a 32-bit counter with it (10 MHz input on its clock, 1 Hz on channel 0). What I am stuck on is how to synchronize my overflow...
Be careful if you run this loop for long durations -- because of roundoff error in the multiplication, the amplitude may not remain precisely constant. For some frequencies, it may grow to overflow...
I re-read your original post. If you need two signals, each from -5 V to +5 V (so a differential of +/- 10 V), you will need two opamps. There are many ways to do this; here's one:
7252
Use 2...
Since the DAC uses the same 3.3 V, you can use that for the reference also.
Resistor tolerances affect how precise your common-mode voltage needs to be. You can basically have two types of errors...
You can split R1 into two resistors in series, each twice the original value. Connect one end to GND, the other end to 3.3 V, and the junction to the opamp's inverting input ('-').
Basically this...
some ideas:
Does this occur if the LEDs are already powered up and you just power the Teensy ?
If you don't have a Teensy connected to the LEDs, do they flash ?
To confirm that it's not your...
Thanks. With 16 word loops, does this still pump data to the DAC at a uniform and constant rate, or does it go in bursts ?