After a rather long design and culmination period, time finally has come for Open USB FXO to transmigrate and materialize from a series of blog posts into a real circuit – working or not. Most likely not: getting the thing working from the first shot seemed to me very, very ambitious.
These days, and after all my former Open USB FXS adventures, building a prototype had become sort of easy to me. I went through my BOM on Mouser and tried not to deviate too much from theoretical values. Some peculiar-valued resistors at 0.5W with a 1210 package were not stocked, so I had to trade-off for 0.4W instead, hoping that the final circuit will not blow smoke on me (a few calculations showed that this should not happen, but does one ever know?).
Going through the actual list shipped by Mouser, I felt a first shiver by running into two bags labeled “R1″. Mouser let you specify a “customer label” for every ordered component, on which the wise-thing-to-do is to put the “R1″, “R2″, etc. component names from your BOM. Unfortunately though, their otherwise good “BOM upload” tool that batch-uploads your BOM does not accept customer labels, so one has to enter them by hand. So there was my first bug: I had entered “R1″ instead of “R11″. But the BOM was otherwise correct, so it sufficed to fix the “customer label” on one of the bags.
I submitted my Gerber files to Eurocircuits, who once more ignored the bottom-layer silk mask file that I produced, and turned in a perfect, two-sided-copper, single-sided-silk PCB. Actually, four of them, although their policy states that for ordering two pieces, one usually gets a third one for free. One bonus PCB was a great gift, thanks Eurocircuits!
It took me two afternoons of a working day to assemble my first prototype. So here are two shots of the first Open USB FXO board ever, right after assembly — and before cleaning, so the big ugly spots of dried soldering paste are clearly visible. The top side is here:
, and the bottom side is here:
Yes, I cleaned the boards after taking the pictures. Please share a minute with while we take a look at the PCB design and the component placement. After Silabs’ advice, the board is divided in two parts: the “line side”, facing the RJ11 connector and the “computer side”, facing the USB plug. The line side does not contain a ground plane; the only copper area is a little square one under the Si3019 that serves as a thermal for that chip. Other than that, the component placement resembles that of the FXS board: the PIC is on the bottom side, this time along with the MPU (Si3050); the line-driver chip (Si3019) is on the component side. Several tiny caps and resistors; the crystal; the programming switch; the “sidactor” line-protection device under the RJ11; the LED; that’s pretty much it.
And of course, I realized my first pernicious design bug — the moment right after I finished assembling the board. What’s that? I think that it will be impossible to program that PIC over ICSP. Why? Take a look at the following detail from the schematic:
The supply voltage from the K1 (ICSP) connector is fed into the BAV99 diode, just like the VBUS voltage from USB. So far so good, since my ICSP has been designed for a Centronics-driven FD-ART2003 programmer, which will feed 5V into it. Passing pin 1 through BAV99 reduces the voltage fed to the PIC for programming it down to 3.3V or so. Good, since this voltage goes also to the Si3050, which does not like 5V. The PIC is 5V-tolerant, so PGC/PGD/PGM coming from Centronics at 5V will not harm it. All this is perfectly correct; what is, then, the problem? Well, the PGD signal (program data) is bidirectional. When the programmer tries to read it, this will come out as a 3.3V-logic-1 signal. Centronics, on the other hand, will expect a 5V signal. Zap… My so-far PIC programmer is very unlikely to work under these conditions.
All this, let aside the fact that the PICLF2550 is not in the list of supported PICs of the WinPIC800 PIC programmer.
Yeah, but probably the author of WinPIC forgot the LF2550 out of the list? Probably Centronics will read 3.3V as a logical true? Well, why not give all this a try, you migth think. Let me save you some time; it’s not like I didn’t try. Of course it did not work.
So, after all that, I am now in a funny position where I am gazing at my first ready-made prototype board, which however I am totally unable to bootstrap it by programming the PIC bootloader firmware into it. What a bummer!
I have still one more thing to try: I can use one of my un-assembled FXS boards with the minimum required components (RPGM, KICSP and JLVP), and secure the 18LF2550 onto it with a clothes peg. Then I can try programming the PIC under a straight 5V environment. And, finally, I will take the pre-programmed PIC and mount it on my FXO prototype. OK, this is a path I will try; and if it doesn’t work, I ‘ll try to find me a real PIC programmer that can do the 18LF2550.
Whatever path I choose, news should be coming, sooner or later. I should be able to program the PIC, one way or another. So bear with me, dear readers. The long debugging trip of Open USB FXO has just begun!