Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions ASSEMBLY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Assembly Instructions

This document explains how to assemble a Neotron Pico kit. It is based around the v1.1.0 Kit, but other versions may be similar.

Assembling a Neotron Pico Kit involves the following components:

* A PCB
* Some surface-mount components
* Some through-hole components
* A power supply, for testing
* An Arm Serial Wire Debug (SWD) programmer (a Raspberry Pi Pico can be used)
* A micro-ATX case, some stand-offs or some rubber feet.

You may have received a kit with some (or all) of the surface mount parts fitted in the factory. If so, you can skip any parts that are already on your board.

## Getting to know the board

The main processor on your Neotron Pico is the Raspberry Pi Pico (hence the name). This lives at the 'top' of the board, with the other external connectors - you can clearly see the 43 large golden pads. To the right of the Raspberry Pi Pico is the 12V DC power input jack, and the PS/2 keyboard and mouse ports. To the left is the VGA circuitry and video output connector, SD Card and Audio input/output jacks. To the far left are four expansion slots for adding upgrades to your Neotron Pico. The Board Management Controller is the is just below-right from the Raspberry Pi Pico and the Power Supply runs along the right-hand edge of the board. In the middle is the IO controller chip and below that the Real Time Clock and its CR2023 coin-cell backup battery. Along the bottom edge are the PC case connectors, for the power button, power LED, hard drive LED and so on. Don't worry if you don't have a PC case, we've also included LEDs and buttons on-board which you can use instead.

We recommend your Raspberry Pi Pico has header pins, and if so, you should fit matching 2.54mm header sockets to your Neotron Pico. These are usually not included in the kit and should be ordered with your Raspberry Pi Pico. If you don't want to use header pins and sockets, you can solder the Raspberry Pi Pico straight down to your Neotron Pico, soldering each of the castellated edges.

You board has some pins marked "TPxxx". These are test points, and are connected to *GND*. You can solder a U-shaped bent cut-off capacitor leg here to each of these if you like, to give your oscilloscope ground-lead something handy to connect to if you ever need to probe the board. Or you can leave them empty.

## My board has some parts missing!

There are some "Do Not Fit" components on your Neotron Pico, so if you ordered it with surface-mount parts already assembled, do not be alarmed if some pads look empty. These are:

* R404 next to the VGA connector. You could add a 0 ohm resistor here to tie the VGA cable shield to ground if you have issues with video noise.
* JP401, JP402, JP403 and JP404. These are for bypassing the TPD7S019 ESD protection chip (U402) in case you couldn't get hold of one and don't have it fitted.
* C901/902/903/904/905/906. These are for slew-limiting signals on the SPI bus. If you have EMC issues, you can replace the matching R90x 0-ohm resistor with a higher value, and fit a small capacitor to the C90x pads. Consult an EMC engineer for further details.

If any other pads look empty, maybe the PCB assembler didn't have the relevant component in stock. Have a look in the kit - maybe it's been included for you to fit yourself. And do look carefully, as some are quite small. It's probably been stuck to something with sticky tape so it doesn't get lost. In particular, Serial Numbers JP00011 to JP00040 are missing U401 (the RGB video buffer), and it's been taped to the top of the Triple 3.5mm audio jack.

## How to solder

The Neotron Pico kit does assume you can solder at an intermediate level. If you need guidance on soldering (especially any of the smaller surface-mount parts) there are many excellent guides online or on YouTube.

## The Interactive Bill of Materials

The best way to fit the components to your PCB is to use the Interactive Bill of Materials (also known as the IBOM). This is a web-page with a diagram of the PCB and a list of all the components. As you click a component it is highlighted on the PC. Conversely, if you click on the diagram, the relevant component is highlighted in the table. Do ensure you click the *"Sourced"* checkbox when you have determined you have the part in stock, and that you click the *"Placed"* checkbox when the component has been fitted. If your PCB was supplied with some parts already fitted, tick those off now.

## But what order should I fit things in?

The general rule is to fit the parts with the lowest Z-height first (i.e. the flat ones, that stick out the least). This means if you flip the PCB over to solder on the underside, you won't have a tall component preventing the board from lying flat and causing the component you are currently trying to solder to fall out of its hole. A suggested order is:

* All surface mount components
* Short-circuit JP1201 *or* JP1201
* If you have a DS1307 short JP1201 to give it 5V
* If you have an MCP7940, short JP1202 to give it 3.3V
* The SD Card Socket
* The 28-pin DIP socket
* The DC Input jack
* The 22uH Inductor, PTC fuse and electrolytic capacitors
* The PSU module
* The Raspberry Pi Pico (if you want to solder it straight to the board)
* Any 2.54mm pin headers and jumpers
* Don't worry about J906, J907 and J908 - they're just for debugging/testing/probing
* Ensure you leave out pin 8 on the J802 PC case audio connector, as most cases have a blank position on the mating connector to make sure you can't put it in backwards. Pin 8 is the top row, one in from the right; if you look carefully it's the only pad on that 10-way header that doesn't have a PCB trace running to it.
* Any 2.54mm pin sockets (e.g. for the Raspberry Pi Pico, if you didn't solder it down directly earlier)
* The MCP23S17 chip
* The Expansion Connectors
* The VGA Connector
* The Triple 3.5mm audio connector
* The PS/2 connector

## Programming the BMC

The Board Management Controller (BMC) is responsible for controlling power and reset signals. If it hasn't been programmed, the power button won't work. Also, the power LED won't light up. If you apply 12V DC power and the power LED blinks, then the BMC has been programmed already and you should be OK (unless you want to update the firmware).

1. Get the firmware from <https://github.com/Neotron-Compute/Neotron-BMC/releases>. You want `neotron-bmc-pico`.
* Or you can clone the source code and build it by following the instructions.
2. Rename the file `neotron-bmc-pico.elf`
3. Ensure you have the Rust Programming Language installed (see <https://www.rust-lang.org>)
4. Install the `probe-run` tool:

```console
$ cargo install probe-run
```

5. Connect your Arm Serial Wire Debug probe to J1001, the BMC programming header.
* If you have 12V DC power to the board, the 3.3V pin will be live and should be treated as an output - connect it to the VTref pin of your programmer if it has one.
* If you do not have 12V DC power to your board (maybe you haven't fitted any of the through-hole parts yet), you can inject 3.3V power here if you are careful. This will reverse-power the 3.3V standby regulator, but it seems to survive (at least for short periods of time).
6. Run `probe-run --chip STM32F030K6Tx ./neotron-bmc-pico.elf` and ensure it completes successfully and prints some log messages from the chip. If there are any errors, investigate.
7. Disconnect the Arm SWD programmer and remove any power from the board.
8. Apply 12V DC power to the board and observe that the Power LED is blinking.
9. Tap the ON/OFF button and observe the Power LED is now on solidly.
10. Check the 5V and 3.3V rails with a multimeter.
11. Hold the ON/OFF button and observe the Power LED returns to blinking.
12. Check the 5V and 3.3V rails - they should fall to 0V.

## Programming the Raspberry Pi Pico

1. Do a `git clone` of the firmware at <https://github.com/Neotron-Compute/Neotron-Pico-BIOS>.
2. Ensure you have the Rust Programming Language installed (see <https://www.rust-lang.org>)
3. Install the `probe-run` tool (if you didn't do it earlier):

```console
$ cargo install probe-run
```

4. Connect 12V DC to your board and press the ON/OFF button (if the BMC isn't programmed, do that first).
5. Connect your Arm Serial Wire Debug probe to the SWD pins of the Raspberry Pi Pico.
6. Run `cargo-run --release` and ensure it completes successfully and prints some log messages from the chip. If there are any errors, investigate.
7. Check you have some output on the VGA connector.

The Neotron Pico BIOS usually includes some version of the Neotron OS, but at the time of writing (November 2022) it's at a very very early stage so it may not do much beyond displaying some text.

Time to learn Rust and get hacking on the BIOS and the OS! That's what the Neotron Pico is all about.

## I don't have an Arm SWD Debug Probe

You can make one out of a Raspberry Pi Pico. See <https://github.com/rp-rs/rp2040-project-template/blob/main/debug_probes.md> for more details.

## Connecting up a PC Case

You can connect the power and reset buttons of a standard ATX case to the relevant pin headers (J1002 and J1003). You also connect an 8 ohm speaker to J1006, and the Power and HDD LEDs to J1005 and J1004.

If your case has AC'97 audio jacks, you can connect the header to J802. Hopefully you left out pin 8, as directed above, otherwise the cable from your case may not fit. Don't force it!

## Not using a PCB Case

Either fit brass stand-offs to each mounting hole (using an M3 machine screw, and don't over-tighten), or fit some sticky rubber feet to the underside of your PCB. Otherwise your Neotron Pico may scratch your desk, and may be shorted-circuited if you accidentally place the PCB on top of something conductive.

Also, you should fit two jumpers to the J802 header - one across pins 5 and 6 and another across pins 9 and 10. This will allow audio to reach the rear audio jacks, even though you don't have a PC case fitted.

```text
+-----+-----+-----+-----+-----+
| | |+---+| |+---+|
| 2 | 3 || 6 || X ||10 ||
| | || || || ||
+-----+-----+| |+-----+| |+
| | || || || ||
1 | 4 || 5 || 7 || 9 ||
| | |+---+| |+---+|
+- --+-----+-----+-----+-----+
^^^ ^^^

```

## Something's not working!

If you paid a commercial company some actual money for your Neotron Pico, in which case ask whoever you bought it from. Don't let businesses selling commercial products fob you off with 'community' support from the volunteers - they're making a profit from our open source work, so they can afford to help you themselves in the first instance.

To chat with the developers and other users, jump in the Matrix Chat and ask nicely. Don't forget, we're all volunteers here, but we like to help people out as much as we can. Just visit <https://matrix.to/#/#neotron:matrix.org> - you can use Element in your browser, so there's nothing to install, but you will need to create an account. If you have some Embedded Rust questions, you could try the `#rust-embedded` and/or the `#rp-rs` Matrix chat rooms.

If you think something's wrong with the design, please do open a Github Issue at https://github.com/Neotron-Compute/Neotron-Pico/issues.

1 change: 0 additions & 1 deletion Kicad/bmc.kicad_sch
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,6 @@
)
)


(junction (at 143.51 36.83) (diameter 0) (color 0 0 0 0)
(uuid 0d9b3050-705c-42cf-a239-c8d08851c730)
)
Expand Down
6 changes: 0 additions & 6 deletions Kicad/io_exp.kicad_sch
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@
)
)


(junction (at 155.575 82.55) (diameter 0) (color 0 0 0 0)
(uuid 0874517d-9004-4861-8da5-2f4d5eef2644)
)
Expand Down Expand Up @@ -1292,11 +1291,6 @@
(uuid ff1df48d-cfc0-4b11-ba4d-e182ff8debd2)
)

(text "We use the MCP23S18 here, because\nyou can buy it and the S17 is out\nof stock everywhere. Either will\nwork fine.\n\nThe S18 has open-drain outputs, but\nevery output here is either pulled-up,\nor is a low-side switch."
(at 66.04 126.365 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
(uuid 10ece55f-24b0-4d8d-8f73-1079d9fdfcdf)
)
(text "When ~{OUTPUT_EN} is inactive (high)\n~{CSx} are all driven inactive (high)."
(at 213.36 111.125 0)
(effects (font (size 1.27 1.27)) (justify left bottom))
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ The Neotron Pico can retain time/date settings when fully powered off, using a R

### I/O Expander

* MCP23S17 or MCP23S18 SPI to GPIO expander (DIP)
* MCP23S17 SPI to GPIO expander (DIP)
* 74HC138 3:8 decoder (SOIC-16)
* Five debug LEDs
* Eight Chip-Select outputs (active low)
* Eight IRQ inputs (active high or active low)

Because we used so many pins on the Pico for Audio and Video, we don't have enough pins to use for _Chip Select_ lines. Each device we wish to communicate with on the SPI bus must have a unique chip select line and so have limited lines means we could only have a limited number of SPI devices.

However, in this design, we cheat and use a Microchip MCP23S17 I/O expander. This is an SPI peripheral with 16 GPIO pins that can be controlled by sending it commands over SPI. It also has an IRQ output which be programmed to fire when the input pins match a certain state. The MCP23S18 (with open-drain outputs) will also work.
However, in this design, we cheat and use a Microchip MCP23S17 I/O expander. This is an SPI peripheral with 16 GPIO pins that can be controlled by sending it commands over SPI. It also has an IRQ output which be programmed to fire when the input pins match a certain state. The MCP23S18 (with open-drain outputs) will *not* work - it has a different pinout.

The problem would come when the Pico has finished talking to our select SPI device - how does it tell the MCP23S17 to release the current chip select, without the SPI bus traffic also going to the currently selected expansion slot? We resolve this by using a simple 8-bit decoder/buffer with an enable pin. This allows the Pico to disconnect all of the chip select signals at once, regardless of the output of the MCP23S17. Once this is disabled, we know we are talking to only the MCP23S17 and the Pico can command it to select the next chip select of interest to us.

Expand All @@ -244,8 +244,8 @@ Interrupts are also processed through the MCP23S17. We configure the device to p
| | | | | | | | | | | |
| | | | | |----/CS6---------+ | | | | | |
| Pico | | MCP23S17 | | | | | | | | | |
| | | or | | |----/CS7-----+ | | | | | | |
| | | MCP23S18 | +-----+ v v v v v v v v
| | | | | |----/CS7-----+ | | | | | | |
| | | | +-----+ v v v v v v v v
| | | | +---+---+---+---+---+---+---+---+
| |--/IOCS--->| | | S | S | S | S | S | S | S | S |
| |<---IRQ----| | | l | l | l | l | l | l | l | l |
Expand Down Expand Up @@ -470,7 +470,7 @@ If you want to order bare boards, it is designed to be hand-solderable. That's w

| Part | Footprint | Size (mm) | Pitch (mm) |
|:---------------|:---------:|:---------:|:----------:|
| MCP23S18 | DIP-28 | 36x7.6 | 2.54 |
| MCP23S17 | DIP-28 | 36x7.6 | 2.54 |
| Jellybeans | 0805 | 2.0x1.2 | N/A |
| Transistors | SOT-23 | 3.1x1.4 | 1.80 |
| 74HC138 | SOIC-16 | 3.9x9.9 | 1.27 |
Expand Down