Help With SMD Led Chaser/Nightrider? For Xbox!

Got a project in mind? Post it in here to get help from the forums. No idea too crazy or mundane!
Rich
Above Average
PostsCOLON 89
JoinedCOLON Fri May 04, 2012 12:43 am
LocationCOLON Chesterfield
CONTACTCOLON

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby Rich » Fri May 24, 2013 12:22 am

On the roulette circuit you'd have to swap the touch pad for a 1M ohm ish resistor... No programming required ;-)

phenoptix
Competent
PostsCOLON 744
JoinedCOLON Sat Apr 17, 2010 11:25 am

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby phenoptix » Fri May 24, 2013 6:36 pm

I'll pick up some of those decade counters and have a look. No programming is always a good route for me!

dynamis_dk
Below Average
PostsCOLON 16
JoinedCOLON Thu May 23, 2013 4:47 pm

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby dynamis_dk » Fri May 24, 2013 7:09 pm

See, I strangely like the idea of programming a chip to do something :) Maybe its my computer nerd side coming out to play lol

I'm more a Do-it learning, rather then a reading and learning person so electronics theory isn't the easiest for me to get my head around - programming however, programmed several bits here and there for coming on 15yr now so that I should be able to learn!

I'm not too good with PCB design (I can etch and UV expose just fine) so as strange as it may sound I actually work out the tracks etc by drawing the design in Photoshop to get my layout before printing on OHP transparency for UV boards.

phenoptix
Competent
PostsCOLON 744
JoinedCOLON Sat Apr 17, 2010 11:25 am

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby phenoptix » Fri May 24, 2013 8:29 pm

Ah it's not a problem either way, many ways to crack the 8 LED egg! Just waiting for the coast to be clear to find a full sized USB cable at home. Should have the basics ironed out tonight
Time passes...

OK, so to do it with Arduino the code is:

CodeColon Select all

/*
Modified and mugged together by phenoptix using
Adafruit Arduino - Lesson 4. 8 LEDs and a Shift Register
Shift Register Tutorial - Oomlout
Shift Register Example - Arduino
*/

int latchPin = 8; //Pin connected to ST_CP of 74HC595
int dataPin = 11; //Pin connected to DS of 74HC595
int clockPin = 12;//Pin connected to SH_CP of 74HC595


byte leds = 0;

void setup()
{
  // set the three control pins to output
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT); 
  pinMode(latchPin, OUTPUT);

  Serial.begin(9600); // so we can send debug messages to serial monitor 
}
 
void loop(){
 
    outputBytes(); // our basic output which writes 8-bits to show how a shift register works.
}
 
void outputBytes(){
    /* Bytes, or 8-bits, are represented by a B followed by 8 0 or 1s.
        In this instance, consider this to be like an array that we'll use to control
        the 8 LEDs. Here I've started the byte value as 00000001
    */   
 
    byte dataValues = B00000001; // change this to adjust the starting pattern
 
    /* In the for loop, we begin by pulling the latch low,
        using the shiftOut Arduino function to talk to the shift register,
        sending it our byte of dataValues representing the state of the LEDs
        then pull the latch high to lock those into place.
 
        Finally, we shift the bits one place to the left, meaning the next iteration
        will turn on the next LED in the series.
    */
 
    for (int i=0;i<8;i++){
      digitalWrite(latchPin, LOW);     
      Serial.println(dataValues, BIN);  // Debug, sending output to the serial monitor
      shiftOut(dataPin, clockPin, MSBFIRST, dataValues);
      digitalWrite(latchPin, HIGH);   
      dataValues = dataValues << 1; // Shift the bits one place to the left -  change to >> to adjust direction
      delay(300);   
    }
}


With the shift register etc wired up as shown here:
Shift Reg_bb.jpg


Now we just need to shrinkify the the package using an ATTiny85 using this https://code.google.com/p/arduino-tiny/. There are a few tuts on it around seem to remember this one being fairly good (also source of the word shrinkify it would seem!) http://blog.makezine.com/2011/10/10/how-to-shrinkify-your-arduino-projects/.

Going to hit the sack now as lots to do tomorrow!
You do not have the required permissions to view the files attached to this post.

dynamis_dk
Below Average
PostsCOLON 16
JoinedCOLON Thu May 23, 2013 4:47 pm

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby dynamis_dk » Fri May 24, 2013 10:22 pm

oooh nice one, thanks for that...

I need to get my hands on a couple suitable shift registers and ATtiny45/85 chips then by the sounds :)


dynamis_dk
Below Average
PostsCOLON 16
JoinedCOLON Thu May 23, 2013 4:47 pm

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby dynamis_dk » Mon Jun 10, 2013 8:08 pm

Gonna have to call into a Maplin store tomorrow to get a couple of breadboards as the one have is too narrow and doesn't have any common live/ground area so hopefully I can have a bash tomorrow night.

Have you done any work on taking serial input using these ttiny chips? Ideally I'd like to send serial communcations to the LED's to make them do different things depending on the software. On the software side I'm limited to python and USB as serial so I expect I've a fair way to go yet lol. I've had it all working using just the Arduino but ideally I don't want to have to sacrifice the Arduino to the HTPC project If I can knock up a PCB to do the same

dynamis_dk
Below Average
PostsCOLON 16
JoinedCOLON Thu May 23, 2013 4:47 pm

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby dynamis_dk » Sun Jun 16, 2013 2:06 pm

Finally got around to having a go at this and got it working using the code above. Next step (maybe tonight if I have time) is to program up one of these Attiny85 chips to have it running without the Arduino attached.

phenoptix
Competent
PostsCOLON 744
JoinedCOLON Sat Apr 17, 2010 11:25 am

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby phenoptix » Tue Jun 18, 2013 8:05 am

Looking forward to seeing what you've done with it! Not done anything with sending serial to the ATTinys but would be interested to see what you come up with! Oh and not Maplins! Breadboards here: Breadboards

dynamis_dk
Below Average
PostsCOLON 16
JoinedCOLON Thu May 23, 2013 4:47 pm

Re: Help With SMD Led Chaser/Nightrider? For Xbox!

Postby dynamis_dk » Tue Jun 18, 2013 11:17 am

lol, well unfortunately I tend to pick up single items I need at maplin's as its about 0.5 mile away from my house. I've done a fair bit of reading the last couple days so just waiting to have a few hours spare to play and see what I can get working. I put an order in for a 2nd breadboard and a bunch of male/male jumper cables as I've hardly got any spare - resorted to using stiff bell wire the other day :(

I'm mindful of how this will all be used in the end so trying to keep the design simple but still meet the requirements. Its also looking like I may have to go to double sided PCB's to get the layout am after so that will be a first attempt too :p


Return to

Who is online

Users browsing this forum: 1 and 0 guests