3.3V Regulator question
lardom
Posts: 1,659
in Propeller 1
I cannot get one of my pcb's to communicate with the Parallax serial terminal. I swapped out the Prop because it's socketed. I removed the crystal oscillator. I tested that Propeller on a different pcb and a breadboard. They worked fine. The 3.3V regulator on the offending board delivers 3.284 volts. Before I desolder it (I don't want to damage traces unnecessarily) is that a likely cause of my problem?
Comments
Com'on Larry, 3.284 volts, you sure it wasn't only 3.28369045 volts
I'm sure there are regulators around that deliver precisely 3.3V but precision has to be measured with precision instruments in a precise way anyway. Think expensive here. 1.5V batteries aren't 1.5V.
Datasheets specify tolerance for all components, even a 10K resistor would typically have a 1% or even 5% tolerance too. The Prop itself will work quite happily with 3V or less depending upon the temperature and frequency etc. This is normal.
Always check the most obvious rather than the least probable such as crystals. Will your Prop blink an LED? If yes, then transmit serial data in a test loop and try serial terminal etc. If no, then run blinky in RCFAST, if that works, then it might be a blown PLL or in some cases lack of decoupling caps close to the pins etc. Always check the basics because if you go ripping up the board you will cause problems. Like a Doctor think "do no harm".
No, it is not the 3.3V regulator. But that is an excellent first bit of troubleshooting information. Always check the power supply first!
From this point forward everything gets tested on a breadboard before I solder it.
My project is still being prototyped so I'll just solder a working circuit onto a pcb perfboard. The serial terminal is OK. I tested an identical pcb and I swapped both Propellers. I also have a Prop setup in a breadboard which had no problems. I also have two Prop plugs and they both work.
If you look at the photo you will see why the problem bothers me...the pcb is simple. It shouldn't be hard to find what the problem is. The two top boards are good. I tested them with the serial terminal and commented out the CON block. Of course I got garbage but at least they communicated with the serial terminal.
The two pcb's on the left came from ExpressPCB. I have three of them. The first one is in the controller of my first propeller project. That project is the one you helped complete years ago. (I think that was back in 2009.) The one top left comes out of a mobile robotic arm with pan/tilt for a camera that I built last year. It is very reliable. The pcb bottom right is a Schmartboard which failed and is why I decided to use the board on the bottom left.
I would not have a pcb pulled apart like this. Just put it back together the way it is supposed to be, with the bypass caps but add an LED + resistor to the SCL line to Vdd. This should flash moments after boot if it is trying to read from the EEPROM. You can also flash that same line for test code since the SCL line isn't normally used after boot.
btw, BIG electrolytics are NOT better than ceramic bypass caps or small tantalums. The electrolytics are effectively useless due to their high ESR at the frequency that the regulator and Prop needs it most. Great for bulk filtering but no good for fast transients.
I will keep working on it but I told the person that I'm prototyping this for that I should be able to post an unlisted video so he could see what I've done so far. I'm going to pick up another socket for the Propeller tomorrow and rebuild the circuit on a perfboard.
An LED on the SCL line sounds great. I'll work on it tomorrow, thanks.
Bad crystal. I scavenged the crystal from the failed Schmartboard. I resoldered the components including the bypass caps at your suggestion. I got nothing from the serial terminal but this time I commented the CON block and I got garbage.
Life is good again. Thank you.
Your test code is going to conflict with your serial port (propplug) and the eeprom.
Try dira[0..27] instead of dira[0..31]
Change waitcnt(clkfreq/20+cnt) to waitcnt(clkfreq+cnt) and the flash will be much slower (1s on , 1s off). You are going to miss seeing 1/20th second.
Leaving out the bypass caps is often the cause of blowing the PLL in the prop - then the crystal oscillator fails.
The 'details' are important and I should never allow myself to get careless.
So I hope you figure it out
Just like you trying to remember how you learnt to talk. You forget you initially made sounds like the words your parents made. Gradually you put some words together. They were gramatically deficient but you got your point across anyway. Then you learnt to talk in proper sentences. Now the words and sentences come automatically and you've long forgotten how you learnt to do that, until you see parents with young children learning to talk. This is where I am at with my grandchildren (ages 1-8).
So back to electronics, we just say put bypass caps here. Its automatic for us oldies. We learnt that if you didn't decouple every IC and a sprinkling of tantalums, you were just asking for trouble. Some of us learnt the reasons while others just took those requirements from others who knew. Now those ICs are embedded into a big chip such as a micro, and those bypass caps become so much more important.
It is great to grab a new chip (PIC32xxx comes to mind) where the brief technical details show a single cap plus power/ground. No details as to how the power supply should be built (that is assumed). These days anyone can build a simple board and power supply. If it works once, then they assume that it will always work fine. But it isn't always the case!
Fortunately these days we rarely have to worry about how IC fan-out / loading, etc.
The point of this is that we often give advice, but we are in a hurry, so we don't take the time to explain why, or we have forgotten that others may not understand why. So, listen to the advice, and if you don't understand the why just ask. There are plenty of us that will take the time to explain the why, and you become better for the understanding.
In computers/electronics, progress is so fast that your always learning. I too have learnt a lot on the forums from others willing to share their knowledge. One never know everything - there's always something more to learn
And it seems to me that the medical field is advanceing way faster than the computers/electronics industry!