PIC18F Based 6 Channel DMX Transmitter

Summary of PIC18F Based 6 Channel DMX Transmitter


This article details a DIY 6-channel DMX transmitter built around the PIC18F24J10 microcontroller. Designed to test DMX-controlled lights without address adjustments, the project uses assembly language and features six analog channels controlled by potentiometers. It allows for adjustable starting addresses via a DIP switch and connects to an RS-485 bus using a SN75176 transceiver. The device operates on 3.3V logic for the microcontroller and 5V for the oscillator and transceiver, constructed point-to-point on a perfboard.

Parts used in the PIC18F Based 6 Channel DMX Transmitter:

  • PIC18F24J10 Microcontroller
  • SN75176A RS-485 differential bus transceiver
  • 28 pin socket (x2)
  • 8 pin socket (x2)
  • 10 position DIP Switch
  • 3.3v linear regulator (TO-220)
  • 16 mhz Crystal Oscillator
  • 6 slide or dial Potentiometers
  • Female XLR connector (panel mount)
  • Male XLR connector
  • Resistors: 10k, 100 ohm, 120 ohm, 10 ohm
  • Capacitors: 10uF low ESR, 1uF electrolytic (x2), 0.1uF disc
  • Perfboard
  • Solid strand wire
  • 5v @ 500ma PSU
  • DC Power Jack (2.1mm)
  • RJ45 jack (for ICSP)

PIC18F Based 6 Channel DMX Transmitter

Based on AN1076 – “Using a PIC® Microcontroller for DMX512 Communication”. Modified and added to Microchip’s code to use 6 AdC Channels for 6 channels of DMX data and the ability to offset its starting address via a 9-position DIP switch.Designed to demonstrate a simple DMX transmitter and to test DMX Controlled lights without having to adjust their address or change anything in a prepared show if using DMX Software and USB DMX device.

It is written in Assembly and utilizes a PIC18F24J10. A bit odd as it’s voltage input is 3.3v and it requires a low ESR capacitor to ground on one of its pins. I am sure the code could be modified to work on any 18F PIC with a EUSART.

There is no PCB layout, it is easy enough to construct point to point on perfboard.

Please Take a look at AN1076  From Microchip and the PIC18F24J10 Datasheet.

I apologize about my images as my camera decided to crap out with this and another project worth of images on it, so I did my best to recover and recreate them.

*UPDATE:
V2 – Updated the schematic to show the potentiometer hookup.
V3 – PIC Transmit pin was hooked up to the wrong pin on the SN75176, fixed, should be pin 16 on the PIC connected to pin 4 on the transceiver. A pretty big mistake, sorry to anyone that got screwed up by it.

DISCLAIMER: Not responsible for any damage or injuries resulting from this instructable. Damage to DMX Devices is possible if this transmitter is not built correctly.

DMX Transmitter

Supplies

Parts:  (all ICs are DIP spacing)
– 18F24J10
– SN75176A – RS-485 differential bus transceiver
– 28 pin socket
– 8 pin socket
– 10 position DIP Switch
– 3.3v linear regulator, TO-220
– 16 mhz Crystal Oscillator – I used ECS-2200BX-160
– 8 pin socket
– 28 pin socket
– 6x slide or dial Potentiometers
– Female XLR, i use panel mount
– Male XLR, not really needed
– 2x 10 1/4w resistor, R3 & R5
– 100 ohm 1/4w resistor, R2
– 120 ohm 1/4w resistor, R4
– 10kohm 1/4w resistor, R1
– 10uF low ESR cap, less than 5 ohm, but most caps can still work,C1
– 2x 1uF electrolytic capacitor, C3 & C4
– 0.1uF disc capacitor, C2
– Perfboard
– Solid strand wire
– 5v @ 500ma PSU
– DC Power Jack, I used a 2.1mm that matched my 5v power supply. Buy PSU with Matching Jack
-Enclosure, or parts to build one. Tools:
– Solder
– Soldering Iron
– Pliars
– Diagnal Cutter

Layout the Board

Perhaps the hardest part is laying out the circuit board. You have to consider where some things have to be, like the slide potentiometer, DMX receptacles, power jack, DIP switch ect. The RJ45 jack is for ICSP and is not necessary.My slide pots had a 1.75″ track and I spaced them 0.75″ apart. Overall it is 4.5″ x 4″ x 1.5″ high in the back and 0.5″ high in the front. I chose the odd shape because I did not want to panel mount anything, I wanted all the components attached to the PCB.

I don’t think my layout is optimal. The DIP switch is in an awkward spot which caused a bit of problems when building the enclosure. But overall it is quite small, which was the idea.

Start Point to Point

There are many ways to go about this, which I am not covering here but with the board laid out in a reasonable fashion it shouldn’t be to difficult. I usually start with the power traces and work my way out from there. I always avoid crossing to jumper wires over eachother, even though they should be insulated, but it is unavoidable sometimes. Just make sure that both wires insulation is fully intact.
Schematic DMX Transmitter
Make sure that the potentiometer have their voltage hooked up right so the correct direction is value up or down. In my case the pot’s contacts on the bottom of the board was hooked to negative and other end to positive, so when the pots were slid upwards towards the PIC, it increased the DMX value. I did it wrong first and had to go back and fix it. The pot’s center should be connected to the PIC pin, the other to 3.3v(not 5v) and ground.- The Oscillator and the SN75176 require a 5v input and the PIC requires 3.3v.

– Most 3.3v regulators have a different pinout than a 7805, so make sure and find out.

– The male XLR receptacle is not required or is the ICSP jack.

Quick Solutions to Questions related to PIC18F Based 6 Channel DMX Transmitter:

  • What is the primary function of this project?
    To demonstrate a simple DMX transmitter that tests DMX controlled lights without adjusting their address.
  • Can this code work on other PIC microcontrollers?
    The code could be modified to work on any 18F PIC with an EUSART.
  • How is the starting address adjusted?
    The starting address can be offset via a 9-position DIP switch.
  • Does the PIC require a different voltage than the transceiver?
    Yes, the PIC requires 3.3v while the oscillator and SN75176 require a 5v input.
  • What type of capacitors are required for the PIC?
    A 10uF low ESR capacitor with less than 5 ohm impedance is required on one of its pins.
  • Is a PCB layout provided for this build?
    No, there is no PCB layout; it is designed to be constructed point to point on perfboard.
  • What is the purpose of the RJ45 jack mentioned?
    The RJ45 jack is for ICSP and is not necessary for operation.
  • Which pin on the PIC connects to the transceiver?
    The PIC Transmit pin should be connected to pin 16 on the PIC and pin 4 on the transceiver.
  • How are the potentiometers wired for correct value direction?
    The pot center connects to the PIC pin, one end to 3.3v, and the other to ground.
  • What tool is needed to build the enclosure if not using a pre-made one?
    You need parts to build an enclosure along with solder, a soldering iron, pliers, and diagonal cutters.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter