Shop OBEX P1 Docs P2 Docs Learn Events
N00bie LED Projects — Parallax Forums

N00bie LED Projects

TymkrsTymkrs Posts: 539
edited 2013-04-15 08:15 in Robotics
So my baby is the Prop Demo board and so far *I LOVE IT* - especially as a first time programmer, because it makes sense. In any case, if anyone's started listening to our First Spin (http://firstspin.tv) podcasts, you'll know that I've been trying to work up to individually addressing RGB LEDs...for blinky lights' sake! So I've been doing some basic led projects that I thought I'd share for anyone who's never programmed before and may want to try their hand at it:

http://www.youtube.com/user/whisk0r#p/u/16/1ic4lFiQ6dA - Quest for RGB LEDs Part 1
Introduction to how to get the Prop Demo board set up and ready for programming
Making single LEDs blink on and off
Making alternate LEDs blink on and off using binary
Making LEDs march up one by one

http://www.youtube.com/user/whisk0r#p/u/14/BT4kfT9ePkw
In this video I made the LEDs march up one by one
Then I delayed the marching of the LEDs
Then I change the delay between each LED
Then I make the LEDs go up then down then up then down
And then! I make it look like a ball - with varying bounce heights

Comments

  • TtailspinTtailspin Posts: 1,326
    edited 2011-11-25 20:15
    Atdiy, You seem to be learning the propeller spin language pretty fast, I like the Podcasts, and the video's too..

    It is easy to take what we have learned for granted, after we have learned it. we forget it was not easy at first.
    So we sometimes wonder why it could be so hard for someone else to learn the same things we allready take for granted...

    Oh well, keep up the good fun, Just be careful, those flashing colored lights can be addicting.
    I think they should have a twelve step program for LED addicts.
    "Hey if one is good, ten must be great!"... :thumb:

    -Tommy
  • Martin_HMartin_H Posts: 4,051
    edited 2011-11-26 05:02
    At least LED addicts are in good company. Remember this Mark Twain quote?

    "Giving up LED arrays is the easiest thing in the world. I know because I've done it thousands of times."
  • TymkrsTymkrs Posts: 539
    edited 2011-11-26 18:35
    Haha!! I highly doubt Mark Twain said that ^o^. I did go a little LED nutty when I figured out that as long as I didn't try to make all of the LEDs light up at once, I could get them eventually lit, so I did the halloween project - Telltale heart:

    http://forums.parallax.com/showthread.php?135260-Halloween-Projects&p=1053857&viewfull=1#post1053857

    More leds!! More sparkles!!

    I think my own next project is going to be expanding the heart project to actually make it "more" viable as a teaching tool.
  • TymkrsTymkrs Posts: 539
    edited 2011-12-06 18:30
    Just addressed my first RGB LED with the Propeller Demo board and I'm currently writing up some posts!

    http://www.youtube.com/whisk0r#p/u/0/oJIkF1FV1OM

    The code's in the video :)

    And here are the posts that I wrote for it that go through the code from a nub perspective:
    http://tymkrs.tumblr.com/post/13972420370/getting-a-rgb-led-to-work
    http://tymkrs.tumblr.com/post/14019500687/pulsing-the-rgb-led
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-12-07 09:22
    Ah! Someone who loves playing with LEDs! Awesome.

    Try twinkling them like a candle..
    http://www.parallaxsemiconductor.com/quickstart5

    OBC
  • TymkrsTymkrs Posts: 539
    edited 2011-12-09 06:40
    Thanks for the suggestion Jeff! I should try that sometime. I know somewhere I made leds flicker randomly, but I saw it more as my paparazzi project :). It was one of the first things I made.

    And another project Whisker just posted up is a morse code project he made the other day:
    http://youtu.be/YOjhunXnohw?hd=1
  • TymkrsTymkrs Posts: 539
    edited 2011-12-21 23:56
    Just restarted with my LED heart project with 14 cardiac rhythms. The code's all done and in the tymkr forums: http://www.tymkrs.com/forum/viewtopic.php?id=14. For sake of time this week I showed the first six using the new Prop BOE board! http://www.youtube.com/watch?v=iTwNE2cFsRs&context=C32be627ADOEgsToPDskIXAsmGA5vZZ4sBNNFhQNzv

    And the remaining 8 are here:

    http://www.youtube.com/watch?v=imDiH0x1XPo

    I think the next step will be to add a switch, sounds, and with any luck, some sort of lcd thing where you can specifically choose which rhythm you want.
  • TymkrsTymkrs Posts: 539
    edited 2012-01-04 18:53
    Thought I'd update the LED Heart Project - as of now I've incorporated sounds, a switch, serial LCD, and all on the new Propeller BOE board. The LEDs are also physiologically accurate:

    [video=youtube_share;DqZ6XSYNW3A]

    Bits of Code: http://www.tymkrs.com/forum/viewtopic.php?id=14

    I am so far having issues with the sound being crunchy after the first few rhythms - not quite sure what that's all about - any ideas? Whisker says it could be buffer overflow of some sort?
  • TymkrsTymkrs Posts: 539
    edited 2013-04-10 06:39
    Hey guys!

    So it's been a while since I've posted on this particular thread updating my led blinky projects, but if you've been following along, you may know I decided to do a PCB for the heart led project. A lot of folks helped in this thread: http://forums.parallax.com/showthread.php/144953-PCB-help-request-(Prop-based)

    S
    o I've gotten the board populated and everything's soldered on and looking okay. When I program it, something goes wrong with the eeprom, which could very well be due to solder issues, but it looks to program okay through RAM - at least PropTool doesn't give me any sort of problem. The prop plug does its little flashy thing, the status says "etcetc verifying ram" and then that's it.

    So my LEDs still don't light up. And when I check the voltages, there's as much voltage on the pins I'm trying to turn on as the pins i don't even have connected to anything or used.

    The code I was trying to test was super simple:
    Pub Main
    
    dira[2] := 1
    
    
    repeat
      outa[2] := 1
      waitcnt(cnt + clkfreq)   
      outa[2] := 0                        
      waitcnt(cnt + clkfreq)
    

    So I'm just wondering if anyone has any ideas? I also checked the connections between the propplug pins and the pins that they are supposed to tap to, and the connections are good. The voltages across the bypass caps are also appropriate (vcc), and it's at 3.27 volts, which I am pretty sure the prop can handle...
  • kwinnkwinn Posts: 8,697
    edited 2013-04-10 15:37
    The 3.27 volt Vcc is just fine. Try toggling some of the unused pins one at a time. You may have to make yourself a blinky led probe to make testing easier. A bi-color led (red/green) makes a good tool for that. It is red for one polarity, green for the other, and amber if it is toggled rapidly.
  • TymkrsTymkrs Posts: 539
    edited 2013-04-10 16:53
    Okay figured out what it was...dumb manufacturing pins vs code pin assignments :p. So the RAM is working yay!

    Now I'm trying to figure out why the eeprom isn't. I got a 24LC512-I/ST and we checked the pins. Power pin is getting what it should, no resistance between the scl and sda lines...and they're going to pins 28/29...

    22cac9.png

    Any suggestions for what could be causing the eeprom to just not work? I get the error message: "EEPROM programming error on Com11"

    Scoped the prop pin for the SDA line and I get this:
    OSHPark 010.jpg

    When I scope the eeprom pin for SDA, I get a small little downblip and that's it...
    559 x 459 - 15K
    1024 x 576 - 51K
  • kwinnkwinn Posts: 8,697
    edited 2013-04-11 08:35
    The scope picture would be of more help if you listed the V/div. settings for the two channels and separated them so they do not overlap.

    For debugging I would start by removing power from the board and measuring the resistance between adjacent pins on all the chips. Use the lowest ohms range to check for shorts. This is a quick check if you start with pin 1 and 2 and then "walk" the ohmmeter probes around the chip. By that I mean that after measuring the resistance between pins 1 and 2 move the probe from pin 1 to pin 3, then pin 2 to pin 4 and so on.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-04-11 08:39
    You don't mention all of the connections on the EEPROM so we'll start there...pins 1-4 (A0, A1, A2, VSS) should all be connected to ground as should pin 7 (WP). Pin 8 (VCC) goes to your supply and SDA goes to P29 and SCL to P28. Now here's where it can get interesting...if you're only booting from the EEPROM you only need the 4.7K pull-up resistor on SDA, however if you're using an EEPROM object to access the EEPROM after startup you should have a 4.7K pull-up on SCL as well as per I2C standards. Some I2C objects expect this to be the case, while the Propeller chip at boot-up drives SCL, so doesn't need it.

    You mentioned the 24C512 (64K) EEPROM but your board snapshot shows a 24C256 (32K). Still, in either case I would have the 4.7K pull-up on SCL. I2C protocol normally drives the lines low and relies on the pull-ups to bring them high. I hope this helps.
  • TymkrsTymkrs Posts: 539
    edited 2013-04-12 02:16
    Yeah so I did check for shorts by looking at resistance between the individual pins, checked pins 1-4 to make sure they were properly grounded (as well as pin 7). Pin 8 looked to be at Vcc, and there was no resistance between p 29 and p 28 to their respective SDA/SCL pins on the eeprom. I have 10k pullups for both SCL and SDA. Maybe I wasn't skilled enough in my measurements...but I'll be bringing it to the conference and you guys are more than welcome to help me test it! And yeah, the snapshot shows the 256, but i put the 512 :p.

    I think it had something to with the solder job (so i'll test to make sure there aren't any shorts again), but I tested the second board i had populated and the eeprom worked perfectly.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-04-15 08:15
    Tymkrs wrote: »
    I think it had something to with the solder job (so i'll test to make sure there aren't any shorts again), but I tested the second board i had populated and the eeprom worked perfectly.

    I hadn't realized you had another unit working. I thought this was the first/only one and maybe it was something missing. Perhaps the EEPROM was overheated during soldering? Could be static or any number of reasons unfortunately.
Sign In or Register to comment.