DMX Pixel String
 
Notifications
Clear all

DMX Pixel String

34 Posts
10 Users
0 Reactions
21.2 K Views
Posts: 604
(@aussiephil)
Honorable Member
Joined: 19 years ago
Entropy wrote:What I haven't seen discussed (maybe I missed some reason it's not feasible?) is the classic "set start address using a program mode jumper" approach.

e.g. if the jumper is bridged, the device sets its start address based on the dimming values for devices 1 and 2 in the universe, if the jumper isn't bridged, it just uses its programmed start addy.

A single jumper is a lot easier than full-on DIPs, but this approach means you don't need to implement fullblown RDM.

Actually the classic approach is what i'm refering to when saying switchless.

Aussiephil


Reply
Posts: 84
Topic starter
(@cypress1138)
Trusted Member
Joined: 18 years ago

Well its been awhile since I posted anything but you know the regular things that crop up work, family, work, honey do lists, work...
Anyway I've not been completely idle I did manage to get the new board design done which basically just removed the dip switch but it did allow for a slightly smaller board (see the schematic and board attachments below).

More importantly I got the first pass at the firmware done. This was not easy at all for me since this project is really the first time I've attempted to do anything this complex. The firmware is attached below as well. I still need to do another pass through the whole thing to make sure I've got all configuration registers setup right but the meat of the firmware, I think :rolleyes:, is pretty good.

I decided to go with a unique start code to allow for re-programming of the start address for the board, in this case 0x68. When the board gets a start code of 0x68 it then moves the first channel into the most significant byte of the address and the second into the lowest significant byte of the address. At the same time it writes these two bytes to the internal EEPROM to save after a power loss.

The UART receiver is setup as the only interrupt. Once it gets a viable frame break and correct start code it will then count the received DMX channels until it reaches its start address. It will then load the next 48 channels into first 48 registers of bank 0. Once all 48 channels have been received the full_frame flag is set and the main program loop begins to process the DMX channels.

Since the LED driver chips use a 12 bit number for their dimmer value the 8-bit DMX value needs to be padded by 4 bits to work correctly. The DMX value is loaded into the 8 highest bits of the LED driver value while the lowest 4 bits are written by the software. If the DMX value is anything greater then 0 then the lowest for bits are set to 1. If the DMX value is 0 then the lowest 4 bits are set to 0. This does sacrifice some resolution but it does make padding the DMX values a lot easier. The firmware processes the DMX values 2 at a time. The 2 bytes of DMX dimmer values are converted into 3 bytes of LED dimmer value. The first LED dimmer byte is made up of the padded bits for the first channel in the lower nibble and the least significant nibble of the DMX value in the upper nibble of the first LED dimmer byte. The second LED dimmer byte is made up of the most significant nibble of the DMX value in the lower nibble and the padded bits for the second DMX value in the upper nibble of the second LED dimmer byte. The third LED dimmer byte is the loaded with the second DMX value. This padding operation will loop until all 48 DMX values or bytes have been converted into 72 bytes of LED dimmer values which are stored in the first 72 registers of bank 1. Once this is complete the firmware then shifts this data out over SPI to the LED drivers and the main loop goes back to waiting for a full_frame flag. If the board does not receive any characters at the UART for over approximately 160 uS the processor will then begin to fade all channels off. One step of the fade to black routine takes a couple of mS to process so it will take a couple of seconds to fade everything to black. All remaining bytes are stored in the 16 common registers.

Anyway, take a look and see what y'all think 😉


Reply
Posts: 1041
(@n1ist)
Noble Member
Joined: 19 years ago

A few suggestions on the layout:
- 24 pins is not a standard ribbon connector size. I'd change it to either 26 pins (the nearest standard size) or better yet, 34 pins with the extra pins tied to +12.
- Some people prefer having a large via in the middle of the heat slug to make it easier to solder (if you aren't using paste and an oven)
- I would make the ground trace and +12V trace a bit beafier to avoid ground bounce
- I would move the bypass caps closer to the chips; they work best when connected with short, low-inductance fat traces.
- Is the internal oscillator on the PIC stable enough for DMX reception? I know that it is marginal without calibration on the AVRs, but I am not a PIC person. You may want to place the pads on the board so you can load the crystal and caps in the future if you need to.
/mike


Reply
Posts: 84
Topic starter
(@cypress1138)
Trusted Member
Joined: 18 years ago
n1ist wrote:A few suggestions on the layout:
- 24 pins is not a standard ribbon connector size. I'd change it to either 26 pins (the nearest standard size) or better yet, 34 pins with the extra pins tied to +12.
- Some people prefer having a large via in the middle of the heat slug to make it easier to solder (if you aren't using paste and an oven)
- I would make the ground trace and +12V trace a bit beafier to avoid ground bounce
- I would move the bypass caps closer to the chips; they work best when connected with short, low-inductance fat traces.
- Is the internal oscillator on the PIC stable enough for DMX reception? I know that it is marginal without calibration on the AVRs, but I am not a PIC person. You may want to place the pads on the board so you can load the crystal and caps in the future if you need to.
/mike

Well I implemented 3 out of your 4 suggestions.
1) I went to a 26 pin header which actually ended up saving some money! Its amazing how sometimes you can actually get more for less in this hobby 😀
2) I beefed up all the power traces.
3) I added an external 32 MHz oscillator with associated cap to the board.

As for the larger via under the drivers I am planning on making my own re-flow oven or trying the skillet method but I may go ahead and put a larger via if it ends up someone else is interested in this design... of course first I have to get the thing working 😉

Even with the addition of the external oscillator the total cost for a one-off board was less by a little more then a dollar which when you plan on building 80 - 90 boards is considerable! I have attached the updated schematic and PCB below and will update the firmware tomorrow... hopefully.

Thanks for your help Mike!


Reply
Page 4 / 4
Share: