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

Thread: Teensy 3.1, external power, servos and ethernet

  1. #1

    Teensy 3.1, external power, servos and ethernet

    Hi Guys,

    Not been around in a while but have a new project in the pipeline. While I have a spare Teensy 3.0, I have ordered a new 3.1 (to help contribute towards Paul's Ferrari fund ) along with a Teensy WIZ820IO Ethernet & Micro SD Card Adaptor, and WIZ820IO Ethernet module.

    I would like to be able to control some external devices and servo from the Teensy as well as monitor a couple of sensors. I was going to use a 4 channel relay module to switch the external devices. Although the unit would probably be in wifi range, I have decided ethernet would be a more reliable way of communication.

    The basic idea is the Teensy will monitor the sensors and switch external devices based on their values. It will also need to control the servo and switch other devices via a PC or Andriod device over the ethernet connection. Lastly it will need to communicate with some PC software (which I will write) to send the status of each sensor/external device and servo position.

    The Teensy and servo will obviously need to be powered, but could I use the same 5v supply for both? While the whole setup is not going to be outside, it will be in a single block building that could be prone to damp conditions.

    Any suggestions or advice is welcomed.

    Regards,

    Les

  2. #2
    Ok, I have my Teensy 3.1 and adapter but I am still waiting for the Wiz820IO. I might get a chance to play with the servo side this week so any advice is welcome.

    Regards,

    Les

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,746
    The user onehorse, has a Tindie shop where he has various shields to be mounted on Tindie. One of his shields is a DC motor controller that mounts on top of the Teensy, and it uses pins 22/23/3/4 to control the 4 motors: https://www.tindie.com/products/oneh...31-or-arduino/

    In terms of servos, it depends on the servo, and how much power they need. If they can work on 5v, you could have a single battery, and you would hook up the power to the VIN pin and ground (be sure to cut the trace between VIN and VUSB underneath the Teensy, so that you are always powering the Teensy via external power, and not through the USB).

    Another option would be to get something like the Adafruit i2c PWM/servo board: https://www.adafruit.com/product/815 that can control up to 16 servos via i2c commands. This board does the PWM on the board, freeing the Teensy from doing it, and you can provide a separate motor power source if needed.
    Last edited by MichaelMeissner; 10-27-2014 at 06:37 PM.

  4. #4
    Senior Member onehorse's Avatar
    Join Date
    Apr 2014
    Location
    Danville, California
    Posts
    921
    The DC motor controller uses a simple quad of mosfets to allow Teensy PWM control of voltage applied to DC motors from zero to VBAT. VBAT is intended to be the 4.2 V of LiPo battery but could also be 5V input to the Teensy VIN or even from USB, I suppose. Most servos can be powered by 4 V as well as 5 V. The DC motor add-on board is intended to minimize size and footprint. If size is not an issue, I agree with Michael, the Adafruit PWM expander board is very versatile.

  5. #5
    Senior Member jimmayhugh's Avatar
    Join Date
    Nov 2012
    Posts
    168
    I'm doing something similar to that with my TeensyNet setup.

  6. #6
    Thanks for the replies guys.

    Quote Originally Posted by MichaelMeissner View Post
    The user onehorse, has a Tindie shop where he has various shields to be mounted on Tindie. One of his shields is a DC motor controller that mounts on top of the Teensy, and it uses pins 22/23/3/4 to control the 4 motors: https://www.tindie.com/products/oneh...31-or-arduino/

    In terms of servos, it depends on the servo, and how much power they need. If they can work on 5v, you could have a single battery, and you would hook up the power to the VIN pin and ground (be sure to cut the trace between VIN and VUSB underneath the Teensy, so that you are always powering the Teensy via external power, and not through the USB).

    Another option would be to get something like the Adafruit i2c PWM/servo board: https://www.adafruit.com/product/815 that can control up to 16 servos via i2c commands. This board does the PWM on the board, freeing the Teensy from doing it, and you can provide a separate motor power source if needed.
    I did link to the servo I am trying to use in the first post. It's a Hitec 1/4 scale (only because that's what I have spare.) As it's only likely to be one servo, I think the servo board would be overkill, but I'll see how I get on first.

    Quote Originally Posted by onehorse View Post
    The DC motor controller uses a simple quad of mosfets to allow Teensy PWM control of voltage applied to DC motors from zero to VBAT. VBAT is intended to be the 4.2 V of LiPo battery but could also be 5V input to the Teensy VIN or even from USB, I suppose. Most servos can be powered by 4 V as well as 5 V. The DC motor add-on board is intended to minimize size and footprint. If size is not an issue, I agree with Michael, the Adafruit PWM expander board is very versatile.
    I thought using a standard servo would be easiest for my application. (I want to be able to open and close a 2" ball valve) I already have some RC stuff such as connectors, linkages etc.

    Quote Originally Posted by jimmayhugh View Post
    I'm doing something similar to that with my TeensyNet setup.
    Thanks looks interesting, I will give it a proper read later.

    Regards,

    Les

Posting Permissions

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