The USB FXS hardware design

By now, after all the woes I describe in my previous post, I had managed to tame the PIC 18F2550, Microchip’s IDE, MCC18, nuxie1’s board, and the PICDEM tool to be able to upload and run code on this board. The time had come to sit down and design the actual USB FXS circuitry.

The idea for this was to use the 3210 (FXS ProSLIC) and 3201 (line driver) chips from Silicon Labs. After half a week or so of studying the datasheets from Silabs, I thought I had a grip of the whole thing. Voltage levels between the PIC and the 3210 are compatible. Si3210 is controlled by a SPI port, and the PIC 18F2550 has a such built-in. Speeds and timing diagrams were looking OK to me. Even some worries I had about about the power consumption of the DC-DC converter circuit were proved unjustified after studying Silabs’ own calculator for the DC-DC converter Excel sheet (by setting NREN — the number of parallel telephone sets that can be connected in parallel — to 1, there exists a 5V configuration which needs close to 0,4 A, below the USB maximum of 500mA). The Gods of hardware seemed to be on my side. Good! Time to move on then!

My thought was to copy-paste the reference circuitry from the Si3201 datasheet, pp.17-20 (for the time, using the reference values provided therein — later I could adapt the values DC-DC converter components as per the spreadsheet). I cross-checked with David Rowe’s IP04 FXS module, which as I found uses the exact same reference design around the Si3210. OK, this was a Good Sign. With these in hand, I started entering my design into the CAD tool that I use, CadSoft Eagle.

Of course, I could not find CadSoft Eagle libraries for the Si3210 and the Si3201, so I had to make schematic and wirepad libraries for these myself. I am not a very good Eagle librarian, so I did some mistakes there (like picking the wrong layer for the device name, so I can’t make it disappear from my PCB like other device names). I am confident that these glitches can be corrected some day. On the other hand, the pad dimensions and the distances proved to be OK. If you are interested in these libraries, drop me a mail (the blogging software on this site won’t let me upload anything other than pictures, sorry…) or wait until I upload them to my sourceforge site.

Then I started designing my circuit. It took some more days until finally it looked like this (click on the image to see it full-size):


Schematic of my USB FXS design (click to see it full-size)

Although my style in this post may look like I did things in a straight line (first the schematic, then the PCB), in practice it was not at all like that. Several times when designing the PCB had I to go back and make smaller or bigger changes and tweaks here and there. One example is the signals of the PCM bus between the Si3210 and the PIC: the PIC has many signal pins that I could use for this. So I tried to use those that would help me route the bus signals between the two chips on my PCB. When my initial guess proved, ehhm, not exactly optimal, I had to go back and change them.

Another issue is the 32kHz oscillator which appears in the schematic. This is not used at all in my current implementation. Supposedly its purpose would be to provide clocking for the PCM bus service routine, but it turned out that this was not a very good idea (I ‘ll explain in a future post why).

One final piece of advice about the design: as I am writing these lines, I have not tested anything more than the SPI communication between the PIC and the Si3210. So, please don’t take for granted that this design is correct. There may be serious errors, even copy-paste ones. The component values of the DC-DC converter are not the correct ones for 5V DC, and will most probably not work correctly.

So here’s a guided tour to the schematic:

  • There is really nothing to the left of (and including) the 3210 that differs from the Silabs reference design. One note: in order to get something like an FCC approval of an “FXS” device, one would need to include a surge protector between the RJ11 pins 3 and 4. I have omitted this, although it is easy to add it, since it is not really needed for intra-home use.
  • PIC’s RA5 is the “user LED”; it is still different from the one used both by Microchip’s demo board and nuxie1’s design.
  • PIC’s RB3 is the \CS line for the 3210; the SPI bus of the PIC does not include a special chip select signal for master mode.
  • The PCM bus (including the 3210’s \RESET signal) is made out of the first 5 usable PIC signals in order of increasing pin numbers. This is for reasons of PCB routing.
  • The CLR and USR switches do exactly what the respective switches of Microchip’s demo and nuxie1’s design boards do.
  • The JLVP jumper must be closed (soldered on the PCB) if LVP mode is to be used.
  • The ICSP bus is for programming the PIC after it has been soldered (which is always the case, since this is a SMD version of the PIC).

This is almost everything that I have to say about the schematic. It is very, very simple. Which, as I found out later on, makes firmware a not-so-simple story! But this I save for my next posts; for the time, I had to design and etch a PCB.


6 Responses to “The USB FXS hardware design”

  1. mark Says:

    Very nice design. I am looking forward to see your report on the first successful call.

  2. openusbfxs Says:

    Thanks very much, Mark! As you saw, it took me eleven days to approve your comment and post this reply. I am afraid this means that I am terribly busy with my daytime job (which – for a short period I hope – has also become a nighttime one). Plus, currently, I am in a state where I am missing a couple of 1208 resistor values, so I have to go shopping for them. I will definitely go on with the second trial of my project (all components are still spread on my desktop), but don’t hold your breath. I hate making other people wait.

    Thanks again!

  3. Elias Says:

    Good projects. It is a new idea since few projects open it’s hardware.

  4. openusbfxs Says:

    Thanks Elias! The important thing though besides opening a project, is making it work. And there, it seems that I still have work to do.

    Thanks again!

  5. Lucas Says:

    Hello Mr Angelo,

    I’m currently making similar FXS module (for Blackfin BF-533) in EAGLE and I’m very interested in your Si3210 and Si3201 library. Could You please send it to me or upload it on some website ?


  6. Angelos Varvitsiotis Says:

    Hi Lucas,

    Thanks for your interest. The library is here. I know these are hard to come by, and this was why I had to create one on my own. I wish you all the best with your project!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: