Saturday, November 5, 2016

Power Control Revisited

The previous power control version used a PIC24FJ64GM002, a 28-pin part with 64K of flash.  For the simple problem at hand, that PIC was gross overkill, but it happened to be what I had on hand.

The PIC24F04KA200 is much better suited to the task.  It still is something of an overkill.  Although 4K of flash is pretty tiny for a PIC24, the application ended up taking less than a tenth of that.  Still, it's 14-pin package and low price make it a better choice.

After some experimentation, during which I got concerned about the base current, I decided to put each of the relays on their own output.  The PIC24F04KA200 can source 18 mA per output pin, and the final base current was measured at slightly over 4 mA so there is plenty of headroom.

Basically, the board is supplied with 5 volts which is needed for the relays.  The relays are operated by transistors so the PIC doesn't need to see the full current of the relays which it would not be capable of handling.  A regulator supplies 3 volts for the PIC, chosen because the PI outputs are 3 volts.

On a signal from the Pi, the PIC waits long enough for the Pi to shut down, interrupts the power for a short time, then re-applies the power which causes the Pi to reboot (the Pi is powered by the repeater).

The final circuit looks like this:
Power Controller Schematic

A printed circuit board was laid out, the layout looks like:

PCB Layout As Designed
The 6-pin header on the left is for programming the PIC, not shown on the schematic.  Also not shown on the schematic are two ways to apply power; the two-pin header on the left and the microUSB on the bottom.  Depending on how the packaging works out, one or the other will be used.

The "realistic" view of the PCB is:

"Photo-Realistic" View of Printed Circuit Board

The actual board is not expected to arrive until November 15.  I selected the high-priced spread (Accutrace) because they are about two weeks faster than my normal supplier (MakerStudio).  They are also extremely diligent.  I covered some of the microUSB pins with solder mask because that makes it easier to solder by hand.  They immediately emailed me with a PDF showing the issue and asking if that is what I really wanted.  That isn't normal but I'm surprised they picked up on that.

Status 5-Nov

ID Estimate Status Description
917 2016-08-10 FIXED Order NW Digital board
981 2016-09-11 WONTFIX KC8ARJ as repeater
983 2016-09-11 FIXED Order quality SD cards
986 2016-09-11 FIXED Validate LTE
982 2016-09-12 FIXED WiFi startup
994 2016-09-12 FIXED Investigate hang time control
978 2016-09-13 FIXED Select UDRC/Pi Case
984 2016-09-15 FIXED SD card receive
995 2016-09-15 WONTFIX Investigate hang time in source
979 2016-09-16 FIXED Receive UDRC/Pi Case
987 2016-09-19 FIXED Select LTE provider
980 2016-09-20 FIXED Modify/Install UDRC/Pi Case
988 2016-09-20 FIXED Order LTE Device
989 2016-10-04 FIXED Receive LTE device
991 2016-10-10 FIXED Log file strategy
1033 2016-10-15 FIXED Power control strategy long
1032 2016-10-19 FIXED Power control strategy short
1034 2016-10-22 FIXED Design power control
1035 2016-10-23 FIXED Breadboard power control
1037 2016-10-29 FIXED Order power control parts
1040 2016-11-02 FIXED Receive power control parts
1038 2016-11-03 FIXED Order power control PCB
1036 2016-11-03 FIXED Power control PCB
990 2016-11-06 FIXED Configure/Test LTE Device
1042 2016-11-15 ASSIGNED Develop short-term firmware
1039 2016-11-15 ASSIGNED Receive power control PCB
1041 2016-11-20 ASSIGNED Construct power control circuit
1044 2016-11-22 ASSIGNED Package power control
985 2016-11-27 ASSIGNED Schedule 2030 install
992 2016-11-28 ASSIGNED Make backup SD
993 2016-11-30 ASSIGNED Move to 2030
996 2016-12-21 ASSIGNED Test 100 watt amp

ID Estimate Status Description
1042 2016-11-15 Develop short-term firmware

2016-10-27 09:41:49:  
Design and test firmware for the short term repeater power
control, both PIC and Pi

ID Estimate Status Description
1039 2016-11-15 Receive power control PCB

2016-10-27 09:41:49:  
Repeater power control printed circuit boards arrive

ID Estimate Status Description
1041 2016-11-20 Construct power control circuit

2016-10-27 09:41:49:  
Assemble the production circuit for the repeater power control

ID Estimate Status Description
1044 2016-11-22 Package power control

2016-10-27 09:41:50:  
Develop physical packaging for repeater power control circuit

ID Estimate Status Description
985 2016-11-27 Schedule 2030 install

2016-09-12 10:30:56:  
Schedule a time to move the repeater to 2030

ID Estimate Status Description
992 2016-11-28 Make backup SD

2016-09-11 09:49:16:  
Need to create a backup SD card immediately before taking
repeater to site

2016-09-12 10:32:15:  
Create a backup of the SD card.  Moved date to the day before
install since this wants to be the LAST thing we do.

ID Estimate Status Description
993 2016-11-30 Move to 2030

2016-09-12 10:54:35:  
Install the repeater at the permanent site at 2030 building.

ID Estimate Status Description
996 2016-12-21 Test 100 watt amp

2016-09-12 10:49:37:  
Repeater will initially be set for 20 watts. It is unknown at
this time whether the addition of an external amplifier will
result in excess desense. After the repeater is at the site, an
amp will be tested for coverage.