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

Thread: Teensy 3.2 Lightsaber

  1. #1

    Teensy 3.2 Lightsaber

    So i am doing a lightsaber using the teensy 3.2 as a main board (https://trello.com/b/1MbM08rb/long-h...tsaber-project) Already purchased the 3.2 and the audio adapter board. Jumping ahead of myself i already soldered them together (got some leads from the underside of the teensy, namely 29-32 , 25, 26 for the sda,scl, pwmx2, rx,tx just in case) Also i cut down the audio adapter. I am hoping i didn't screw something up :s The board was too wide and i wasn't planning on using the ac97, headphone jack, or trim pot area. The cut is just outside the two visible resistors one above and one below the main pin lines, leaves the board just slightly wider on both sides than the teensy. Also picked up 6dof imu-6050 board, a class d 2.5 watt amp, 8ohms 2w speaker, 3 mom switches 2 with led rings (1 for power/aux, 2 for aux/menu/effects). Plans are to buy a LED engin rgbw 10w star, 2 accent rgb 20ma led's, and i am looking at making a 4ch 1A led driver similar to http://www.instructables.com/id/Easy...iver/?ALLSTEPS minus the extra frills. Not sure power wise though if i can get away with two panasonic 18650's w/3400ma @7.4v thats the plan but being a major noob that's not based on any calculations but off of what i have seen others use on forums. I might get away with 4 cells but i'd have to change the hilt some if i could do it. Led's forward voltage is 2.2v-3.4v @700ma max's out just above 4v depending on the die. Will be using a recharge port as well.

    My plans are to include as many of the feature found in the major popular lightsaber sound and driver boards like the Crystal Focus http://www.plecterlabs.com/catalog/p...oducts_id=1173
    As many of these features as possible:
    3 or 4 channel color mixing (7 to 10 programmable presets using a windows gui)
    Multiple sound banks for either programmed presets tied to the colors above or cyclable or both)
    Flash on clash i.e. pulse of bright light (color select-able) on detected impacts
    Fade on/off light for on/off effects combined with sound effects
    Blade shimmering effect
    Random low level blade pulsing
    Constant hum with frequency changes (based on swing speeds or gestures?)
    2 Accent rgb's that change to the color of the blade and pulse on off when main power is down.
    Stretch ideas would be demo or special modes where the blade would play music accompanying a preset theme and/or a easter egg mode with color shifting and music (possibly with the accent led's pulsing to the music?)

    As i stated above i am a noob. While i have built every pc i ever owned, i only just stated learning the basics of electronics and schematics and my programming experience isn't much more than a week of html from college. I have been reading and studying as I plan. Reading cross referencing etc. I could really use some advice. Right now i am trying to straighten out the wiring because i am on a spend as little as i can so my wife doesn't kill me budget i am looking at purchasing the bulk of the remaining electronics Namely the led star, accent led's, led driver components, and anything else that come along with that..which is much of the issue as i am unsure of what i need resistor, power regulator(s), caps etc.. The teensy is gonna run off of 5v, led drivers x4 run off of 3-6v on the Vin and upwards of 25v on the Vcc (i don't really understand the difference between voltage in and voltage source), the Amp says it runs 1.5watts for a 8ohm spk but also said its up to 5.5Vin, The 2 swtich led's and two accent rgb led's i figured i would run directly off of the teensy. I don't mind if the 2 accent led's run off of the same pwm i/o's sharing the power since i don't think i can come up with another set of 3 pwm's with the sound adapter hooked in. Do i run the boards all off of a 5v linear regulator? or does each piece need it's own, Any help on how to know if i need to use a cap and calculating resistor needs i might have.

    Re the audio board i only plan on using a mono speaker and i was hoping on using the i2s sound connections but in the library it shows them coming off of the ac97 area do i just use pins 23 (LRclk) and 22 (tx) or am i screwed or are there special circumstances i need to have in mind. I was hoping to either play up to 2 files same time option if i needed to or if there was a way to run 2 channels of audio over the mono (not sure that's even possible)
    Also i was hoping on using the pwm on pin 6 for one of my led's but it has the memcs hooked up to it. I don't plan on using flash memory is it locked into using the memcs or can i use it as i would if it wasn't connected memcs.

    As you can see i have quite the road ahead of me. I am planning on having a usable prototype by the launch of starwars on dec 18th though i know i probably won't have a full featured one by then. Any and all help is super appreciated. After writing this out i know it's quite the load to throw out there.

    Current state of my wiring diagram is here: https://trello.com/c/6Vbo2LRI/28-cur...wiring-diagram
    Photos of all components that i have to date are on the trello page and i am gonna start linking the data sheets to all parts as well.

    Thanks
    Grimmdus

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    579
    You seem to be jumping a little far into the deep end here.

    Break the project down into sections such as, light control, audio and the such. Get each one working in turn and then combine them. Doing this too early can cause a number of issues that would be hard to debug without the prior experience

    In terms of power, a single 5V regulator will do the job however read the datasheet for them before you buy any. You need it to suppy enough current and it in turn will need to recieve a voltage of around 7V+. Consider the potential need for a heat sink if you have a high supply voltage.

    I'm not sure what you're asking about the I2C connections but you can have as many devices on that bus as long as they have unique addresses

  3. #3
    Administrator Robin's Avatar
    Join Date
    Oct 2012
    Location
    PJRC Global Headquarters
    Posts
    319
    Out of curiosity, are you a member of the 501st or Rebel Legion?

  4. #4
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,665

  5. #5
    Senior Member
    Join Date
    Oct 2013
    Location
    Rogersville MO
    Posts
    253

  6. #6
    Quote Originally Posted by Xenoamor View Post
    You seem to be jumping a little far into the deep end here.

    Break the project down into sections such as, light control, audio and the such. Get each one working in turn and then combine them. Doing this too early can cause a number of issues that would be hard to debug without the prior experience

    In terms of power, a single 5V regulator will do the job however read the datasheet for them before you buy any. You need it to suppy enough current and it in turn will need to recieve a voltage of around 7V+. Consider the potential need for a heat sink if you have a high supply voltage.

    I'm not sure what you're asking about the I2C connections but you can have as many devices on that bus as long as they have unique addresses
    Yeah deep end is about right
    As far as break down that is definitely my plan as far as coding is concerned.
    Power wise on the 5v regulator i have mostly only seen 5v 1A or 5v 1.5A max. Are there other regulators that handle a larger load? I found this http://www.mouser.com/ProductDetail/...qc766fPIZDw%3d That seems promising but i don't really know regulators much if at all. Seems i can adjust the voltage and it can take up to 5A but i don't know how that process works or if the amps that can be passed through are dependent on the voltage, i.e. if it would supply the 4 to 5 amps i need at 5V. If it wouldn't be a problem i don't mind using multiple regulators but would that work in series? The circuit anatomy i think is my major confusion at the moment. Also is there a drop off in voltage over the circuit or is that negligible.

    As far as the IS2 connection i looked back over the schematic it looks like the physical connection was the ac97 i/o's i cut off there is also I2SS which uses pin #9 bclk, #22 lrclk, and 23 TX. But it says they are used to connect to a is2 device. So i am assuming if someone can correct me, my choices sre then spdif (not happening), DAC, and PWM. If i am using dac or pwm then wouldn't that mean i am not using the audio adapter for my sound? or can i still use the SGTL5000? I got the audio adapter for the sd card, the 16 bit audio, and its ability to run 2 audio files simultaneously. Am i screwed on some of those features if i am not using the i2s or spdif? Not sure exactly how that works...

    Quote Originally Posted by Robin View Post
    Out of curiosity, are you a member of the 501st or Rebel Legion?
    Nope, not i am a fan but not a fan boy. My nephew would jump at the chance but he doesn't have the gear.

    Quote Originally Posted by WMXZ View Post
    I think that link is the same guy doing this https://hackaday.io/project/3825-lightsaber i've also looked at this project https://forum.arduino.cc/index.php?topic=261980.0 Kinda trying to look at every project that's similar and glean from each.

    Quote Originally Posted by cartere View Post
    That's pretty awesome just wished it was 6 weeks plus a month earlier :s I'll have to have a look at that if/when i look at a redesign in the future or if i trick myself into making a second device, or if something breaks when i do stress tests from stunt impacts, x fingers that doesn't happen.

  7. #7
    Oooh also if i am not using pin#22 or #23 for the I2S does that mean i could use them as pwm for the audio or would that be a conflict or confusing to the adaptor. Says if i connect all 3 clocks it is in slave mode, does that lock up all the i/o's that are clocks or can i just use the sda/scl connection and not lose the 2 pwm's since i am really rather short. 4 pwm's for the main led's, 3 for the accent rgb led, 2 for audio output to the amp, thats 9 out of the 12 but the audio adapter connects at pins 22 lrclk,23 tx, 6 memcs, 9 bclk, 10 sdcs (thats 5 pwm's connected to the audio adapter). So that means i only have 7 when i need 9. Not really sure if they are now considered used or if they can be used for either/or depending on the code. I don't plan on using the flash memory, and if i don't use 22, 23, and 9 as i2s can i just re-purpose them? Or are they required so that the audio adapter has all 3 clocks. Noob and confused ;s

  8. #8
    Senior Member
    Join Date
    Nov 2015
    Location
    Wales
    Posts
    579
    Quote Originally Posted by Grimmdus View Post
    multiple regulators but would that work in series?
    You'd want to put them in parallel. See http://www.linear.com/solutions/5759
    Look into switch mode regulators as well. They'll help reduce the heat generated

    Quote Originally Posted by Grimmdus View Post
    Is there a drop off in voltage over the circuit or is that negligible?
    Usually this is negligible, it depends on the resistance between the regulator and the device that is to use it. In general you want your regulator on the same board as the units that use the voltage generated

    You've somewhat lost me on the audio side of things. Can you post a page to the components/shields you're looking to use?

    Perhaps looking at some of Paul's work may shed some light on the situation https://www.pjrc.com/teensy/td_libs_AudioOutputI2S.html

  9. #9
    Thanks for the info! looking into it as we speak, Gonna do some more reading on the audio and see if i can't narrow down my issues there before coming back for more info. Power is more important atm anyways..one thing at a time and all.

Posting Permissions

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