4 channel Light saber driver design, may the light be with you.

Or you need two different pull down voltages on the main pin, but I think the above is simpler as far as software. Might even work without changing anything.

Depending on how things go, I might try to use a tiny841 and acupuncture or a bed of nails for flashing. That would provide more pins and a newer MCU. I’ll probably also try to align the LED connections directly under the holes in the heat sink, so a short wire can go directly up to each emitter and the board itself can be pressed against the heat sink.

I just need to learn a PCB layout tool first. :slight_smile:

That’s all for later though. For now, I can get things like 90% done (and make a working saber) with the provided layout.

All of my designed come with the source files that are pretty easy to edit once you get the software. Sadly for you, I don’t think diptrace is on linux but you could most likely use a virtual machine or even wine.

I figure I’ll probably use KiCad. It’s what my Linux circuit geek friends recommended, and Oshpark supports its files directly. It appears to be a little on the complex side compared to some, but it also appears to be pretty powerful. And I’m not doing anything particularly complicated, so I don’t have to be picky. :slight_smile:

Before that though, I have some firmware to write. So much firmware. And parts to order. And tools to try.

If you are starting on a new MCU anyways, I HIGHLY recommend the 1617 mcu : http://www.mouser.com/ProductDetail/Microchip-Technology/ATtiny1617-MFR/?qs=sGAEpiMZZMvqv2n3s2xjsdZc02topxxIyb2htVHofo5O1dwzOibzLA%3D%3D

It is what I think flashlights should and will be moving to in the future. It offers many advantages with no cost increase or other downsides if learning a new chip anyways.

I mean 16kb and 22 i/o pins, whats not to like and thats before you really dig into the spec sheet. It also has multiple reference voltages making it much simpler to create a driver that can work with any input voltage.

Is that even supported in gcc yet? My copy ( gcc-avr 1:4.9.2+Atmel3.5.3-1 ) doesn’t seem to recognize it, unless it’s supported under a non-obvious name. It recognizes attiny841 though.

TK, if you want easy, I would recommend Eagle. It’s very intuitive to use and if you need to, you can use mattaus’ tutorial to get you started. It’s what most of us around here use, so if you get stuck on something, help is very near. We have lots of custom made library parts floating around here for Eagle as well. I tried looking at KiCad, since it’s included in Ubuntu’s repositories, but I couldn’t figure out how to do anything with it. Oshpark also supports Eagle files directly, and they have a design rules file for Eagle that you can download.

Good question, it is the latest MCU out so if it is not supported yet you can bet it will be soon. Although it could just simply not be in there by name yet but share the settings with another chip.

The latest AVR toolchain (3.6.0) was released in January, while the 1617 data-sheet initial release was in March.

Haven’t updated in a while, but I’ve got this mostly working now. I just have a few things left to do. Off the top of my head…

  • Improve button de-bouncing code because these saber buttons are really noisy and sometimes have pretty long leads.
  • Lay out a new PCB to make it more physically compatible with the hosts.
  • Try to eliminate some occasional timing jitter on the 4th PWM channel.
  • Add a couple more lighting effects.
  • Tweak default modes and calibration, and otherwise polish up little details.

Really not all that much left, but some of the remaining steps are going to be time-consuming.

I’m still watching this channel! :nerd_face:

So am I now! :+1:

As am I.
I’ve been on the fence about owning a lightsaber, because I don’t feel it’s practical (this from a guy with a shelf full of flashlights that mostly just sit there). I’ve been a Star Wars fan since ’77, so the desire has always been there.

This may turn the corner for me. With my modicum of lathe experience, I suppose if I were to own one, it should be one that I made myself. A 26mm driver board is barely over 1”, so it would fit inside a ’saber hilt without any difficulties.

This one is light only, no sound, but I’m hoping I can make one with sound in the future. That’s a much bigger project though, and I’ll need to find a way to fund development. Hoping one of the saber companies will be interested enough to help with that.

In this light-only version though, what I’ve made is similar to an analog synthesizer, only for light instead of sound. The user can create their own unique look by, basically, turning knobs while watching the changes in real time, until it looks how they want. The colors are entirely up to the user, and the patterns are formed by modulating together whatever effects they want. This allows them to build smooth oscillations, harsh strobes, shimmering colors, unstable flickering, etc.

This is a pretty big change from the existing products out there, which typically have only a few preset colors and a single pattern which can be high, med, low, or off. Other stuff also has some other weird drawbacks, like requiring inline floating resistors to prevent the LEDs from turning into smoke… but the heat goes into the resistor instead (which has no heat sink and is often shrink-wrapped), so the resistors tend to burn out.

I’m undecided whether to make an intermediate version which also includes an accelerometer. It would be a really nice upgrade, and would fit very nicely into the analog synth approach, but it’d still be light-only. I might go directly for the full-featured version instead. Or, if things don’t work out, I might never make the second version. Hopefully things will go well.

I forgot to post this earlier. Things aren’t finalized yet, but here’s the interface so far:

It’s pretty simple as far as synth engines go, but it’s plenty for personalizing a lightsaber. Most drivers offer like 5 different shimmer presets (including “none”) using a single color, and that’s it. In contrast, this one can be configured for a wide range of different patterns (including multi-color). I tried to keep things reasonably simple though, since it only has one button.

Configuration is basically just “pick two colors and then turn knobs until it looks good”. It shows the results in real time during adjustment, so it’s fairly intuitive. There’s currently room for 12 different personality slots, though that number is kind of arbitrary. By default, it has 8 slots for somewhat traditional blades (like “Paladin Blue” and “Consular Green”) and 4 slots for special-effect blades (like “Rainbow Lightning” and “Police Flasher”).

As an example of how these things work, here’s how to configure a police flasher:

  • Set color 1 to bright red.
  • Set color 2 to medium blue.
  • Set the color shape to a square wave.
  • Set the color speed to something slow.
  • Pulse depth: medium-high.
  • Pulse shape: square.
  • Pulse speed: fast.

The two square waves stack so that one alternates slowly between red and blue while the other alternates rapidly between dim and bright. There’s nothing special about this though — the user can configure it for whatever patterns they like, and the police flasher is mostly just an example to help people understand how things work. For less dramatic patterns the user can do things like “slow triangle wave from light orange to dark orange, plus a medium-speed low-intensity triangle wave”. That would make it look like a gently-pulsing, breathing, orange plasma. It mostly just depends on what the user wants it to look like.

Thanks for the update! I’m looking forward to seeing this in action when you get it done! (You ARE going to post photos AND video, right?)

Hey TK! Have you any updates for us mere mortals? I’m still interested in seeing this new driver come available here.

Also, did you end up using KiCAD for your PCB design? I just downloaded it again recently, because Eagle is getting really weird since AutoCAD took it over. I’m still trying to figure out how to use KiCAD, but it seems a bit easier than I remember it being before. One problem I’m finding is that I don’t know how/where to get library parts for standard stuff we use like AMC7135 regulators and less ‘common’ stuff like PIC chips.

I keep getting distracted and haven’t done it yet.

The only progress since my previous update is I got a prettier host with a lighter-weight blade for better balance. But it doesn’t even have a proto1 board in it; instead I currently have a Convoy S7 crammed inside the hilt for extra weight and some light.

It spins nicely, but I really need to make a new driver and update the firmware.

TK? Still working on this? :innocent:

This probably isn’t the best place to ask, but since David bumped what turned out to be an interesting, somewhat related thread:

Is there a list anywhere of 4-channel drivers? Here’s what I know of so far:

  • Mountain Electronics has one that has been around for a while.
  • tterev3 used to offer the really sophisticated looking meld-x, but has discontinued it.
  • Dr. Jones also used to have a similarly neat looking e-switch driver, but it also appears to no longer be available.
  • The Light Saber driver also looks awesome, but is too big for most flashlights, and not yet available?

My personal interest is RGBA, specifically an E17A quad from Clemence, to put in preferably an S2+ with a frosted lens.

I can probably live with the driver Mountain offers, which is easy because it comes assembled, ready to go, for a decent price, and the default current is a good match for the E17A. The drawbacks are the modes are fairly basic, switching mode groups requires soldering, output is only adjustable by swapping resistors, and there’s no mode that runs all 4 channels at the same time - the color E17A’s are phosphor converted, so they should be able to mix to a pretty good white, if you get the power levels right.