Andrew Que Sites list Photos
Projects Contact
Main
   For our role-playing game last night we made use of my new LED fixtures in the living room.  I don't have any DMX cables to connect to these devices so I left them voice activated.  Color changed anytime there was a loud noise.  That was amusing for awhile but then got a little annoying.  My DMX connectors are in the mail so we can hook the lights to a control board.  Despite not having any control over them, they looked great. 

February 08, 2016

Dumb Assing Math Problems

A math professor introduced me to the term “dumb assing” which is a term used for guessing your way to a correct answer in math. For example, if given 2x+3=9, you could simply plug in values for x in an attempt to get the right answer rather than use algebra to solve for x—dumb assing your way to a result.

At work I've been working on a motion simulator. I started with a spreadsheet I made up some time ago and finished more details. In the spreadsheet you can specify a distance to travel, a maximum velocity, maximum acceleration, and a constant instantaneous jerk. It will then calculate when jerk should be positive, negative, and zero in order to obtain these values. This is some physics 101 stuff, but getting the transition points requires a good understanding of the equations of motion and decent algebra skills.

Here we see an example of what the spreadsheet does. The top graph is position which has to travel form 0 to 4,000 units of distance. The next graph is velocity which has a maximum of 100 units of distance over time. Then acceleration which has a maximum magnitude of 10 units of distance over time squared, and finally jerk which is either 2, -2 or 0 units of distance over time cubed. The stages are easy to see. Set jerk to positive value and hold it there until maximum acceleration is obtained. Once at max acceleration, set jerk to zero until we start to approach maximum velocity. Use negative jerk to decrease acceleration to zero, which will result in a constant velocity. With velocity at maximum and no acceleration or jerk wait for position to get to where we need to start slowing down. Not the procedure is just the reverse of the initial procedure. Create a negative acceleration to decrease velocity, and as velocity approaches zero, bring acceleration to zero. At the end, jerk, acceleration, and velocity are all zero, and the position has reached its destination.

This I had all working, but only for scenarios where maximum acceleration was reached before maximum velocity, and maximum acceleration/velocity reached before finial position. These two additional cases needed to be worked out for my simulator at work, and this is where I dumb assed things.

I had an equation that would tell me position after some period of time. But I couldn't figure out how to work the equation such that I could derive a time for the transition point. Instead, I plugged in numbers and graphed the results. Using the graph I plotted the points with polynomial regression. Using the regression equation I derived the equation that gave me a transition time, and it worked. However, I am still not able to figure to derive this equation from the equations I have. It works, but I dumb assed it.

This is always a problem with work. There is a limited amount of time I am able to spend on specific aspects of the project. And although I want to know where my equation came from, I didn't have the time. I may try and derive it myself outside of work, but for now I have plenty of projects to work on.

February 07, 2016

The Snowflake Guardians Rendezvous

Two groups of the Snowflake Guardians are trying to rendezvous. These include Kostan, a noble born centaur; Marcus, a noble human paladin; Hindrich, a noble orcish half-giant; Fulgar, a battle mage; and Brak, a rouge kobold. Along the way both parties spot the signs of a camp and go to investigate. Dreknor's Valley is a mix of centaurs and wild elves, both of home hate one an other. Skirmishes have been ongoing for generations, and a camp may be a raiding party. Dispensing groups like this is the job of the Snowflake Guardians, and their rendezvous was likely chosen because a raiding party was suspected.

Sure enough, the camp was discovered to belong to a wild elf, goblin, kobold, and a skaven. They spotted the Hindrich and condensed attack. Brak was unable to see the group when he first arrived at the scene—not unusual for someone who only stands 3' 9”. So he quickly and stealthy climbed a tree. After identifying his foe, he also spotted two tents. Without hesitation he make a stealthy b-line for the tents, leaving Fulgar behind. Fulgar was spotted shortly afterward and the wild elf and enemy kobold begin heading toward him. Marcus is riding on the back of Kostang and they charge into the camp at a full gallop. Kostang uses a lance to stab at the skaven, and Marcus, with a natural 20, swings an ax and turns this foe into chunks. This causes the goblin to decide to run at an emerging Hindrich who was late into the battle. Apparently a 9 foot tall half-giant seemed safer than the centaur, but the goblin was mistaken. Hindrich hit the goblin with his bow in the first attack, knocking him down, and then toss his lifeless body into a tree with a natural 20 second attack. Brak completely avoided all battle and looted the two tents, taking a sizable quantity of gold and some spell scrolls. Meanwhile, Fulgar was under constant attack. A fireball destroys the enemy kobold, and bloodies the wild elf with an ice spell. But it is Hindrich who finishes off the wild elf with a bow shot. Shortly there after, Brak rejoins the group and so ends the first campaign of this game.

   Hooked up a ECG plugin board for the I picked up some time ago.  Managed to clear off enough bench space to play with it finally.  However, I failed to get the thing to work.  Using the oscilloscope I never saw anything but oscillation and the chip was never able to get a lock.  There is a good chance there is something defective with the board I am using, but I couldn't say what.  Too bad, because I have a project in mind for this device.  Guess I will have to figure out what if I want to pick up an other one, or do something else.

I have an inexpensive plasma globe that stopped working some time ago, and so I decided to look into way. I say a burn mark on the high voltage cable that fit the transistor on the board. I suspected the reason the setup didn't work was the high voltage arched from through the insulation to the transistor and destroyed it. The transistor is a standard part and I found a cheep replacement online and had them a few days latter. I removed and soldered the new transistor in place, plugged it in, and… nothing. After looking over the setup for other signs of damage, I decided to get out the volt meter and check power. I found nothing coming from the 12 VAC wall-wart. It was dead.

Looking at the circuit board for the high voltage driver I saw four diodes close to the power connector—mostly likely a bridge rectifier. So I could feed this device with 12 VDC. When I did, the globe came to life.

What about the transistor I replaced? There may have been nothing wrong with it as clearly the power adapter was dead. Lesson: start at the beginning! I wouldn't have had to order anything to have tested the power supply first.

The replacement green laser for Xiphos' laser light show came the other day, and this evening I had time to look into doing the replacement. The replacement laser is of a little different design than the existing laser as I could not find the exact laser and driver. However, much to my delight, the new laser had the same screw hole locations on the base as the old laser, allowing me to quickly put it in place. The factory's method of alignment was to use part of a zip tie jammed under the laser to shim it. This had become lost, in the spirit of recycling I used a part of a clipped lead from a resister.

The replacement laser came with a 150 mW red laser, 50 mW green laser, and a driver board. This is exactly what the old setup had, although the parts are slightly different. The old driver board was functional because it ran the red laser just fine. However, I decided to use the new board, new green laser, and old red laser. When plugged in the old laser to the new board and powered it up, the red laser worked as expected.

The laser driver board was different than the original, and upon inspecting the cables I could see the wires were reversed—positive and negative. I was able to use a tweeters to extract the pins of the connect and reverse them for power. However, the connectors for the TTL signal that turn the laser on and off were covered in RTV silicone, presumably to keep the connectors from falling out. I was unable to extract the wires. For now this means the lasers will never turn off when the display is running. In the future I can either order new connectors (which I probably won't) or solder the wires directly to the terminals. This will allow the display to be run from DMX, which Xiphos has done at shows in the past.

Mounting the driver board presented the last issue. The old driver board was just a PCB on the standoffs. The new board had it's own plastic housing. However, there were holes in the display assembly the lined up correctly, allowing me to use some random bolts to secure the new driver board.

So that's it. The display is again functional and is sure to make our future gatherings at Elmwood Park more fun.

This is something I've wanted to have for some time—a self winding reel for air compressor hose. It was on sale at a really good price at a local tool store and so I picked it up. Mounting presented an issue however. There is no way to remove any part of the reel and thus it must be mounted as-is. This thing isn't light and I had to get a roomie to help hold it in place as I screwed it in place (thanks Steve!). In addition, the clearance for accessing the screws was very small so I couldn't use a socket. So Steve had to stand there for some time as I slowly drove in the 2” screw using a wrench. Nonetheless, I have self-rolling air compressor hose.

Today we had been forecast to receive 4-6 inches of snow with a winter storm warning. People were scrambling to stock up on groceries/water, requesting the day off work, and bracing for the snowpocalypse. Instead, 24 hours before the storm it was downgraded to a winter advisory with 1-3 inchs of snow and rain. The day was a serious letdown. We did get a good bit of precipitation, but it was just too warm for snow.

It took the snowblower out to clear the little bit of accumulation from the sidewalks. It was heavy slush more than snow and it looked like I was pumping water. I knew the temperatures would be dropping in the evening and wanted to have the sidewalks as clear as I could so when things did freeze I didn't end up with a sheet of ice.

The season is still young enough to give us a good snowstorm, and hopefully I will get it as this certainly wasn't it.

I ordered 10 of these DMX LED lights for the living room truss system. They showed up the other day and I spent about 30 minutes putting them together as I watched the news. The lights have a rubber/plastic grommet between the hanging bracket and the light housing that needs to be installed. It is not an easy thing to put in place. However, I found that by heating the grommet it became much more malleable and thus easier to install. So I boiled some water in my electric tea kettle and throw the grommets in there. I also put the brackets in the hot water briefly to warm them up. The malleable grommets and the brackets warm enough not to quickly cool the grommet allowed me to easily squeeze the grommets in place.

After assembly and I hung the lights from the ceiling truss and powered them up. Right now I do not have DMX cables to connect the lights to a board, but they default to a sound activated mode. Hanging went quickly. I used some 2” bolts with wing nuts. The truss is just 2x4” lumber with holes drilled every 12 inches. So I just drop a bolt in one of the holes and use a wing nut and washer to hold up the light.

This is a cheep 10 watt RGB LED light I picked up. It is designed to be outdoors and has a remote that can control the color. For gatherings at our house I wanted to light up the outside of our house to make it obvious to guest they had the right place. It looks like this light will not be bright enough for what I want to do, but they make the same setup in larger sizes.

What I am really interested in is how the driver works. If I can, I would like to replace whatever brains they use with my own driver circuit. This will allow me to control the color. I read about the ESP8266 WiFi module. This is a cheep module used by the hobby community for getting WiFi access to small embedded computer projects. It works so well that people have been looking into using it as a stand-alone device since it contains an 80 MHz ARM processor. What interests me about this is the ability to create custom smart devices. If I can generate 3 PWMs from this chip I can drive this RGB LED—from a PC on the network.