Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: Jp3141

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    602

    If you are just interested in the average...

    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,...
  2. Replies
    6
    Views
    415

    I do that too, but with many computers of...

    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...
  3. Replies
    6
    Views
    415

    Self-print code for documentation ?

    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...
  4. what works really well is to run through 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...
  5. Replies
    7
    Views
    2,617

    15 V might be a little too low for the TVS -- as...

    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...
  6. You can't connect the 'A0 COM' connections...

    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...
  7. If you have problems with signal amplitude, you...

    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...
  8. Replies
    3
    Views
    2,123

    1) jitter: you can't easily remove this. If you...

    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...
  9. Replies
    3
    Views
    2,123

    You are asking too much. 1) The ADC can always...

    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...
  10. Replies
    3
    Views
    1,395

    0.1 mV for a 100 mV signal requires 10 bit...

    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...
  11. Replies
    4
    Views
    1,422

    There is a sufficient amount of digital IO on T...

    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...
  12. See my code in thread...

    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...
  13. I think I have this figured out. When the FTM...

    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...
  14. Thanks @robsoles. I see what you are doing, but...

    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...
  15. @TelepnoneBill -- I am trying to do nearly the...

    @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...
  16. @robsoles -- I am also puzzled about the...

    @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...
  17. Replies
    3
    Views
    1,653

    Be careful if you run this loop for long...

    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...
  18. I re-read your original post. If you need two...

    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...
  19. Since the DAC uses the same 3.3 V, you can use...

    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...
  20. You can split R1 into two resistors in series,...

    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...
  21. Replies
    3
    Views
    1,040

    some ideas: Does this occur if the LEDs are...

    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...
  22. Replies
    4
    Views
    2,063

    Thanks. With 16 word loops, does this still pump...

    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 ?
  23. Replies
    4
    Views
    2,063

    Max DMA Buffer Size ?

    I am trying to build an arbitrary waveform generator by using DMA to drive the DAC diretly from a table in (flash) memory. I need at least 50,000 points. My code works with < 32767 points, but not...
  24. Replies
    3
    Views
    1,282

    What is the setup & hold time of your data bits ?...

    What is the setup & hold time of your data bits ? -- how long between the change in a data bit and a (rising) clock edge ?

    Perhaps the Teensy is too fast - if the signal rise or fall times are...
  25. Replies
    8
    Views
    2,061

    I suggest you use plain, clean water (and a...

    I suggest you use plain, clean water (and a toothbrush). After cleaning, blot the water off with a paper towel as much as you can, and then keep the Teensy warm for 30-60 mins to completely dry it --...
  26. Replies
    23
    Views
    6,030

    I'm trying to do it all with no (minimal)...

    I'm trying to do it all with no (minimal) additional hardware. Basically, if I can couple the crystal and MCU's temperature, I'll have a (digitally-controlled) TCXO, and a frequency counter that just...
  27. Replies
    23
    Views
    6,030

    I too have been working on this and find similar...

    I too have been working on this and find similar results. Here is my particular T3.1 with a 10 MHz rubidium reference and varying OSC0_CR capacitance from 2 to 32 pF (I didn't use the 0 pF setting)....
  28. Replies
    5
    Views
    2,085

    Your setting of delayCount and pulseCount isn't...

    Your setting of delayCount and pulseCount isn't atomic -- you could get a SPI interrupt between setting Tpulse and Tduty in loop() -- best to wrap those 2 statements in noInterrupts().

    You can...
  29. Replies
    501
    Views
    191,348

    Can't you just add: SPI.setSCK(14);...

    Can't you just add:

    SPI.setSCK(14); (SCLK connected on Teensy pin 14)

    to your SPI code ?
  30. What's the difference between analogReadRes and analogReadResolution() functions ?

    I can't find any description of the differences, or which is preferred.
  31. Replies
    1
    Views
    857

    Serial locks up when no Serial.read() ?

    Simple program outputting some characters. If I type into the serial port (either with Serial Monitor or Coolterm), it frequently hangs when the buffer contains ~30 characters -- not always, but...
  32. Yes, you can write to it in decimal. Note that...

    Yes, you can write to it in decimal. Note that this value takes effect on the next timer cycle (from the F1RM: "Sets the timer start value. The timer will count down until it reaches 0, then it will...
  33. Replies
    3
    Views
    1,248

    As far as I can see from the spec for these...

    As far as I can see from the spec for these supplies, they are specified down to zero load on the 12 V outputs. Therefore you don't need to load them. On the other hand the 5 V are specified only...
  34. I don't think there will be any noticeable...

    I don't think there will be any noticeable difference in Teensy performance or behaviour. The T3.2 regulator won't be particularly effective in further reducing the switching regulator noise.
    ...
  35. Do you know the rough magnitude of the draining...

    Do you know the rough magnitude of the draining current ? You should be able to measure it with the car off:

    But be careful just using a DMM -- many of the loads in a car have a large capacitor at...
  36. Replies
    14
    Views
    2,604

    With a 13 V input and 5 V output, 85 mA will only...

    With a 13 V input and 5 V output, 85 mA will only cause 0.085*(13-5) = 680 mW dissipation in the 7805. It should be able to do that with a small heatsink, especially if you put it in (inside !) a...
  37. Replies
    14
    Views
    2,604

    The 150k & 100k you show won't work -- basically...

    The 150k & 100k you show won't work -- basically they won't provide enough current for the Teensy or the other loads. If you make the resistance low enough to work, you'll end up dissipating more...
  38. Replies
    14
    Views
    2,604

    That'll work. You'll have to configure the...

    That'll work. You'll have to configure the Teensy's input pin as INPUT_PULLUP when reading -- else nothing will pull the pin up to +3.3 V when the NPN is off.

    In case you have noise or spikes,...
  39. This will ususally work, but note that the DAC...

    This will ususally work, but note that the DAC spec has DNL (basically error in the step) of +/- 1 LSB. This means that for a given ideal step size, the actual step could be between 0x and 2x this...
  40. For the same amount of filtering, both the...

    For the same amount of filtering, both the hardware and software approach will have the same delay.

    PWM will introduce more ripple -- but you should PWM at frequencies higher than the response...
  41. That's not surprising -- here's a picture of...

    That's not surprising -- here's a picture of (idealized) motor current for a simple brushed DC motor. In reality there are larger spikes as it commutates.
    5272

    In addition, as the motor wears...
  42. Don't get carried away with accuracy. Copper...

    Don't get carried away with accuracy. Copper wire's resistance changes by 1 % for a 3 deg. C (5 deg. F) temperature change. As the motor wears, its characteristics change; in addition (depending on...
  43. That'll work, but will have the same concerns...

    That'll work, but will have the same concerns about interfacing with the Teensy's 3.3 V capable inputs.
  44. I think you are shorting the unused outputs of...

    I think you are shorting the unused outputs of the opamp to GND -- don't do that. You can short the unused inputs together and to GND, but it is not necessary on analog components; usually just on...
  45. I haven't had time to look into the details of...

    I haven't had time to look into the details of Teensy's input pin. If it is capable of withstanding 5 V, then neither the zener or R2, R3 are really necessary (if the opamp is also only powered from...
  46. Think of a zener as a device that clamps the...

    Think of a zener as a device that clamps the voltage from going above 3.3 V -- it does this by conducting enough current to keep the voltage low. When the voltage is less than 3.3 V, it doesn't...
  47. Yes, R2 does limit the current through the zener...

    Yes, R2 does limit the current through the zener -- but the zener is there to protect the downstream circuits.

    Basically, when the opamp output is < 3.3 V, the zener does nothing (it acts like an...
  48. OK -- if the Teensy's inputs are 5 V tolerant,...

    OK -- if the Teensy's inputs are 5 V tolerant, then you don't need any protection on the output of the opamp -- since it is powered from the 5 V supply, it cannot overdrive teh Teensy's inputs.

    if...
  49. Yes. When the diode is clamping the opamp's...

    Yes. When the diode is clamping the opamp's output votlage, the value will be 3.3 + 0.7 V, or 4 V. The 1k then limits the current that can flow into the Teensy's pin to 'reasonable' values. Higher R...
  50. That circuit will work. However consider that if...

    That circuit will work. However consider that if there really are large spikes, you'll need to protect the opamp's input also.

    I suggest you use 2 back-back diodes (e.g. 1N4148, or 1N914 --...
Results 1 to 50 of 460
Page 1 of 10 1 2 3 4