Electronics mod with tons of circuts

Discussion in 'Modding' started by Zephyr, 5 Dec 2004.

  1. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    PIC vrs AVR is very much a religous thing, and the benefit on this project as we've already gone on about is language / support.

    Now i often think its better people understand whats going on in ALL of the micro, its not hard at all, it might take a whole weekend of playing, but once you've done that the uC world is ur oyster. Now for this i would say its so simple its quite silly not to do it in macro assembly.

    The problem with high level languages is there is more to learn, were as MASM if you're smart enough, you can figure out everything u need. I know C, about 5 differnt compilers intimately, but in the lab on friday i was helping someone who was using a C compiler i've never used before, damn it was hard, i wanted just to go MOVLW x MOVWF STATUS, but this C made it too hard because it was trying to wrap it all up.

    Now the point is this project isn't hard at all, but when we see people posting code on this forum often they don't understand how it works, as its just been taken from other peoples sites.

    Which brings me to the point of this post. Zephyr:
    No matter what arguments are here, when u start messing about with a micro, its VERY worth while learning enough so that you understand ALL of the code your given. On a micro its not as simple as a flat memory model PC, copy and pasting, trying to use a function approche often dosen't work. And enless you have £50 to spend on an ICD u will get quite stuck because you can't see were u've gone wrong.
     
  2. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    So now im confused again....Which is better (better meaning cheaper and easier to work with for a beginner) for what I would like to do?

    :confused:
     
  3. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    For what you want to do you could use a PIC or AVR. You're design is so simple that it makes no difference which type you use other than cost.

    You can build a PIC programmer from bits you have laying around, so I'd have thought it would be cheaper for you to use a PIC. If you'd rather use an AVR then use one :)

    I'd suggest it's easier to use MASM to program PICs for a beginner, and since MPLAB IDE is free, you don't need to buy a compiler or anything. I'm not sure what free software is available for AVRs. Just choose which is most suitable for your needs. If you only need a USART and lots of I/O's, the PIC16F87X range is pretty cheap and would do fine. An ATMEGA8 or 16 would do also.
     
    Last edited: 13 Dec 2004
  4. nleahcim

    nleahcim What's a Dremel?

    Joined:
    22 Apr 2003
    Posts:
    550
    Likes Received:
    1
    You can build a AVR programmer for about $3 in parts - so I don't really see the programmer cost as a serious factor.
     
  5. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    The answer lies with you, Zephyr. Take a look at my site: microPICs for idiots . It should take you a whole 20 minutes to read through what you need to know.

    Then take a look at AVR sites, specific to the language you want to program in.

    Research a little so you have an informed decision.
     
  6. Alvin

    Alvin Guest

    Well, Zephyr, I think its not time to be too confused just yet.

    I think we can go ahead with the driver interface part,and just design it so it's uC independant.

    And you can go ahead with making some lighting tests, to see if what you have in mind, will actually give the results about the lighting that you want.

    There are likely to be free C++ and Macro ASM for both AVR and PIC. And the simplest of programmers can be made for both uC for almost nothing. So I think you should just give it time, and start researching a little, like Hazer suggested.

    The uC part of this project is relatively simple, so perhaps we can even come up with programs for both PIC and AVR, and in several languages.
    That might end up being a good exercise for more people than just you.
     
  7. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    So, for the stuff that I will need to build the controller and the programmer, how much will it be and where can I get it? Plus, how hard will it be to build? I assume I can find everything online, easily? The even better thing would be if Radio Shack has them, but I doubt it.

    Free programmers would be nice. So, basically I would write the program on my computer, and send it through a COM port (Serial or LPT?) to the PIC/AVR programmer, which changes it to the PIC/AVR's native language and sends it off to the controller? Which in turn stores it in a RAM module, and runs the programs I need?

    I plan on doing this extremely slowly, bit by bit at a time, as time and money permits. So, please bear with me if it takes me a week to build a board that most people can build in a few hours, as I have to do it slowly where I can find spare time (although this seems to be many people's issues :sigh: ). I figure that if I can get the controller built and programmed, then the rest is just grunt work (wiring LED's, testing, mounting, tedious stuff). I still need to get my hands on a basically standard rectangular box. Finish and color don't matter, as I plan on re-doing them anyway, unless I can find the perfect finish. I'm thinking at this point a black case with a basically entirely acrylic side panel, with metal only around the edges where the panel interfaces with the case. This way I'm not stuck with an acrylic case where I have miles of wires to hide and nowhere to hide them. The other thought is that I venture away from the world of computers, and make this simply a light box. I am starting to think this would be cooler, as I wouldn't be restricted by the simply physics of a computer (wires coming out, drives, motherboard, large power supply, etc.) and simply turning this into a Shuttle sized box with acrylic panels on top and one side that would sit on the desk. This way, I can strip it down and make it just a light box, plus it would be more versitile and easier to work with. As I write this, I'm coming up with new concepts and ideas, so I'll try my hand at SketchUp and see if I can't get something out that gives an idea. And again, thanks for everyone's help!
     
    Last edited: 14 Dec 2004
  8. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    OK. Got another diagram made, this time a modded picture of a Shuttle case. The blue buttons on front would control each channel seperately. The pink LED's around the Shuttle logo (which I might change should I decide to use this case) would chase around all the time, so that would need to have its own circut, but not be controlled by the other controller. The green LED's on front would be the indicators for each channel, telling me which one is on at what time. The black colored lights are supposed to be white lights, not black :duh:. The CCFL's wouldnt actually be mounted on the window, rather the adjacent side (i.e. if in the picture the CCFL's are on the top window, they would be on the bottom of the case), but it's rather hard to depict 2d. The LED's would be mounted underneath, so you wouldnt see any sign of them from the outside, but again, have to give the idea. It looks like the <insert name of large city in your country> Christmas display, but...again...all the lights wouldn't be on at the same time. Why all the white? Because I want to have semi-directional white control, plus I want there to be an option where all of the white lights are on at the same time, creating a wicked-bright glowing affect. The weird black ball with the white in it in the lower, rear, left hand corner is a strobe light. I think everything else is self explanitory. (I know we discussed the possible problems with the CCFL's, but for now they're the best lighting idea I can think of, plus they give a good idea of what kind've affect I want). Oh well, here it is (done in Photoshop this time :thumb: )
    [​IMG]
    :naughty:
     
  9. Alvin

    Alvin Guest

    My oh my, that is ONE WILD PC case.

    What parts do you need? Well, as the design is evolving a little, your control parts may change along with it.

    One main question would be, how precise would you like to be able to control those LEDs. In a line or actually individually?

    We may still work out a good solution for those CCFL's, as with that many tubes I think it will definately be worth getting a "power" converter, and then using Triac's to turn on/off those individual tubes on the AC lines.

    And the buttons on the front. They could be hardwired to light lines, or better yet, they could be hooked to an input array/matrix that is read by the uC.

    With the way you like lights, I would say that you would get most fun from being able to control each LED/light source individually (read: under program/uC control).

    Incidently, I did go ahead and designed a board with 64 outputs, just as Hazer suggested.
    This first "64x output" design uses standard DIL size chips, but I think I'll try one using SMD chips, as that may give us a chance to get as many as 256 outputs on the same size board.

    An image of the "64x Output Board"
    [​IMG]

    I do not shop in the states (I live in Europe) so I do not know which places is the best to get components from, but it may very well be worth checking out different postorder/internet shops, and eBay, as you are likely to get the key components cheaper that way. And then just get odd parts from places like Radio Shack.

    As for PCB's, I'll be able to make you some, and then you can just populate them your self. Or you could go the long way and build the circuits on Strip boards. Or get a friend living closer to you, to make the PCB's. Or even just send in the gerber files, and have a pro etch the boards. Your choice.

    Yep, that is basically the way it works.
    The program in native code is stored in FlashRAM, so it stays there even when the power is turned off. FlashRAM is sort of an uC's super miniature HD.

    With FlashRAM the uC becomes completely autonomous, once it is programmed.

    The uC still has RAM and EEPROM where user data/choices can be stored.
    It would probably be beneficial to take a look at a smal smalpe program shortly, as that will probably give you a better idea of what can be done with a uC and just as importently HOW it is done.


    About that case
    I think just adding plexi windows is a great idea, as there would definately be a few wires, if all the LEDs were to be controlled individually.

    I'm thinking that lacquered copper wire might be an easy way to go. They make coils using lacquered copper wire. This way, you could use very thin wires to each LED, and just make a strand of wires, that would hook up to the controller board(s). The strands would be much thinner than any handfull of plastic covered wires.
     
  10. Alvin

    Alvin Guest

    About parts and prices.

    I'll point you to the cheapest supplier I have found here in Denmark/Europe
    Conversion rates: US$1 ~ 6 dkk (danish kroner)

    8x output driver chip ULN2803 SMD dkk 4,63 @ 10pcs.
    74HC573 SMD dkk 1,87 @ 25pcs.
    Power transistor TIP125 5Amp dkk 4,86 @ 25pcs.
    BT138 Triac dkk 5,39 @ 25pcs.
    ATMEGA8-16MI dkk 20,15 @ 1 pcs.

    That place does not sell PIC, so I'll leave it to someone else to find good PIC prices.

    You will probably be able to get better prices online in the states, as these prices are including the 25% Danish sales tax.
     
  11. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    I never thought of controlling each LED independantly. That sounds cool, but slightly out of my league...Until I read your post, I was planning on it just being *strips* of LED's, but in the strips where there are multiple colors, each color is a different channel. As far as the buttons and green LED's on the front go, I hoped there was a way to hook them into the uC, so I could either let the program take over or control the lights manually. Plus, with the rapid switching of the channels in each program, I think just the green LED's constantly going on and off would create an affect of its own.

    The pink LED's on front don't need to be worried about, those will be controlled by what I've gathered is a 555 switch, which will just make the LED's chase around. The laquered copper wire idea sounds good, because (Googled a bit ;)
    ) they will be super-thin, and easy to conceal. Even though I will have to think of ways to hide wires, the much thinner wires will help tons.

    As for the uC itself, I must first say that 64x Output Board looks beautiful, and I barely know electronics :thumb:. I don't know that I trust myself enough to do this myself, and I was actually wondering if you could construct the actual PCB. You really seem to know what you're talking about, and every time I throw out a crazy idea, you have 3 ways to do it, each improving on my original plan. That, and you've been really cool :hip:. Of course the world is free, so you will do this all for no cost. :worried:. Kidding, I wouldn't even ask, don't worry. I will be more than happy to pay for parts+time. I don't know how long it will be until I'm ready for the construciton phase of this, but I don't plan on leaving Bit anytime soon, and I can certainly hope you don't either (where would I get the know-how to do all my crazy ideas :p ).

    Everyone at Bit is great, and everyone has their own little area of expertise, and I've gotten awesome feedback on this thread and others from lots of people, so thank you to all :thumb:. Alvin, I seriously need to thank you though, because just following your posts, you've created boards, researched things, racked your brain finding possibilities, plus every time I check this thread there's another post from you :p. Thanks, very much so thanks :rock:.

    :waah: After that bit of emotion, I shall continue: about the CCFL's, I don't know left from right where the best place to break the line and throw the controller line would be, or what I would need to use to make it work right. (seems like I've said a lot of "I don't know how to _____" in this thread. well then what DO you know how to do?! :p )

    On the 64x Output Controller schematic, the power input is obvious, so I won't waste time asking about that. I assume the numbers from 00 to 07, repeated around the top and bottom of the board are the outputs for the channels. The chips are self-explanitory, but what is the section in the middle, as well as the section on the left side? I assume that the left side interfaces with the programmer/PIC/AVR, but I don't know (there it is again :p ).

    I'm off, but thanks again to everyone, especially Alvin, for everything! :clap:

    BTW: Just read through Hazer's Guide to PIC's, awesome. Extremely helpful! :idea:
     
  12. Alvin

    Alvin Guest

    You are very welcome Zephyr. It is nice to know that my efforts are appreciated. :thumb:
    I do this because I like being part of the process, and because I WANT to make these interface boards. Like I said before, I have been working on a Mod Guide of how to interface a PC/uC to the real world. And to me it's simply a more enjoyable journey/process when being able to share ideas and such with others. It also gives valuable feed back for design modifications, avoiding pitfalls and such. As well as designing for a specific project makes it easier to weed out some of my wilder interface ideas. And it's alway nice to get additional constructive input form other fellow modders.

    I plan on hanging out here at Bit-Tech for some time in the foreseeable future, so just take your time with you project. Who cares if it takes 6 or 12 months to finish, as long as the journey can be a good adventure.

    About the CCFLs
    then I have found a producer at - well guess what - www.ccfl-inverter.com, so take a look at these specs CCFLs they tell me that a typical CCFL uses 5mA, and operates at 100-1200V AC, with an ON value of about twice that.
    And form the specs of these Super Inverters, it seems that the frequency is in the 20-30KHz range.

    By looking at the normal Inverters (click thumbnail picture for larger pictures) It seems that the secondary side of the coil can be basically directly connected to the Tube.

    Mind you this is what it looks like for an amatures of electronics point of view. It does however give me some ideas of how we might be able to do the power and controlling of the CCFLs.
    So one of these days I may be off to my hobby lab (read: computer desk with the keyboard moved to the side and the desk filled with components and my three multimeters. For this one I may have to borrow a Scope from a friend)
    and testing CAN BEGIN :dremel: [​IMG]


    About the 64x Output Controller board
    on the left is the uC connection points, as you guessed.
    The center piece, are the wires needed to connect all the 573's to the 8 bit data bus. Each of the 573's than have a catch-and-store pin (LE= Latch Enable). This way 16 data lines can become 64 (128, 256, ....) data/driver lines.
    Some tricks can even be applied to the 8x Catch-and-store pins (LE) when adding more 573's than the current 8, so one does not need another 8 data pins on the uC to be able to control say, 16x 573's.
    But more on that with the next driver board design, where I'll be aimnig for 256x driver control lines.
    It may be a bit much for the same size board, but we'll see.

    Just out of curiosity, I have made a calculation for the chip cost of a 256x driver board.
    32x 573 chip (@ dkk 1,87) = dkk 59,84 ~ $10
    32x 2803 chip (@ dkk 4,86) = dkk 155,52 ~ $25
    finished PCB $5-7
    jumper pins for easy creation of pcb vias $5-7

    As I have offered before, I'll make you a populated PCB basically at cost. Maybe we can throw in a few additional components, when shopping, so I'll have some parts to play with for my own (smaller) interface boards.

    See ya'll later.
     
  13. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    A 64x output board should do me, with all those more channel's I may definentally split up each LED strip into sections of 2 or 3 LED's. So, I stopped by Radio Shack today, because my wife got her hair cut and I had nothing to do, and lo and behold, Radio Shack is across the street. So, I went in, and found...what else? Multimeters glaring at me. So I picked it up, looked at it, and checked the specs. It's a "29-Range Digital Multimeter". They had a much bigger, 90-Range Multimeter, for double the price. As it's my first multimeter, I decided I didn't need anything amazing. So, I grabbed it, some 96% Tin, 4% Silver .062" solder, and asked about laquered copper wire. They said they didn't have any, but had a 30 gauge, extremely thin plastic-coated wire. I grabbed it too, but wonder if 30 gauge isn't too thin to wire the LED's? I assume they don't need anything very thick, but I could be wrong. Checked out with all that (plus a Mini Cooper model, because it was the "S" version and pepper white with black roof and mirrors, the same as my wife's Cooper :p ). I looked at a lot of the controllers, PCB's, everything, but didn't know what to get at all, so left everything there. Just an update...
     
  14. Alvin

    Alvin Guest

    A 64x board it will be then. I have however started designing a board using SMD chips only, so I'll just finish that, and then get on with making a physical version of the 64x board.

    About wires and Amps
    One wire (the plus wire) can run from LED to LED. This wire does however need to be thick enough to handle probably a couple of Amps. And any PC style wire can do that.

    The other wires (the LED minus wires) needs to run from each LED/group of 2-3 LEDs and back to the control board. These wires will typically only carry 20mA, and for that I'd say that any wire thick enough to be seen by the nacked eye, will be thick enough.
    So for the LED minus wires, I think you 30 gauge wire will be perfect.

    I do however not have any idea how thick a 30 gauge wire is, as here in Europe we use cm2 (centimeter squared) to measure the thickness of a wire. Some one here at Bit-Tech did point me to a translation table. It was a couple of days/weeks ago in a thread about PSU I think. I'll find it, so we can talk the "same language" about wires.

    Congrats on the Multimeter and the solder tool stuff. Sounds like good stuff. :thumb:

    Now, what's with the Mini Cooper? Is that a RC car or something fun like that?

    I recently picked up a small 4" long RC car at a local supermarket. The model name says:"Mini Cooper". I bought it as a christmas gift for the for the cat to have something to chase (read: I bought it for me, to have something to play with indoors, that might also entertain the cat :naughty: ). Unfortunately it's somewhat too big, as the cat will hardly turn it's head when the car comes racing by. I say it's somewhat too big, because, it's the perfect size for me to drive around with in the apartment. :D
    Picture of a Danish version of the Mini Cooper
     
  15. nleahcim

    nleahcim What's a Dremel?

    Joined:
    22 Apr 2003
    Posts:
    550
    Likes Received:
    1
    30awg wire will be fine for wiring leds. Being that it's solid, and very thin, try to bend it as little as possible, as it can wear out fairly quickly. I personally love 30 awg wire - it's very useful for really fine stuff (like doing work on smt components and whatnot)
     
  16. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    Well my wife has a real Mini Cooper S, the replacement for her '88 Honda. She's in love with the car, and loves everything Mini now, so I thought it would be a fun gift (yes, the one I bought is an RC :p )

    So the 30AWG wire will work for only the anion lines, or both the anion and cation lines?

    Yeah, my cat absolutely loves anything that moves, including laser lights (if you haven't tried that, you have to. Cats will chase those things everywhere. I even had it attempting to climb the walls to get it :hehe: )
     
  17. Alvin

    Alvin Guest

    That Lazer light sounds like a great idea for the cat. I'll have to get one of those.

    I can appreciate how your wife likes everything Cooper. I do too. I'll probably never buy one (I have five kids), but I still like it and consider it an all time classic.

    I never can remember the Anion/Cation thing, so I just remember it as plus and minus, with minus being the short one.
    [​IMG]

    And sorry about my pervious wording about connection LEDs, you do not weant to connect each LED to plus, you want 3-4 LEDs in a group (connected in serial), and the plus side of the LED group connects to plus 12V
    3 LEDs in blue and white lines, 4 LEDs in red and green lines, I'm not sure about other colors, you'll have to read the specs of the LEDs you buy. OR measure with that new Multimeter :thumb:

    You can use the 30 awg for both lines, but if you choose to have just one plus wire loop from one LED group to the next LED group, then you cut the number of long wires in half.
    A loop wire like that will end up carrying 20mA for each LED group it is connected to, so with ie. 10 LED groups it will carry 200mA, with 20 groups then its 400mA and so forth.

    Enough with the talk, here's an illustration
    [​IMG]

    The yellow wire should probably be thicker than 30 awg. The balck wires can all be 30 awg, the blue wire might also be 30 awg, we'll have to simply touch it or find a table with the recommendation.

    The yellow wire does not have to be connected in any specific order.

    Another point is that each ULN2803 driver chip can only take a 500mA load. That's an average of 62,5mA on each of the 8 channels.
    So you need to calc (keep track of) the max possible load on a channel, and sum those up, so an 8 channel ULN2803 can/will not exceed it max driver capacity.
    With some of the 8 channels hooked to ie. 20mA loads, other channels can carry higher load. Each channel's electronics is actually strong enough to be able to take all of the chip's 500mA capability. It's just that if you load MORE than 500mA total on the chip, it is very, very likely to fry [​IMG]

    I have finished a 128x controller board. I have also made a version 2 that adds some flexibility to hook up other driver chips, so EACH of the add-on channels will have 500mA or 5Amp capability, independently of the load on any of the other channels.
    More detalis about this board later.
    The 128x board can also be used as a 64x board, and at the same price as the first 64x board, we'll just only mount enough chips to make it a 64x board.
     
  18. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    So would it be electronically better to string the LED's all together on one channel, or break them up into groups? It seems it would make sense to seperate them, because it would be less load on each channel. But, does this mean if I wanted to turn on every LED channel at the same time, for a blinding effect ( :p ), each LED channel would have to be controlled by a different controller?
     
  19. Alvin

    Alvin Guest

    Well, "electronically better to string the LED's all together on one channel, or break them up into groups?"
    The short reply would be: define "better"

    But then, I'm no good with just short replys :worried:

    How many LEDs do you think you will have in a string of LEDs?
    For the sake of an example, lets say 24 LEDs.

    As we have a 12V supply they will seperate into groups of 3 LEDs. That makes 8 groups each using 20mA. One string of 24 LEDs is thus using 8x20mA=160mA.
    With a 500mA limit on the chip, only 3 strings of 160mA should be connected to one chip. That leaves 5 un-used channels on a chip, but this is the "best" electronical design limit to follow.
    As I do think allowing for an option of ALL LEDs ON would be the better VISUAL design guide to follow.

    If there are only 12 LEDs in a string, then each string of LEDs (4 groups of 3 LEDs) would use 80mA, and 6 strings could then be attached to one chip.

    Does this clarify anything?
     
  20. Zephyr

    Zephyr Go V-Boy, Go!

    Joined:
    1 Oct 2004
    Posts:
    2,024
    Likes Received:
    1
    While it would be more complicated, I think the end result would look much cooler if it were 4 or 5 LED's per channel. This would take a lot more programming effort, and a lot more channels to worry about, but it would provide a much better control. And yes, that clarifies it. Thanks :thumb:
     

Share This Page