DMX512 to Analog Voltage Converter (Version 1.12, December 31, 2001) Contents 1. General Description 2. PIC Microcontroller 3. RS-485 Differential Receiver 4. BCD Input Switches 5. Status LEDs 6. Relay Outputs/Option Switch 7. Digital to Analog Converters 8. DAC Reference Voltage 9. Channel Output Buffers 1. General Description 1.1 The circuit presented here implements a DMX512 to analog voltage converter. 2. PIC Microcontroller 2.1 The heart of this DMX receiver is a Microchip PIC16F876 microcontroller. The 16F876 was chosen for primarily two reasons. One, it has a built in UART; and two, the UART is capable of receiving 250 kbps with no speed error (@ 20 MHz). 3. RS-485 Differential Receiver 3.1 This RS-485 transceiver (75176B) provides the necessary conversion from the RS-485 voltage specification to a standard TTL level. This signal is connected to the PICs UART receive data input (pin 18). 4. BCD Input Switches 4.1 BCD Switch Decoding PIC Output BCD Switch Common ------------------------------------ Port B, pin 6 Start Address Hundreds Port B, pin 5 Start Address Tens Port B, pin 4 Start Address Ones BCD Switch PIC Input Input ---------------------------- Binary 1 Port B, pin 0 Binary 2 Port B, pin 1 Binary 4 Port B, pin 2 Binary 8 Port B, pin 3 4.2 DMX Start Address Switches 4.2.1 These three BCD switches provide input for setting the starting DMX address. 5. Status LEDs 5.1 Data Received LED 5.1.1 This signal is provided by output RB7 (pin 28). 5.1.2 This LED illuminates anytime a DMX signal is being received. 5.2 Hardware Overrun LED 5.2.1 This signal is provided by output RC4 (pin 15). 5.2.2 This LED will illuminate if data is being received faster than the hardware UART is configured to handle. During normal program execution this LED should never illuminate. 5.3 Software Overrun LED 5.3.1 This signal is provided by output RC5 (pin 16). 5.3.2 This LED will illuminate if data is being received faster than the interrupt handler/main program loop can handle. During normal program execution this LED should never illuminate. 6. Relay Outputs/Option Switch 6.1 Relay Outputs 6.1.1 These signals are provided by outputs RC0 and RC1 (pins 11,12). 6.1.2 These outputs are for future use. At the present time, they provide a logic high when a DMX signal is being received, logic low otherwise. 6.2 Option Switch 6.2.1 This signal is present on input RC2 (pin 13). 6.2.2 This switch is read upon reset of the PIC. If this signal is at logic high, then the data received in the DMX data stream is sent to the DACs "as is". This results in a linear relationship between the DAC output voltages and DMX dimmer values. If this signal is at logic low, then the data received is complemented before it is sent to the DACs. This results in an inverse relationship between the DAC output voltages and DMX dimmer values. 7. Digital to Analog Converters 7.1 The digital to analog conversion is provided by a pair of Analog Devices DAC8800s. Each DAC8800 provides eight outputs, thus bringing the total number of channels to sixteen. 7.2 DAC/PIC Interfacing 7.2.1 Clear 7.2.1.1 The clear pins (pin 12) of both DAC8800s are tied together and are driven by output RA0 (pin 2) of the PIC. 7.2.2 Clock 7.2.2.1 The clock pins (pin 9) of both DAC8800s are tied together and are driven by output RA1 (pin 3) of the PIC. 7.2.3 SDI 7.2.3.1 The serial data in pins (pin 8) of both DAC8800s are tied together and are driven by output RA2 (pin 4) of the PIC. 7.2.4 Load 7.2.4.1 The load pin (pin 13) of the first DAC8800 (channels 1-8) is driven by ouput RA5 (pin 7) of the PIC. 7.2.4.2 The load pin (pin 13) of the second DAC8800 (channels 9-16) is driven by ouput RA3 (pin 5) of the PIC. 8. DAC Reference Voltage 8.1 The voltage reference provided to the DAC8800s is obtained from a resistive voltage divider and buffered by an Analog Devices OP284 operational amplifier. The same voltage reference is provided to both DAC8800s. Use of other op amps (less expensive) is possible. Use of these was due to samples on hand. 9. Channel Output Buffers 9.1 The outputs from each DAC channel are routed through an Analog Devices OP484 operational amplifier. This op amp buffers the DAC output and provides the DAC with a high impedance load. Use of other op amps (less expensive) is possible. Use of these was due to samples on hand. Copyright (c) 2001 by Kelly J. Kohls All rights reserved