Friday, 1 February 2019

PRC344 Scan Project, further design work

Ive spent many hours this last week working on the design details for this project, and each time it has come down to a toss up between physical size and number of IO ports.

While working out the details, the need to draw virtually no current from the radio was paramount. Originally, the plan was for zero current, as all the control electronics would be isolated, but a flaw in the radios original design has led to a change of perspective - the PRC344 has no battery low warning!

Now, PIC chips can be put into sleep modes where they will draw negligible current, in the order of a few micro-amps, yet still react of external or some internal interrupts. So I started thinking of ways to monitor the battery with the MCU, and to set up a low battery warning. But this meant that the MCU would have to be powered all the time, so the search extended to 3v regulators that not only could cope with a 24v input, but also had extremely low quiescent currents. This in turn led to finding serial line drivers that also had ultra low current sleep modes!

But all that was irrelevant compared with another small problem. The MCUs I had chosen did not have enough IO ports to run the system, and so required port expanders. These extra chips need controlling over a serial data link such as SPI or I2C. As im trying to design this to use materials I already have, I found my lack of coding knowledge a major disadvantage, as none of my devices has SPI, only I2C, and none of my stock of preferred MCUs can do I2C natively. This meant I would have to bit-bang the entire instruction set for the port expanders from scratch!

One device I do have though, which can not only do SPI or I2C through native hardware, but also has sufficient IO ports to mean I dont even need the port expanders, is the PIC16F887. But I had originally discounted this device due to its size - a 40pin DIP!

But the realisation came to me that since I was trying to make this a very small unit, and so was looking at SMT parts for almost everything, I should look at the SMT packages for this chip - and the 44pin TQFP package is only 10mm square yet the legs are relatively accessible!

So, a redesign using the 16F887 has resulted in a system that has just 6 ICs (including a sophisticated LDO regulator and RS232 line driver), will fit in the space left by disabling the radios transmitter, and can monitor the battery voltage during sleep mode to bring the entire systems quiescent current draw down to just a few tens of micro-amps!

...oh, and the code now is little more than beginner level port on/off stuff!

I'll start prototyping on the weekend, first testing out basic port driving code and E2PROM stored look-up tables. Sadly I cant prototype with the HV multiplex chips yet as I cant find my SMT break-out PCBs, and have had to order more.

No comments: