Saturday, September 30, 2017

Blender Terminator HUD Tutorial

Friday, March 13, 2015

3d Printer Part 19

I had several nights of non constructiveness and now...

It looks better with a spool mounted to it:

I should be able to do my first print this weekend. I modeled my house last night for the first print:

Looks like I need to change the slope of my roof.

 Now that I have everything to print, I'm scared to do it. Heh.

I've been doing little things in preparation but it's clear to me I'm dragging my heels.

Here's my house:

I think I will print that first rather than some calibration thing. Then I can figure out what I need to do to handle overhangs. One would think the slicing software would handle adding support material, but we'll(meaning me) see.

Sunday, March 8, 2015

Computer Vision

Tonight, I will be working on getting my computer to watch for the mailman. I made huge headway last night in that I was able to access the camera and save an image to the program directory from within Processing. It was far easier than when I was doing it in VB. Bleh. No hunting for an obscure library reliant upon an outdated windows framework or any of that nonsense! Heck, Processing comes with it's own freaking openCV, but I'm not going to use it, though. Imma do my own thing!

*the next day*

Here's what I was able to come up with last night in Processing:

The beginnings of my own computer vision.

Reader: How are the red particles distributed?
I took the average of the value of the blue and the green in the pixel and if that number is half the value of the red of or less, I max out the red and zero out the other colors, giving it the full red.
    float comp = r/((b+g)*.5);
    if (comp>2){r=255;g=0;b=0;}
I'm really just trying to see the red in the circuit board I'm holding in my hand but the dresser in background is a dark brown and that always triggers red. I have an algorithm in mind to ignore those irrelevant outliers.

Speaker First Aid

Reader: I was kinda enjoying the sounds of the stepper motors and seeing the work in the first part of the vid.
I'll have to do a music video..

So... I have some lovely Altec Lansing speakers I hope to have till I die. I paid $70 for them and I like them more than those Bose ones you get at Sam's club(I have a pair of those too). They(the Altec Lansings) are loud enough I had the police called on me because of them. The cop said, "All of that is coming from your computer?" Aye!
I did not photograph the other one!

Anywho, a few weeks ago I started getting a loud thump and they were losing power and I was sad. This morning, my intuition told me what the problem was. I took out the amp board and..

Lo and behold, I was correct- cracks in the solder! Weeee!

The end!


I kid. Here they were:

You will have to imagine them repaired because they are. The woofer is back together and is in service as I type.

I am not sad.

Monday, March 2, 2015

3d Printer Part 18

view the hotend affixed to my printer:

As you can see the bowden extruder is mounted on the right side there with the guiding teflon tube which runs to the hotend. This setup lowers the amount of inertia the little X axis motor has to overcome. The hotend is mounted with an L shaped bracket on the ink cartridge carriage. I didn't even have to drill a hole! Weee! Also a smaller L bracket holds the cooling fan pointed at the hotend. I will have to come up with a little fan shroud to guide the air where I want it.

And now.. I must order some filament.

I hope I'm right when I think it's 3mm. I took the hotend totally apart and the hole through it is just about 1/8 inch which would be .125 inches(I have a reciprocal button on my calculator- bow before my button power! I kid- I had the fraction memorized). 3 millimeters is .1181 inches(this one I did use the calculator). That's only a 5% error! Ok enough numbers!

I'm going to order from the US this time so I don't have to wait 3 weeks. I still have on order a small Arduino Nano, a wifi for an Arduino, and a 3 axis accelerometer(oh and do I have nerdy plans for this beotch! Hint: it has something to do with interpretive dance! I am a pretty flower.)

 Filament, en rout. Gaze upon the magnificence:

Sunday, March 1, 2015

Milo's Nightlight Part 1

The other day, prolly the one before this one.. I receive the goodies pictured here:

And today I got one of these things:

It's cold out in the garage and what I need to do with the printer is really a weekend thing.


Last night before I got the sensor, I spent some time figuring out how to do PWM to control LED brightness and multicolor control. Today with the sensor I could implement my plan.

Milo lays on the bed at night till it's time to go to bed and I kick him out and he goes to his crate. Sometime between 3 and 6 he awakens and asks to get in bed again by whimpering very quietly. I always hear him though he's very quiet- he's a very considerate dog. About two years ago, I started leaving his crate open so I would no longer have to get up to let him in bed. Sometime since then, I have found a way to make the room very dark. Milo can't see it's so dark and I hear him doing this hopping thing trying to get the nerve to jump up in the bed blind and so I still have to wake up to tap the touch light I have by the bed so he can see. No more!

The point is for the arduino to 'see' him walk by and turn on enough light for him to see to jump up and turn it off. AND I want it to gradually come on and gradually fade so it's a gentle thing that doesn't wake me. See where I'm going with this?

After checking this page to see how to plug it in, I modified the code on the page to include My gradually changing pulse width modulation led control. It works nicely and I didn't take a picture because I intend to swap the Arduino Uno out a for a Nano I have on order when it gets here and use the Uno for other experiments and applications. Anywho! The dog sensing nightlight will get a nice case printed from the 3d printer and designed in Blender when the time is right. View this picture in lieu of a picture of my astounding creation:

Here's what the code looks like:

int pirPin = 3;
int pin = 8;
int val;
float act = 98; //actual brighness
int des = 98;//desired

void setup() {
  pinMode(pin, OUTPUT);

void loop() {
  val = digitalRead(pirPin); //read state of the PIR
  if (val == LOW) {
  else {
  if (des>act && des==98) {act=act+.1;}
  if (des<act && des==0) {act=act-.01;}
      for (int n = 1; n < 100; n++) {

     if ( n > act ) {digitalWrite(pin, LOW);} else {digitalWrite(pin, HIGH);}


Saturday, February 28, 2015

555 Module and Soundcard Oscilliscope

As I'm still waiting on parts, I decided I needed a 555 circuit module because I build the circuit so often. If I had the circuit ready to go, I could just plug it in without worrying about messing with that part and get to the nitty gritty. The 555 circuit I have built a zillion times looks like this:

Or like this depending on your perspective:

Any ways looking for resisters and hooking all that crap up every time I need it gets old so I needed a ready made reusable dealie I could just plug in.

However, since I'm not too interested in doing all the math, I wanted to work everything out without thinking about it. So I made the sound card oscilloscope so I could measure the frequencies and see the waveform right on my computer like so:

That picture is an actual capture of my computer reading the 555. The circuit for the probe looks like this:

And I didn't photograph the actual probe circuit because it doesn't look impressive and this kid would pop out and heckle me:

Anywho! I managed to do all the horrid planning and soldering to get all the components(6 resisters, 3 switches, an LED, a capacitor, an IC, and the 3 pin header) I needed in a 1 inch square and tested it with my new $3 oscilloscope. It look like this:

The switches change the frequency between these:
~2 hertz
~20 Hertz
~110 hertz
~160 hertz

That's plenty of variation for experimentation.

3d Printer Part 17

I had a bunch of trouble today. My calculations assumed I was using 16 microsteps per axis so my printer suffered numerous head crashes. Belts and gears don't like that. The printer thought it was 16 times larger than it was so it was trying to traverse the axis' that much. It is a scary sound when your printer tries to destroy itself. I may have peed a little. Anywho! I searched the firmware, the slicer software settings, and the printer interface software settings for microstep settings. Several internet searches later, I found they are set with jumpers under the stepper motor controllers on the RAMPS board. Anyone care for a tall glass of RTFM? I set my x and y axis' to 1/4 micro steps and adjusted the firmware config accordingly.

Shortly after, my x belt kept jumping and skipping teeth. That was freakin awesome. The jumping could be dealt with pretty easily but skipping teeth makes it so the center moves while it's printing like in this cropped version of the image I posted before:

You can see it drifting to the left in a star shaped coil. Nice. On closer inspection with a magnifrier, I discovered the belt doesn't mate perfectly to the gear. I posted the picture before out of anger and walked away from the thing a awhile thinking I was going to have to rebuild the x axis.

When I came back to it and started taking it apart, I saw the mounting screw was binding the tensioning pulley. I loosened it up and made a little guide to keep the belt from being thrown and viola!

I could then adjust my x so it and the y could make square objects. This took some trial and error since I don't really know the pitch of the x belt. The result seems within about 5% error.

As one can see in that video, it wouldn't be hard to actually make this a working plotter or cnc machine or laser cutter..

I would also like to note that with microstepping working, the motors are considerably quieter.

Note to selfdude:

 jumper   Yes/No  step size
 1     2    3
 no   no    no    full step
 yes  no    no    half step
 no   yes   no    1/4 step
 yes  yes   no    1/8 step
 yes  yes   yes   1/16 step

Sunday, February 22, 2015

3d Printer Part 15

I moved the gantry back.. too freaking much! Nice. I swear sometimes I move freely between and hacker and hack. Well, I'm not moving it again so all of you can just deal with it. On top of that, for this post I ran in there to take a picture because I added an accent light and it was cool. I connected it backwards and fried the voltage inverter for the light- awesome.

I did my calculations for calibrations. I'm using this page and this calculator works nicely. Below are my printer's axis vitals.

X axis:
Motor M42SP-6TG with a 7.5º step and a 16 tooth gear driving a belt that looks like it might have 1mm pitch

M92 X20.83

Y axis:
NEMA 17 with a 1.8º step and a 20 tooth gear driving an MXL belt with a pitch of 2.03mm
M92 Y78.82

Z axis:
NEMA 17 with a 1.8º step directly driving an SAE 5/16 rod with 16 threads per inch.
M92 Z2267.72
All of these are on A4988 stepper drivers with 16 microstep capability so the calculations take this into account.

I know this is dry reading but I kind of am just documenting my shiz for later reference. Anyone using similar equipment would get similar results. These are all preliminary too and I'll have to devise a way to test the accuracy of all of this.

Saturday, February 21, 2015

3d Printer Part 14

Tonite, I modified a few reset buttons(dpst) from old computers from normally open to normally closed. Those switches work nicely because they come with the Dupont plugs that fit my RAMPS shield.

They are going to be used as end stops(currently I'm just using jumpers) The end stops are needed to establish an origin in the Cartesian geometry the printer uses to to determine where to put plastic. It won't be to long before I can start calibrating and then I can run the slicer program.

Before I do that, I'm going to move the gantry back a couple inches because in my lack of planning(true intp), the build bed doesn't get enough travel under where the j head is going to traverse.

I get the slicer dealie running, that'll be a cool video! Imma have to find some nice funky music for it.

I know I didn't mention I was going to do this but hopefully I can put together the protection circuit for my sound-card oscilloscope this weekend. I've wanted an oscilloscope since I was a teenager. It will cost me $6! Weeee!

Also, the heated bed I ordered doesn't fit my printer so it will go on the next one and I need to make one that will fit this build or widen it- bleh.

A need for wire control:

Fortuitously, the gantry is only held there by 2 screws so all I need do is drill the two new holes for the guide rods and put those aforementioned screws back in at the new position. Of course drilling the new holes is tricky because I have to use the top board there as a template and do the drilling on the drill press so it's nice and vertical.

Saturday, February 14, 2015

3d Printer Part 13

As one could see in this video, the bed slides on rods which ran through holes drilled in pine furring strip. It was wicked tight so I bored them out a bit which resulted in a loss of precision. I was going to make that up but devising some adjustment dealie. When I saw(and heard) how it chatters I knew I needed a harder point of contact to lessen the friction. Even a hard wood would have improved the ride of the thing. I bought some nuts which fit on the rods nicely and slid freely. I fashioned a magnificent bracket which holds said nuts in a precise manner:

Sadly any weight caused those hard nuts to bite my rods. That's right- my nuts bit my rod. I rolled a small piece of sand paper to round off the the inner threads of deez nutz and BAM! It didn't work. Still binding.

Out in the garage I found some brass or bronze nuts which although they didn't fit as snug, they like sliding on cold rolled steel more than steel nuts. Gaze upon the nuts:

Naturally brass or even hard plastic sleeves would work better but, hey, I have a set of linear bearings on the way($13.50 on ebay) and the plan I'm on will yield me two printers. One will be the one I'm hacking together from crap and the second one will be built with parts printed on the first one and with better hardware.

Anywho! See all 3 axis' working correctly here:

Currently the bed is a cd rom case which amplifies the motor noise in an obnoxious cacophony. I want to use the mirror you see at the beginning as build bed cause thad be coo! However! It's honking heavy.

Expressive mascot:

I suffered an ocular migraine between the fourth and fifth sentence of the post and had to lie down like one dead for about 40 minutes. I listened to George Noory on youtube and laid there in the dark. All is well now tho a bit loopy like always after one of those things.

Friday, February 13, 2015

3d Printer Part 12

I put the motor from a scanner on the slide from a printer. I got my gears and mounted one on a motor to get the bed moving. It works great pulling but it chatters when pushing so I'll be rethinking that. In the latter part of this video, can see the z axis working with slide mounted on it:

My extruder parts came and I mounted them on one of my motors. Please ignore the fact the pictures are blurry or I will destroy you.

Tuesday, February 10, 2015

3d Printer Part 11

The lady from whom I purchased the motors did not get my note to her about wanting the gears for the motors so she didn't include them. I begged her to send them to me and she is going to send them.

I ordered this j-head with teflon tubing today for $21.99 and the gear I need for $1.33. With the motor I got for $8 and the printed parts for the extruder, my total for the bowden extruder/hot end setup is $38.82 which clearly beats getting this one w/no j head and this one including everything.

I'm going with the bowden setup because the motor/extruder combo can be mounted basically anywhere so the z axis motor and the y axis motor doesn't have to move the weight of the extruder. My plan in the future is to add a second extruder so saving the weight now makes sense. Cripe I'm proud of myself! My parents didn't have any kids that lived.

Today, I messed around more with the Pronterface which is.. wait for it.. a printer interface. I don't know why there is a freaking 'o' in there! Anywho! It was stalling because it couldn't find a thermister and I tricked it into going with a 100k resister. Also the motor would stop saying the endstop was triggered. I shorted that sucker out with a jumper! In business!

I probably won't do much on the frame until I get the gears from that motor chic for I am not certain if I'll need timing belt or not. I will know when I get the gears.

I made some pretty good headway. Too bad I don't have pictures or a movie today because it's cool. I'm stoked. The z motors were just buzzing regardless of how I adjusted the amperage. With some reading, I discovered I was trying to push the motors too fast. I have the z axis and x axis moving nicely. 

Sunday, February 8, 2015

3d Printer Part 10

I got my motors I paid $39.99 for

and have already tested them and determined their pinouts. That black thing on the breadboard is an H bridge motor controller and I don't currently know how to limit current on that kind of circuit so that puppy gets wicked hot powering the nema 17.

I also got my Arduino and my RAMPS shield.

I did a couple experiments and got the Arduino to drive the motor. I didn't make a movie because it would be redundant as I've already done the same thing a couple times with gate logic and now I've to done it programmatically. I have to say I found the Arduino IDE pleasant and easy to use and set up. I read about some people complaining about the non brand name Arduinos giving a problem because the serial chip is a cheap CH340G. Even the ebay seller sent me a message reminding me to download the drivers for it which I did. Windows 7 found and installed the drivers by itself. The IDE was able to communicate with it and install the firmware(Marlin). The printer interface software also was able to talk to the firmware just fine. It remains to be see if I will have a problem in the future and if I do then I'll pay the extra 3 bucks for a real Arduino Atmega 2560 and demote this one some future project.

I added some more wood to my frame today so it's starting to look like it will be able do something soon:

I found this scanner in my attic that is so old it has a parallel plug. I will be dismantling it gleefully:

So I have gotten the electronics and the motors. I have also ordered the heated bed for which I paid $7.49.

I have decided to go with a bowden style feeder(which is used in delta printers) so I ordered the printed parts and hardware for it for $7.50.

I'm watching a j-head and an extruder gear.

This is what my work space looks like right now and I thus far spent $83.61:

Thursday, February 5, 2015

3d Printer Part 9

I broke out the drill press so I could make some precise holes in some scrap wood I have. I built a little bed on rails and connected it to the motor using a zip tie as a link. As you can see in the video my pinch roller wasn't pinching enough so it slipped. It occurred to me that whenever I'm building something, I'm always frantically searching for hardware. While I'm out gallivanting around on the morrow, I'll pick a bunch of nuts and bolts and I'll be able to make good brackets and stuff. That will rock.

I used the circuit from my last video to drive this motor but I eliminated one of nte1825's and bumped the voltage up to 12 volts on the remaining one. That made the motor strong enough to move the bed with a spool of solder on it. You view now:

I have some breadboards in route here from China so I can make some reusable modules for my experiments.

Wednesday, February 4, 2015

3d Printer Part 8

I got the teac motor working with my circuit and I bought a grip of ttl chips to play with.


I'm going to have some extra parts I'm not using in the 3d printer so I've been considering other project I can make out of those parts. Maybe a couple persistence of vision projects featuring lasers like a raster and/or vector display or 3d scanner.

Mayhaps my faithful readers can give some suggestions of microcontroller controlled automation projects..

Killing time till my parts get here, I made another circuit with a counter and a demultiplexor(the last one, I made the demultiplexor with NAND gate & AND gates). View it here:

Someone asked this:
"is knowing which bits to print first complicated? or do you just get the printer to start at the bottom and trust your 'plans' will work out ok printed that way?"

Mostly, you just can't print anything horizontal that is hanging in the air without support because there is nothing to squirt the plastic onto. Such as a chair- it would take some planning to print a chair because no matter how you rotate it, there will always be some just hanging in the air. My solution for stuff like that will be to make things in parts like this guy's robots.
I would like to do things like this and a some other ideas.

This is my new current plan: Build this thing with crap around the house and stuff I've ordered and use it to print proper and more precise parts to upgrade it. Then I'll use these parts for some other project like a plotter or CNC thingy featuring a Dremel. I have one of those flex shafts for my Dremel so that should make it easy. I may not get away with not learning g code..

Tuesday, February 3, 2015

3d Printer Part 7

Welp, I ordered the Arduino Atmega 2560 which I got for $10.59 and the RAMPS shield with 5 motor drivers for $18.04. I will now wait as fast as I can until they get here from China.

I believe my plan for now is to make it work with crappy printer motors until I can upgrade them to NEMA 17s like the plans call for. I might order the heated bed today too.

The circuits I made above drive the motor at 5 volts which is not enough to run the motor at full power and speed, but I was being conservative as I'm not really electrically inclined either beyond basic circuits and digital design.

Also, I have discovered in my reading, the traversing bed is the y axis not the x axis.

I found one of my Teac motors from a 5 1/4 floppy drive and know I have at least 2 more- Weee! Also, I remembered I have 4 micro-controllers I could have used to simplify my design- 3 TI Launchpads and a coriduimcorp microcontroller! The reason that is easier is that rather than wiring 2 gates with 6 wires each and hour's work and testing, the logic can be obtained through coding with just a few keystrokes. I was glad I did it the hard way at least once though. That'll give me something to do till China sends me my shiz.

Too bad I don't have any darlington arrays laying around(aside from on that scanner control board that is) My 10 o'clock is right near OEM Parts so I may find myself accidentally shopping for good stuff on the morrow...

Sunday, February 1, 2015

3d Printer Part 6

The image shows a dude not happy with what he has as it is woefully inadequate.

My Dell printer yielded 2 stepper motors and a regular permanent magnate motor and the main slide I want to use has guess which motor mounted to it? That's right. The permanent magnet motor which can't be used in this application. I look upon those printer parts as the Phantom Limb looks at his baby arm.

Thursday, January 29, 2015

3d Printer Part 5

I got my chips to move the motor- gaze upon the magnificence here:

Thanks! Next up for sacrifice to my vanity is this lovely Dell printer/scanner:

See how I rip at its flesh to get to the juicy succulent innards!

I failed to mention the scanner that is forming the base of my 3d printer yielded a nice cold cathode tube and voltage inverter I intend to us as accent lighting. It runs on 12 volts and i have already tested it. No picture yet.. 

3d Printer Part 4

I discovered I have a bunch of 74ls08's laying around and those are AND gates- bonus! That make's it simpler- see my new diagram(just imagine those inverters are not going to be NAND gates hahaha)

Here's what it looks like blinking in sequence as it should(too bad I didn't get the other chip in the picture- whoops):

Maybe tomorrow I'll wire the motor to it.

Monday, January 26, 2015

3d Printer Part 3

I was able to make the motor move by sweeping the wire across 4 leads manually. I wired up a decade counter to do it automatically and added a 16 output multiplexor to change the two binary outputs to four lines going to two NTE1825 motor drivers(these are meant to be used as H-bridges so don't tell anyone of my perverted use for them)

Stupid me- I forgot the 74ls154 outputs an inverted value so I have to invert every output which I did tying the 2 inputs of NAND gates(I have a buttload of these 74ls00 chips) together to make an inverter.

Sadly my multiplexor is not working right so I need to make a multiplexor from NAND gates. Here's what that would look like:

Yeah, I'm not doing that. From my swiggles one can see I will need 12 gates to get it done. That's 3 chips all wired up for a proof of concept experiment that is unneeded because I've already proven I can move the motor using the sequence I did. Bah, be gone with it!

Note to self: