Showing posts with label PIC. Show all posts
Showing posts with label PIC. Show all posts

Tuesday, December 13, 2016

Status 13 Dec

Testing the logic started out OK. Creating a file on Cimbaoth, it was read by the Raspberry Pi, which then signaled the power controller to cycle power which it did.

However, after running a while, it was clear that the power was also being cycled on occasion when it was not commanded.  This caused a need for more complex signaling between the Pi and the controller so it was harder to be misunderstood.

As of this point in time, the logic for recognizing a more complex signal, and for generating that signal, has been developed, but not yet added to the production controller.



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
1039 2016-11-15 FIXED Receive power control PCB
1041 2016-11-20 FIXED Construct power control circuit
1044 2016-12-04 ASSIGNED Package power control
985 2016-12-09 ASSIGNED Schedule 2030 install
992 2016-12-14 ASSIGNED Make backup SD
1042 2016-12-16 REOPENED Develop short-term firmware
993 2016-12-24 ASSIGNED Move to 2030
996 2017-01-07 ASSIGNED Test 100 watt amp





ID Estimate Status Description
1044 2016-12-04 Package power control

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


2016-11-14 08:36:04:  
Holes cut, plugs/jacks mounted, now need to wait for PCB.


2016-11-22 08:12:49:  
Still need outlet


2016-11-26 11:58:05:  
Still need more time, hope to do today


2016-12-02 15:03:29:  
Still having trouble with packaging


2016-12-05 08:11:02:  
Got box to work (sort of), had been connected to a poor choice of
Raspberry Pi pin.  But a new issue emerges.  On boot, the RPi pin
is not an output, must be pulled up because it goes high in spite
of the PIC's weak pull-down. Once getit runs, it gets set low,
and a minute later the plug is pulled.

After about 20 seconds, the cycle starts all over.



ID Estimate Status Description
985 2016-12-09 Schedule 2030 install

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


2016-11-26 11:58:56:  
Predecessor slipped so slip this one, too.



ID Estimate Status Description
992 2016-12-14 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.


2016-11-26 12:01:29:  
Must be 993 - 1 day



ID Estimate Status Description
1042 2016-12-16 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


2016-11-14 10:23:54:  
Largely complete
commit 56e57f72d9b15bf1256c4f30ba4dd6a59e5bce3c

Still want to make a new branch with doxygen


2016-12-13 09:22:04:  
Original firmware worked, however, power cycles every 30 minutes
without the Pi software running, so something else was signalling
the controller.

Moving to a more involved signal, where three pulses of specific
length are required to signal the controller to cycle power.



ID Estimate Status Description
993 2016-12-24 Move to 2030

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


2016-11-26 11:59:18:  
Predecessor slipped so slip this one, too.



ID Estimate Status Description
996 2017-01-07 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.


2016-11-26 11:59:58:  
Predecessor slipped so slip this one, too.



Thursday, October 27, 2016

Power Control

With the better understanding of the Karma WiFi came the realization that some of the control we would like won't be available since we can't connect into the repeater over Internet, only out.

So, we would need some "pull" mechanism for control.  Thinking through that made us also recognize that, because the Raspberry Pi is powered by the repeater, removing power from the repeater also removes power from the Pi, meaning that we have no control at all.  This is messy especially because it takes time to arrange a physical visit to the site.

It isn't all dark.  We have various commands we can perform on the input.  And although we can't shut the repeater down, we can make it stop repeating which is almost as good.

However, we have seen the occasional case where we would like to cycle the power on the repeater.  That will take some external logic since when the power is off there is nothing available to turn in back on. Even after we get "real" Internet, we still have the issue of loosing control when we cycle power.

We have concluded that a small controller would do the job.  When the Pi sends a signal to the controller, it would wait long enough for the Pi to shutdown cleanly, then remove power for a while, perhaps 15 seconds or so, then re-apply power.

Block Diagram

Another approach would be to have a second Pi or similar box that could handle the sequencing but have separate power from the repeater.  The first approach looked simpler.

The power controller would be fairly simple; a couple of relays for the power, a transistor to drive the relay, and a PIC to receive the signal from the Pi and operate the relay.  The PIC I selected is overkill for the task, but it is still inexpensive and was a 3 volt PIC I had several of in the parts drawer. (The Pi is a 3 volt device, and although 5 volts is needed for the relay, it is simpler to drive a transistor with a 3 volt PIC than it is to level shift the input.)

Schematic


The circuitry has been breadboarded and tested. It remains now to lay out the printed circuit board, order the parts and PCB, and assemble the production version.

I have added the appropriate tasks to the bug list.  I find it helpful when doing things like this to be very granular, so there are a lot of extra bubbles on the map, but most are short or involve no effort (e.g. wait for PCBs).

The detailed list, including the completed items, will come in a later post.

Not shown here, nor in the to-do list, is the possibility of constructing a parallel controller for the W8QN repeater, run off the same Pi. There are available output pins.