I’ve populated my new PCB with components and after a bit of fiddling, I’ve run a test on it and everything appears to work.
The board has a few problems that had to be patched over, including:
- A missing trace (jumper added)
- Switches damaged during soldering (replaced)
- Pins bridged by solder (cleaned up)
- Poor soldering of one IC socket which shifted while soldering (resoldered)
- Incorrect footprint for MOSFET (installed rotated with extra solder to make connections)
- Incorrect footprint size for several resistors (removed solder mask to extend pad)
- K and L signals don’t work because of special pins on processor (solution TBD)
Given all that, the board operated properly. The cycle sensor works, none of the channels are crossed or swapped, and it communicates properly through the USB to my laptop.
My next job is to solder on the connectors for the pneumatic valves and install the board on the valve bodies. It will need a new flag for the optical cycle sensor because its orientation has changed. This will point out any other errors, in particular swapped channels where, for instance, the laptop wants the N channel on, and the N channel LED lights, but some other air passage actually gets the air. I hope I don’t have any such mistakes because laying out the PCB traces for this part was really tedious.
For the problem with the K and L signals, it turns out that the pins I had selected for these signals can only be operated in open-drain mode. Most of the output pins can either force to ground (“0” output) or to the logic “1” voltage (about 3 volts in this case). However, an open-drain output has the choice of forcing to ground for a 0, or letting the pin float to whatever voltage the rest of the circuit tries to put it to. For this to actually generate a 1-level voltage requires a resistor connecting the pin to the +3.3V supply so when the processor pin stops forcing it to ground, it will go to a voltage that indicated a logic 1.
I have three ways to work around this:
- See if the processor’s internal “weak pull-up” is strong enough to do the job
- Use two other pins on the processor for these signals
- Add pull-up resistors to these two signals
The first solution is only a software change, so would be preferable if it works. The other two solutions ultimately require PCB design changes, though they can also be patched on the existing board for testing. Changing the pins is a more elegant fix, but requires more extensive PCB changes.
There are also other changes I want to do:
- Change the resistor value on the LED’s as they are too bright
- Switch from mini-usb to either micro or original type-A connector
- Give the firmware on the board a way to read a hardware revision number
- Add product identification graphics to the board
None of these are critical to operation of the board, however.
Update: There is no soft-selectable pull-up or pull-down capability on the I2C-capable PIO ports, so a hardware solution will be required.
As far as patching the existing PCB is concerned, either change is equally difficult, but I’ll probably go with using the two unassigned processor pins. This requires patching two fine wires onto the PCB and cutting two traces.
Before going to this trouble I’ll be connecting up the pneumatics and trying it out live. There is little point patching a PCB that otherwise would need replacement.