uTracer 3+ Upgrade Part 2: Design Overview

All of the design files for this project can be found at my github

The Idea

The concept for this design was to create a carrier PCB to which the uTracer can mount to and pass signals and power. This carrier board contains all of the switches/encoders/displays/micro controller/etc necessary for the user interface to function.

The next two images of the carrier pcb and the assembly inside the enclosure will hopefully make this a bit more clear.

Carrier PCB Top Side. Dashed line shows uTracer PCB outline.

 

The Circuit Design

Describing the design will best be completed with the use of a block diagram. This circuit doesn’t have a lot of interconnected analog circuits so it works well inside a block diagram. Although the image is a bit crowded, the overall circuit is pretty simple.

Lets step through the main sections and look at the details.

The main uTracer Board

At the heart of the design is the main uTracer PCB. Since my carrier board is designed to interface with this board, the majority of design around this portion of the circuit was dedicated to how to pass signals between the boards. The layout of the uTracer board was not completed with board to board connections in mind so I had to use some non-conventional connection methods. In the end, I opted to place a handful of single pin headers at each location that signals needed to be passed.

This method of connection is not very elegant or professional but since this was a one off design I figure it was fine. The uTracer board does not need to be removed once it is installed on my carrier board so this style of connection would get the job done without much trouble. In an ideal design, the uTracer would actually be a part of the board to make a single board design.

On my carrier board I placed through-hole pads underneath where the uTracer would mount to. Female headers were populated in all of these holes and male headers were installed on the bottom side of the uTracer such that the whole board simply plugs into the carrier board.

The signals that are passed between boards are:

  • 19V
  • 5V
  • Ground
  • TX
  • RX
  • Grid
  • Screen
  • Cathode
  • Anode
  • Heater 1
  • Heater 2
  • A handful of signals for the grid loupe

At this point I think it is worth mentioning the Grid loupe circuit since I have yet to do so. This circuit is an “add on” circuit that came as a bit of an upgrade afterthought from the original uTracer designer. This circuit allows the user to measure a few things that were outside of the original scope of the uTracer such as grid current and positive grid voltage effects. You can read more about it here. I have included the grid loupe circuitry on my carrier board and will discuss it in a future post. For now we will ignore it.

The uTracer board receives 19V from the power input and converts this to 5V (along with other voltages) which it uses on board for its pic microcontroller and a few other small things. The 5V uTracer voltage is sent back down to my carrier board to be used in the USB circuit which we will discuss next.

 

THE USB COMMUNICATION CIRCUIT

The microcontroller on the uTracer board communicates via a UART protocol using the TX and RX lines. To connect this to the outside world, I utilized an FT230X USB to UART bridge IC. This IC can appear as a virtual COM port on a PC once all the appropriate drivers are installed and makes communicating serially from your project to a PC very easy. The IC does all of the heavy lifting of converting serial data sent over the USB standard back into convenient transfer and receive signals that microcontrollers use.

The schematic below shows the USB input circuit. This is nearly a direct rip from one of the examples in the FT230X datasheet. I wanted to have the FT230X powered from my circuit as opposed to the USB input so I configured the power input to come from the 5V that is generated on the uTracer board and sent back to the carrier board.

This 5V power rail is labeled as UT_5V on the schematic and is connected to the power pin of my FT230X (pin 12 of U14). This 5V rail also provides power for two LEDs that indicate when transfer and receive signals are present. Having these LEDs is a great tool for diagnosing issues but are also nice for identifying when the uTracer is actively communicating with the pc.

U16 is a USB input signal protection IC. The part number is IP4234CZ6,125. Strictly speaking, this part is not necessary for the circuit to function but it does provide protection against potentially damaging transients so I typically include it in my USB circuits.

The two lines FT_RX and FT_TX are the output communication lines from the FT230X. Both of these lines are sent back up to the uTracer via pin headers and connect directly to the pic microcontroller.

 

 

THE POWER SUPPLY

The power supply within the project is not very interesting and is pretty stock so I will not go into too much detail. It is shown here mainly for completion.

The supply input is coming from a 19V laptop power supply and is converted sequentially to 12V and 3.3V rails. The 12V rail is used to power all of the relays, and the displays and is generated from a small, 3 pin switching power supply. The part number for this supply is VXO78012-1000. I opted to use a small switching supply first to handle the heat load and second because the part I found was small and relatively inexpensive.

A voltage regulator could have been used in this situation, however there is one large disadvantage to doing so. If a regulator was used, it would have to burn up all of the voltage from 19V down to 12V as heat. If the case happened that all of the segments of each displays turned on and all of the relays turned on the current demand on the 12V rail could be upwards of 1.37 amps!

Calculating the heat requirements a regulator would be required dissipate:

(19-12)*1.37 = 9.95 Watts

This is without even considering the draw of the 3.3V circuitry and ideal input power! Of course this situation should never happen but it is worth considering in case something goes very wrong or even the case where the processor has yet to be programmed and its pins are in unknown states. Standard operating condition would have 6 relays or so active and somewhere around 35 segments of the displays active. This ends up being a load of around 420mA. Even in this case the power dissipation would be:

(19-12)*.42 = 2.94 Watts

This is far too much power to burn as heat and I did not want to go about designing a cooling method for handling this. Because of this I opted to go with a switching power supply to get the voltage down to 12V. This switcher has been tested with nearly all of the displays fully active and most of the relays actuated. Although it does get a little warm it handles the heavy loads with no issues and does not warrant any special cooling.

 

The processor

The brains behind the uTracer upgrade is an STM32F373C8T microprocessor. This processor was mainly chosen for its large amount of i/o pins and ease of use.

As can been seen in the schematic above, there is not much happening in the processor hardware. Aside from a power reset detection IC (U20 – part number STM1061N31W6F) this is a very common microprocessor schematic. For the main clock oscillator I chose a 16 MHz crystal. This was chosen as it easily multiplies to 72 MHz which is what I selected for my main clock speed. 72 MHz is way overkill for a project such as this but a little extra current draw from the processor is a fine price to pay as my coding skills are not amazing. A little extra speed can help when the processor has to execute my strung together code.

The majority of signals passing to and from the processors are switches and rotary encoders. To keep all of the signals organized I used the following naming rules:

  • Switches <pin number> – S
  • Rotary encoders <pin numbers> – A or B for both signals from the rotary encoder.

In addition to the switch and encoder signals, SPI signals were configured for pins 18,19, and 20. These were labeled 595_CLK , 595_DAT, 595_LAT. We will discuss their connection in the next section.

Programming of the STM32 was completed via a SWD connection over a standard 0.1″ pitch pin header. This programming header is labeled as H1 on the schematic block.

The last thing to note is the 10K resistor on the boot pin connected to ground. By grounding this pin, the processor will boot into flash memory upon power up. For a project like this where the processor only needs programmed once this boot method is all that is needed.

 

The Rotary ENCODERS

The 9 rotary encoders are part number PEC12R-4115F-S0012. These encoders are a 12 pulse per revolutions with quadrature output and a push switch. The schematic above is repeated 9 times, once per encoder and was pulled directly from the datasheet. The two quadrature signals (in this case 1-A and 1-B) were pulled up to 3.3V via a 10k resistor. The signals pass through a 10k/0.01uF filter to help debounce the signals before terminating at the processor.

The Displays and Relays

The circuity that controls both the relays and the seven segment displays are very similar and can be discussed together.

Display Circuit
Relay Circuit

Each of the above schematic sections are repeated 9 times.

With 54 relays and 9 seven-segment displays, the design needs a total of 117 output control signals. This is a lot more signals than most micro controllers have available without being very large or very expensive. With all of the encoder and switch inputs, most of the pins on the STM32 processor were taken to service inputs. To expand the output control I  used a series string of shift registers to control the relays and displays. I chose to use an 8 bit shift register (74HC595) mainly because I have used it before and already had a schematic symbol and layout footprint already created.

These shift registers take in serial SPI data from the processor and apply it to their 8 individual outputs. Each shift register can be connected in series to increase the total number of output pins under control. This allows the processor to use only a few of its output pins to control a much larger number. The trade off for doing this is that the data has to be shifted out sequentially one bit at a time. In my processor running at 72 MHz, this is no issue.

The image below shows the connection scheme for the display and relay circuits to the processor SPI communication lines.

The first shift register in the pin 1 relay circuit receives data directly from the processor. The output from this register is connected to the data input of the next shift register in the pin 2 relay circuit. Each of the registers are cascaded one by one through the 9 relay circuits and then through the 9 display circuits. Since these registers are 8 bits each, the entire line of registers is a total of 144 bits. Stringing these registers together gives the uTracer the ability to control any relay or any display segment by simply writing 144 bits over SPI.

Each of the shift registers in the schematic sections have their outputs connected to a ULN2003 driver. This IC contains 7 darlington transistors that are used as switches to activate the relays and displays. In the case of the relay circuits, 6 of the transistors within the ULN2003 IC are connected to the coils of the relays that in turn connect to the uTracer test signals (anode, screen, cathode, etc). By writing to the shift register for each circuit section, the relays can be controlled individually.

In a similar way, the display circuit controls the individual leds within the seven segment displays.

Next

Now that we have a general idea of the separate circuits within the design and their use, we can begin to look at how the code within the processor bring everything together.

Leave a Reply

Your email address will not be published. Required fields are marked *