The Great DIY Arduino Controller Project

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
Now i have all the gear needed, now to start coding it all together

2017-10-09%2013.09.53.jpg
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
help is what i need now,
still trying to setup a bitbucket for the source codes of the different arduino's.
So there's lots of coding in different area's needed,
as im only using basic code i find (so things will be patchy)
im still also trying to draw a basic wiring diagram for it all..
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
any update on this project Alec
Latest Update from 2017,

Hardware side :-
Still slowly milling out the plastic for the panel, got a perfect box from a xmas presant (i asked for) to be the roadie case for it.
Got the wrong leds, after i went against the voice in my head telling me to test a example first.. (thats the whole button matrix board to do) (16 rgb leds + pixel boards),

Coding side :-
'Clock Time' working,
'RFID' access working,
SD card access working (more work needed),
'Sliders + pots' values screen completed,
but with all that i lost the touch screen function (no great rush to fix yet)

So im getting there slowly..
 

Barnabybear

New elf
Joined
Mar 30, 2012
Messages
42
Location
UK
Hi, I notice that the Pixel and DMX outputs are still empty in the github files. I have no idea how github works so offer these here.

DMX output on Nano / Mega Tx pin:

Code:
      //Send DMX on usart0



      UCSR0B = (1 << TXEN0); // Enable transmitter

      UCSR0A |= (1 << U2X0); // Double transmission speed

      while ( ! (UCSR0A & (1 << UDRE0)) );  // Wait for buffer to empty



      // Send break and mark after break



      UBRR0H = 0; UBRR0L = 17; // Set baud to 100,000bps @ 16Mhz clock

      UCSR0C = (3 << UCSZ00) | (2 << UPM00); // Set 8 data bits, E parity and 1 stop bit.

      UDR0 = 0x00; // load data into usart buffer and send

      UCSR0A |= (1 << TXC0); // Clear transmit complete flag

      while ( ! (UCSR0A & (1 << TXC0)) ); // Wait for transmit complete flag



      // Send start code 0x00



      UBRR0H = 0; UBRR0L = 7; // Set baud to 250,000bps @ 16Mhz clock

      UCSR0C = (1 << USBS0) | (3 << UCSZ00); // Set 8 data bits, no parity and 2 stop bits

      UDR0 = 0x00; // Load data into usart buffer and send



      // Send data



      for (int n = 126; n < 638; n++) { // Loop 512 times

        while ( ! (UCSR0A & (1 << UDRE0)) ); // Wait for buffer to empty

        UDR0 = data[n]; // load data into usart buffer and send

}

Pixel output on Nano / Mega Tx pin but is inverted (a fix later in this post):

Code:
      UCSR0C = 0xC0; // Set MSPI data mode 1.

      UCSR0B = (1 << TXEN0); // Enable transmitter

      UCSR0A |= (1 << U2X0); // Double transmission speed

      UBRR0H = 0; UBRR0L = 1; // Set baud to 4,000,000bps @ 16Mhz clock



      // Send data

      cli();

      for (int n = 126; n < 638; n++) { // Loop 512 times



        op1 = B01111011; // set values to zero pixel

        if (data[n] & B10000000) op1 &= B10011111; // mask as 1 if pixel data bit is a 1

        if (data[n] & B01000000) op1 &= B11111100; // mask as 1 if pixel data bit is a 1

        while ( ! (UCSR0A & (1 << UDRE0)) ); // Wait for buffer to empty

        UDR0 = op1; // write to output buffer



        op2 = B11011110; // set values to zero pixel

        if (data[n] & B00100000) op2 &= B11100111; // mask as 1 if pixel data bit is a 1

        while ( ! (UCSR0A & (1 << UDRE0)) ); // Wait for buffer to empty

        UDR0 = op2; // write to output buffer



        op3 = B11110111; // set values to zero pixel

        if (data[n] & B00010000) op3 &= B00111111; // mask as 1 if pixel data bit is a 1

        if (data[n] & B00001000) op3 &= B11111001; // mask as 1 if pixel data bit is a 1

        while ( ! (UCSR0A & (1 << UDRE0)) ); // Wait for buffer to empty

        UDR0 = op3; // write to output buffer



        op4 = B10111101; // set values to zero pixel

        if (data[n] & B00000100) op4 &= B11001111; // mask as 1 if pixel data bit is a 1

        if (data[n] & B00000010) op4 &= B11111110; // mask as 1 if pixel data bit is a 1

        while ( ! (UCSR0A & (1 << UDRE0)) ); // Wait for buffer to empty

        UDR0 = op4; // write to output buffer



        op5 = B11101111; // set values to zero pixel

        if (data[n] & B00000010) op5 &= B01111111; // mask as 1 if pixel data bit is a 1

        if (data[n] & B00000001) op5 &= B11110011; // mask as 1 if pixel data bit is a 1

        while ( ! (UCSR0A & (1 << UDRE0)) ); // Wait for buffer to empty

        UDR0 = op5; // write to output buffer

      }

      sei();

You can buffer and invert the Pixel output with an RS485 module it also has the advantage of offering the differential signal for DMX. I don't have a schematic in my dropbox at the moment, I'll clear some space next week.
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
What about using a raspberry Pi? In built support for LCD screens and inputs, no analog inputs though.
Richard

How many Rx/Tx in/outs can a rasp pi have?
as the sliders an buttons are both serial Rx/Tx lines

it would be great to have the processing power of a rasp pi,
but sadly i have no knowledge on how to design such a interface.

but if anyone is able to chip in.. it would be great to have 2 output versions going (arduino/rasp pi) for people to choose from
 

SmartAlecLights

Im a SmartAlec what can i say!
Community project designer
Joined
May 4, 2010
Messages
1,533
Location
Murray Bridge, S.A.
After 6hrs, of soldering,
I can now say the sliders are all soldered up
Im still cutting the plastic with the dremel.. (slow process without a CNC)
2018-01-30%2005.35.11.jpg
 
Top