Control Panel 2020 A
page modified May 4, 2023
Specifications may change without notice.
Do not use this device in any situation where loss of life or property would be the result of the device missbehaving or failing.
If you go beyond this rule, you are self certifying this device.
This device is built by hobbyists for a hobby project.
We do not certify that this design, or any particular unit, is sound.
Use at your own risk.
Feel free to use these 3 images for publicity or articles!
First Time Kit Builders
People who are unfamiliar with kit building may approach this as their first kit but there are a few caveats.
- Be careful. While this kit is one of the easier and better documented kits, and building a kit is pretty easy,
a cavalier attitude will result in hard-to-diagnose failures.
-
Have an experienced hand available for guidance and troubleshooting.
Building a kit is much easier than fixing a kit.
It is possible to reverse a soldering mistake, but it is definitely much harder than doing it right the first time.
If you have any doubts, send a message to [email protected] and we'll try to help you out.
-
If you find anything in the instructions which is unclear, write us.
We'll try to fix it.
-
If you are a first time kit builder, please consult your local experienced builder for help in reversing any mistake.
-
#4 is important.
-
Adafruit
has some excellent tutorials on soldering.
Buy the board and parts kit from Aaron, KK4KFG
Contact Aaron by his email address listed on
his QRZ page
What you will need
- Raspberry PI with TARPN installation
- Magnifying glass or smart-phone with close-up zoom capability
- Solder sucker (DS017 Soldapult for instance)
- Diagonal Cutters
- Thin rosin core solder - 0.02inch to 0.04inch - 0.5mm to 1mm. Kester 0.02inch Solder
- Soldering iron with thin tip - I use a Weller temperature controlled soldering station at 650 degrees.
This is the good soldering station at $120. Weller soldering station
This one’s probably good too at $45. Far East brand soldering station
- Computer capable of supporting a KISS TNC connected via USB
- Radio wired for KPC-3, TNC-PI or NinoTNC 9 pin D-sub connector
⇒ | Excepting the battery wiring lugs, all of the parts are inserted from the silk-screened side of the board, i.e. from the side on which the white writing is printed.
|
⇒ | The resistors are non-polarized.
You can put either end of the resistor in either of the two holes.
|
⇒ | The LEDs are polarized.
The instructions are specific.
|
Soldering tips
Insert the component so it is flush without breaking the part.
Splay the wires out to keep the part in the board while you invert it to solder.
Solder the part.
Inspect the leads to make sure the solder comes up over the lead for a visible amount.
Cut the lead at the wire, not the solder.
The solder is your friend.
What you do NOT want is a lead which is not making good electrical contact with the hole.
When debugging a kit because something went wrong, it is nice to have a clear image of the naked printed circuit board (PCB). Here you go:
Control Panel 2020-A board:
Click either to enlarge
Here's the control panel PCB's schematic. Click to load the PDF.
Circuit description
There are two different circuits in this device.
The first is a switch which connects or disconnects the VCC to the battery.
The switch is capable of interrupting up to 3 A of current.
Use crimp-on lugs on the wire to the battery.
See the Robust Power for Raspberry PI page.
The second part of the circuit is the connection to the Raspberry PI.
The key element is a jumper between GPIO pins.
A script runs on the Raspberry PI called pi_shutdown_background.sh.
That script initializes the GPIOs used for the control panel and looks for a short between GPIOs 8 and 11, which map to pins 23 and 24 of the expansion connector.
See the image below.
There are two GPIOs configured as inputs. Pull them to 3.3v (through a resistor) and pin 19 will cause a Linux shutdown, and pin 16 will cause a Linux reboot.
Note that neither of these affect the power to the Raspberry PI.
There are three outputs which are useful for driving LEDs.
Again, make sure the current does not exceed the drive power of a Raspberry PI GPIO.
### toward SDcard
### output high if LINBPQ up GPIO 22 GPIO 23 input. if high, do reboot
### 3V3 PWR GPIO 24 output high if LINUX
### Shutdown when High input GPIO 10 GROUND
### .5hz output GPIO 9 GPIO 25 NC
### /======= input GPIO 11 GPIO 8 output >>====\
### | toward USB |
### | |
### \===============================================/
When I made the diagram to the right we were using the TNC-PI which connected to the upper 10 pins.
The lower boxed set of pins would be for the PWRMAN board, or the One-Button-Shutdown board.
The control panel presented here is based on the One-Button-Shutdown design.
Larry WN8P did the layout for the Control Panel board based on my One-Button-Shutdown design.
You're going to have to do something to make the ribbon cable fit on the appropriate 10 pins.
I cut the expansion connector pins 13, 14, 25 and 26 using a diagonal cutter.
Be careful to not let the pins fly or get in your eye.
It could be bad.
|
|
Assembly Instructions
Bill of Materials
2020-06-08-BOM-for-digikey.csv
Some of the images on this page can be enlarged and opened in a new browser tab by clicking on them.
Install parts in this order:
1 |
R1, R2, R3, R5 |
1 k Ω 5% 1/4 W resistor
|
R1 serves as a link between a GPIO output and a GPIO input.
The raspberry PI uses the presence of this link as a signal that the control panel is hooked up.
R2 is used as a current limiting resistor for the blue LED DS1.
Resistors are not polorized so you can put either end in either hole.
It might help to bend the wires loosely from the ends of the parts.
Leave about 1/10th of an inch before a slight curve.
If you bend the resistor leads sharply, it is hard to insert them.
R3 and R5 are current limiting resistors for the two switches, S1 and S2, respectively. |
2 |
R4 |
220 Ω 5% 1/4 W resistor
|
R4 is a current limiting resistor for the green LED, DS2.
|
3 |
R6 |
330 Ω 5% 1/4 W resistor
|
R6 is a current limiting resistor for the yellow LED, DS3.
|
4 |
DS1 DS2 DS3 |
LEDs blue, green, yellow
|
The LEDs are polarized. Follow the instructions here.
All 3 LEDs are driven by Raspberry PI GPIO through a current limit resistor.
Since the LEDs each have a different efficiency and brightness, the current limit resistors were chosen to tune the LED to an appropriate level so the LED brightnesses appear to be balanced.
Note: The short wire on each LED, which is toward the flat edged side of each LED's plastic housing, goes to the pad on the left, and that is the ground connection.
The long LED lead goes into the hole where the signal-wire from the resistor is connected to the LED.
Feel free to install all 3 LEDs, bending their leads out to hold them in place, and then solder.
|
|
DS1 |
Blue
|
DS1, Blue, is driven through a 1 K Ω resistor, more than 2x the resistance of either of the other LEDs.
For some reason, blue LEDs are naturally brighter?
Install the LED so it is flush with the board (no space between the bottom of the LED and the PCB) and so the squared off side of the LED body is to the left.
|
|
DS2 |
Green
|
DS2, Green, is the dimmest of the LEDs, so we feed it through the lowest value resistor of the three, 220 Ω.
Install the LED so it is flush with the board (no space between the bottom of the LED and the PCB) and so the squared off side of the LED body is to the left.
|
|
DS3 |
Yellow
|
DS3, Yellow, is fed it through a 330 Ω resistor.
Install the LED so it is flush with the board (no space between the bottom of the LED and the PCB) and so the squared off side of the LED body is to the left.
|
5 |
J1 |
10 pin 2x5 0.1" spacing socket
|
J1 is used for a ribbon cable connection to the Raspberry PI.
I suggest soldering one pin on the bottom of the board, probably in one corner, then, with the bottom of the board up, apply some pressure on the 2x5 connector, and heat up the one pin.
Now rock the board so the 2x5 connector is appropriately flush and allow the solder to cool.
Inspect and make sure the connector is placed properly.
Now solder the other 9 pins.
|
WARNING!!!!
This next step is where most of the O.M.G. mistakes have been made.
The J2 and J3 lugs stick out the back of the board and are soldered from the front.
This is opposite of every other part you've soldered onto this board.
|
8 |
J2 and J3 |
Battery Lugs
|
These parts come attached to one another.
I just wiggled them back and forth on the joint until they came apart.
Make sure the two pins on each part don't get bent much, or adjust them so they are parallel after separating the parts.
These get pushed into the board from the back, right next to the big slide switch.
Solder them in front the front of the board.
There will be some resistance to pushing them into the board.
The point of these lugs is that your battery wiring from the switchover circuit to the gel-cel will pass the battey PLUS lead through the switch.
This lets you disconnect the battery after you shut-down your Raspberry PI's Linux system.
|
9 |
ribbon |
Assemble the ribbon cable.
|
You are supplied with 3 Insertion Displacement Connectors (IDC) and a foot or more of ribbon cable.
You'll only use 2 of the connectors.
The 3rd connector is included for practice or in case a 2nd try is required.
The length of the wire required is specific to your needs.
It is ideal that the ribbon be shorter than 6 inches if you are using UHF radios nearby so don't leave much slack lying around if you don't have to.
The wire will run from your control panel to the Raspberry PI.
The orientation of the connector on the cable relative to how it plugs in is critical.
For simplicity, clamp the connectors on the same side of the ribbon cable.
For instructions on installing the IDC connector, see this link: Ribbon Cable Construction
Note that I often don't use the extra piece of the ribbon cable connector.
That piece helps for strain relief but that hasn't been necessary for our application.
|
10 |
Pi Aux Cuts |
|
Modify the Raspberry PI.
Cut two sets of two pins on the expansion connector to make room for the IDC plug to fit over thte appropriate 10 pins.
Count 6 pins down from the corner, then cut two pins across, leaving 2x6 intact.
Then count down 5 more pins, and cut two pins across, leaving 2x5 intact.
Carefully observe the photo.
One option to making this mod is to buy a stacking connector and then modify the stacking connector.
Digikey link for stacking header
|
11 |
Final |
Assembly |
Plug the IDC ribbon cable from the control panel to the Raspberry PI.
Carefully observe the orientation.
The cable goes up over the top of the control panel to the near edge of the Raspberry PI near the expansion connector, and then right onto the Raspberry PI expansion connector's pins 15 through 24.
|
Finally
After the TARPN installer completes and the Raspberry PI reboots, the control panel will be picked up automatically by the pi_shutdown.service.
So, shutdown the Raspberry Pi, then attach the ribbon cable, and power up the Raspberry PI.
If the control panel is not present when the Raspberry PI boots, the service will only check for the control panel every 15 minutes or so.
There is a log file that keeps track of the pi_shutdown service.
To observe the log, do
tail -f /var/log/tarpn_pwrman.log.
You can expect the PWRMAN lopback cable to fail.
That refers to support for another product.
The feature you are interested in is called "ONE-BUTTON".
pi@taddpacket:/var/log $ tail -f tarpn_pwrman.log
pi_shutdown_background.sh --VERSION-- b009 - start:Wed 24 Mar 2021 11:41:51 PM EDT
23:41:51 up 64 days, 23:05, 4 users, load average: 0.16, 0.16, 0.12
gpio export facility exists
Wed 24 Mar 2021 11:41:51 PM EDT PWRMAN loopback cable fail at startup on first -1- echo test
Wed 24 Mar 2021 11:41:51 PM EDT PASS - ONE-BUTTON loopback cable pass at startup on first -1- echo test
PASS - ONE-BUTTON loopback cable pass at startup on first -0- echo test
Wed 24 Mar 2021 11:41:52 PM EDT Wed 24 Mar 2021 11:41:52 PM EDT PASS - ONE-BUTTON loopback cable pass at startup on 2nd -1- echo test
Wed 24 Mar 2021 11:41:53 PM EDT PASS - ONE-BUTTON loopback cable pass at startup on 2nd -0- echo test
Wed 24 Mar 2021 11:41:53 PM EDT #### ONE-BUTTON loopback cable PASS at startup
If the system is running correctly and the Control Panel is functional, the blue light should flash once per second, and the green light should be steady on.
The yellow light is on if the node software is running.
If you press and hold the SHDN button for one complete blue-light blink-cycle, the blue light will flash two times slightly faster than usual, then hold, and then the Raspberry PI will shut-down turning out all of the lights.
The green light will go out about 10 seconds before the PI goes to hold-for-poweroff.
Now it is safe to remove power from the Raspberry PI.