Villain Mash-up

Villain_Blog

I drew a science fiction villain mash-up!
How many can you identify?

As usual, you can get this design on RedBubble:
https://www.redbubble.com/people/imasillypirate/works/32794081-villain-mash-up

Advertisements

LED Cylon Scanner in Fencing Helmet

For the last 9 months, I’ve been learning light saber with San Diego Sabers. They are an amazing group full fantastic nerds of every sort. I’ll miss them quite a bit when I move to San Jose in 2 weeks. If you’re in the San Diego area, check them out.

…But that’s not what this post is about.

I recently decided to mod my helmet to add an LED Cylon scanner and, for those that are curious, this is how I did it.

20180713_173051

(I did not make the light saber. That came from Ultra Sabers.)

First, I’d like to say that I am aware that there are other, cleaner, and easier ways to do this. I made mine entirely using stuff I already had.

Materials:
-Fencing helmet with removable lining (mine is made by LINEA Fencing Gear, and I got it at the Fencing Post in Escondido, Ca)
-Arduino Micro and mini usb cable to connect to a computer with the arduino IDE (Not the cheapest buying option, but this is the one I’m using)
-Wires (You are going to want a bunch, thin-ish guage. You may want wire strippers, solder, and a soldering iron)
-Red LEDs (I used the reds from this set of LEDs)
-9V battery connector
-9V battery
-Electrical tape
-Switch (I’m using a big green toggle switch because that’s what I had, but any switch should work)
-Velcro (I used this because of the adhesive and wide strip)
-Small solderless breadboard (This one is optional if you want to solder to the Arduino, but I used one of these)

Here is the Arduino code (Sorry about the sloppy indents, WordPress kept changing them, so I gave up):
int nLed = 7;//number of LEDs
int ledPin[] = {13,3,5,6,9,10,11};//list of PWM pins
int ledHi = 100; //value for center LED
int ledMid = 10; //value for LEDs directly adjacent to center LED
int ledLow = 1; //value for dim LEDs

void lightUp(int num){// Light up the num-th pin in the ledPin
//along with 2 LEDs on either side of decreasing brightness

for (int i2=0;i2<=nLed-1;i2++){//Turn off everyone
analogWrite(ledPin[i2],0);
}

if (num == -1){//center is off the low end
analogWrite(ledPin[0],ledMid);
analogWrite(ledPin[1],ledLow);
}

else if (num == nLed){//center is off the high end
analogWrite(ledPin[nLed-1],ledMid);
analogWrite(ledPin[nLed-2],ledLow);
}

else {//center is in an actual LED
analogWrite(ledPin[num],ledHi);//light up center

if (num >= 1){//LED just before center exists
analogWrite(ledPin[num-1],ledMid); //Light up LED just before center
}

if (num <= nLed-2){//LED just after center exists
analogWrite(ledPin[num+1],ledMid); //Light up LED just after center
}

if (num >= 2){//LED 2 before center exists
analogWrite(ledPin[num-2],ledLow); //Light it up with ledLow
}

if (num <= nLed-3){//LED 2 after center exists
analogWrite(ledPin[num+2],ledLow); //Light it up with ledLow
}
}
}

void setup() {
}

void loop() {
int rest[] = {75,100,150,100,100,100,150,100,75}; //delay for each step
int ind = 0; //rest index

for (int i=-1; i <= nLed; i++){//Step through LEDs from low to high
lightUp(i);
delay(rest[ind]);
ind++; }
for (int i=nLed; i >= -1 ; i--){//Step through LEDs from high to low
ind--;
lightUp(i);
delay(rest[ind]);
}
}

The wiring is very simple. Here’s the wiring diagram.
CylonPinOut
If you set that up and send the above code, the lights should do their Cylon thing.
Keep in mind that the Arduino needs a few moments (a little more than 10 seconds) to get going. So, the first LED (the one plugged into pin 13) will pulse for about that long before it starts working how we want it to. Be patient.
It may seem like a strange set of pins that I’m using and look like I could have used 12 instead of 7 LEDs. The pins I used are actually the Pulse Width Modulation (PWM) pins for the Arduino Micro. The PWM analog pins let you set varying brightness levels, which we need for the way I set this up.
You’ll want some fairly long wire leads between the LEDs and the Arduino, depending on the space you have available in your helmet, but the LEDs will need to be on the front of your head, and you’ll need space for the battery, switch, and the Arduino with breadboard and crap-ton of wires. While deciding where to place things, remember that the Arduino has a pulsing blue power light on it… so, unless you’re into that sort of thing, you may want to hide it from view.

Those are the basics of how to get it working. Below, I’ll give a couple of ideas about how I went about attaching it to my Helmet. This super ugly diagram will help:

CylonMask

The LEDs are attached to the forehead cover of the helmet liner by Velcro. I cut down one strip of Velcro that covered the entire width of the forehead piece (see diagram above), punched 7 eqally spaced holes and pushed the LEDs through from the buisness side of the Velcro as seen in the picture. 20180713_141452_HDR

In my helmet, there is a little bit of space above my head on the sides, so I crammed the arduino and the battery in those spaces. Time will tell if I regret that for the Arduino, because I do supply a little force to it with my head when I move around. It isn’t uncomfortable for me, but the Arduino probably doesn’t like it. Were I to start over, I might make the leads for the LEDs a bit longer and attach the battery and Arduino to the very back of the helmet.

The battery is Velcroed into place, with just a strip of velcro attached to the battery. Changing the battery will require putting velcro on a new battery. There are lots of 9V battery holders available for cheap but they add a little width, and I had limited space to work with. Depending on your placement, this might be an option worth considering. It is orange in the diagram, and you can see it in both of the following images.20180713_145902_HDR20180713_150248_HDR

The switch is just hanging free back there and I have to keep a hand on it when I put the helmet on. It’s not the ideal solution, but it works in a half-assed first try sort of way. It is the blurry green thing in the foreground of the most recent image.

A similar statement about care and thought given to the switch placement can be made about the Arduino. It’s just sort of in there, held in place by all the wires and the fact that, when my head is in place, there’s not much room for it to move around. You can see it in the following image.20180713_150242_HDR

Another thing worth mentioning is that, with this setup the red lights shine on the inside of the mask in front of my eyes. I can see through it fine, but it’s a little annoying. If I had a black sticky-back foam sheet, I’d probably cut some strips and stack a few just under the row of LEDs to block some light from coming at a downward angle into my field of view.

Thanks for reading. I’d love to see if anyone else tries something similar and hear about alternate designs!

Some news about Harold

Hey everyone!

If you’ve been following my blog for a while or you know me in real life, you may recall that in July of 2014 I signed a contract with Divertir publishing for my novel entitled Harold and the Purple Wormhole. It was all very exciting and I told everyone… several times… very loudly…

Well, if you’ve been paying attention, you may have noticed that the book is still not available to adorn your bookshelf.

I have some bittersweet news: Divertir and I have mutually decided recently to cancel our contract and go our separate ways. They will not be publishing Harold. This is for the best as we have different priorities and goals and it doesn’t mean, dear reader, that we don’t both still love you very much. The split was amicable and smooth and, though Harold is no longer destined to be among their herd, I wish them the best and I know that Harold will find a home that is a better fit.

Thank you to everyone for your enthusiasm, advice, and support throughout the last 3 years.

To the queryinging!

New Shirts

Hey everyone!

I’ve posted a few new designs on RedBubble, that I thought you might appreciate.

There are 2.

wolfGirl_wm
Stuff can be found here: https://www.redbubble.com/people/imasillypirate/works/30645920-wolf-girl?asc=u

threadBear
Stuff can be found here: https://www.redbubble.com/people/imasillypirate/works/30646082-thread-bear?asc=u

I’m on Shutterstock

DSC_0036Hey everyone!

As many of you know, I’ve been taking a lot of pictures lately. I recently decided to try my hand at selling some stock photography and I’m now a contributor on Shutterstock.

Check out my portfolio if you are interested: http://www.shutterstock.com/g/Imasillypirate?rid=192788184