PIC Multiboard

In order to drive different prototype power electronics converters, a custom microcontroller board was designed, using the Microchip dsPIC30f4011. The functions of the board:

  • Three PWM output pairs
  • Two variable analog inputs ousing trimmers
  • Five external inputs (analog or digital) or outputs
  • Two input switches
  • Four buttons
  • Two seven segment displays
  • MCLR button
  • ICD programming input
  • Power on LED

pic

 

The board was designed using Altium Designer. The schematic of the board is shown below, together with the final PCB.

Multiboard schematic

Multiboard board

The programming of the microcontroller was done with Mplab. In the source code, you can view the pinout of the microcontroller, as well as the loaded firmware. The microcontroller is programmed to output a PWM signal of 50kHz, or 100kHz, depending on the state of Switch1. Button1, 2 increase/decrease the duty cycle by 10% (uplimit is 90%), whereas buttons buttons 3, 4 increase/decrease the duty cycle by 1%. The duty cycle is displayed decimally in the 7-segment displays. Switch 2 bypasses the buttons and the duty cycle is controlled via trimmer1. Again the duty cycle is displayed. Two LS47 are used to drive the displays and a latch is used to isolate the microcontroller and the PWM outputs.

You can download the source code here. The detailed schematic of the board can be downloaded here.

Hardware mapping:
Input:
Button1: RC15 (pin14), pressed=5V
Button2: RC14 (pin16), pressed=5V
Button3: RC13 (pin15), pressed=5V
Button4: RE8 (pin17), pressed=5V
Switch1: RD3 (pin19), ON=5V
Switch2: RD2 (pin22), ON=5V
Trimmer1: AN0 (pin2)
Trimmer2: AN1 (pin3)
Analog Input: AN2-6 (pin4-8)
Output:
Display1: RB7(pin9), RB8(pin10),RD0(pin23), RD1(pin18), DP:RF6(pin24, ON=0)
Display2: RF5(pin27), RF4(pin28), RF1(pin29), RF0(pin30)
PWM: 1L/RE0(pin38), 1H/RE1(pin37), 2L/RE2(pin36), 2H/RE3(pin35), 3L/RE4(pin34), 3H/RE5(pin33)