TIP120 is NPN, while you are using it like a PNP. You need to be switching the ground.
coil power---->relay coil---->Collector Emitter----->GND BASE | | Arduino pin
TIP120 is a darlington so it doesn't need a base resistor. You are trying to switch the high side rather than the ground, that's all. Switch that up and you should be good to go.. and add a "reverse" diode across it for the inductive spike. Also, you need to know that writing ANALOG to a pin gives PWM, which means it switches off and on very fast. For a relay, that isn't what you want. The relay can't keep up with PWM and you wouldn't want it to. You just need to digital write the pin either high or low. Do remember to declare the pinMode to OUTPUT...
Very cool with the DIY nut.. two things come to mind. One is that you could probably well-oil the rod and then form the "nut" out of Hotmelt glue, doing essentially the same thing as HDPE (might even be HDPE for all I know) except not having to do all that clamping and such. Epoxy grabs pretty tight and is more brittle usually, but "pouring" hotmelt into an impromptu mold would be simple.
The other is to mention to the original poster that since his build is rather small- larger than a disk drive size but not big ole CNC router either- he could very likely harvest the carriage assembly from a printer or scanner. They tend to be really quite good.. attach a drive screw and you are good to go.
Which brings me to the last idea: many printers and scanners have both a very solid rail system and a drive method which is often a stepper motor. It may be worth it to just hack the whole assembly, and use the existing stepper motor. Printers tend to belt-driven, so the delivered torque might not be as high as a leadscrew-- but he may not any real torque for what he is doing..
Very uncool. Glad you let me know, they won't be getting my business again. I just browsed their site and found the one you are talking about- that's not the model I ordered or got.. mine was (and is) clearly a clone, and the only logo associated with Arduino is the big infinity on the back, and a line of text "www.arduino.cc" under the Made in China stamp. Everywhere else is prominently their own logo. Even the infinity on the back doesn't have the +- symbols. I purchased mine through their ebay store, which doesn't carry the Arduino branded board (I don't think).. so all I ever saw was clearly a clone.
Very strange, too, as they have their own branded everything- including the xxxxx Uno I got (obviously I am substituting the x's for the name). I would assume that given the standards, the device I got is "okay" in terms of branding.. but if that device that they are selling ISN'T a real Uno when they say it is.. It just doesn't make a lot of sense to me. They also have no other device they claim is the "real thing". Why wouldn't you go for the higher priced Mega? Leonardo? I mean, if you are going to steal, make it worth it, you know? So strange.
What they show on that page is clearly intended to be an Arduino Uno, including replication of the trademarked logo.
Especially since they have right next to it in terms of boards and such, their own branded items- why the heck would they do that? Had I seen that device, not the one I got, I would have believed it to be authentic. Like maybe they would carry the "real thing" and theirs next to it to show theirs was cheaper, you know as an advertising thing or whatever. Talk about cutting your own throat! I was JUST praising the maker on the overall quality of their own branded items, to boot. I went from "Gee, I'd buy that again, maybe it's worth looking at" coming out of me to this. How much repeat business did they just lose from me, and anyone else who read this? I suppose, we can be cynical and say "probably less than they are making selling fakes in the first place..." but then why would you put the UNDERPRICED identical, other than branding, board (visually, anyway) next to it, if you are going to go through the trouble and risk of outright faking the real thing? Why carry anything with your own name? I mean, if you were a counterfeiter, would you really stop at the ATM to pull out real money for groceries, EXCEPT the cash for the eggs, which you pay for with bogus bills... but only the eggs.?
That right there is just plain dumb on their part.. I mean I could see selling the "real McCoy" to highlight your own alternative product (hopefully selling your own I would think).. at even a slightly ABOVE retail price. Dang. And we are sure that they haven't bought and retail those, for the purpose of showing a price point comparison to their own? It just doesn't add up. Why do yourself like that? I mean, there's quite a few Arduino enthusiasts, but in reality, it's overall a small number. Word travels fast. Selling an outright fake is just crazy. They HAD to know this very discussion would be the result.. and I assume that someone is throwing the appropriate rocks at their windows?
Makes no sense to me at all, but thanks for pointing it out!
Good to know. I do have to say that in this case, it's clearly marked as their own product, marked made in china, and denotes itself as "XXXXXXX Board model Uno" (I'll post a pic, prolly tomorrow, of the back where the imprinting is done).. it isn't trying to pass itself off as an "official" board. Have they done that in the past?
I will give a report on the (reference to counterfeit product removed by moderator) "uino" when it arrives- but I see no reason for it to be anything other than a good ole basic Uno..
EDIT: Just noticed the reference to it being counterfeit! If I might ask (going to go and read the permissible use of the design page) what specifically about their clones isn't allowed? Last thing I want is to help a counterfeiter.. isn't there licensed clone uinos? I assumed.... Don't SparkFun and LadyAda among others make licensed clones? And, if this is a "problematic" clone brand while others are licensed, is there a list of vendors that HAVE licensed the design properly? I'd of course avoid using or praising a vendor that is cheating the system. As an end user on a shoestring, I often go for the cheapest, but it's not worth hurting the Arduino project for! If there's an "offender's list" or a "certified list", I've not ever seen it, other than the references to SparkFun and a couple others.
LCD/Keypad Shield: Their example code leaves a little to be desired, the lib works well but wasn't documented out for use (on the Keypad/LCD shield). They use the design where the five buttons return a different value on A0, and the lcd is wired to pins D4-D9 for use in 4-bit mode with the standard libs. Cute, solid implementation. It's mass produced cheap stuff of course, but it seems at least WELL mass produced. They provide no docs on the device, their website link could really use to be better documented.. but for the price- awesome. Because there is the doc problems, I'd not recommend it for a total novice.
Uno: Solid clone. Very clearly their logo screened on back, reference to www.arduino.cc, came with what looks to be about a half meter shielded cable. Started "blink" from original plugin, driver wasn't a problem, no problems uploading and using a couple of basic sketches, then popped on the LCD shield and loaded up their demo sketch, worked with no problems. Again, no documents whatsoever, but since it is a clone, Arduino site is plenty. Not much to say really, it's an Uno by all measures.
ProtoShield: First off I will say that I preferred the protoshield kit from SeeedStudio that I actually purchased at a Radio Shack for $9.99. I prefer to solder on the headers that I want to use, while this is more like the genuine, with the top and bottom headers already attached and two LED's, a RESET passthrough button, and a spare button. It also came with one of the little breadboards that fit between the headers and a mittfull (supposed to be sixty five of them, not going to bother to count) of male-to-male standard jumpers. Again, it's a solid clone of the "real thing", no logos on it at all.
Got the three of them for $39 shipped, I have to say, other than feeling a small twinge of guilt at not having bought "the real thing" this time around- not bad at all, and between the three look like they would make a solid foundation for a project. Most of the time these days I just use raw chips and USBASP, but I have a couple of shield-based things and wanted to see how one of the clones measures up to the real thing...
EDIT: Interested into seeing what's up with the clone permissibility and all that. Had wondered about it, as there are quite a few out there in terms of makers. Having just read the FAQ, I'm really curious as to what they've done - the whole clone thing never made sense to me, in that clones are sure to be cheaper than the original, thereby undercutting your own sales. Philosphical I figured it must be. The only thing that looks like it COULD be a violation of a copyright (to my eye, anyway) might be that the infinity "big" logo that gets cut off by the edge of the board. What's the scoop?
Despite mine and Terry's comments, those little steppers are not really suited to the job very well. They are made to turn vanes on air conditioners and stuff like that and are not that robustly built. They are made amazingly well for two dollars.. but they are two dollar motors!
Happily, steppers are not really expensive and you don't need anything with immense torque or speed. You should be able to get away with any "standard" stepper. Here's one that was one of the first hits on an ebay search..
That's five NEMA17's for $43, pretty good deal. You are just looking for something similar to these, exact ones don't really matter all that much.
The drawer slides really do make amazingly stable rails for what they are. Use two per axis, spaced as far apart as possible, that'll keep the wiggle to a minimum.
The key for you is going to be keeping that wiggle factor to a minimum. As for movement, if I remember right, the 1/4" rod is 12 thread per inch as a standard.. which means it will take 12 turns to move the carriage one inch. Those ones above are 1.8 degrees per step, 200 steps per revolution.. so that's 2400 steps per inch. WAY smaller than a millimeter. The thing is, the construction method and "play" obviously makes a difference. Even if you get this down to only 100 steps per inch of movement, 1/24th of the stepper/rail movement accuracy, you should be reasonably good to go.
Buckets of epoxy, sticks of it, and have hotmelt handy too. You are going to want it!
These days you are a hero for dumpster diving for parts. It wasn't that long ago that being a tech packrat got those "hoarder" looks from folks.
Aha, here's one, but before the code to take out that radial distortion. The source "image" is g-code (which is remarkably like Postscript) produced as a CNC toolpath by DeskEngrave. I simply screen out the z axis.. with only two motors, there's no way to lift the pen.
I make a habit of doing things that aren't supposed to be done. Eventually, I have the idea of scaling this (as it really only depends upon the string length) and putting together a more interesting "print head"- I want to attach a solenoid or cam... and use cans of spraypaint. Solenoid pushes spray button, or turning cam does. The Airwick Air Fresheners use the cam method, and the hardware looks like it would be easily harvested....
You could graffiti entire sides of buildings.... with no gantry (being a suspension plotter), scaling is just putting the motors further apart and more string, and a few lines of code... fact is, it isn't outlandish to think that with a little better construction, something like this could be used to do a number of very useful, difficult to accomplish tasks..
When I get around to it, I am also planning to add a third line/axis. The code is going to be tricky, but adding a third dimension to this arrangement... now, forget ink or paint. Extruder nozzle is what you want. Room-sized, virtually any sized, 3d printing. Anyone want to fund that? I have too many toys going already, but that one is in the "hmm, it really wouldn't take much" phase.. Tensor math can be confusing, I did well in geometry and trig, but I have forgotten more than I ever knew in the thirty years since my last geometry class
Terry- Yep, it's those AirConditioner steppers. Love them, so much torque it's crazy. I've not ordered from your store, but have browsed a number of times and seen you carry them along with the ULN2003A darlington driver boards for a couple of bucks. Great item, everyone should have a handful of them. I have also mounted wheels on two and a caster for a third wheel and made a bot with them, and if you remember my Frankenbotic Thinganator (the wall plotter made of salvaged stepper motors and fishing line) I went back and replaced the original steppers with those little beasts, but I haven't redone the code yet. Suffice to say, the resolution on the Thinganator is going through the roof... the video below is the original Thinganator, somewhere around here I have a couple of photos of it writing "Arduino Rocks" in a couple of fonts. Taking out radial distortion was very hard and done with recursive approximation.. the new version will implement some newer, faster code which is based on Heron's extrapolation of Pythagorean theory, calculation of the height of a triangle (y coordinate) by the length of the sides/tensors (my fishing lines form two sides and the beam is the third) and then calculating the x coordinate from the y. It actually made sense once I started thinking of it as a tensor/triangle problem-- the inverted triangle, no matter the angles, is composed of two right triangles of equal height, gravity being the third tensor. MUCH more accurate and fast than recursive approximation. I've also been thinking about a tweak to Bresenham's line algorithm (which I already redid for this as unidirectional while Bresenham's is arbitrary) that ought to make location calculation a bit easier too, but that's for another time...
As for coupling on the XY table, that's a 1" coupling nut, filled in with epoxy and jammed onto the motor halfmoon shaft, then caked in more (stick this time, not liquid) epoxy and secured with drywall screws. If my projects don't give actual engineers the heebie jeebies, then they obviously haven't looked too closely.
I'll MacGuyver anything, badly. If I thought it were even remotely possible, I'd probably somehow make my own transistors out of sand with a bic lighter, just to be a moron about it In reality, I have more than once thought about throwing you guys here on the site a curveball and make something robotic but instead of transistors, how about vaccum tube-- or better yet, home-made triodes. Those can be made fairly easily.... just need a torch, some nitrogen, and some funky bits of wire, as far as I can tell...
My XY table made with Home Depot ball-bearing kitchen drawer slides, two dollar steppers, and threaded rod. Made for about twenty dollars. Now admittedly this is a total hackjob, but the design works. Those steppers are actually geared down to over 2000 steps per rotation, with one rotation moving the carriage a tiny amount.
Make a slightly beefier version, less epoxy and better steppers, and you will be in business. 1mm resolution shouldn't be TOO hard to achieve. This has been sitting on a shelf waiting to add a third axis and be a CNC router for a few months..the whole project is supposed to be making a CNC router for under $100...
Using a IR pair as a photogate, arduino for the timing, and a bunch of cheap MOSFET's, I drive literally hundreds of watts of LED's for stop-motion. This particular one is three consecutive 2msec flashes 5 msec apart lit with about 75 watts of LED's, a paint drop landing in a bowl. I have to revisit that project, I have now amassed just about six hundred watts of white LEDs and built drivers.. and much more efficient and fast switching transistors for them too. I should be able to dump around 45,000 lumens at intervals down to microseconds with ease. Since I am just letting the LEDs power up to flash, the cycle time is nonexistant. Arbitrary delay, duration and interval strobe, solid state. This was shot badly, mainly because I tried to use a relatively slow ISO with a wide aperture - which backfired in terms of having too shallow a depth of field. That, and 2 msec introduced more blur than I want. More power and better exposure planning will make for a much better outcome- but suffice to say, using power LED's as a photostrobe is more than feasible.
Tons of light is the key with stroboscopic effects...
VERY cool...Okay.. but I believe the forward and reverse effects (as well the frozen motion) is because the frequency is the same as the frame rate, 24 HZ. I would assume that similar effects would be obtained as long as the frame rate and the oscillation rates match.. or is there some magical resonance at 24 Hz? For that matter, considering the sound level generated by a big ole speaker, maybe a solenoid could do much the same job in a much smaller space with much less power... or even a servo/stepper if the frequency of going back and forth is as low as 24 hz... I don't do much with servos, but I know that buzzing a stepper back and forth that fast could be done..
(edit- after thinking about it, 24Hz is subsonic)
Hmm. Since I can do some neat frame rate stuff with the EOS and Magic Lantern, have a couple of old 6x9" car speakers and some tubing....
Well, they say it's supposed to last ten years.. in many places that isn't considered a permanent structure. I know here in Massachusetts, it has to have a foundation and be expected to have a certain lifespan to be considered a permanent structure as relates to property laws. Especially considering there's no reinforcing bars or anything, that's impressive lifespan for a temporary building! The ribbing where the fabric is stitched forms the load bearing members of the structure.
I have no idea of the price of the things, but in many cases I am sure that it is a fraction of the cost of virtually any other form of construction. The one they show most often is something like 50 square meters... that's a pretty decent area, requiring framing and such with any other construction method. The thing is easier to assemble than a tent.. only takes one person.
I also look at the smaller one, and having grown up in the Midwest where tornadoes are a common thing... if you anchored that thing (and I mean really anchor it) it's rounded shape makes it an almost ideal tornado shelter. Heck, the ability to put up a feedbarn anywhere in a single day with one man... what's that worth to a farm?
I have one of the prefab steel backyard lawnmower and junk sheds, it's running down to the end of it's life- I understand it's over twenty years old. When I looked at what it costs to replace it, you are looking at a thousand dollars or more in many cases- and I know from a mechanic friend who has done it- don't do the "assemble it yourself" kits, ever. Even cheap sheds are five to seven hundred dollars, and even if you just set out to build one yourself out of lumber, you are looking at a few hundred for even the most rudimentary-- and a lot of labor and knowhow to do it if you want it to last a decade or two. If one of the smaller ones was say, five hunded dollars-- it would be a real contender in that market. I know I would think about it... and in the meantime, I take window screen and lay it across the rust holes and hit it with that spray rubber coating (or automotive undercoating spray), and it'll hold for several years.. I am up to three years on one such patch
Another very interesting material I have a yen to play with is UV-cure polymers. In all honesty, I want to build a 3-d printer which utilizes this rather than extrusion.. I think managing a UV LED or laser diode is a lot easier than a feed mechanism and temperature controlled nozzles. Just pump the liquid polymer and expose (harden) it on very precise locations, the extra runs down and is refed into the supply. The media management becomes a simple pump, the "print head" an LED or laser diode. All that's left is a gantry.
Had a neighbor who made rockets from glass cloth and epoxy but I'd have to do major re-arranging here to begin at it.
Another mix I have yet to try is glass strands in concrete.
I've recently been intrigued by the invention of Concrete Cloth. Cloth impregnated with concrete- they even make it as bags, with an internal bladder, as an instant hardened shelter. Leaf blower to inflate it (like a bouncy house) and then spray it with water, and it hardens overnight. Sterilizable, hardened, drillable for utility installation, all of it. They also can unroll it and make walkways, dams, runoff channels, you name it. Amazingly useful invention:
It's one of those "Geez, I wish I had thought of that" things, we've been doing the same thing forever with fiberglass and paper mache, why it's never been done before now with concrete is just that "Aha!" or "I wonder.." moment, I suppose.. it was invented by university students... and I look at it and instantly imagine it would be a PERFECT shop space. Maybe it's the extremely thinly veiled desire to have a skull-shaped island with a dome, or an underground lair, but for some reason this has that "madman with a soldering iron" feel, don't you think? Suffice to say, I think the stuff makes it worth trying out for yourself, in a poorly done hobby way. Fiberglass matting saturated with portland cement and probably some type of latex (I would use exterior latex semigloss paint. Always add latex to cement, imo- the cost is worth the durability.) would probably work for starters and would be cheap enough to try. Home depot, ten to fifteen bucks you should be able to get a sack of portland cement and the cloth and a quart of noname latex paint.. Heck, they are using canvas, but multilayered. I might consider using the fiber roll padding used for carpet backing possibly. In any case, sounds like cheap and easy enough to try...
Opening a drawer and finding those five bubble envelopes you got, paid a dollar each for, and forgot-- only to open and find the inspiration for the next wildly useless portzebie. Why do I have an industrial ultrasonic transducer designed for use in measuring the volume in tankers? Because it was a buck (though lists for a thousand!). What will I do with it? Stick it on a shelf, and then pull it out when a ping sensor (at five bucks) would work. I saved four bucks, even if it is a thousand dollar part, actually
It's the fact that many of these are so low cost that makes it possible or reasonable to lose things in a drawer for six months until Geekmas... it's not too hard to forget three items costing a total of two dollars that take a month to arrive, especially if you were buying them to shelve them in the first place