Did you connect the power plug?

The title of this post refers to the standard question from technical support, when one reports a problem with an electrical or electronic appliance over the phone: “is the power cable of your XYZ plugged into the mains outlet”? In this case, XYZ parallels to my brains, and the mains outlet  is something like the outlet of the universal common sense supply (let us assume that this supply exists anyway — and that it has an outlet somewhere…). This post explains why.

I had not written any new post on Open USB FXO since April. In reality, I was barely even thinking about my new project. The official excuse was that my new daytime job occupied just about all of my time. However, I believe that there was a slightly more complex (and much more sensere) explanation: because of the transition from the 18F2550 to the 18F25J50, this new project was now looking too complicated to me. I had already gone once through the realy early stages of design and development, back when I played with that first PIC development board (the one that refused to work unless I held it tenderly in my hands? Remember that?); I had invested much time into learning the PIC compiler and Microchip’s USB libraries; had made my first unsuccessful attempts in creating PIC firmware; and generally, I had stumbled upon every possible obstacle there was during these first steps. If I were to start over with a new processor, I would have to go through the same again — at least, so I was fearing. And I guess that this was what was really scaring me off my newborn FXO project.

Nevertheless, I started some work on the project: I first set to change the (open-source) Eagle library that I was using for the PIC 18F2550 into one for the 18F25J50. The 18F25J50 has vastly different pin names, and producing a schematic with the wrong pin names might work in practice, but would look ugly. The original library already conained the symbol and package formats that I needed, so what was remaining would just be a work of changing pin names. So, starting from the “microchip-pic18fxx5x.lbr” library that I used originally, I removed unneeded packages and symbols and changed the pins of the 18F2550 into the ones of the 18F25J50.

Now, funny, see how working in an open source context changed my view of the project.

Working in open source means sharing your work. If I were to give this new PIC18FXXJYY Eagle library away to others, I had to make it correct.  Changing the pin names would not suffice: as a final touch, I had to correct the HTML markup for the documentation of the library. It was then that I noticed that the original library also mentioned the PIC18LFxx5x, stating that this L stood for “low-voltage” — low whaaaaat?

A quick look into PIC18F2550’s datasheet confirmed that there is a low-voltage cousin of the 18F2550 that I used, namely 18LF2550. No wonder I had not noticed that so far; here is the only reference to “LF” that exists in the datasheet:

Standard devices with Enhanced Flash memory, designated with an “F” in the part number (such as PIC18F2550), accommodate an operating VDD range of 4.2V to 5.5V. Low-voltage parts, designated by “LF” (such as PIC18LF2550), function over an extended VDD range of 2.0V to 5.5V. 

No wonder I had missed that among the hundreds of pages of the datasheet (yes, I know this is no excuse)… Which means that there was a PIC18LF2550, that suited perfectly my needs, without needing to change anything substantial in my design. A quick lookup on Mouser revealed that not only did LF2550 exist, but also that it was in stock and priced quite the same as the F2550. In other words, all these redesign issues that gave me headaches could just vanish by using the 18LF2550!

A small change in the circuit would be required anyway for lowering the voltage to 3.3V. In the point where the circuit draws power from USB:

, I would have to add the two 1N4148 diodes that I mentioned in my previous post, just like this:

, and that would be it. Elementary… And this means that I can use my compiler, my hand-made FD-ART2003 PIC programmer, my flash memory utilities and my firmware without changing anything but the logic that interfaces with the Silicon Labs chipset.

So, after I connected my brains to the universal common sense supply (there had to exist a low-voltage equivalent of the 18F2550, and I should have thought about it before looking at another PIC), the project seems much easier to me, and I can start spending late-night or early-morning hours on it again. The little brother  just grew up a bit, after being stuck in its newborn state for quite some time.

Quick update, Jul 18: I think I will replace the two 1N4148 diodes with a BAV99 double-diode, in order to save some room in the PCB. I am now checking whether other designs use BAV99 successfully for dropping 5V to 3.3V. Anyone who can contribute on this, comments welcome!

Advertisements

6 Responses to “Did you connect the power plug?”

  1. marcus905 Says:

    Why don’t you use a very cheap lm1117-3.3 LDO linear fixed regulator (or a generic clone) that is regulated (duh!) instead of a double diode that is not?

    The price is a bit higher but still low (the IC is about .60$, plus 2 ceramic/tantalum capacitors for filtering, each at about .15$ for a grand total of under a dollar or .70 EUR for Europeans) and it will be much more reliable this way.

    • marcus905 Says:

      Oh, by the way: I looked at the FXS project and found out the problem you had with the capacitor in the first posts.

      I suggest you avoid Lelon capacitors as the one you used as they are practically crap. Use only capacitors made by Nichicon, Rubycon, Nippon Chemi-Con, United Chemi-Con and Panasonic that are way more reliable and will save you lots of time spent debugging electronics 🙂

      • Angelos Varvitsiotis Says:

        Hi Marcus,

        Thanks very much for your suggestions! It is always good to receive thoughtful advice from experienced electronics engineers! I am replying here to both of your comments.

        For the capacitors, I think you are right — though I cannot tell about the specific manufacturers that you mention. For my latest prototypes I have used mostly Kemet and Vishay-Dale, with good results. For mass production, these manufacturers may prove to be too expensive, so I will take your advice!

        Yes, I have considered using a regulator chip; however, the datasheet of LM1117-3.3 states that the input voltage must be >= 4.75V. My USB experience (see Power games on my Open USB FXS blog) has shown that this threshold may well be violated by some USB drivers, given that the USB standard allows supply voltages as low as 4.25V (if I remember correctly). So, comparing between a double diode and a regulator on a situation with Vusb = 4.6V, the regulator will not work full stop, while the double diode will give out something close to 3.0V, which is marginally within the specs for the Si3050’s supply voltage! There may be other regulator chips with even lower dropout voltages that will work with 4.5 or even 4.25V, but I have been too lazy to look for such.

        One more concern that I had (less important than voltage) is the PCB real estate, since regulator chips typically require one decoupling cap in the input and one in the output — the LM1117-3.3 is no exception — and these tend to occupy much (scarce) PCB space.

        BTW, my next post with the final schematic and a PCB design is now being written, so you may want to take a look at those when they come out.

        Thanks again very much for the constructive comments!

        Cheers,

        Angelos

  2. marcus905 Says:

    Kemet and Vishay/Philips are good manufacturers, especially in tantalum and single/multilayer ceramic capacitors (but as you said quite expensive.)

    The manufacturers I posted specialize in electrolytics so they’re better in that field (and also cheaper.)

    Actually I posted the wrong LDO regulator (I used so many different ones that I think I had a freudian slip), I actually meant to write MAX8888 and clones: they’re specific VLDO regulators for USB -> 3.3 for up to 500ma pulsed and 300ma constant current.

    It still requires 2 decoupling caps but IMO in my designs diodes and voltage dividers used as voltage droppers create lots of problems (they’re very close to ceramic resonators in my things to avoid list)

    • Angelos Varvitsiotis Says:

      You are correct in that MAX8888 looks more like the chip to use in this kind of environment — a design with this chip would be more reliable than mine which uses a double diode. Halas, my first PCB edition (v0.9) is already out using BAV99. Moreover, the MAX8888 is priced quite higher (Mouser retails it at 3.64 EUR @1pc and at 1.52 EUR @500pcs), which increases the cost of my BOM (remember that . Thus, I will try the BAV99 and see what I get. To make everyone happier, I have already produced a version 0.91 of my schematic and PCB that uses the MAX8888. If problems arise with BAV99, I will switch to that version.

      Thanks again for the constructive comments!

      Cheers,

      Angelos

      • marcus905 Says:

        You’re welcome!

        Those prices are high indeed! I found another one that could probably be the right one though: it’s the Motorola/ON semi NCP4589… it costs under a dollar, about .63 EUR each at Mouser (the exact code if you want to look it up there is NCP4589DSQ33T1G.)

        Take a look at it and see if it fits 🙂 it requires two 1µF ceramics for decoupling though.

        Let me know if you need anything else, I’m very interested in your project and will help in any way I can 🙂

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s


%d bloggers like this: