Help with Teensy 3.2 DIY Project

Status
Not open for further replies.

JStew

Member
Hi, I am working on a bike computer hobby project. The goal of my project is to use the Teensy 3.2 as the base circuitry and then add on my own peripherals to connect to sensors and display. So far, I have designed the schematic, got the PCB manufactured, self assembled it, and now trying to program it for the first time. Trying to load any program using the Arduino IDE to my board fails with this error message:

Error_Message.png

I have done all of my development work so far on a store bought Teensy 3.2. I do not believe it is a problem with Arduino IDE because I can program the store bought one. I believe it must be a problem with my board. I followed the Teensy 3.2 schematic example on the PJRC website pretty closely. I removed a few things which I believed were not necessary for my purposes. I marked the stuff not included in my schematic in red. For example I do not plan to use VRef so I removed some of the components for it.

PJRC_Teensy32_Schematic.png

Here is my schematic. I have a lot of added circuitry involving how power is provided/enabled/recharged however from my testing I believe it to be working. In summary I have circuitry to automatically switch from using battery power to using USB power and begin charging once USB cord is plugged in. I have proven VDD line is 3.3V using battery or USB power. I was also able to prove my VDD line was able to supply 220mA at 3.25V continuously. All that to say, I think ICs using VDD are getting the power they need. I believe the problem is either with my programming circuitry or bad soldering somewhere. I bought the pre-programmed MKL02Z32 from PJRC and am using it on my board. Please let me know if you can see anything wrong with how I am trying to program my board. Also let me know if you have any ideas on how debug my circuit further to determine where the problem is.

My_Schematic.jpg

Thanks in advance! I am looking forward to the day when I can program my own board :)
 
PCB Layout

Thank you for the quick response. Here is my PCB layout. I added a more zoomed in picture to help see the MKL02 and MK20 connection and crystal layout. Also the schematic I posted earlier had a few minor changes which I added after the fact which are unrelated, but thought I would post the schematic which exactly matches the layout. Upon reading the crystal guidelines it seems I may have done a few things wrong:

1. My 16MHz crystal (https://www.digikey.com/product-detail/en/abracon-llc/ABM3-16.000MHZ-B2-T/535-9103-1-ND/675620) has 18pF load capacitance and I did not add any extra 20pF capacitors. What are the part numbers of the 16MHz and 32KHz crystal being used on Teensy 3.2? Does the 32KHz crystal for RTC need 8 to 10pf load capacitance as well? Am I looking for a crystal or an oscillator I may have gotten theses confused?

2. I have signals routed underneath the crystal.

3. I don't have a ground plane underneath the crystal. I am not sure I fully understand what I am supposed to do here. I am using a 2 layer board. So from what I understood, say I am putting the crystal on the top layer. I have the crystal pads and crystal signal traces on top layer. I have an island ground plane underneath the crystal on the bottom layer. Does ground plane underneath connect to board GND or is it just floating? Does the ground plane underneath connect to the crystal? Does the crystal connect to board GND?

4. Does my schematic look correct as far as the connections for USB to MKL02 to MK20 go?

Layout
PCB_Layout.png

Layout Zoomed
PCB_Layout_Zoomed.png

Schematic
Schematic.png
 
Thank you for pointing me to some useful examples. I now have some ideas about how to solve my crystal problem. As I am redesigning my circuit I would like to confirm a few things.

1. Am I okay not having the parts for VRef which I marked in red on my original post?

2. When you say decoupling capacitors, are you referring to the capacitors on either side of the crystal?

3. Do I need capacitors for the 32KHz crystal as well?
 
You aren't the first custom teensy designer to think that decoupling capacitors can be placed anywhere. Google with "decoupling capacitors pcb placement" should fix this.
 
2. When you say decoupling capacitors, are you referring to the capacitors on either side of the crystal?
No, those are crystal loading caps. Decoupling capacitors go from the power pins to ground right next to the chip
in every logic chip. They are not optional, everyone assumes this is known, so this can catch out newcomers. The
faster the logic chip, the more important decoupling cap size and placement is.
3. Do I need capacitors for the 32KHz crystal as well?

The datasheet should say what crystal and loading are permitted - watch crystals use different on-chip oscillator
due to the very different operating frequency. The datasheet will also have details of layout requirements, typically
watch crystals are driven at µW levels and are very susceptible to noise on the PCB so a recommended layout may be
given in the datasheet - follow it!
 
Thank you jonr and MarkT for your tips. I redesigned my board based on your tips and it is now programming! :D

For the benefit of others reading this, I will post what I did to fix it:
1. Add two 20pF capacitors(C17 and C18) to my schematic to be connected to the 16MHZ 18PF crystal(Y1).
2. Created isolated ground plane on opposite side of the board underneath the 16MHZ crystal(Y1).
3. Removed all traces going underneath or on top of crystal.
4. Repositioned decoupling capacitors(C12, C13, C14).

Working Layout:
new_layout.jpg
 

Attachments

  • new_layout.jpg
    new_layout.jpg
    207.3 KB · Views: 106
Status
Not open for further replies.
Back
Top