Is possible to reassign digital pins to analog? If not, how do I use the bottom pins?

Status
Not open for further replies.

deelaleo

Well-known member
I am using a 3.1 model. I didn't realize that the pin that I need (analog and I2C) are overlapping; which means that one row of 10 analog become 1 row of 6 if I use I2C too.

Is there a way to reroute the pins on the left row (0 to 12) to be the analog pins that instead, are on the back of the board?

If not (as I suspect), can someone point me to a way to get the connections from the pin in the back? They are so close to each other and I have never solder on anything so small (that's why I ordered the Teensy with the header already installed on it). I wish they would sell the Teensy with all the connections hooked up to headers :)

Thanks!
 
Hi deelaleo,
I don't think you can use the pins on left side since they are not connected to ADC pin of the controller. But if you really want to have both 10 Analog pins and an I2C pins, then you might have to your own library (for I2C) to make pins from the left side to work as SCL and SDA. If you really know how the I2C protocol works, then it would be an easy task for you.
If you really don't know that, then you might have to look for other communication protocols as Serial or CAN. If that not possible then look online for sample codes or reply here. I would write the functions for you. But I strongly recommend that you write it on your own.
 
I see; I was hoping that there was a way to switch these pin with the one on the back of the Teensy, but is not possible.

I know how to use I2C, but the same pin are assigned to Analog in and SCL-SDA, so it is impossible to use both features at the same time, on the same pin, unless you swap pin mode; which is not something that I would like to do after all, especially for peace of mind :)

I guess that I have to solder some wire at the bottom of the Teensy, to get all the analog input that I need. I really wonder why the designer of the Teensy, put these pins in such a horrible position, instead than making the board a bit longer, and have all the connections on the edge of the PCB
 
deelaleo, as you can imagine, all product design involves tradeoffs. Many of us like really small boards. Few projects need so many pins. For projects that do, soldering a surface mount header on the bottom of the Teensy isn't so bad. The only time it's inconvenient is for breadboarding.

Even for breadboarding, if you don't mind something larger, you can get/make a carrier board that takes all the pins to a breadboard-friendly configuration. A couple of folks here have designed carrier boards.

In one of my projects, I mounted the bottom of a Teensy 3 directly behind the control panel with surface mount LEDs soldered directly to the bottom pads.
 
There are breakout boards that you can solder onto a Teensy 3.1/3.0 to bring out all of the pins for use with breadboards, such as: https://www.tindie.com/products/loglow/teensy-31-breakout/?pt=directsearch

If you only needed 2 more analog pins, you can solder A10 and A11 more easily, since they are part of the 4 holes in the Teensy, in the middle, so you can access them without having wires underneath the Teensy (AREF and VUSB are the other 2 pins).

In the original kickstarter campaign for Teensy 3.0 (https://www.kickstarter.com/project...rm-cortex-m4-usable-in-arduino-a?ref=category), Paul said the original design was with a 48 pin version of the Freescale chip, but that wasn't available in the time frame that he needed, and instead went to a larger 64 pin chip, and now had 12 extra pins that were available, and were routed to the bottom pads.
 
Last edited:
Indeed I understand that one design can't make everyone happy :) I use also the Beagleboard, altho that one uses a header, so you don't need to solder anything. Breadboard friendly is a big thing when you are just starting.

I didn't realize until I received my boards, that the other analog pins were sitting on the bottom, and required soldering...I am just starting, and for that reason I purchased the boards with the headers already installed; I should've mail them asking if I could pay extra for a breakout pin on the bottom :)

I do like the small board; I was just thinking that having extra 14 pins on the edge won't really increase the size that much (7 per side), but for some, the size matters more than the difficulty to reach certain pins and solder them, so I understand...again, one board can't make everyone happy. I saw a thread about the 3.1++ version, which is probably what I am talking about.

I will have to look into tutorials for SMH; I just don't want to burn the board shorting the pins...it is all so tiny, and I have such huge hands! The breakout looks sexy, but how do you hook up the bottom pins? You need to solder them, right? Unless I may try with superglue around the contacts, so they touch but in fact are hold together by superglue instead than solder (I am sure that many of you are about to kill me :D).

I will take at this point some courage and give a try at soldering at least A10 and A11; BTW can I use also A14? I see it on the edge of the board, and is marked as Analog.

Thanks!
 
There are electrically conductive adhesives. Many more expensive than a second Teensy. I haven't tried them and am curious how well they would work for this application.
 
There are electrically conductive adhesives. Many more expensive than a second Teensy. I haven't tried them and am curious how well they would work for this application.
If you live in the USA, and are near one of the Radio Shack stores that haven't yet closed, you might try wire glue: http://www.radioshack.com/product/index.jsp?productId=12925060. Or on ebay: http://www.ebay.com/itm/Wire-glue-E...881?pt=LH_DefaultDomain_0&hash=item2a37f82d79.

I'm with you in terms of being solder challenged (though I have done some soldering, I'm not that comfortable with it).

I suspect on most projects, people don't use as many analog sensors as you need. The Arduino Uno for instance only has 6 analog pins, and the Teensy gives you 10 analog inputs on the main pins.

I haven't yet gotten a Teensy 3.1, so I forgot that A14 is also easily accessed. Yes, you should be able use that as well on a 3.1 (on the Teensy 3.0, it is the reset pin).

<edit>
You can also get i2c ADC's (analog to digital). This one gives you 4 12-bit analog sensors: http://www.adafruit.com/products/1083. You can have up to 4 of these on an i2c bus, so you would lose A4/A5 to control the i2c bus, but you would get up to 16 analog pins (plus the A10, A11, and A14 as has been mentioned).

<edit2>
It probably won't help you, unless you have the hardware programmer, and are willing to have 2 systems, but you could use some raw ATtiny85's, each of which can sit on the i2c bus, and provides 2 analog input pins (the chip has 4 analog inputs, 1 of which is used by the i2c interface, and the other is typically the reset/programming pin). I got some ATtiny85's when I wanted to do some Christmas ornaments with neopixel rings, but I didn't get them done in time. Compared to the Teensy, it is a rather minimalist system.
 
Last edited:
As I have mentioned in a few other threads, for the fun of it I have built a fabricated a couple of different carrier boards. On the 2nd version of the first one, I did add an SMD adapter to the bottom of the Teensy, such that I could get those extra IO pins. Note: Did not find exact part I wanted (2x7), but Digikey and others carry the 2x8 versions, which you can then clip off a row of pins. Digikey part number I used is: TSM-108-01-TM-DV-ND

Slightly off the topic, but here is a picture showing the first board:
Teensy-3.1-breakout-brd-v.0.jpg
The purple one is the slightly changed 2nd generation, with a Teensy also from OSH-Park.

I couple of people on another forum were interested in one that also supported Arduino Headers, so I continued to play around with Diptrace and since it only costs about $30 to get 6 of them from Seeedstudio I decided to try one out and just put in the order today. It looks like:
Teensyduino-.00001w.jpg
It is a bit bigger than the other one and does not have an XBee setup, but just having some fun. Sorry for a slight hijack

Kurt
 
There are electrically conductive adhesives. Many more expensive than a second Teensy. I haven't tried them and am curious how well they would work for this application.

Indeed the price is out of this world...altho I found this:

http://www.thinkgeek.com/product/b7...g&matchtype=&gclid=CNbWtdebhL0CFa07MgodU3QAaA

I am ordering a can, just to check how it works. I won't use it on the Teensy, until I find out if it is safe for the long run. It is incredibly cheap...cost more to ship than the product itself! Which is probably the same product that Michael suggested.

If you live in the USA, and are near one of the Radio Shack stores that haven't yet closed, you might try wire glue: http://www.radioshack.com/product/index.jsp?productId=12925060. Or on ebay: http://www.ebay.com/itm/Wire-glue-E...881?pt=LH_DefaultDomain_0&hash=item2a37f82d79.

I'm with you in terms of being solder challenged (though I have done some soldering, I'm not that comfortable with it).

I suspect on most projects, people don't use as many analog sensors as you need. The Arduino Uno for instance only has 6 analog pins, and the Teensy gives you 10 analog inputs on the main pins.

I haven't yet gotten a Teensy 3.1, so I forgot that A14 is also easily accessed. Yes, you should be able use that as well on a 3.1 (on the Teensy 3.0, it is the reset pin).

I do live in USA; altho the guy at RS had such a clueless look when I inquired about the product...I ended up finding it at think geek, and ordered a can to try it.

I suck royally at soldering; mostly because I have serious problems with my eyes, and can't even see things with a loupe or the magnify glass...and my hand is far from being steady, which means that in the small areas I have good chance to smear solder all over:)

Indeed it seems that the most analog input is on the Mega; which is 16 if I recall correctly....today makes little sense to use analog after all, especially when with SPI you can hook as many devices as you want (at the cost of a wire hell); I2C is cleaner but there is the issue with the conflict on the register, if you use the same sensor (I think that in general, 2 is the max number of identical sensor that you can add on any I2C channel).

I went ahead today and woke up with the intention to either succeed or destroy 20 dollars; and I may say that I was decently successful!

I was able to solder A10 and A11, then I went ahead and did A12, A13, A16, A17, A18 and A19. Except a mess caused by me shaking the iron, and dropping a glob of solder on top of the board (god bless solder wick!), I was able to make decent junctions; altho I can't really tell if they are good or not for the long run...looks horrible but overall seems to be able to grab the analog signal from the sensor.

The down side is that I probably burned the LED, since it won't turn on anymore, but the board seems to work (tried few sketch and the serial port is returning the data); if I damaged something else, I have no idea...guess I will find out once I try I2C and try the other mode of the board (in particular I will need USB HID, since the Teensy will act as USB peripheral to drive the sensors).

Attached few pictures to show what I did. I simply tinned and soldered the wires on the plates, then I had to cover the exposed part of the wire with electric tape, since while soldering, I burned also the wire coating, exposing the wire :)

photo 1.jpgphoto 2.jpg
 
Status
Not open for further replies.
Back
Top