Future of the Eagle library

Well, it’s been rather a long time since I last posted anything here – it’s been a hectic couple of years! One of the most enduringly popular items has been my small Eagle library, and thanks to everyone who has used it (and will continue to use it) in the future. Eagle has been acquired by Autodesk, and they’ve rolled out their new subscription pricing model promising to be cheaper and more accessible to everyone. This is contrast to their old one off payment model, but instead of an old (and rather reasonably priced) license chugging on for years, you now have to continue chugging out money. I was very close to upgrading to a paid Eagle, mainly for 4-layer support, but that’s not going to happen now and Eagle, much as I’m quick and effective in it, is not in the same league as Altium.

This prompted me once again to look at KiCad, and it seems that the involvement of CERN and perhaps a growing userbase has improved its quality immensely. As it is completely free and open source, and offers everything Eagle does and more, I’ve decided to no longer update the Eagle library and make the move over to KiCad. Perhaps a new KiCad library will be coming, at least once I’ve got my head around the workflow..!

Raspberry Pi HATS compatible UPS – part IIc – switching supply and EEPROM

Following on from parts IIa, and IIb, this should be the final part about the actual electronic design. All that’s left to cover is the switching voltage regulator and the EEPROM for HATS compatibility. Luckily, these are actually both just stock designs. In the same way that software can (and often should) be written with libraries, these are essentially copied designs. I’ll cover the basic parts of the regulator first, then the EEPROM.

Switching voltage regulator – IC4

As we have two power supplies which are both above the 5 V the RPi requires, we need a method of taking the voltage we have and regulating it down to 5 V. The choices are: a shunt regulator (similar to what has been implemented before), a linear voltage regulator, and a switching regulator. Both the shunt and and linear regulators drop the voltage by literally burning away the extra energy. This imposes two problems. Firstly, you’ve got to deal with the heat. Secondly, it’s very inefficient, something that’s important for a UPS as we want the battery to last as long as possible. In the, not unreasonable, case where your device is consuming 1 A at 5 V. For a simple linear LM7805 regulator, the minimum dropout voltage is around 1.25 V, and as a designer you’d be brave stupid to go to that precise a margin. So, let’s say as a safety requirement, that the input is 7 V. Now, using P = I(V_\mathrm{in} - V_\mathrm{out}), we can work out the power dissipation required: P = IV \rightarrow P = 1 \times (7 - 5) =\ 2 W. Given that the device is only consuming 5 W, gives an efficiency of \frac{P_\mathrm{device}}{P_\mathrm{total}} \rightarrow \frac{5}{7} =\ 71%. In the worst case scenario of a 15 V power supply, those numbers become 10 W and 33% respectively. This requires both a large heatsink, and also some way of getting all that extra heat out of what is likely to be a small enclosure

To avoid this problem we can use a switching buck converter to take down the input voltage with efficiencies in the 90% region across a wide voltage range. I chose to use a TI LM22670 chip as it comes in a space efficient but easily soldered SO-8 packages. Increasingly, control chips are coming in QFN packages, which are much trickier to solder and more difficult to inspect. The values and layout for this design were done using TI’s excellent WebBench design software. To run through them briefly, C6 and C7 are bypass capacitors. Without going into switch mode design too deeply, these see a large ripple across them and need to be specified accordingly. R25 turns on the controller IC. R26 serves to limit the speed of the controller. Generally, as low a speed as possible is desirable as it will be more forgiving of layout and less likely to act as a radio! They values of R25 and R26 are the same – R26 was specifically chosen, whereas R25 just needs to be pulled up to a high voltage. L1, C5, and D3 form the heart of the converter, and I suggest you read up outside about how they work. Switch mode design is not for the feint of heart, but is well worth it!

EEPROM – IC5

The design for the EEPROM is specified in the HATS standard, and there’s very little to add to that. It will contain information which tells the RPi what the board is, and to download any required software. I’d originally powered it from the 3.3 V supply used as the reference for the comparator in part IIb, but user mahjongg on the RPi forum pointed out this could be powered from the RPi’s internal 3.3 V supply. Much better! The values are close, but not precisely, those on the specification sheet. As these are simply acting as pull-up resistors, their value isn’t too critical and as we’ve already used these values before, from a manufacturing prospective, it makes more sense to reuse them.

So – that’s the full design gone through. I hope you’ve enjoyed and learnt some things from it. Next up, the boards will be ordered and built! As ever, any questions or ideas are more than welcome, either here or on the forums.

Eagle library updated

Some more updates for the Eagle library. The link is at the bottom of the post. I’m currently writing up my DPhil (PhD), hence fewer updates (if that’s possible!). I’ve ordered some more boards and parts, so should have some more things up in the next couple of weeks. In the meantime, the updates are:

  • 78xx regulator in SOT-223
  • LM317 variable linear regulator in SOT-223
  • LM337 variable negative regulator in SOT-223
  • LP38692 linear regulator in SOT-223
  • Panasonic ELF 15N common mode AC filter (nb, silkscreen on the bottom side)
  • INA219 in SOT23-8 (SOT363-8)
  • PIC16F883 in DIL28, SOIC28, and SSOP28
  • PIC32MX4xx in TQFP64
  • Alps 4-way navigation switch SKQUAAA010

As ever, I hope these are useful and any questions please let me know.
Download the library here.