+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: The Teensy 3.0 project

  1. #1
    German cave diver bluepot is an unknown quantity at this point bluepot's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    16
    Raycy

    Ray, BK2, IDA57, IDA59

    The Teensy 3.0 project

    I have been playing around with lots of different microcontrollers over the past years - basically with various "Duinos", which I like because of the availability of various hardware extensions and the standardized IDE.
    For a new O2 monitor / HUD project I recently checked out the Teensy 3.0 which has been around for a while and is probably one of the most powerful small "Duino" - style microcontroller boards available. I have not found any reports on the Teensy for rebreather / O2 monitor use, so this little article might be interesting to some homebuilders.

    The 32 bit ARM Cortex-M4 used by the Teensy board is interesting in terms of 14 high resolution (16 bit) analog channels. Due to noise only 13 or 14 bits (depending on who you ask) can be effectively used but this seemed to be enough for reading the voltage of standard O2 cells without any signal conditioning in the form of an OP amp.

    In fact, I can report that my experiments with direct connection of the sensors to the microcontroller have been successful!
    I get a very stable reading of the ppO2 without any noise problem.
    To achieve this I had to use the following strategies:

    1. 100 nF capacitors and sensors in parallel
    2. underclocking of the
    ARM Cortex-M4 (24 MHz)
    3. switching to internal voltage reference
    3. signal averaging (4 times internally in the ADC and 2000 times externally using a simple moving average, however due to the processing power even more complex schemes like mode filters can be used easily)

    This even works at a resolution of up to 14 bits!

    Since the Teensy board is so small I could easily fit it into one of my Tecme O2 monitor tubes including a small OLED 128 x 64 I2C display on the perfboard and a bicolour LED that can be used as HUD (e.g. by mounting to the front side of a helmet). Both the Teensy board and the display are fairly cheap (~ 20 $ each).
    Another big advantage is that the board can be directly powered from a 3.7 V lithium ion battery. I can switch the O2 monitor on and off with a standard reed switch using the Tecme magnetic wheel.

    So far I am pretty satisfied with the board and I think I will upgrade it with a temperature / pressure sensor for more advanced stuff.

    Regards,

    Juergen


  2. #2
    RBW Member Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse's Avatar
    Join Date
    Jan 2008
    Location
    Auckland New Zealand
    Posts
    1,647
    rEvoIII mini hCCR

    RG-UMF,IDA 71,rEvo mCCR

    Re: The Teensy 3.0 project

    Interesting.
    I have not looked at the Teensy before.
    any simple way to add a Li Ion battery and charging via the Teensy's USB?

  3. #3
    German cave diver bluepot is an unknown quantity at this point bluepot's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    16
    Raycy

    Ray, BK2, IDA57, IDA59

    Re: The Teensy 3.0 project

    Quote Originally Posted by Packhorse  View Original Post
    Interesting.
    I have not looked at the Teensy before.
    any simple way to add a Li Ion battery and charging via the Teensy's USB?
    It might be possible but I have not looked into it, yet. The problem is that you cannot get more then 3.3 V output from the standard connections. So either you have to connect a LiPo charger to the 5 V USB source before the voltage regulator or you have to connect a step-up regulator with LiPo charger to the 3.3 V source.

    Currently I use LiPo batteries with JST connectors, so I can easily charge them by connecting them to my Seeduino stalker.
    An easy way of charging the battery might also be to use an separate cheap USB LiPo charging board:
    USB-uLiPo
    which is so tiny that it could easily be placed inside the housing if you need it.

  4. #4
    RBW Member Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse's Avatar
    Join Date
    Jan 2008
    Location
    Auckland New Zealand
    Posts
    1,647
    rEvoIII mini hCCR

    RG-UMF,IDA 71,rEvo mCCR

    Re: The Teensy 3.0 project

    Can you put it to sleep and achieve low power consumption or will it continue to draw power due to voltage regulator?

  5. #5
    RBW Member jeffgerritsen is an unknown quantity at this point jeffgerritsen's Avatar
    Join Date
    Mar 2011
    Location
    Kent Washington
    Posts
    149
    Megalodon

    Optima

    Re: The Teensy 3.0 project

    I've started working with the teensy 3.0 and you can get 5 volts, if the input voltage is 5v from the Vin pin. The Vin pin is a tap before the voltage regulator and step down to 3.3 volts.

    See: Teensy USB Development Board

    for more information.

  6. #6
    German cave diver bluepot is an unknown quantity at this point bluepot's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    16
    Raycy

    Ray, BK2, IDA57, IDA59

    Re: The Teensy 3.0 project

    Quote Originally Posted by Packhorse  View Original Post
    Can you put it to sleep and achieve low power consumption or will it continue to draw power due to voltage regulator?
    Yes, you can put it to sleep and use several Arduino - style power save modes, although I cannot tell you how low the power consumption can get. In standard mode the power consumption is ~27 mA.
    The voltage regulator is inside the chip. In BAT mode everything can be powered down except for the VBAT supply, so the RTC and the 32-byte VBAT register file remain powered:
    Chapter 7 from http://www.pjrc.com/teensy/K20P64M50SF0RM.pdf

  7. #7
    RBW Member Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse is a glorious beacon of light Packhorse's Avatar
    Join Date
    Jan 2008
    Location
    Auckland New Zealand
    Posts
    1,647
    rEvoIII mini hCCR

    RG-UMF,IDA 71,rEvo mCCR

    Re: The Teensy 3.0 project

    Using External Power and USB with the Teensy USB development board

    It seems at 5v in sleep mode it goes as low as 0.04ma
    At 3.3v it is reported to be 0.23ma.

    The 3.3 volt measurements include the current used by a MCP1825 powered from 5.0 volts. The MCP1825 consumes approximately 0.2 mA for itself.
    So bypass the MCP1825 ( voltage regulator) and you get 0.03ma when in sleep mode. Mind you this may only apply to a Teensy 2 because I cant see a MCP1825 on the 3.0

  8. #8
    German cave diver bluepot is an unknown quantity at this point bluepot's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    16
    Raycy

    Ray, BK2, IDA57, IDA59

    Re: The Teensy 3.0 project

    Quote Originally Posted by bluepot  View Original Post
    Yes, you can put it to sleep and use several Arduino - style power save modes, although I cannot tell you how low the power consumption can get. In standard mode the power consumption is ~27 mA.
    The voltage regulator is inside the chip. In BAT mode everything can be powered down except for the VBAT supply, so the RTC and the 32-byte VBAT register file remain powered:
    Chapter 7 from http://www.pjrc.com/teensy/K20P64M50SF0RM.pdf
    Quote Originally Posted by Packhorse  View Original Post
    Using External Power and USB with the Teensy USB development board

    It seems at 5v in sleep mode it goes as low as 0.04ma
    At 3.3v it is reported to be 0.23ma.

    So bypass the MCP1825 ( voltage regulator) and you get 0.03ma when in sleep mode. Mind you this may only apply to a Teensy 2 because I cant see a MCP1825 on the 3.0
    There is no external voltage regulator on the board, it is in the chip.
    BTW, I just learned that avr/sleep.h does not work with the Teensy 3.0, yet.
    However, Paul Stoffregen is planning to address the low power stuff soon:
    Teensy 3.0 LowPower examples don't work!!

  9. #9
    Supporting Member nicklinux is an unknown quantity at this point nicklinux's Avatar
    Join Date
    Jul 2011
    Location
    Miami
    Posts
    129
    Hammerhead

    Darwin mCCR, MK15, Hobo, Flex

    The Teensy 3.0 project

    Teensy 3.0 looks nice! I just ordered one for my HUD / controller project. Can't wait to try it out :)
    Thanks for pointing out !!

  10. #10
    German cave diver bluepot is an unknown quantity at this point bluepot's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    16
    Raycy

    Ray, BK2, IDA57, IDA59

    Re: The Teensy 3.0 project

    The new Teensy 3.1 is out:

    Teensy 3.1: New Features

    Flash has doubled, RAM quadrupled... 3.3V pins are now 5V tolerant, too.

    This should be more than enough for even advanced projects, unless you are into very complex bubble-based deco algorithms

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts