Shop OBEX P1 Docs P2 Docs Learn Events
Eight Channel Light Controller ==== Reached My GOAL ---- Propeller — Parallax Forums

Eight Channel Light Controller ==== Reached My GOAL ---- Propeller

lockadoclockadoc Posts: 115
edited 2010-05-30 04:26 in Robotics
I finished my first project outside of the Boe-Bot ,Stampworks and Propellor Education Kit books. It drove me nuts at times,but was worth it.
Could some of you go over it and make a some kind of a report card· for me. I would like to see where I could do it better.


This Object is to control 400 feet of 4 colored lights, and a traffic light.

I know its not a very neat mix of methods, BUT it does do everything I wanted. After I got it up and running I went on and cleaned up the documentation·on all the methods. Then complied·it and it would not work right, I was going nuts trying to get it running··before I realized the battery was too weak (Boy that sure does make you go over it again and again).


I want to thank the FORUM for all the help and input.

BillS
· Louisville KY.

Added 5-29-10

Link to one of the lightshows

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



**************************************************************************************************************
This one is with fast rate for the lightshow
Each boat slip is to take care of bulbs infront of the slip,most have updated the bulbs to CFL's but a few have not.
Most of the boats were out for the night thats why there are only a few boats docked

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




▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life is fun with a Prop.



BillS
··· Louisville KY.

Post Edited (lockadoc) : 5/30/2010 4:31:37 AM GMT
3264 x 2448 - 1M
3264 x 2448 - 1M
2448 x 3264 - 813K

Comments

  • HumanoidoHumanoido Posts: 5,770
    edited 2010-02-17 07:07
    BillS:

    Fantastic project well accomplished!
    I like the schematics in the spin file
    and the documentation, and overall
    project layout.

    humanoido
  • BeanBean Posts: 8,129
    edited 2010-02-17 13:30
    Bill,
    The only thing I would worry about is grounding pin 8 with the relay. When you go to read the LDR you are creating a dead short when you make pin 8 high.
    Other than that, it looks good to me.
    Nice Job.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    ·
  • lockadoclockadoc Posts: 115
    edited 2010-02-17 14:54
    Would a diode protect pin 8 ?
    I tried all sorts of things to make the light displays work when it was dark, that was the only way that I came up with that worked.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • ManetherenManetheren Posts: 117
    edited 2010-02-17 23:33
    The best way I have found to make the relay work is to use a transistor and have the pin out control the base of the transistor and the collector control the relay. Kind of the same principle as controlling a motor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tia'Shar Manetheren
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-02-19 01:24
    Re. P8.· An additional resistor, low val (1K), between the LDR and GND would be good insurance/practice: some resistance there even if the LDR went to "0".
  • lockadoclockadoc Posts: 115
    edited 2010-02-19 02:39
    Thanks The Resistor sounds good. I'll try adding diode also between pin 8 and 18

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • lockadoclockadoc Posts: 115
    edited 2010-02-24 05:02
    Updated the code



    added 4 more light displays· to have one color of bulbs light up· for a few minutes to check they were in the right order and working



    also changed the road sensor from pin 30 to pin 14

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • securemansecureman Posts: 11
    edited 2010-05-17 23:08
    Hey Bill

    I Wonder if if is possible to expand this project to include more light circuit's and include touchscreen to control the system ???

    The Propeller Chip Has Opened UP My Mind To All Kinds Of Possible Things !!!!!

    Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Doug Smith
  • lockadoclockadoc Posts: 115
    edited 2010-05-18 02:44
    Yes all that could be done, I only used 18 out of the possible 32·pins,it could also be connected to a multiplexing circuit if more channels are needed.I was planning on installing a realtime clock chip for the timer


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • bill190bill190 Posts: 769
    edited 2010-05-18 16:08
    For the traffic signal, there is this line...

    MS_001·· = 80_000_000 / 1_000

    Might instead use something like this...

    MS_001·· =· clkfreq /·1_000

    ...then no matter what speed the Propeller is set to, or perhaps replaced with a new faster Propeller 5 years from now, the timing should stay the same. Test by slowing down the Propeller speed and see if the timing remains the same. This is mentioned in the waitcnt documentation or in the Propeller Education Kit Labs manual around page 62.

    And if you ever incorporate a left turn signal, there is NEVER enough time allocated for left turns! Or the left turn signal will turn red *just* before I get there! So add a few extra seconds for me to get through the light please.burger.gif
    ·
  • lockadoclockadoc Posts: 115
    edited 2010-05-18 20:23
    I never thought of left turns,,,,,,
    you are right about the " MS_001·· = 80_000_000 / 1_000···· " line, I did not notice that I did it that way.Must of been one of my late night computer·Loose track of time nights, and everytime I looked at it sence I·just sailed right past it.
    Thank you for pointing it out .

    I will update the code for it.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • metron9metron9 Posts: 1,100
    edited 2010-05-25 05:45
    When do we get to see the lights? Perhaps a youtube video?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • lockadoclockadoc Posts: 115
    edited 2010-05-27 23:13
    I'll make one this weekend and post it during the week

    on the "lightshows"· I was amazed how high the RATE could get up to with CLF bulbs that we have on the light chain.





    Con
    ·· Rate =16·························· 'Variable used to change display speed
    ·· MS_001·· = 80_000_000 / 1_000································ ' ticks per millisecond····
    PUB LightShow4

    ··· dira[noparse][[/noparse]0..7]~~
    ······· dira[noparse][[/noparse]18] := outa[noparse][[/noparse]18] := 1················ ' Set pin 18 to output-high
    ······· pause(100)··
    ···
    ··· repeat 10
    ······· outa[noparse][[/noparse]0..7] := %10001000
    ······· waitcnt(clkfreq/rate + cnt)
    ······· outa[noparse][[/noparse]0..7] := %11001100
    ······· waitcnt(clkfreq/rate + cnt)
    ······· outa[noparse][[/noparse]0..7] := %11101110
    ······· waitcnt(clkfreq/rate + cnt)
    ······· outa[noparse][[/noparse]0..7] := %11111111
    ······· waitcnt(clkfreq/rate + cnt)
    ······· outa[noparse][[/noparse]0..7] := %11101110
    ··


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • lockadoclockadoc Posts: 115
    edited 2010-05-30 04:26
    Link to one of the lightshows

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



    **************************************************************************************************************
    This one is with fast rate for the lightshow
    Each boat slip is to take care of bulbs infront of the slip,most have updated the bulbs to CFL's but a few have not.
    Most of the boats were out for the night thats why there are only a few boats docked

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





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
Sign In or Register to comment.