carlfoxmarten: (default)
[personal profile] carlfoxmarten
Warning: Gets very technical, so beware!

So, the very first magic wand the theatre company I'm involved with had caused some electrical burns to its original operator due to malpractices by the original creator.
I think it might be fortunate that he's dead now, though I think it was more due to age than an accident with his contraptions.

The second version (that I'm aware of) was the one that our current fairy queen broke this year taking last year's decorations off it, so the third version was the one I fixed up and improved.

The fourth version, which this post is about, is one I've been asked to build to replace our old one.
The fifth version, and there will be one, will have even more features than V4, so we'll either be able to choose which features to enable, or which wand to use for each year after, depending on what features we want to use that year.

First off, the old wand (probably version 3) could only glow when on and charged (via a white LED in the middle of the bulb) and flash brightly (due to a cut-down flash unit inside the wand's bulb). The goal of this project is to add extra features to it so we have more flexibility with regards to how our fairy looks.

The one thing that definitely will not change is the brilliant flash, and it will still be done with a flashtube connected to a capacitor and flash unit taken from an old film camera.
The nice thing about the board I found is that all the wires are marked! =^.^=
Which is a good thing, because the board itself combines newer (at the time) surface-mounted components with regular (not sure what they're called) components, so there are parts on both sides of the board, all very tightly packed together, which would make it almost impossible to figure out what the circuit diagram is! =0.o=

The first feature that I'll be adding for sure is an RGB LED and an extra button.
This will allow the fairy using it to have it do something interesting when she's invoking a spell.
For instance, the LED can change colours smoothly when the secondary button is pressed, or it could gently pulse from black to this year's chosen colour, or even cycle through a range of colours.

This means that we'll need a small microcontroller to control it, and there are few microcontrollers smaller than the Adafruit Trinket.
The Trinket is based on the Atmel ATtiny85 microcontroller chip, which has a mere eight pins, five of which are for I/O use, and has a very low current draw of about 15 milliamps.

Three of the I/O pins on the Trinket are capable of Pulse-Width Modulation (PWM for short), which means that they can effectively control the brightness of LEDs (at least to human eyes) by rapidly turning them off and on at specific frequencies and duty cycles.
All three of those pins will be used to control the RGB LED, which is made of three smaller LEDs inside, one each of red, green, and blue.
This allows the RGB LED to create almost any colour we want, which will allow us a great deal of flexibility.

The one concern I have is what will happen when the capacitor is being charged by the flash circuit.

On my test bench, I've hooked up an LED across the power wires to the circuit board (with the appropriate limiting resistor), and it completely goes out when the capacitor is being charged.
This means that the charge circuit is almost literally sucking power from the batteries and there won't be any left for the microcontroller or LED while it's charging.

Fortunately, it only takes about four seconds for the charger to ramp the capacitor up enough for it to stop taking quite that much power from the batteries.
Theoretically, after those four seconds, there ought to be enough power left over for the microcontroller to boot back up after getting essentially power-starved.
I'll just have to make sure that it comes back up in a way that isn't visually distracting, otherwise I may have to have two separate battery systems! =0.o=

As for the wand's construction, the old one had a pipe for the handle that is large enough to fit AA batteries in (of which it uses three), holes drilled and cut for a power switch and a trigger button, and had four wires (two for power, two for the button) running up the wand's shaft, so all were (relatively) low-power wires.

Unfortunately, this meant that all the important guts were in the bulb at the wand's tip, which in turn meant that there was a limit on how large things could get inside there.
After all, they couldn't interfere with the flashtube's light...

This time around, my goal is to make it as slim as possible up at the tip, so all the electronics are not stuffed into a small space.
Instead, I want to put just the flashtube and LED up there, with all seven wires trailing down the shaft to the various circuit boards situated in part of the handle.

Because there will (or should) be so little in the tip of the wand, I can house them inside a short length of clear tubing, and then we can change out the shape on the wand's tip as a part of the fairy's outfit each year.
For example, we'd finally be able to use a star for the wand's tip! =^.^=
(I do have other ideas for stuff to put at the end of the wand, and yes I've been writing them down)

Anyway, the four wires for the LED are going to be fairly straightforward to deal with, but it's the three wires for the flashtube that's going to cause me problems.
For one thing, two of them are going to be dealing with about 500 volts, and the third wire is going to get spikes of 2,000 volts every time the trigger button is pressed, so I need to use some sort of high-voltage wire, but I'm not sure where to find some around here.

Actual physical construction of the wand is somewhat tricky to describe using text alone, but if I don't try I won't figure out how to do it for next time.

Starting from the tip of the wand, there's a clear plastic tube that contains the flashtube and RGB LED, which leads down to a (preferably) metal tube for the shaft (as it's about four feet long, plastic is far too flexible for how slim we want this part), which is then connected to a plastic cap that screws inside the end of the handle.
The handle itself is at least a foot long (exact length will be determined based on the amount of stuff that needs to fit inside it), and contains two separate sections, the “bottom” end of which is a plastic tube large enough to contain three AA batteries, is mostly cut-away on the side so the batteries are both held in and easy to remove, and has metal contacts to get the batteries’ power to the rest of the wand.
The “top” section is another section of the same size tube as above, but is firmly attached to the cap the shaft is attached to, and contains all the circuitry necessary for the operation of the wand.

It will be necessary to have a connector or something between the handle and battery compartment, and the shaft-section of the wand, but hopefully I can handle it without too much difficulty.

The reason for having all the components inside the handle, and in a different section of the wand from everything else, is for safety's sake.
We are talking about high voltage electricity here, and if somebody merely replacing the batteries could accidentally touch some wires that contained dangerous levels of power, they could either be badly hurt, or even killed, which is something that only technicians repairing the wand should have to worry about.

Once it gets right down to it, though, probably the hardest part is teaching a fairy to use it.
Yes, it has two buttons, but you have to be able to press them easily, and without moving your hand between them! =0.0=

I'm also hoping to get this built by February 27th, as that's when the theatre company is having a potluck dinner for all the cast and crew (and whoever else is interested in showing up).
That way I can show it off. =^.^=
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

carlfoxmarten: (Default)
Carl Foxmarten

August 2017

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
272829 3031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 22nd, 2017 04:53 pm
Powered by Dreamwidth Studios