Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 19 of 19

Thread: Wiring look over

  1. #1

    Wiring look over

    The current state of my wiring diagram on a lightsaber project i am doing.

    Click image for larger version. 

Name:	wire diagram 11-16-15 v2.jpg 
Views:	5258 
Size:	128.4 KB 
ID:	5532

    Things to note:
    1. I have the 2nd mom switch set to have the led on only when i am pressing the button, not sure if there are any guides re lighting tricks for the switch led's
    2. I am worried about the recharge port. Are the two ground lines correct? One I link in to the main power before the regulator, the other i put to the ground line to the board after the regulator. That's the closet approximation i could figure out with reference to other wiring setups i have seen on the forums.
    3. The accent Led's are hooked to the board but the i/o's only output 3.3 @about 20ma i think its 25ma peak but i can't find perfect info on it one page said 10ma, Is there anyone that has a link to the proper info. So i don't have the resistors on there because i am not completely sure how to wire it. I figured i would share the current 2 led's per i/o but does that mean i should have 1 resistor for each pair set at 3.3v 20ma or 2 at half the current or 2 at 20ma? I don't wanna over draw the i/o's
    4. the audio amp is't hooked up in the diagram yet as i am still trying to figure out exactly which I/O's to use on the audio board though my guess is the lrclk and tx lines coming from the audio board. Anyone know more about the best manner to hook them up, i need to achieve gapless playback for a constant hum sound. As you might notice i clipped off the sides of the board. So the headphone jack, trim pot area and the ac97 connectors are all gone. I couldn't fit it in the project otherwise, I am thinking that at last resort i'd just use the lrclk and tx lines as pwm's but i don't know if that would interfere with the function of the connection to the audio adapter or not.
    5. Also i noticed that pins 16 and 17 show SDA0/SCL0 grayed out does that mean they are used up when I use pin 18 and 19 as a sda connection or just that i can use either or but not both for the function.

    Thoughts, help, laughing at my lack of knowledge are all welcome (though i would say be nice on the last one ;P)

    Grimmdus

    A larger image file is here on my trello page https://trello.com/c/6Vbo2LRI/28-cur...wiring-diagram

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,928
    First point is that you will need resistors on your RGB LEDs. Ideally you'd put a resistor for each colour for each LED (6 total) due to the way the LED's wouldn't necessarily share well. That said given your space needs would suggest that you can probably get away with parallel LEDs since the current will be low because you will be using reasonable sized resistors:
    http://led.linear1.org/1led.wiz
    http://www.evilmadscientist.com/2009...ce-calculator/
    That said you may need to consider soldering some sort of baby transistor driver arrangement for the LEDs if you want any serious light from them, since teensy pins really aren't designed for LED driving. 10ma will be fine for an indicator, but I take it this is supposed to be a couple of feet of glowing awesome.

    Will need to chase down the Amp part to make sense of that, though an option is to skip the audio board entire and drive from the analog out pin, though you'd likelly still need that for the SD card unless you get clever with audio synth. Normally the analog out isn't really useful since it's got limited current drive and less than great fidelity but your using an Amp and audio fidelity is not quite where this is going.

    What part number is your battery charge/reg board?

  3. #3
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Best to draw a schematic, rather than the pictorial.

  4. #4
    Quote Originally Posted by GremlinWrangler View Post
    First point is that you will need resistors on your RGB LEDs. Ideally you'd put a resistor for each colour for each LED (6 total) due to the way the LED's wouldn't necessarily share well. That said given your space needs would suggest that you can probably get away with parallel LEDs since the current will be low because you will be using reasonable sized resistors:
    http://led.linear1.org/1led.wiz
    http://www.evilmadscientist.com/2009...ce-calculator/
    That said you may need to consider soldering some sort of baby transistor driver arrangement for the LEDs if you want any serious light from them, since teensy pins really aren't designed for LED driving. 10ma will be fine for an indicator, but I take it this is supposed to be a couple of feet of glowing awesome.

    Will need to chase down the Amp part to make sense of that, though an option is to skip the audio board entire and drive from the analog out pin, though you'd likely still need that for the SD card unless you get clever with audio synth. Normally the analog out isn't really useful since it's got limited current drive and less than great fidelity but your using an Amp and audio fidelity is not quite where this is going.

    What part number is your battery charge/reg board?
    The RGB led's will be lighting a crystal chamber through quartz crystals on top and bottom. So no need for more than 10 to 20 ma just need to see how bright i want it. I had checked out the res values on linear1 but i was unsure the wiring config i guess if i need to run 2 each on a line i would calculate for 3.3v @10ma to split the difference run in parallel? because when i ran it @20 it was saying it would use 40ma on the line and i don't wanna mess the board up. Does that sound right? I am still hoping someone knows the specs on what each i/o can run reliably That way i can get the max out of the led's I am gonna have the match color with the main led's as best they can software wise so i need to run them on pwm pins, what few i have left.

    The amp board is here https://www.adafruit.com/products/2130 and http://www.adafruit.com/datasheets/PAM8302A.pdf gives a fixed 24dB gain runs 1.5w @ 8 Ohms 10%THD which is what my speaker is. The SD pin is a shutdown pin on the card other than that it is just the Audio + and - pin's since it's mono. The board also has built in ferrite beads and caps on the output, not sure if i should have anything on the input lines, i don't need superior audio but reasonably decent would be good. I believe i can use pwm as a output for the audio board too but if i can't re-purpose the lrclk and tx for that (since they are both pwm) i wont have the pwm pins for it. maybe i could make some soft pwm's for the rgb led's and use there pwm's but i am new to programming so the less complicated at this point the better.

    The batteries are 18650's at least 2 hoping to fit 4 in a 2 cell config i haven't bought the board yet looking at a 5A or a 11A max output ones on amazon any suggestions?

    Also did you manage to look at the recharge ports wiring does that look right? SHould have + and - to the batt and a negative to the board or whatever shuts it down i believe.

    Thanks for the reply. I wanted to put this up on a lightsaber site but most forums are run by stores so it makes for uncomfortable posts when you have product that competes with theirs.

  5. #5
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,928
    ok, sorry lost the first try at this so it's going to be a bit shorter:
    There is definitely an issue with your charge/power supply circuit but since I'm not sure what that reg component is can only say I'm seeing a black DC jack charging the batteries directly and tying all the grounds together, with a downstream regulator. If that's a battery charge circuit in needs to be between the DC jack and the batteries. If it's a buck reg then the tied grounds are a possible problem.

    With the LEDs, the R is sized for the max pin draw(10-25ma depending on bravery https://forum.pjrc.com/threads/5455-...nt-per-I-O-pin), then that current is split between the two LEDS (and thus half brightness) Also check your LEDs since every RGB led I've met in that form factor has been common + not common -.

    The speaker works ok with audio on the + and the differential - grounded according to adafruit, though will drop your level down. For the driver pin Ideally you'd use a lineout pin from the board, but that's going to be hard to reach post surgery, so going to the analog out on the board end may be easier.

    For your power circuit I'd be going for DC jack -> hulkiest charge board you can fit and afford - > batteries - > power switch (possibly wired to be charge OR power system for added safety) - >high power components and reg for Teensy.

    You can get integrated charge and regulator boards, but I think you are going for a bit more current than they normally provide (or at least more than I'm used to seeing, quadcopter sites would be the place to look)

  6. #6
    Quote Originally Posted by GremlinWrangler View Post
    ok, sorry lost the first try at this so it's going to be a bit shorter:
    There is definitely an issue with your charge/power supply circuit but since I'm not sure what that reg component is can only say I'm seeing a black DC jack charging the batteries directly and tying all the grounds together, with a downstream regulator. If that's a battery charge circuit in needs to be between the DC jack and the batteries. If it's a buck reg then the tied grounds are a possible problem.

    With the LEDs, the R is sized for the max pin draw(10-25ma depending on bravery https://forum.pjrc.com/threads/5455-...nt-per-I-O-pin), then that current is split between the two LEDS (and thus half brightness) Also check your LEDs since every RGB led I've met in that form factor has been common + not common -.

    The speaker works ok with audio on the + and the differential - grounded according to adafruit, though will drop your level down. For the driver pin Ideally you'd use a lineout pin from the board, but that's going to be hard to reach post surgery, so going to the analog out on the board end may be easier.

    For your power circuit I'd be going for DC jack -> hulkiest charge board you can fit and afford - > batteries - > power switch (possibly wired to be charge OR power system for added safety) - >high power components and reg for Teensy.

    You can get integrated charge and regulator boards, but I think you are going for a bit more current than they normally provide (or at least more than I'm used to seeing, quadcopter sites would be the place to look)
    The LED star has essentially a 4ch version the pico buck on sparkfun and protfusion https://www.sparkfun.com/products/11850
    set to run 1A instead of 350ma per channel. It is wired directly to the positive. Input 6v to 20v control pins can run 3.3v or 5v w/ internal pullups.

    The rest of my components run or are 5V tolerant. The other part is a buck regulator. The only info i could find on it is a sale page http://www.banggood.com/Small-Mini-3...-p-917568.html has a adjustable potentiometer for setting the output voltage.
    Input voltage: DC 4.75V-23V
    Output voltage: DC 1.0V-17V (Adjustable, Output < Input)
    Output current: Rated current 1.8A (3A MAX, can not be prolonged)

    The RGB led's are 3+ common - just went back to the datasheet to double check (always a good idea) http://www.mouser.com/ds/2/216/WP154...ZGC-194997.pdf

    question i am planning on feeding 5v to the teensy, but i thought that all i/o's output 3.3v? So i was calculating 3.3v 20ma The post you put up (thank you by the way) has him mentioning 5v vs 3.3v wether it can feed 25ma or 10ma but that i should first subtract the voltage. So I am a little confused especially if the ouput voltage on the pins is always 3.3v or am i wrong on that. So I am looking at either 5v-LEDv then computing for current/2 (two led's) if that makes sense, or am i doing the same but starting with 3.3v...:s

    As far as the dc jack is concerned i was reading and it was talking about + and - to the battery and the negative to the shutoff. Most wire diagrams i saw that used developed lightsaber boards had them going to common ground on the board. It didn't make sense for me to attach both negative lines directly to the battery's negative so i put it to the boards common ground after the regulator not really knowing where else to put it. The other though is maybe getting a simple small toggle switch as a manual cutoff and tie the recharge port 2nd negative to it and back to the battery?

    Thanks for the help, it's really appreciated.
    Grimmdus

    p.s. I am looking at one of these for the battery pack
    http://www.amazon.com/Protection-Cir...&keywords=7.4v
    http://www.amazon.com/Tenergy-Protec...X695RGNT43QR4D
    and using
    http://www.amazon.com/NCR18650B-3400.../dp/B00DHXY72O if i can find the room i'd use 2 sets.
    Last edited by Grimmdus; 11-18-2015 at 07:22 PM.

  7. #7
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,928
    Teensy 3 is 3.3V logic. Can tolerat 5V inputs to the digital pins, but output will never exceed 3.3V unless something has con badly wrong. So level converters or some fidlly interface circuitry may be needful, though I think everything is accounted for at the moment.

    So yes you are using 3.3V for calculating LED resistors, so the blue channel will have a pretty small value on it since it will be at or close to 3.3V. So you do the math for just one LED, then fit two. unlike normal components in parallel they have the fixed forward voltage drop so no matter how many diodes you have the current will be almost entirly controlled by your resistor size. Just means your current (and therfore light) gets divided down.

    If you were doing it properly with a resistor per LED, then you would need to size the resistor for half the pin capability current.

    A suggestion for version one of this project is to actually replace your monseter LED module with a third RGB led and skip wiring the battery. Will make the whole thing just about powerable from USB while doing the development and cut down your dev time and reduce the smoke potential. Speaking of which, what are your plans for avoid conflict with USB power and the batteries?

    Easy option is to remind yourself to never plug USB in while the batteries are switched on. Safer option is to look at fitting diodes or cutting the track on the board to drop USB power, but that means it will need external power to do anything with into the future.

  8. #8
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I have my doubts that a couple of 20mA RGB LEDs' can create enough light to power a light saber, unless it's operated in rather dark conditions, meaning at night indoors with dimmed lights.
    An individual bare LED may appear bright when looked at directly but when installed in a device such as a light saber that likely will, include some form of diffuser it will not be so bright.

    I've got some experience with LED lighting http://trippylighting.com

    This is an interesting thread as my Son has approached me about making a cool lightsaber. Perhaps we can join forces ( pun intended)

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Just looking at your wiring/schematics it appears you are able to create your own PCB. In that case I'd ditch the resistors for the LEDs and go for a driver chip. The CAT4901 from Onsemi a linear constant current LED driver chip that needs only three additional components ( resistors). It is dirt cheap at $2 and and has a 1.27mm pin pitch to is even easy to solder by hand. It has three independent high frequency PWM channels that can drive up to 175mA constant current per channel and a 4th PWM channel for overall brightness. The PWM pins can be driven from the 3.3V Teensy pins.
    But you'll need At least 5V from the batteries to drive the LED part of the chip.

    I drive a few cheap SMD LEDs with this chip that can take the 175mA. Price for the LEDs and the board from OSH park that these are soldered on is maybe $5.
    Last edited by Headroom; 11-19-2015 at 11:32 PM.

  10. #10
    What i was meaning as far as using the accent rgb's is for the programming part until i get the battery pack up and running. The code shouldn't be too different for color change and effects so then i can modify it once i add in the led engin 10w array. That's all i was meaning there's no way i'd try and power it with 20ma lol. Planning to run at 700ma per die with peak to around 950ma for flash effects. I am just saying i agree it would be less complicated and less risk on the parts to do the programming pre installation using the rgb led then right before set up the battery pack wire it and fix the led's where they need to be and then modify the code to 4 color channels. Of course i am a noob soo the coding will be going on for the next 6 months or more as i add each feature. Shooting for basic constant hum and color change right off, then add one feature at a time. I could look into running a cat driver setup depending on the room i have left but for now 10ma per led i am hoping will cover lighting the crystal chamber. gonna put a led behind each crystal and shine in from opposite sides. only gonna be a 2in space. Now that i know about OSH park it makes things much easier in the future though.
    The crystal chamber led's will only need to change color with the main led as best as it can with 3 colors and to fade in and out when the blade isn't on but power is.

  11. #11
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I see! I've skimmed over the posts too quickly ;-)

    Consider that a 10W LED will require a substantial heat sink. Usual calculations for determining the thermals of a LED heatsink assume an efficiency of the LED system of 25%. That means you need to dissipate the other 75% as heat.
    Also instead of using the LED driver chip that is on the picobuck I'd exchange that with a PT4115 which is a more capable and pin-compatible.
    This is available very cheaply from ebay. Heck, I can send you some of the one's I bought and never used.

    Could you provide a link to the specific ledengin emitter you intend on using ?

  12. #12
    Looking at the data sheet is that straight up swappable? One pin assignment looks like maybe it could be, but i'm unsure what that open pad is on the 2 pin side. I don't really have the expertise to redesign the circuit board. Otherwise 1.2A would definately be a improvement As far as the heat sink i have one that is designed for lightsabers, though it's the low profile one was hoping to swap out for the beefier one once it is in stock again.
    This is the one i have. http://www.thecustomsabershop.com/MH...tyle-P841.aspx
    This is the one i want. http://www.thecustomsabershop.com/MH...k-V3-P782.aspx
    and my led engin is
    http://www.mouser.com/ProductDetail/...F1P96I5Q%3D%3D

    I appreciate the offer i might just take you up on it.

  13. #13
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Yes, I compared the two data sheets and the two chips are pin compatible and swappable.
    I'd definitely try the bigger heat sink. These heatsinks are designed for Rebel Tristar LEDs that you can buy for example from here: http://www.luxeonstar.com/rebel-sabe...led-assemblies

    The wattage of these is a good bit lower than that of the Lightengin LED that you linked to. They really only take 3 X 700mA at around 3V average. That makes about 6 watt vs.10 for the ledengin LZ4. Also running the ledengin at around 550 ma per die will generate much less heat but provide you with 70-80% of the light output.

  14. #14
    Good thing to think about, the whole thing is gonna be encased in about 1/2 to 3/4 in aluminum outside of the heatsink so i am hoping that might help some. I wonder if there is anything else that i can do to help. Also i bet i could figure out a way to have two modes so i can run it at a high power setting for special occasions? Not sure. but i definitely don't wanna burn anything out. Interestingly enough if you look at the Ultrasaber heatsink it doesn't look any bigger than the tcss flat one and they do use the lz4's in there high end sabers, wonder why..plus i don't think they use copper.

    By the way, What would i do with the open pad do i leave it unsoldered?

  15. #15
    Sent you a PM headroom

  16. #16
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I am not sure what you are referring to as the open pad. If you mean the center pad on the LED driver chip, this chip is usually reflow soldered onto the PCB. If the PCB is designed correctly you'll see that there are little vias in that pad directly under the chip. These are thermal vias that connect the top of the PCB with the bottom of the PCB electrically but more importantly thermally to increase the cooling surface.

  17. #17
    https://people.xiph.org/~xiphmont/thinkpad/PT4115E.pdf
    Yeah i got the name wrong it was exposed pad, read into a bit more and it looks just like what you said, just got confused if it was a bare lead for the circuit for some other function.
    Last edited by Grimmdus; 11-25-2015 at 08:28 PM.

  18. #18
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Correct. I thought that my last post addressed that ;-)

  19. #19
    yep you did

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •