4. Main Board 2 - alanbjohnston/CubeSatSim GitHub Wiki

If the images on this page fail to load, you can download a PDF of the page.

We can now start doing some intermediate tests on the board.

You will need these tools:

  • Safety glasses (to protect eyes while soldering or trimming leads)
  • Soldering iron and solder (I use lead-free solder, but leaded solder is easier to work with)
  • Needle nose pliers (to bend leads and hold parts)
  • Side cutters (to trim leads)
  • glue, such as super glue to attach the JST connectors to the PCB

Other tools that are helpful:

  • Blue mounting putty (to hold components in place while soldering)

The first part of this step is testing while the second part continues the assembly

Checklist

The BOM has a sheet "By Steps" which lists the parts needed for each step in order. http://cubesatsim.org/bom If you have a Google account, you can make a copy of this spreadsheet ("File" then "Make a Copy") and check off each part as you install it.

For example, here is the checklist for this step:

Part Checklist

4.1 Testing

Video

Here is a video of the testing part of this step: https://youtu.be/gZgWQNDQo9U

Charge LED Test

For this test, you will need the USB-C charging cable plugged into a computer or a power outlet to supply power. If you have a micro USB charging cable, you can use a micro USB to USB-C adapter. When the charging cable is plugged into the Main board USB-C connector (NOT plugged into the Pi!), the red Charge LED will illuminate.

Red LED Test

Red LED Test

If it doesn't illuminate, check the red LED LED3 polarity, resistor R13, USB-C connector, or your USB-C power cable.

Pi Blink Test

For the rest of these tests, you will need your Raspberry Pi Zero W or Pi Zero, a micro SD card with the CubeSatSim software installed (see the Software Install instructions), and the micro USB power cable (or a USB-C power cable with a micro USB adapter).

Parts for Pi Testing

If your Pi Zero W does not have the 2x20 pin header installed, you will need to carefully solder it in. The pins should stick up on the side that has the ICs and the SD card holder.

Flip the Pi upside down and plug it into the bottom of the board so that it looks like this:

Pi Blinking

Plug your USB power cable directly via the Pi micro USB port (NOT the Main board micro USB connector like you did to illuminate the red LED). The Pi will turn on and the tiny green LED on the Pi will be on or blinking. Note that the LED is on the top of the Pi Zero W board, but you can see it through the lower left mounting hole, as shown in the photo above.

If you don't see this, make sure you have your micro SD card with the CubeSatSim software installed and the micro USB cable providing power to the Pi.

Power LED Test

With the Pi plugged into the main board and the power cable plugged into the Pi micro USB port, about 30 seconds after booting, the CubeSatSim software will run and turn on the green Power LED.

Green LED test

If the LED doesn't illuminate, it might mean there is a problem with the green LED LED1 or resistor R11 or that the CubeSatSim software isn't running.

Transmit LED Test

With the Pi plugged into the main board and the power cable plugged into the Pi micro USB port, after booting, the CubeSatSim software will run. When the CubeSatSim is transmitting, the blue Transmit LED will be illuminated, occasionally blinking. This indicates that the CubeSatSim is transmitting.

Blue LED Test

If the blue LED doesn’t illuminate, it might mean there is a problem with the blue LED LED2 or resistor R12 or the CubeSatSim software. If it only illuminates once, it might mean that the Band-Pass Filter is not detected by the presence of resistor R1 or R2 - check this resistor.

Transmit Test

If the blue LED is illuminated or blinking on and off, you can tune your radio or SDR to 434.9 MHz (+/- 15 kHz) to see and hear an FM signal. You don't have an antenna yet, but a close by radio will pick it up. If you have your FoxTelem ground station working (the Ground Station instructions are here), you can try to decode frames in FSK mode.

If your blue Transmit LED is illuminated but you don't see a signal, check your antenna on your radio or SDR, and the gain and frequency on your SDR or radio. Or there may be a problem with the CubeSatSim software, in particular the rpitx library.

Push Button Test

With the Pi plugged into the main board and the power cable plugged into the Pi micro USB port, after booting, the CubeSatSim software will run. When the push button is pressed and held, the green LED should blink rapidly in this sequence: 1 quick blink, 2 quick blinks, 3 quick blinks, 4 quick blinks, 3 slow blinks. Releasing the button after one of the quick blink sequences will put the CubeSatSim in that mode, and the green LED will stop blinking. For example, in this video, the push button is released after the 3 blinks, so the CubeSatSim is in Mode 3. http://countingfromzero.net/amsat/v1/blink.MOV The modes are: 1: APRS, 2: FSK, 3: BPSK, 4: SSTV, 5:CW.

  • When pressed and immediately released, the Pi should reboot after about 30 seconds.
  • When pressed and held until the green LED starts to blink slowly (see above for the LED blink sequence), the green LED will then blink slowly three times, then the Pi will shutdown (the green Power and blue Transmit LEDs will go out, then the tiny green LED on the Pi will flash rapidly for about 10 seconds then go out). You can release the button as soon as the LED starts blinking slowly. This video shows the button shutting down the Pi: http://countingfromzero.net/amsat/v1/shutdown.MOV After the Pi is shutdown (no LEDs are on or blinking), you can safely disconnect the USB power cable and unplug the Pi from the board to continue the build.
  • When the Pi is off, pressing and releasing the push button will startup the Pi, as this video shows: http://countingfromzero.net/amsat/v1/power_up.MOV

If the green Power LED doesn’t blink, there might be a problem with the push button switch S1 or with the pi-power-button software.

4.2 Build

Video

Here is a video of the assembly part of this step: https://youtu.be/9ZKbU2a29TQ

If all your test results are "nominal" (expected results), you can continue your build after shutting down the Pi as described in the Power Button Test (by holding the push button until the green LED blinks slowly then releasing) and unplugging the Pi from the board.

INA219 Install

Next you will install four INA219 blue boards on the bottom of the PCB. These boards are current and voltage sensors that are on the Pi I2C bus so that the Pi can query them and read the values to include in the housekeeping telemetry decoded in FoxTelem. The design is based on an Adafruit board described here https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout. On the bottom of the PCB, the sensors are on the battery, 5V bus, -X solar panel, and +Z solar panel.

The INA219 packet contains the INA219 blue board, a 1x6 straight pin header, and a two position screw terminal. We do not use the screw terminal so you can put it aside. If you ware mounting the INA219 boards in sockets, you will also not use the 1x6 straight pin header.

IMPORTANT NOTE: most of the photos and the video for this section still show the purple INA219 boards. These boards are hard to find, expensive, and have an extremely high failure rate (> 50% in many batches). As a result, we recommend the larger blue INA219 boards. With the larger boards, you CANNOT just mount them directly on the board! If you do so, you won't be able to access the connectors. You will need to use sockets (as shown in these photos for the purple boards) or pin headers that raise them higher on the board. Make sure you test your setup carefully before soldering!

INA219 boards

But first, I highly recommend testing them, as there seem to be lots of bad boards being sold at the moment, perhaps due to low supply levels. First, solder on the 1x4 pin header J4 on the bottom of the PCB:

INA219 boards

Here's how it looks soldered in place:

INA219 boards

Now, plug back in the Pi Zero and power it up:

INA219 boards

You can then test each INA219 board before soldering them in. Do this by carefully placing them on the pin header (no connection is necessary for the Vin+ and Vin- pins). Be very careful not to offset the pins, as this could damage the board. With your fingers, tilt the board so that contact is made without soldering.

INA219 boards

The test is to see what voltage and current is shown for the +X Solar Panel. The easiest way to do this is to log into the Pi using ssh and then run the command CubeSatSim/telem. This reads all the INA219 sensors and displays them. If no sensor is detected, it will read 0.0 V and 0 mA. An INA219 sensor that is present but with nothing connected will read a voltage in the range 0.5 V to 1.0 V and a current in the range of -4 mA to 4 mA. This reading shows a functioning INA219 board plugged into the 1x6 pin header you just soldered in:

INA219 testing

The +X reading of 0.56 V and 1 mA shows it is working. If you get 0 Volts or too high a value for either current or voltage, the board is bad.

If you have your Ground Station running FoxTelem and your CubeSatSim in the two blinks mode (DUV/FSK), you can also do the INA219 test by reading the +X Panel telemetry in FoxTelem. Note, however, it may take up to 8 seconds from when you connect the INA219 board under test and the reading being displayed in FoxTelem. For a working INA219, you should get something like this:

INA219 testing

If you want to be able to easily replace INA219 boards if they fail, you can mount them on sockets. If not, you can solder them in.

INA219s Sockets

Here is a photo of the bottom of the PCB with the blue INA219 boards mounted on sockets.

INA219 blue boards

Start with the bottom of the Main PCB use four 1x6 pin female right angle sockets, four 1x6 pin right angle breakaway headers, and four tested INA219 blue boards:

INA219 boards

Solder the female sockets to the PCB and solder the pin headers to the INA219 boards as shown:

INA219 boards

Be very careful to solder the left and right sockets into the right holes.

This is how they look when they are plugged in:

INA219 boards

Here is the detail of how two of the right angle pin headers are mounted on the INA219 boards:

INA219 boards

Each sensor needs to have an I2C bus address set by the jumper pads A0 and A1. For A0 and A1, the PCB indicates if a small blob of solder is needed on the pad ("bridged") or nothing needs to be done ("no jumper"). For example, a sensor with the address 0x44 is set by having A0 with no jumper and A1 bridged with a small blob of solder.

The four sensors have all four permutations of jumpers on A0 and A1. This will give four I2C addresses as follows:

  • 0x40 (no bridges) which is in the top right in the photo below
  • 0x41 (A0 bridged only) which is in the top right in the photo below
  • 0x44 (A1 bridged only) which is in the bottom left in the photo below
  • 0x45 (A0 and A1 bridged) which is in the bottom right in the photo below

In this photo, the bridged jumpers are boxed in red:

INA219 boards

The next section shows how to alternatively solder the INA219s in place

INA219s Soldered

To solder the INA219s in place, you don't need the 1x6 female sockets or the 1x6 right angle pin headers. Instead, you will use the 1x6 straight pin header from the INA219 package. Four of them will be soldered on the bottom of the PCB:

INA219 boards

Be careful to mount them in the correct holes, especially the left and right ones. The blue putty will help hold them in place parallel to the board while they are soldered. Solder one pin on each first and check for correct positioning before soldering the rest.

INA219 boards

Each sensor needs to have an I2C bus address set by the jumper pads A0 and A1. For A0 and A1, the PCB indicates if a small blob of solder is needed on the pad ("bridged") or nothing needs to be done ("no jumper"). For example, a sensor with the address 0x44 is set by having A0 with no jumper and A1 bridged with a small blob of solder.

The four sensors have all four permutations of jumpers on A0 and A1. This will give four I2C addresses as follows: as follows:

  • 0x40 (no bridges)
  • 0x41 (A0 bridged only)
  • 0x44 (A1 bridged only)
  • 0x45 (A0 and A1 bridged)

These jumpers should be set according to the PCB labels as described above.

Diode Install

The bottom of the PCB is now complete, so flip the board over to mount the 7 1N5817 diodes D1, D2, D3, D4, D5, D6, and D7 on the top of the PCB:

PCB Top

Note that the diodes have a polarity indicated by a grey band on one side. These diodes only allow current to flow from the solar panel to the battery or from the USB charger to the battery and block current from flowing in the other direction. This image shows the PCB printing, and silver band marking on the 1N5817 diode.

Diode Polarity

Pay attention to the polarity of the diodes by referring to the photos below. DO NOT install a diode in D8 yet as it is a different type of diode!

All diodes are mounted vertically like the resistors. Here is diode D1 bent and ready to be inserted:

Diode Polarity

Here is diode D1 mounted.

Diode Polarity

With all 7 diodes soldered in, the board looks like:

PCB with diodes

Here are some closeups showing the correct polarity.

PCB with diodes PCB with diodes

Here is how it looks on the bottom of the PCB after the diodes D1 - D7 are soldered and the leads trimmed:

PCB with diodes

Save at least 4 of the cut-offs from the diodes to use to mount the 5V boost converter in Step 7.

PCB with diodes

JST 2.0 Connectors

Next, insert the 8 JST 2.0 connectors on the top of the PCB (note: JP5 is optional and can be left off). It is a good idea to put a drop of glue on where they make contact with the PCB. This will hold them in place when you unplug cables. But only use a tiny amount of glue, and don't get it on the pins to be soldered.

Pay attention to the polarity as indicated by the notch in the outline that lines up with the slot in the connector.

PCB with JST Connectors

Solder the JST 2.0 connectors on PCB on the bottom, which will look like this:

PCB with JST Connectors

These instructions are for mounting the INA219s in sockets. Note that these photos still show the purple INA219s instead of the recommended blue INA219s. Here's how the top of the board looks when using the blue INA219s in sockets:

Blue INA219s

Then, prepare four more tested INA219s, setting the four possible addresses as before with the 1x6 female right angle sockets and 1x6 right angle breakaway headers. Solder the sockets in, paying attention to the jumper A0 and A1 labels on the PCB:

PCB with rest of INA219s

PCB with rest of INA219s

Solder the 1x6 breakaway right angle headers to the INA219 boards and set the A0 and A1 jumpers. Here is how they look when inserted. The bridged jumpers are in the red boxes:

PCB with JST Connectors

If soldering the INA219s to the board, this how it looks before setting the jumpers:

PCB with INA219s soldered in

The next step is to build the Battery board.