philetaylor

DMX512 Controller

78 posts in this topic

I did have some problems with the bankstick, initially I was calling MIOS_BANKSTICK_ReadPage from within the Timer function and I kept getting some weird results.

IIC read/writes are blocking functions, you shouldn't call them in an ISR. You've got it right now :)

I am still not sure how to cut the slots for the faders or the hole for the display though

With a dremel, a file, and a lot of care, skill, and mucho voodoo chicken.

Great work man! Keep it up, and thanks for that ID!

Share this post


Link to post
Share on other sites

Awesome work! I ordered some IIC MIDI boards and PIC's from Smash TV in hopes of playing around with this over my Christmas Holiday. I have two weeks off and one with no Wife (she has to work). Some extra free time in january too. Phil, you must not be married to be making so much progress so quick!

I think you will find Front panel construction to be the biggest challenge yet! Especially since you seem to breeze right through coding.

Share this post


Link to post
Share on other sites

Phil, you must not be married to be making so much progress so quick!

How did you guess  :)

The only disruption I get is my dog bugging me for food and walks!

I think you will find Front panel construction to be the biggest challenge yet! Especially since you seem to breeze right through coding.

I did an apprenticeship in electronic engineering (in the late 80's) and almost all of the first year of that was spent in the machine shop. If I had access to a milling machine and a decent pillar drill i'm sure I could make quite a nice job of the panel but I may have to make do with a hand-held router and a dremel  :(

Mori Seiki who manufacturer cnc machine tools are a customer of mine so I might see if I can call in a favour??

Phil

Share this post


Link to post
Share on other sites

IIC read/writes are blocking functions, you shouldn't call them in an ISR. You've got it right now :)

To be honest when somebody spells it out like that, it makes absolute sense why it wasn't working but it took me ages last night to come to that conclusion!

With a dremel, a file, and a lot of care, skill, and mucho voodoo chicken.

I thought as much, I have bought one of the cheap crappy dremel stands, as it seems to have about 1mm lateral movement I don't think it is quite 'precision' enough????

Share this post


Link to post
Share on other sites

How did you guess  :)

Because I am......Quite happily.....as long as I don't spend "too much time" back in the lab "ignoring her"  ;)

I did an apprenticeship in electronic engineering (in the late 80's) and almost all of the first year of that was spent in the machine shop. If I had access to a milling machine and a decent pillar drill i'm sure I could make quite a nice job of the panel but I may have to make do with a hand-held router and a dremel  :(

Mori Seiki who manufacturer cnc machine tools are a customer of mine so I might see if I can call in a favour??

Phil

Right, I was assuming you didn't have acces to a proper machine shop since you were asking about how to cut the slots. Machine shop access should be a right, not a privilege.  :D

Share this post


Link to post
Share on other sites

Right, I was assuming you didn't have acces to a proper machine shop since you were asking about how to cut the slots. Machine shop access should be a right, not a privilege.  :D

Unfortunately I don't (any more) but my customer always has a couple of machines in their showroom. I'm not sure they would have anybody that could spare the programming time though.

I asked the question in case anybody had a good DIY way of neatly cutting slots???

Cheers

Phil

p.s. 50 posts that means i'm no longer a newbie!

Share this post


Link to post
Share on other sites

It's been a while since I updated this project.

I have some quite functional updated software now for this which I will upload soon but with the imminent release of the STM32 core, I may not do much more with the PIC based version of the actual controller.

There are a few reasons for this, mainly as the PIC16f88 will never be able to support a whole DMX universe and using IIC adds an extra level of complexity that makes certain features difficult. Thing like submasters and fixture configuration etc become very complicated....

I am currently in the process of writing an STM32 version which will use one of the USARTS for DMX rather than using a seperate PIC. The STM32 will easily support 'at least' one DMX universe and I don't foresee any performance problems as the DMX sending can be acomplished in its own thread.

I should be able to add RDM support as well...

Cheers

Phil

Share this post


Link to post
Share on other sites

Sweet project man. This has great direction :)

Share this post


Link to post
Share on other sites

sweet project!!!  :D

I agree that the STM32 is the way to go here.... Lots of ram and processing power for more than one universe, and some pretty complex crossfade/step calculations for some really neat effects.

not to mention more intuitive on the user side (graphic lcd? Possibly vga out?).  lots of possibilities.

Share this post


Link to post
Share on other sites

Bit of an update. I now have a working system using a CORE32. I have also finally managed to put everything in an enclosure.

I found 4 old Strand Tempus 2-12's on ebay. As they are old analogue lighting desks and not much use to anyone I didn't mind canibalising them. The unit is a single PCB with all faders mounted to it. I removed all unnecessary (for me) components and connected my AIN4 module to each fader.

It works OK although as suggested by TK, I am seeing quite a bit of jitter probably because I am using USB power at the moment.

Anyway, here is a pic. Please don't laugh (too loud) at my LCD mounting. I am trying to find a nice bezel for the DOG GLCD at the moment. You may notice that I have also created a simple fader font (16x4) which is quite nice (I think!)

Cheers

Phil

fetch.php?media=midiboxdmx:mbdmx-boxed.jpg

Share this post


Link to post
Share on other sites

Sweet! Nice find on those cases!!

I dig that fader font too, please commit it :D

Share this post


Link to post
Share on other sites

Nice work! That LCD looks ok, I've mounted one that looked worse than that....

Where are you getting The stm32 boards? Last I looked Smash didn't have them? Sorry If I missed an anouncement, my work has kept me away from midibox the past couple months and likely the next few but I try to check up on the topics that I have been following. I ordered some IIC modules to get started on this but they have set in a box since Christmas :(  I'll check the WIKI page and see what's up.

Keep up the good work!

Share this post


Link to post
Share on other sites

There have been a couple of beta versions of the board produced for developers and I managed to get get hold of the last version :)

Apart from a few cosmetic changes, the board is pretty complete but I know TK doesn't want to release it until everything is 'right'. If you want to take a look at the 'code' for the DMX module and the simple controller, they are all in svn.

http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fdmx%2F

http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fexamples%2Fdmx%2F

Cheers

Phil

Share this post


Link to post
Share on other sites

Hi all

Before starting excuse me for my bad english, I do that I can.

I am searching a way to do dmx lighting desk thru a midibox.

I see your project, it is very interessant and good, but I need to have access on all level on a dmx channel. Is it in order to pilot a VJing software, and each level of each channel is assign to a different effect. So I need all 256 levels for each channel ...

Searching on we I have found this :

http://www.response-box.com/mididmx.shtml

On "Mode 3" it correspond exactly to that I need.

Do you think it is possible to program a core to respect this requierement ?

Thanks a lot.

Share this post


Link to post
Share on other sites

Yes it is certainly possible to achieve this. I would use a CORE32 rather than a CORE8, it has much more power and can happilly send a DMX universe in the background without any real noticeable load.

Cheers

Phil

Share this post


Link to post
Share on other sites

Hi Phil !

Really ? you think it is possible ???

Yeeeeesssssss !

I could not help you very more because I do not know anything on C+.

I know some things but ... this is limited to program a door for garage ...

Do you think I can bought all parts now and waiting your soft ?

If needed, I can bought some parts, tests your soft, and only after it, bought missing parts.

For my project I need at least 96 faders, so 2 core, 4 AIN, and ?

thanks thanks thanks !

Share this post


Link to post
Share on other sites

Hi Piletaylor

I just read another post you have made and ...

You say it is possible to make DMX with core 32.

A full dmx ? with 256 levels by channels ?

Is that I am searching !!! Nothing more !

Is it that ?

Sprry my english is not very good and I need to read and read many times to understand ...

thanks

Edited by catscase

Share this post


Link to post
Share on other sites

Hi. Yes the current DMX module can handle a full DMX universe at full resolution (256 values). This code snippet would basically achieve what you want to do at 8 bit resolution:

I haven't tested this but this should give you an idea. You will need to know some C programming to complete this.


int lastchn=-1;

int lastnote=-1;

int lastvelocity=-1;

void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package)

{

  if (midi_package.chan>7)

    return;

  if (midi_package.chan==lastchan && midi_package.note==lastnote+1)

  {

	DMX_SetChannel(((lastchn<<6)+(lastnote>>1),lastvelocity+midi_package.velocity);

	lastnote=-1;

	lastchn=-1;

	lastvelocity=-1;

  } else {

	lastnote=midi_package.note;

	lastchn=midi_package.chn;

	lastvelocity=midi_package.velocity;

  }

}

Share this post


Link to post
Share on other sites

Hi

Ok thanks philetaylor

In fact I was thinking that your project support only 7 bits resolution.

I ll try to do it in 8 bits but my knowns in C are very limited.

on another post you speak about ARTNET, where are you about this ?

thanks

Share this post


Link to post
Share on other sites

Hi

Philetaylor : the code the posted : where do I have to include it ? in the core ? or IIC modified module ? thanks.

Share this post


Link to post
Share on other sites

Hi.

That code is for CORE32 only and could be added to the standard app_skeleton. The CORE32 can talk DMX32 with the simple circuit on the wiki page. No MBHP_IIC_MIDI module is required.

I am not developing the CORE8+IIC version anymore as the CORE32 works so much better.

Cheers

Phil

EDIT: I haven't done anything with ARTNET support although it wouln't be 'that' difficult to add....

Edited by philetaylor

Share this post


Link to post
Share on other sites

Hi Philetaylor

I am a bit lost ...

on your wikipage midibox dmx you speak only using core8 and IIC ...

Do you have another wiki where you speak about it with Core32 ?

In fact, with core32 and your code, the midibox do not produce midi but dmx, is it ?

thanks

Share this post


Link to post
Share on other sites

Hi.

Yes sorry I haven't updated the wiki for quite a while....

Using a CORE32, I have created a software module that sends DMX using the built-in UART's of the CORE32 so yes it replaces at least one of the physical MIDI ports on the CORE32.

Thanks

Phil

Share this post


Link to post
Share on other sites

ok thanks, I understand more !

Do not worry, as you are here on the forum, as you help everyone who want to made a midiboxdmx using your code ! And complete on the forum that said on wiki.

So, it is very simple to do ?

I need a CORE32 complete board, 4 AIN, some faders, and your code to the core32 code, some faders, many times, and run!

on the second midi port, the core 32 sand midi dta a 7 bits resoltions, isn't it ?

Share this post


Link to post
Share on other sites

Hi all

I have searched where adding your code but ...

I have found only bin and hex ... not source code !

where could I find it ???

thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now