Ads
Tuesday, December 23, 2008
Friday, December 19, 2008
The nature of repair
I was also repairing a broken hard drive (well, attempting to) yesterday. An idea came to me as I was driving to have lunch, you don't need to understand how to fix most computer related things.
Most computer things you just follow directions for a tool. You don't need to know how the tool works, how the hardware/software works, or anything. If it is a software issue, you replace the software. If it is a hardware issue, you replace the hardware. If it only a slight failure, you use advanced software to fix it.
The big skills for those kinds of repairs are reading comprehension and fast forum browsing. Well, and a lack of fear about what you are doing so that you can attempt stuff that is sure to break it if it fails.
Posted by sstc at 12/19/2008 04:29:00 PM 2 comments
SpaceDev RIP
SpaceDev was recently sold to a privately held company. As a really really small shareholder, they didn't bother to ask me what I thought about it. (I didn't want to sell).
I am basically back where I started with SPDV, I made a bunch off of the SpaceShipOne launch, then lost all of the gains during a spring break (I was in Mexico and didn't know that the price tanked until mid-week, and then couldn't do a thing about it (moral of the story? don't have open positions when you go to Cancun!)).
Bye SPDV (or SPDV.OB as Yahoo calls you).
Posted by sstc at 12/19/2008 10:28:00 AM 1 comments
Thursday, December 18, 2008
Repair work
I was making an adapter to fit together two threaded things. I discovered two very useful tips.
1. Use superglue to hold together items that you are going to JB Weld together. This helps alot if you do not have clamps or a helpful friend.
2. An electric drill chuck makes an excellent vice/holder for small objects that you want to sand/grind/superglue/JB weld.
Posted by sstc at 12/18/2008 04:26:00 PM 0 comments
Blog posts
I have found myself writing blog posts in my head.
Then I don't write them down.
So, in my mind, I had tons of new content on here. It was really good content (trust me!)
but its gone now. I'll work on getting them from head->interwebs.
Posted by sstc at 12/18/2008 10:14:00 AM 0 comments
Outing in the woods
We had a great time out in the woods.
I got to test the M-44. We tied it to a tree with the stock against the trunk. I used some rope that I rescued from Yajeev's scissors (rather than untie knots, he was going to cut it off, not thinking of the future potential of using the rope to tie a gun to a tree). It fired no problem. The case did look a bit bulged on the tapered portion of the case. We fired at a 6-8 inch log about 40-45 m away. I hit it the first try. I was pleasantly surprized to see that windage seemed to be perfect with the bayonet in (I had the sights set at 200 m, with the ammo I had, -1inch -> +4 inch drop over 0-200m). As I fired more rounds, the cases kept looking better and better. I'll take it to a range with some paper to figure out how accurate the M-44 is with the ammo I have.
If you ever let go of a helium birthday ballon, it ends up in the woods in north georgia. We saw two balloons in the woods. One was used for target practice at about 100 yards (not really sure how far it was, there is debate).
Posted by sstc at 12/18/2008 09:35:00 AM 1 comments
Monday, December 08, 2008
I pryed it from an Ivan's cold dead fingers...
My friend mentioned that his friend was in the market for a rifle. A gun show was chosen and I was invited to go. I had three "holes" in my collection that I deemed worthy of filling. A bolt action in a useful caliber (.308 equivalent +), a .22lr for plinking, or a PF-9 for pockets.
Thanksgiving happened and I saw an exquisite M1917 Enfield with family history. I started leaning toward the bolt action. I figured that something WWII era would be ideal. American/British was out of the question due to price, so I was looking for a K-31, Mauser k98k, or Mosin-Nagant variant.
I acquired a Soviet M-44 Mosin Nagant. It was made in 1946 at the Izhevsk plant.
This is it when I got it home.
I wanted to show all of the cosmoline on it, but it did not come out in the pictures. The bottom of the barrel was positively goopy. I'll substitute two pictures of the bolt.
The action is actually quite cool, except that the safety SUCKS. To quote Arthur's Hall (Michael Z. Williams):
It does, in fact, have a safety, but it's quite hard to engage. But this is not a complaintThe ball of flame is real and can readily be seen in youtube videos. I will writeup the comparison in recoil between 12 gauge slugs and this round/gun combo. I bet the shotgun still wins.
one would ever voice in the Red Army. Your officer would reply, "Safety? Safety? Is gun! Meant to kill! No warrior should know he has safety on gun, because he should be killing enemies of homeland! Safety make loud click to aid enemy in locating warriors! No safety!" while pounding his fist on the table.
And the Mosin can kill enemies of homeland. The muzzle blast will vaporize green growth within a few feet of the muzzle, and even if you miss, the enemy will be reduced to shouting "WHAT?" to communicate. You'll need a recoil pad or shooting jacket. Ordinarily, this might be considered unmanly, but this rifle has a short stock for using while wearing several layers of wool for a Russian winter. It is acceptable to wear padding to fire a Mosin.
I took it apart. Better instructions that I could make here. The only thing I did not take out was the extractor from the bolt head, the bayonent lug, the front sight, and the rear sight assembly. I could not get the pins out of the rear sight assembly. The extractor really shouldn't be removed, the front sight is designed to stay in (it is staked), and the bayonet lug is also staked.
And cleaned all of the metal parts with mineral spirits. I could clean the nooks easily, but I had trouble with the crannies. I discovered one of the greatest cleaning tools known to man. The toothbrush. I could get all of the crannies. After the parts dried, I gave them a good dose of CLP (gun oil). The toothbrush again saved the day, as I could get the oil everywhere that I wanted it.
There was no rust except a small amount on the recoil bolt. I checked my firing pin protrusion after I reassembled the bolt. I used the "tape" method of headspacing (bolt closed on round, round + 1, round + 2, but not round + 3 pieces of scotch tape). I recommend using a gun smith to check headspace.
After the long cleaning session, here it is ready to load and fire:I'll try and post a range report when I figure out how accurate this thing is.
Posted by sstc at 12/08/2008 02:13:00 PM 1 comments
Our minds perception
I was sitting down after a grueling day of holiday shopping and looked up at a design on the side of the starbucks counter.
I am going to show you the shape first, as I wasn't that close to it.
At first I thought it was a dog thing?
But turns out it was a dove.
And the Original.
The orientation might be off from how it was on the wood.
Weird how our minds work.
Posted by sstc at 12/08/2008 01:51:00 PM 0 comments
Friday, December 05, 2008
remote execution
So I am working on this project where the code runs in a virtual machine using python. To make some of the code faster, we could pass it "outside" of the VM and let it run natively.
I was just musing and asked, can you get an object that is a python closure. Then, we could serialize the object, send it out, and execute it on the outside?
I doubt its possible, but its interesting.
A quick look at google suggests that you can not pickle a closure. (Assuming that you dont want to follow Greenspun's 10th Rule expanded to include python)
LAME.
Heh, I can't imagine writing the code to pickle something like a closure.
gah, I have been infected! is there no cure?
Posted by sstc at 12/05/2008 11:38:00 AM 0 comments
Thursday, December 04, 2008
Tuesday, December 02, 2008
note to self
dress pants are very thin and not compatible with 32 degree weather and a 45 mph wind.
Posted by sstc at 12/02/2008 04:40:00 PM 2 comments
Thursday, November 20, 2008
Scooter electrical problems
So I bought that charger for the scooter. It worked great.
I go outside. Turn key. Turn master cut off switch to on. Nothing.
Open up battery compartment. Everything looks good. Look underneath and remember two wires that were not connected to each other or anything else (they are terminated with those metal circular plates with a hole in it). I pull out the battery holder piece, and there they are. One seems to go from the battery post to... nowhere? The other from the bowels of the machine to ... nowhere.
Using my engineering instinct, I boldly connected the two parts going nowhere. Hey, the colors matched. Nothing.
Turned on the switches and touched the two ends ... spark and lights coming on!
Off switches, off to find a bolt and a nut. I found a bolt with a wingnut . The bolt had a square part of the shaft so that it would not turn when inserted into a square hole. I did not have a square hole, but I did have duct tape. So I made a duct tape spacer, put on the two wire ends, and another duct tape spacer for good measure.
Everything worked great after I got it re-assembled. My fuel gauge wasn't acting weird and my lights flash now.
Uneventful ride to work. The new idle is so quiet, I had to rev the engine at stop lights to prove that it was still on.
Posted by sstc at 11/20/2008 02:37:00 PM 0 comments
Labels: moped
Wednesday, November 19, 2008
Scooter tweaking
I noticed that my turn signal light was solid today on the way to work. When I got to work, I found out that no light bulbs are out. I think I either have a bad flasher or a discharged battery. I lean toward the battery being the problem and I am going to try and buy a charger for the battery tonight.
Since I was looking at the scooter, I wanted to figure out how to change my idle setting. I could see this little screw, but it was tucked away in a fairly hard to get to location.
I got a screw driver bit and put it in a small socket. I turned the screw with that, and promptly dropped the screw driver bit. I couldn't find it. I shook the moped. I leaned it. I used a big powerful magnet. Nothing.
I finally decided to take off the seat. My sockets weren't deep enough, so I couldn't get it off. I decided, well, at least I can check out the battery. I opened up a compartment in the seat looking for it. I did not find the battery, instead, I found this:
My little idle adjustment screw! Outside I went and made it run at much lower rpm's at idle, it still starts, so I didn't bring it down too low. For some context, here is a zoomed out picture.
Since the battery wasn't where I thought it was, I looked around a bit more.
there it is!
Posted by sstc at 11/19/2008 06:00:00 PM 0 comments
Labels: moped
Tuesday, November 18, 2008
More random pics, this time from homecoming
The homecoming football game. We had a good time, actually tailgated for the first time ever (for real tailgating, not the pre-game fake kind).
Good seats the secod half due to an incident (epic awesomeness from Adam) on the other side of the field.
Posted by sstc at 11/18/2008 09:42:00 AM 0 comments
Monday, November 17, 2008
Saturday, November 15, 2008
Adding a shift register to the mix
So I hooked up a shift register (SN74HC595N) (8 bits output) to the ATMega168 (avr).
I wrote code. It wouldn't work. I couldn't figure out why. It sometimes worked, sometimes didn't. The lower 4 bits would work, sometimes...
Turns out, I forgot to set the 'you allowed to send information/output stuff' (SRCLR (overriding clear)) pin to high (tie it to vcc), so it was floating. This made it work sometimes, and most of the time it didn't work.
Once I put +5v on pin 10 (SRCLR) everything worked out great. I cleaned up all of the crazy code that I wrote trying to get something to work (I thought it was a code problem, not a "I missed hooking up a pin"). I had LED's hooked up to the 8 outputs of the shift register. It just lights the last led, then the next up(with the first), and etc until it lights all of them.
oh, for the connecting of stuffs, I used this diagram
from http://www.windmeadow.com/node/20 (note: On that page, he mentions adding power to the shift register as its not on the diagram. I didn't read that until making this post, but just remembered to do it from the data sheet on the shift register. Sucks that I didn't remember to hookup pin 10!) I put the LEDS on QA -QH.
the code (blinkin.c):
#include <avr/io.h>
#include <util/delay.h>
#define nop() __asm__ __volatile__ ("nop")
#define F_CPU 20000000UL //My chip is 20 Mhz
//make sure F_CPU is after #include <util/delay.h>
void send_byte_to_shift_register(int8_t bite);
int main(void)
{
int j = 1;
while(1)
{
send_byte_to_shift_register(j-1);
_delay_ms(500.0);
j = j*2;
if ( j == 512)
{j = 1;}
}
return 0;
}
void send_byte_to_shift_register(int8_t bite)
//should be able to use SPI instead of this way...
{
DDRB = 0xFF;
int i = 0;
int out = 0;
for(i=0;i<8;i++)
{
out = (bite >> i) & 0x01; //extract 0 or 1
//0x01 for last bit only, and >> to get location i
if (out == 1) {PORTB = (1 << PINB3); }
else {PORTB = (1 >> PINB3); }
PORTB = (1 << PINB1); //clock;
}
PORTB = (1<<PINB2); //latch the shift register
return;
}
yeah, so my sister yells out "STELLLLA" at the end of the video. Think of it as a bonus.
Posted by sstc at 11/15/2008 11:45:00 PM 0 comments
Labels: alarm_clock
Friday, November 14, 2008
Tuesday, November 11, 2008
Flashing blue lights in my mirror
I got pulled over by a mis-informed cop for driving an unlicensed scooter.
Turns out I was legal.
So I tried to complain and this was their response. (I used two browsers... its on their end)
"""
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'CDONTS.NewMail'
/web5-2/communication/ofcemail.asp, line 49
"""
and still broken after the vacation.
Posted by sstc at 11/11/2008 04:28:00 PM 3 comments
Labels: moped
Tuesday, November 04, 2008
Election Day! (and I am missing it)
I will be happily ignorant of the outcome of the election as I am on my honeymoon.
My only regret is that I may miss the ensuing riots.
(ha!)
(no seriously, someone please secure my belongings)
I hope everyone is having a good week, catch you at the end of the week.
-written 1.5 weeks before the election/marriage
Posted by sstc at 11/04/2008 04:00:00 AM 0 comments
Sunday, November 02, 2008
Candy!
update: the candy was a big secret? it seems. So I am re posting this the day after.
We got candy for the upcoming big event.
I forgot to post a picture of the non-chocolate candy. So here it is.
nom nom nom.
Posted by sstc at 11/02/2008 12:54:00 PM 0 comments
Tuesday, October 28, 2008
Easier than I thought...
So I had a free 15 minutes today and the result:
I implemented the four LED counter that I was talking about last time. One of the pins that I used is also used to program the device, so I have to move the reset and that pin (17/PB3/MOSI).
code:
#include < avr/io.h >
#include < util/delay.h >
#define nop() __asm__ __volatile__ ("nop")
//My chip is 20 Mhz
#define F_CPU 20000000UL
int main(void)
{
DDRB = 0xFF;
PORTB = 0x0;
while(1)
{
PORTB += 1;
_delay_ms(1000.0);
if(PORTB == 16) {PORTB = 0;}
}
return 0;
}
//endcode
So, I just realized that my header info last time probably didn't work, as I used < and > .
Next step, do the same thing with the shift register chip in there.
After that, figure out timers/interrupts.
Posted by sstc at 10/28/2008 09:15:00 PM 0 comments
Labels: alarm_clock
Monday, October 27, 2008
Manpower
I just want to point out some pitfalls of trying to make the government/our military have a ROI and super efficiency. Actually, it can also apply to anything that becomes extremely optimized with humans in it.
Robo-Cannon's Manpower Problem
So they won't have enough people for 24 hr operations, as someone has to drive, and the other to pay attention. It would be like trying to drive cross country by yourself ... you can't take a nap cuz the car crashes. If one dude is out of the fight, there is no excess capacity.
Bad thing for the military, often people are used in ways that are not designated by their MOS.
When designing stuff, remember the big picture, and add some resilience, just in case. It normally works out that you need it.
Posted by sstc at 10/27/2008 08:34:00 PM 0 comments
Pumpkins!
We carved pumpkins yesterday. I like to make my own pattern and was a bit rushed. I was inspired by an upcoming vacation and decided to make a turtle. Its not very Halloween, but eh.
The pattern:
Pictures of the four pumpkins:
Posted by sstc at 10/27/2008 04:38:00 PM 0 comments
Friday, October 24, 2008
Great success!
I was having lunch with a good friend on Wed and we mentioned some interesting projects that we could get into. I stopped myself from dreaming because I have not worked on the alarm clock for a long time. I resolved to write code, flash it, and blink an led by the end of the week.
As you can see above, I made the LED blink. Next step is to setup 4 or 8 LEDs and make them "count" from 0000->1111 (0->16). Then do the same, but using a shift register.
The reason that I have not done it before is because I was scared. It really was as easy as reading 1-2 pages in the datasheet. I had to figure out how to make a "nop" (no operation) but I could have just made the device add a number or something. There seems to be delay code already written in util/delay.h so I will try and use that in the 0->16 counter step to make it change once a second. I also turned all of the ports in "B" to output and on, so I should be able to just add LEDs and have 8 that flash together.
Summary:
xn ... so x can be like, C or B and n can be lik 0-7 (makes sense if you see the pin names)
DDxn: 1->output , 0->input
DDxn configures how the PORTxn acts.
PORTxn: input: 1->pullup resistor active,0->pull up resistor inactive
ouput: 1->driven high,0->driven low
PINxn: 1 -> toggle PORTxn
There was some warning about switching between input and output, it works better if you make sure that you use a specific sequence if you don't want the pin to be in a random state for a period of time.
My LED was on Pin 14 on the DIP, otherwise known as PORTB0 (PB0).
Code (blinkin.c):
#include < avr/io.h >
#define nop() __asm__ __volatile__ ("nop")
int main(void)
{
int i = 0;
DDRB = 0xFF; // set all B's to output
while(1)
{
PORTB = 0xFF; //All On
for(i=0;i<30000;i++)
{ nop(); }
PORTB = 0x00; //All off
for(i=0;i<30000;i++)
{ nop(); }
}
return 0;
}
for the record, these are the commands used to compile/flash:
avr-gcc -I. -I/usr/local/AVR/avr/include -g -mmcu=atmega168 -Os -fpack-struct -fshort-enums -funsigned-bitfields -funsigned-char -Wall -Wstrict-prototypes -Wa,-ahlms=blinkin.lst -c blinkin.c -o blinkin.o
avr-gcc -Wl,-Map,blinkin.out.map -mmcu=atmega168 -lm -o blinkin.out blinkin.o
avr-objcopy -j .text -j .data -O ihex blinkin.out blinkin.hex
avr-objcopy -j .eeprom \
--change-section-lma .eeprom=0 \
-O ihex blinkin.out blinkin.ee.hex
avrdude -c bsd \
-p m168 -P /dev/parport0 -e \
-U flash:w:blinkin.hex
I didn't write those all by hand, I found a nifty Makefile online that I configured, all I have to do is type "make writeflash" to compile/flash it onto the device. I can post the Makefile if anyone is interested.
The big problem that frustrated me was that I wasn't exactly sure how to "start" the code. So for a while I thought I did it wrong because I couldn't even make the LED light. I originally just kept cycling the power. That does not work if you have the programmer still plugged in. Turns out that if you pull the reset line out (pin 1), you start the device.You can leave the other programming pins attached. I might wire a switch to that line so that I can leave the programmer attached and run the code without pulling out a wire and reinserting it.
Should be relatively smooth sailing from here, I am assuming that the hardest parts are setting up the compiler/flasher, learning how to make the code run, and plugging everything into the correct pins.
Posted by sstc at 10/24/2008 09:19:00 AM 1 comments
Labels: alarm_clock
Wednesday, October 22, 2008
All I really want....
is a friend. (if I was a terrorist)
or so says Max Abrams in his paper "What Terrorists really want: Terrorist Motives and Counterterrorism Strategy".
My ten word summary of the paper.
Terrorists are terrorists because they want to have a friend.
Using his words on page 94 (it was published in a journal, the whole paper is like 28 ish pages)
There is comparatively strong theoretical and empirical evidence that people become terrorists not to achieve their organization's declared political agenda, but to develop strong affective ties with other terrorist members.It seems to be some quality research. He identifies seven puzzles that can not be explained by conventional wisdom about terrorists. Also brings up some good numbers about what the captured terrorists say about why they joined. They seem to act almost like cults and exist to keep the group alive as he could not find one group that met its political aims.
Save the world, befriend a loner! (but only if he has relatives in a terrorist organization or visits their forums).
Posted by sstc at 10/22/2008 09:26:00 PM 0 comments
Track fidel update
So I was curious about the health of Fidel, he has been posting fairly recently.
When I ran my code, I ended up with a negative number of days, investigating, I found something interesting around June 22th 2008. The post is labeled and seems to have been posted on June 22th, but the date on the file seems to be June 4th.
He might have written the article on the 4th, but then decided to post it on the 22nd. June 4th is in the middle of a 17 day drought of posts, and also when he seemed to not be feeling well both before and after based on his posts. He broke the 2 week barrier three times around that date.
I am going to make the code sort the dates, I am assuming that the date on the file is more accurate than the date in the listing. I'll try and remember this though, it did identify a date range where he was lacking on posting.
Also, on the 20th and 21st, the numbers ((2 and 0) and (2 and 1)) are split up in the text, and are actually different fonts. You find more weird things about words or numbers being different in the html, but not on the visible side. (see October for a recent set)
Anybody have enough free time to figure out the Castro html blog cipher? (heh)
Overall diagnosis: Zombie Castro is healthy!
Posted by sstc at 10/22/2008 09:31:00 AM 0 comments