BlogmaIntro to Physical Computing Fall, 2003 Jeff Feddersen Week 7 Common Ground!
My home phone number is, apparently, one digit different from the front desk of Screw magazine.
I was temporarily without my bread board, so I did some soldering and hooked up the servo directly to a 5V DC power supply, with red to + and black to -.
Another general electronics-y site: play-hookey.com with guides on how DC power works, etc.
Tested servo with sample script online - works just as promised.
In college I took a midi class with David Borden, who had worked with Bob Moog (pronounced 'mohg') in Trumansburg, NY, just a few miles north of my home town. He would tell stories about Wendy Carlos (back when she was Walter Carlos). Borden was kind of a jerk, and his music wasn't even very interesting. When he couldn't think of a melody, he would just take some random piece of sheet music (say, "Jingle Bells"), turn it upside-down, and play it that way, at Carnegie freaking Hall, no less. I suppose that is an avant-garde technique of sorts, but it sounded terrible. Still, the class was a lot of fun.
I try the second online script, but the servo just cycles between 'start' and 'minimum'.
I add I resoldered the connections on my power supply jack, which were kind of threadbare. Making them nice and solid again seems to have improved my serial connectivity.
The popcorn song was a hit with everyone this week.
I realized that I'd heard that songs lots of times, but never really thought about where it was from.
In my mind, I always associated it with the Axel-F theme from 'Beverly Hills Cop'.
The Popcorn song was composed by Gershon Kingsley in 1969, who, in addition to surviving the holocaust at age 15 and serving with the British military in Palestine, joined Moogby, the first Moog synthesizer quartet. 'Popcorn' was composed "in about two minutes" for the group, and has since become kind of an anthem for electronics musicians. Kingsley said he uses Macs, and said he prefers Performer and Overture software.Maybe I should switch back to macs. The vanBasco's Karaoke Player is the best midi player I've seen. It's free, and good for when you don't have access to your midi keyboard. I remove the wires connecting the right and left power bays, like Jeff showed in class, and put a 9V battery on the right side. So now the chip doesn't shut off, and the servo acts like it's having a seizure. The instructions say the minimum pulsewidth of 0.001 and maximum of 0.002, but the code uses 0.0003 and 0.0022. Hmm. I change the values to 0.001 and 0.002, but it doesn't seem to make any difference, although the seizure looks slightly more erratic.
There's a mnemonic device for resistor colors:
(if engineers had invented the English language, we wouldn't have three basic color names that begin with the letter 'B') So some common resistors in the cabinet are:
So now I try 0.0001 and 0.003, but that doesn't seem to matter either. I change the sleep from 2.0 to 5.0 - no significant difference. Change the 'refreshperiod' to 0.05, and the only difference is intermittent pauses. And the servo is getting kind of warm.
How to read a capacitor (it sort of makes sense)
This one takes a stab, too, and one more
I put back the original script - no difference. I notice that if I manually twist the motor all the way clockwise, the first thing that happens when I run the script is that the motor turns all the way back ccw, then vibrates. Good thing I bought two servos. I try the 2nd one, and it jitters as well, but in a different way. Try all the things I did with the 1st one, and they both act the same - even the part about spinning ccw before jittering. Maybe the example code is bad. The first script worked fine. Oh, but I try the first script again and it doesn't work. Oh, that was before I put in the 9V - that must have too much power - ah yes, the servo doesn't want more than 6.
I have one little blue thing, that looks like this:
So I need a different power supply, or a voltage regulator.
Here's one, no wait, that's not a 7805, that's a NL|CE LM|317T|NLAS947 - an adjustable voltage regulator.
Where the hell did that come from?
This Word doc has a thorough listing of circuit symbols, and leads me to believe that the blue component is a 'piezo transducer', although it doesn't look like the photos of piezo transducers I see on the Web. But it looks like it makes sound. To regulate the new VR, I need a 240Ω resistor and a 5KΩ variable one. I've got a 220 (red, red, brown) resistor, close enough, and a 10K pot. Let's see how it goes... I've learned that, just as the US has different spelling (color vs. colour), sports (football vs. football), and measurements (imperial vs. metric) when compared with the rest of the world - the US also uses different circuit diagram notation. The differences are more for logic gates than for component symbols, but geez, why do we always have to be different? All the same, ours are easier to read. Now, with the pot turned all the way one way, I get about 14V, and turned all the other way gives me 0V, success! I guess the difference in resistances in my components is why the max isn't 37, but I'm not going to do the calculations now. So I turn the pot and watch with the multimeter until I have about 5V. Now, to try the servo script again... and... nothing. Here is a diagram for a Variable Frequency Quadrature Sinewave Oscillator. I want to try it. I think I might print out the diagram, paste it to some cardboard, and then just lay out all the components on top of the diagram and solder them together. It requires:
I was testing voltage at the wrong points, across the pot, instead of where the motor will get it. The instructions also suggest some optional capacitors. Let's try those as well. It asks for 0.1µn;F and 1.0µn;F, I have 0.047 and 10. Oh, but one is directional and the other isn't(?). I try a few configurations, but no dice. This British electronics componments site: Maplin seems to have everything. Too bad the shipping charge is so high to the US. They even have loads of fireworks. Japan sells loads of fireworks, for like, $5/pound. I tried smuggling $20 worth from my last trip, but ever since 9/11, the airport personnel are a little twitchy about piles of explosives being brought aboard. Oh well. Let's make it simple, just stick the pot between the battery and the regulator. Well, I now have a min of 2V and a max of 3 - that's no good. Okay, start over. Putting batteries in series should have an additive effect on the voltage, right? So put two AAs at 1.5V each and, yes: 3V. So I just need one or two more.
This site has a diagram to make something that is essentially the same as a 7805 (but better input voltage range) for $0.46 in parts.
Too bad the shipping would be more than the cost of just anew 7805.
Shortly before Bloomberg ran for the mayor's office, his people were hanging out on NYU's campus, handing out little radios that could only be tuned to one station, the AM broadcast of Bloomberg radio. I still have mine, ripped apart, but alas, it only has a battery bay with room for two. No problem, there's one with room for four in the bottom of junk box #4. Multimeter says: 6V - finally! An automated plant-watering system But dammit, still jittering! I try with three batteries (4.5V) - same, 2 batteries - same. I try the first script with the same 5V power that's running the chip - and it's fine.
Phaedra was talking about bioinformatics.
I now have the 4 AAs powering the servo, which is still jittering. Futzing with the numbers helps somewhat. The fact that both motors have a left-bias, concerns me. This guy did a thorough test of pulsewidths for the CS-60. I need to eat more Chinese food, just so I can get more of those clear plastic tubs. I've got resistors in one, LEDs in another... Oh man, I fucking got it. I remember overhearing someone say in the lab something about 'common ground' so I link the ground between the batteries and the 7805, and voila. So now I can see that a 0.001 sec pw only gives me 45°, and 0.002 only gives me about 135. Tom's numbers are much closer to the right ones, though still a little off on mine. When I left the lab yesterday, I tossed my random wires, leds, and stuff into a paper bag that was on the floor. When I got home and was rummaging through it, I found some napkins, which seemed very odd. Then I found a large slice of chocolate cake in saran wrap. So, to whoever lost a piece of cake in the lab: it was very tasty. About two years ago I built a perpetual motion machine, of sorts. It would only make about two revolutions before it was overcome by the friction on the axles. With some better lubricant and more precise gears, I might be able to get it to work. People say perpetual motion is impossible, but if you notice, the Earth has been moving around the Sun for quite a long time. The trick is to have a balance of non-collinear forces. The Earth is always falling toward the Sun, while at the same time hurtling away along a tangent of its orbital path. These forces are at right angles of each other, so the method here on the ground is to use magnets at right angles to gravity. Several magnets repel each other while fixed to two interlocked gears, both of which are on ratcheted axles, so they can only turn in one direction (1 cw, the other ccw). It's not 'free' energy, which is impossible, because over time, the magnets gradually lose their field. It's very similar to a water wheel - the potential energy in a magnet is converted to kinetic energy. Looking at that LM317T VR, I see that I may have had pins 1 and 3 reversed. Oh well. I don't think I'll do anything interesting this week for IPC. But I have a plan for how to use the servo for my Halloween project. I got a sort of robot arm powered by servo working, based on a sketch at http://zzz.com.ru/ Tried building a tesla coil, but I didn't have any of the right parts. I substituted in a regular transformer for the flyback one, 220Ω resistors for the 240 and 27, and I don't even know what transistor I used. I powered it up, and the transformer was working because the steel loop became magnetized, but I didn't get any sparks. Then smoke started coming out of it, so I pulled the plug. The lesson is that electronics is not like making a stew, you can't just substitute ingredients if you run out. (I guess I knew this already, but I was hopeful that I might get at least something interesting) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||