Henne’s DMX transceiver
Date: June 29, 2009 | CommentIf you’ve visited my automated Christmas lights page, the letters DMX won’t be unfamiliar to you. For those too lazy to click, it’s an electronic lighting protocol. Two wire. Used extensively in stage shows. And, in recent months, adopted by the DIY Christmas lighting community.
So, I’m working on an idea (I’ll post more when I get closer to the finish) that I want to add to my Christmas lights show, and it therefore needs to talk DMX. Numerous previous postings here will tell you that would mean I’d need to do this on an Atmel chip. Though there are a lot of DMX projects done on Microchips (PICs), fewer have been done on Atmels. And pretty much everyone who has done DMX on the Atmel has based some or all of their work on that of Hendrik Hölscher.
Fortunately for those monolinguists among us, Hendrik – who goes by “Henne” – writes in both German and English. He’s also moderately active on one of the Christmas lights forums.
My initial plans were to write my own code to get my idea off the ground; a few months(!) of fiddling around and I was never even able to pull off my main effect, no less receiving DMX.
During that fiddling, I ran across a web site in Germany that sold a bare printed circuit board for Henne’s basic DMX transceiver. It took PayPal, so I bought a couple of boards. And the next time I dropped by Jameco, I took along the bill of materials for the transceiver and bought the parts.
Then life intervened. It wasn’t until earlier this month that I got back on track on this project, which started out with a redrawing of Henne’s schematic. I then wanted to build the circuit on a breadboard. The design requires an external crystal and while I knew of the potential to “brick” the 8515, I didn’t think said bricking would be quite so easy.
So easy, in fact, that I bricked two.
The problem (for me, anyway), was a lack of understanding of terminology. While I’d started out using AVRDude on the command line, I somewhere along the line stumbled across AVRFuses, a Mac application that puts a graphical user interface on top of AVRDude.
Anway, AVRFuses uses the same terminology as FuseCalc and I find (found) both of them to be opaque. Suffice it to say, the 8MHz crystal used in Henne’s design is designated as “Ext. Crystal/Resonator Medium Freq.; Start-up time: 16K CK + 4 ms; [CSEL=1101 SUT=10].”
So, another trip to Jameco and this new-found knowledge (thanks Limor) and I had a functioning 8515.
But not a functioning circuit. The version displayed here clearly shows a ground on Pin 5 of U2, the 75176B, as well as five-volt power to Pin 8. Well, apparently some schematic-drawing programs don’t indicate such niceties and the drawing I was basing my work off of didn’t. So I sat here for almost two days, banging my head against the wall trying to figure out why the breadboarded circuit didn’t work. I wonder if I would have ever figured it out without help.
As Henne says, this is a simple circuit, with virtually all the heavy lifting happening in the software of the 8515. Suffice to say, U2 (the 75176B), an RS485 transceiver, receives the DMX signal and turns it into something the UART on the 8515 can read. The 8515, in turn, processes the signal and outputs it onto pins 32-39 (unless one of the many options is chosen, in which case signals can come out of the J4 Spare port as well).
Henne doesn’t explain why he chose the 8515 – it’s a big chip, taking up quite a bit of board real estate, and it’s not inexpensive (I’m too lazy to look it up, but I’m pretty sure that last winter when I bought the first set of these chips at Jameco, they were $4.50+/-; last week’s purchase they had gone down to $3.50. I just looked them up and at Mouser and Digi-Key, they’re $5.27). But for an eight-channel project (potentially 16-channel) that has DIP-switch control of the DMX start channel (another 10 pins), this really can’t be done in less than a 40-pin chip.
(Oh, and a note on the licensing: I had included my standard Creative Commons, Noncommercial Share-Alike license on the schematic and Henne asked that I remove it. In deference to the original author, I did. None of his schematics have licenses on them and he wrote, “You cannot license the schematic under cc since its based on my schematic / hw where unauthorized commercial production is prohibited. [This is necessary if some companies produce the boards in larger quantities...] I don’t want anyone to get into trouble…” Now you know what I know.)
Using Henne’s “board.hex” testing software, the red LED flashes a steady beat once power is applied; turning on DIP 2 (or, as in my case, shorting Pin 22 to ground), the green LED should light if the crystal fuses are set correctly.
Anyway, I finally got the circuit working on Saturday. Now, to add a couple of sub-circuits and get this idea – which I’ve been working since December 2007 – afloat.

10:29 am on July 6th, 2009
I chose the mega8515 because it was rather cheap (1,80EUR) and has many pins. (The mega8 cost 1,25EUR and has less pins. The TINY2313 has not enough flash mem for many applications.)
best regards,
hendrik
11:28 am on July 6th, 2009
Thanks for the clarification Hendrik. I did realize the issue of the memory differences and should have included them in my post.
\dmc
3:44 pm on November 18th, 2009
Hi,
I’ve built hennes dmx circuit but have never built anything like this before. How do I programme the chip to work in the circuit and what tools will i need to do this? (can it be done by tll)
Have you got it controlling any sub circuits yet?
Thanks in advance,
Andy
3:58 pm on November 18th, 2009
Andy:
Here’s a basic how-to on programming Atmel chips:
http://www.dmcole.net/index.php/taking-the-atmega8-for-an-introductory-spin/
But you should be able to get way more info simply by doing a search for “programming atmel chips” or somesuch.
I was able to get this breadboarded circuit to drive an 8 x 8 set of LEDs, but it didn’t perform the way I wanted it to and for now I have abandoned it.
Best o’ luck.
\dmc
2:53 am on June 19th, 2010
Hello DMC
I like the way you have redrawn Henne’s circuits with the standardized ISP port
I have been interested in building Henne’s circuit(s) and discovered the German site but they only sell to Germany and Austria.
I spent hours searching for the board or Gerber files. Have you ever designed a new PCB?
I wanted to use the standard ISP port and add a ULN2803A output buffer so I have designed one in RIMU. A fairly cheap and easy to use PCB layout software. I found Eagle too hard.
I am close to getting some made although the MR16 board looks interesting.
The advantage of Henne’s circuit is having all the code for various applications.
My main purpose is to drive air solenoids for my musical fountain (http://www.dmdl.co.nz/Fountain.html) and possibly to drive LED lights as well.
I have some DMX 8x relay cards coming and hope to test the fountain with these before trying Henne’s circuit to eliminate the relays.
Do you know of any other source of boards?
I would be happy to share my design but it is as yet unbuilt and untested.
Regards
Malcolm
1:03 pm on June 20th, 2010
Malcolm:
Whew. Quite a bit of info there.
I bought my Henne-designed boards in 2008 and I got them from Germany, I’m pretty sure; had no trouble getting them into the USA.
I never designed a PCB based on Henne’s schematics; I was unable to make the 8×8 array work (I think it was a software problem and the array code Henne didn’t share).
I too found Eagle too hard; I picked Diptrace and am happy with it so far (only schematics; haven’t designed PCB with it yet).
The MR16 board is very good, but right now there is a shortage of them; RJ hasn’t seen enough demand to warrant a board-run recently. You should keep an eye on Robert Martin’s web store (http://shop.martinxmas.com/); he says he will be doing a run on his DMX16DC boards, which are like the MR16, except a lot smaller and somewhat cheaper to build.
Like Henne’s designs, Martin shares his code, though he is an assembly fiend and doesn’t write in C, making the code harder to understand.
Hope this helps.
\dmc
2:46 pm on August 4th, 2010
Hi,
I am back on with the transceiver again, after some time! Any way I’ve built the board and have just bought an AVR ISP Mk2 to programme the chip. However…. I can’t seem to power up the board. Now my circuit understanding is very limited being quite new to all this, so excuse my dumb question…
I’ve built it and it looks like the one on hennes site. I have a Korg wall wart rate 9v 600ma which I believe meets the circuits requirements. But I’ve tried connecting it up and I get no lights on at all. I’ve attached the power to pins 1 and 2 next to the rectifier. I think this is right and it can take ac or dc, I am supplying DC.
So for the dumb question, does it matter which pin negative or positive go to and do I need to connect anything else to anything else. I have literally followed hennes instructions. So could you tell me what connections for both power and ground I need to make and where they go. Also what do you ground it to?
Do I need to programme the chip first or, as I am using and in circuit programmer do I need to power the circuit up?
What do I connect the isp’s 6 pins to in order to program the chip and does anything need to be jumpered to put the chip in to program mode?
Sorry for the newbie questions, but I hope you can help, this project has been dragging on for some time and it would be nice to get to the next stage of building some LED modules to control with it.
Thanks in advance,
Andy
10:23 am on August 6th, 2010
Andy:
Lots o’ questions:
So you are building based on Henne’s schematic at http://www.hoelscher-hi.de/hendrik/english/dimmer.htm ?
If so, using a 9v wall wart should be fine; if the wart is outputting DC, the rectifier in that circuit should just be redundant and shouldn’t be a problem. There should be no polarity issues either. My memory is that there is no “power” LED in the schematic, so when you are applying power before the chip is programmed, you shouldn’t see either LED light.
You are mixing up the meaning of “ground” and “earth” … the negative buss on the circuit does not go to “earth” (as in “grounded”) — it is just a common connection to the negative side of the circuit. It doesn’t need to go to “earth.”
You should be able to program the chip in-circuit, provided you give the circuit power. I believe the 10-pin AVR ISP header provides power, but the six-pin does not.
I am not familiar with the AVR ISP Mk2, so I Googled it. The picture looks like it has a ribbon cable coming out with a 2×3 connector on it. Henne’s schematic shows a straight row of six pins … you’ll need to change that to two rows of three pins. This is tough to do on a breadboard (you didn’t say whether you’re working on a bb or not). Short of buying something like this … http://zovirl.com/2007/10/21/avr-isp-header-for-breadboards/ … or this … http://www.sparkfun.com/commerce/product_info.php?products_id=8508 … you can make one up with a 2 x 3 header soldered to a piece of protoboard and then solder some wires to the pins. (Again, a quick Google found me this page, which has another alternative — bending the long pins on a 2 x 3 header: http://imakeprojects.com/Projects/avr-tutorial/ )
Once you apply power to the circuit and connect the ribbon cable to the header, you should be fine. You don’t need to jumper anything to put the chip into programming mode (that last URL is a good tutorial on programming an AVR chip).
Hope this helps.
\dmc
3:30 pm on August 12th, 2010
Hi,
I’ve connected it all up, I get 2 green LED’s on the avr isp as hendrik, describes, after the following:
I open his text file in avr studio, power the transceiver. Then I compile and run the code. All is OK. Next I click connect button, choose avrispmk2 and usb and press connect. I get my 2 green leds on the avrisp, all is well.
Then when I try to read from the chip, I get “avr studio entering programming mode failed”
Why is this, I don’t understand, have I missed something critical?
Hope you can help,
Andy
4:05 pm on August 12th, 2010
Andrew:
Your problem is specific to your programmer and AVR Studio; I use AVRDude and the LadyAda USBtinyISP, so I can’t be much help here.
I’d suggest you find the forum for your programmer and ask for help there.
Best of luck.
\dmc