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.)


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.

No comments:

Post a Comment