Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Can I use teensy as a simple analogue to digital converter when connected to a PC USB

  1. #1
    Junior Member
    Join Date
    Dec 2017

    Can I use teensy as a simple analogue to digital converter when connected to a PC USB

    Hi, I intend to buy Teensy LC and I am confused if I can work on Teensy without Arduino or Arduino must be required for Teensy? Do you think it can be used as a simple voltmeter? I mean, can I use it as a analogue to digital converter which converts an external DC voltage (e.g. 0-5V) or resistance (e.g. an external potentiometer) into a text string or numbers which I can read through a COM/USB port on a PC (through serial or USB connector). I already have a Windows program to receive data into a COM port. I wonder if this device suits this purpose, if not what would you recommend? Do I need to download driver to connect to a PC? thanks

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Teensy is a line if 32 bit microcontrollers in a standard bread board friendly form factor that can be programed many way, Arduino is a loose package of programing tools and libraries that can be used to write and program code for many micro controllers.

    PJRC provides an add-on for the generic arduino install to allow arduino written code to be loaded to Teensys including the special loader program and a bunch of other quality of life things.

    You don't have to program a Teensy from Arduino, though it is generally easier to install and use the provided tool chain and then break one part of the chain at a time to get where you want to go and there are various pre built solutions for eclipse, visual studio , notepad++ along with various higher end IDEs.

    To answer what I think you were originally asking, a Teensy LC out of the box does nothing but flash a LED. It can be programed to read an analog value and send it to the serial port very easily, and in fact there is an example built into Arduino that does just that.
    So you could take that code, tweak the write functions to match your PC side code and move on but yes you would need to write some Arduino code to do this (and install Arduino on at least one PC to program from), it's not prebuilt or configurable from a PC interface like a true data collection system would be.

    Drivers wise on current windows versions a Teensy programed to be a serial device (which does need to be selected from the menu) will show up as a generic serial port like any other.

    Edit: should also be pointed out that if you just want to read one value at a low rate and send it out the USB serial port pretty much any Ardunio will be capable of the job, with the really low cost options being a couple of dollars. At that price point your actual programing and build experience will be much rougher than buying an LC or OEM Arduino but it certainly could be done.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    You definitely do need to use Arduino to program the Teensy to do the function you want. But that's just a 1-time, fairly simple thing to do. Then you won't need to touch Arduino again, unless of course you want to make changes to what Teensy does for you. After you're programmed it once, Teensy will forever run that program if you don't use Arduino again.

Posting Permissions

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