Connecting a Battery to the Teensy-LC

Status
Not open for further replies.

dripsys

Member
Dear Colleagues,

I would like to connect a LiIon battery-charger to the Teensy-LC.
The other Teensy models have a VBAT pin, however I couldn't find one for the '-LC'

I would appreciate if you could point me to some documentation that shows how to connect.

Thanks
 
The VBAT pin on the other Teensy's is just to keep the real time clock powered with a coin cell battery. It does not power the rest of the Teensy.

There are at least 3 ways to hook up a Lion battery to the Teensy and use the Teensy's USB port for charging.

The simplest is to buy the Adafruit Teensy->Feather adapter. This board has a lion battery port in it. If you power the Teensy, it will automatically use the power from the USB connection and charge the battery. If there is no USB power, it will provide power to the Teensy. Note, the power provided will be 3.7-4.2v (i.e. the lion battery is not boosted).

The other three methods will require you to cut the trace underneath the Teensy that connects the USB power to the external power pin:

The forum user onehorse has created these two chargers that fit on the Teensy. They are made to fit underneath the Teensy, but you can also mount it above the Teensy. Note, it uses pin 0 to signal whether the device is charging, which if connected means you can't use Serial1 with the default pins:

This other device is made by Adafruit for one of their microprocessors. You would hook up the normal ground, the external power, and the VUSB pin to this unit:

Alternatively, if you didn't need charging, and won't plug in the USB and the battery at the same time, you can just connect the power from the battery to the VIN pin on the Teensy and connect the ground pins.
 
Thank you for the quick and thorough reply.

I will use the Adafruit product (which I already have).

Will the pins be connected as follows (after separating the VIN from VUSB):

Teensy -> Adafruit
============
VUSB -> 5V
VIN -> BAT
GND -> G
 
Will the pins be connected as follows (after separating the VIN from VUSB):

Teensy -> Adafruit
============
VUSB -> 5V
VIN -> BAT
GND -> G

Yes. On the LC, it doesn't mattery which ground pin to use. On the 3.2/3.5/3.6, you want to use the ground pin on the other side of the Teensy (next to pin 0), or the ground pin at the back. The reason is the pin next to VIN on the 3.2/3.5/3.6 is the analog ground, and it is meant for using on analog devices as the ground to improve the measurement accuracy.
 
The forum user onehorse has created these two chargers that fit on the Teensy. They are made to fit underneath the Teensy, but you can also mount it above the Teensy. Note, it uses pin 0 to signal whether the device is charging, which if connected means you can't use Serial1 with the default pins:

What?! Really, you can't use Serial1. How did you figure that out?

Serial1 has a FIFO buffer, so it's kinda important to keep. Guess I'll have to look up pin substitutes for it.
I've kinda written off the T-LC for some projects cause of some problems I had that I thought were memory problems, but maybe it was this.
 
What?! Really, you can't use Serial1. How did you figure that out?

The description in the original charger says:
The charging state is also broken out to Teensy 3.1 pin 0 and can be monitored (LOW = charging, HIGH = fully charged), and the battery charging can be managed, in software.

The new version with the higher charging ability doesn't say anything about pin 0, but it does say:
This LiPo battery charger add-on has the same convenient form factor as the popular original LiPo battery charger add-on based on the MAX1555. It mounts onto the Teensy in the same way and is functionally identical except it has no DC input and provides a greater range of charge currents.

As far as I can tell, in looking at pictures of the boards at OSH park, there no longer seems to be a trace connecting pin 0 in the new board. Onehorse, is this correct, and the new board no longer connects pin 0?

Because I'm still at the breadboard/prototype board stage, I tend to try and mount onehorse's Teensy chargers above the Teensy, and just not connect pin 0, but connecting 3.3v and pin 1 for stability. However, I don't have good luck in getting it attached, due to poor soldering on my part.

Note, the LC does not have FIFO's on Serial1/Serial2, and it does not have a separate analog ground. Instead, the 2nd pin between VIN and 3.3v is a normal ground pin, just like the first pin on the other side.
 
Hello every one!

I am a lightning electrician from Germany, and i am planing to build two midi controller (with bluetooth LE and a battery) that i need to control lights in scenes over my Ipad. One with just one small button and the other controller with 4 faders und 8 buttons and a joystick.
I like this ways to hook up a Lion battery to the Teensy because of the charging option :

quote : "The simplest is to buy the Adafruit Teensy->Feather adapter. This board has a lion battery port in it. If you power the Teensy, it will automatically use the power from the USB connection and charge the battery. If there is no USB power, it will provide power to the Teensy. Note, the power provided will be 3.7-4.2v (i.e. the lion battery is not boosted).
https://www.adafruit.com/products/3200"

Is there may be also a similar solution to connect a bluetooth transmitter to this setup?


I would be delighted if some one could point me to some documentation that gehts me to a wireless midi controller.

Thank you,
Jonas
 
It sort of depends on what you really want/need, your programming skills, etc. Note, while I know these products exist, I might not have actually used them.

If you are just wanting wireless connections between two boards, and they don't have to connect to anything else, then that opens up other possibilities, such as using wifi, or LORA radio. If you need to interact with the boards from a smart phone using some sort of app to do basic things that might be doable. If you need the Teensys to act as bluetooth midi controllers, then it maybe harder to find a solution, as you might need BLE boards that present the midi interface.

Adafruit has 2 boards that do BLE, one that uses SPI and the other serial UART. I'm sure there are other boards that would work as well, particularly if you would connect to it via a serial UART:

In terms of UART, the Adafruit page says it requires CTS/RTS support. Note, the Teensy LC does not support CTS/RTS. I'm not sure the Teensy 4.0 supports it either as the Serial page has not been updated for Teensy 4.0. The Teensy 3.2, 3.5, and 3.6 support RTS/CTS using certain pins for CTS (RTS can be any pin):

That means the SPI version is probably better for the bluetooth end of things. SPI is often used for displays, and sometimes SPI devices don't work too well when they are sharing a SPI bus.
 
Thank you very much for your quick respond!
I don't know a lot on programming, but i started a workshop on Arduino robotic where they teach a bit C.
I would like to connect the midi controller to my iPad where i use the software luminair.
I found this i few hours ago:
https://learn.adafruit.com/bluetooth-le-midi-controller/overview
They use this controller : https://www.adafruit.com/product/2829
May be i should go with this one. It seams easy to plug a battery to this.


Jonas

Off hand, I would probably suggest going with the M0 version instead. The one you mentioned uses an older 8 bit processor (AVR 32u4, similar to the ones used in the Arduino Leonardo boards or the Teensy 2.0). The M0 version uses a much faster 32-bit ARM chip:

The one disadvantage of the M0 board is you can't get a version with the headers already soldered in, while the 32u4 board has an option where Adafruit will pre-solder the headers. When I first started using the Teensy, having a pre-soldered version was helpful, since at the time, I had never soldered anything.

At the moment, Teensy does not have integrated bluetooth or wifi support. This means buying separate boards, and connecting them together. If you are just starting out, having an integrated board will be simpler. Obviously, you would want to go over to the Adafruit forum to ask for help on that board.
 
Status
Not open for further replies.
Back
Top