Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sagebrush
Feb 26, 2012

Delta-Wye posted:

What platform and compiler?

Check the thread title. ;) I have to say that I have no idea how to disassemble a .hex file and I wouldn't know what I was looking for if I did. I would imagine you're right, though -- the compiler (avr-gcc) is probably smart enough to recognize the multiple lookups of the same value and handle that efficiently.

Bad Munki posted:

If you know the value won't be changing within the function, why not just pass the specific array element by value and call it a day?

What's this mean?

For what it's worth, I solved the slowing down problem I was having -- it turned out to not be limited by memory access at all but by a code error, having one line inside a loop when it shouldn't have been. I was trying to bit-bang 144 kbps out a single 800kHz digital I/O instead of the 1.2 kbps that was actually needed and that obviously slowed things down. After fixing that it's working plenty fast. Still interesting to think about, though.

Adbot
ADBOT LOVES YOU

Delta-Wye
Sep 29, 2005

Sagebrush posted:

Check the thread title. ;) I have to say that I have no idea how to disassemble a .hex file and I wouldn't know what I was looking for if I did. I would imagine you're right, though -- the compiler (avr-gcc) is probably smart enough to recognize the multiple lookups of the same value and handle that efficiently.
Whoops! Forgot which thread I was in. Anyways, http://stackoverflow.com/questions/919781/how-can-i-get-an-assembly-language-listing-of-my-arduino-sketches-on-windows

If you dump it out, post your results! Compiler outputs are neat.

Bad Munki
Nov 4, 2008

We're all mad here.


Sagebrush posted:

What's this mean?
You said you have a function within which you need to use a value from an array a bunch of times, so I'm guessing something like

code:
doStuff(&arr);

...

void doStuff(int *arr) {
//do some crap, maybe a loop, I dunno, but you said need that same value from the array a bunch of times, so maybe it's a pin number, for example
  for(int ii = 0; ii < 100; ++ii) {
    Serial.write(analogRead(arr[5]));
  }
}
but that's silly, just do it like this:
code:
doStuff(arr[5]);

...

void doStuff(int a) {
  for(int ii = 0; ii < 100; ++ii) {
    Serial.write(analogRead(a));
  }
}
Obviously that depends on what exactly you're doing, but based on your description (you need to use this same value from an array within a function and you know it won't change) pass the actual value at that index of the array into your function.


Disclaimer: it's late and the above code was not even proof-read.

Bad Munki fucked around with this message at 07:25 on Dec 3, 2013

Aurium
Oct 10, 2010

ejstheman posted:

I already have a Radio Shack 22-602; will that be sufficient?

I'm browsing around those two sites now, and I'm really digging the physically tiny microcontrollers like Adafruit's Gemma and Trinket. Are they a good place to start with this, or should I get an Uno for the benefit of lots of other people having the same thing?

I don't have a specific project in mind yet; I kind of want to understand better what's possible before trying to be creative.

It's not really a good multimeter for electronics but it will work.

Analog meters have been almost entirely superseded by digital ones. There are some trends they can show more clearly, but there's a large tradeoff in readability. Seeing the needle move out of the corner of your eye is nice when you're probing an appliance, dealing with a bunch of scales with overlapping ranges when you're actually measuring something isn't. There's no microamp range, which would be nice, but isn't a deal killer. The clamp will be useless, very little microcontroller stuff will be high enough current to make it twitch, that it only measures AC signals makes it even more rare. Lower ranges in general would be nice, 15v full scale doesn't really matter when almost everything is 0-5v. It's manual ranging, but this matters less for analog meters. The log scale for reading resistance won't be so hot. Same for the fact that you'll need to multiply the scale reading by 5 to read voltages on the 15v setting.

It's clearly been designed for electrical rather than electronics work.

Honestly, I'd get a autoranging digital multimeter. Adafruit has an inexpensive pocket one. As digital multimeters go, it won't be great, and like most pocket meters you probably shouldn't stick it on anything that you wouldn't touch with your bare hands (i.e. something that might have wall power), but it'll be much nicer to use. They also have an even cheaper non autoranging meter. Get the autoranging one. Your radioshack meter can handle stuff a pocket meter can't, and autoranging is so much nicer. If you enjoy deal extreme, here's something for you as well.

If you decide you enjoy electronics, you can always get a nicer meter later, and then you'll have a decent pocket one too.

ejstheman
Feb 11, 2004

Aurium posted:

It's not really a good multimeter for electronics but it will work.

Analog meters have been almost entirely superseded by digital ones. There are some trends they can show more clearly, but there's a large tradeoff in readability. Seeing the needle move out of the corner of your eye is nice when you're probing an appliance, dealing with a bunch of scales with overlapping ranges when you're actually measuring something isn't. There's no microamp range, which would be nice, but isn't a deal killer. The clamp will be useless, very little microcontroller stuff will be high enough current to make it twitch, that it only measures AC signals makes it even more rare. Lower ranges in general would be nice, 15v full scale doesn't really matter when almost everything is 0-5v. It's manual ranging, but this matters less for analog meters. The log scale for reading resistance won't be so hot. Same for the fact that you'll need to multiply the scale reading by 5 to read voltages on the 15v setting.

It's clearly been designed for electrical rather than electronics work.

Honestly, I'd get a autoranging digital multimeter. Adafruit has an inexpensive pocket one. As digital multimeters go, it won't be great, and like most pocket meters you probably shouldn't stick it on anything that you wouldn't touch with your bare hands (i.e. something that might have wall power), but it'll be much nicer to use. They also have an even cheaper non autoranging meter. Get the autoranging one. Your radioshack meter can handle stuff a pocket meter can't, and autoranging is so much nicer. If you enjoy deal extreme, here's something for you as well.

If you decide you enjoy electronics, you can always get a nicer meter later, and then you'll have a decent pocket one too.

I'm actually pretty confident that I'll enjoy electronics; I just don't want to buy something that I don't entirely understand and then find out later that it sucks, which is what's been holding me back on Arduino stuff. I browsed for "starter kit" type stuff during the sale yesterday, but all the things where I thought "okay, this is definitely the right thing for a beginner to get" were out of stock.

I would really like to have a nice multimeter, so if people have suggestions on that I'd love to hear them. I just got the Radio Shack one because I needed a cheap clamp ammeter for a specific application that's now long past. I'd be interested in replaceable probes, auto-ranging, rugged chassis, and the ability to measure volts, amps, farads, and henries, along with anything else that would be helpful for physically building electronic things. I want something that I won't just have to replace later. The autoranging adafruit one that you mentioned has a weird storage configuration where the probe leads loop outside of the chassis. That makes me worry about durability, especially since the probes don't seem to be replaceable.

Salami Surgeon
Jan 21, 2001

Don't close. Don't close.


Nap Ghost

Delta-Wye posted:

Whoops! Forgot which thread I was in. Anyways, http://stackoverflow.com/questions/919781/how-can-i-get-an-assembly-language-listing-of-my-arduino-sketches-on-windows

If you dump it out, post your results! Compiler outputs are neat.

AH HA! That's what I was really looking for. I remember MPLAB spitting out assembly from your C code, and it was super convenient for optimization. So if you can do the same with Arduino C, I think I'm set.
Radio Shack, here I come.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

ejstheman posted:

I'm actually pretty confident that I'll enjoy electronics; I just don't want to buy something that I don't entirely understand and then find out later that it sucks, which is what's been holding me back on Arduino stuff. I browsed for "starter kit" type stuff during the sale yesterday, but all the things where I thought "okay, this is definitely the right thing for a beginner to get" were out of stock.

I would really like to have a nice multimeter, so if people have suggestions on that I'd love to hear them. I just got the Radio Shack one because I needed a cheap clamp ammeter for a specific application that's now long past. I'd be interested in replaceable probes, auto-ranging, rugged chassis, and the ability to measure volts, amps, farads, and henries, along with anything else that would be helpful for physically building electronic things. I want something that I won't just have to replace later. The autoranging adafruit one that you mentioned has a weird storage configuration where the probe leads loop outside of the chassis. That makes me worry about durability, especially since the probes don't seem to be replaceable.

I may get hissed and booed for this, but I think a multimeter is one of the few tools where your first one should be pretty cheap, and I say this because there's a non-trivial chance you'll break it doing something stupid, and you won't feel nearly as bad about it if it happens.

The bells and whistles and high precision will be nice in a multimeter later on, but I'd recommend your first meter be one that later you won't mind lending out or tossing in a bag. However, do try to find one with audible continuity testing because that's actually much more handy as a beginner than it sounds. (No pun intended.)

I'm getting to the point where I need to get a decent meter to be able to measure capacitance and frequency, but the only times I've ever thought "I wish I had a nicer meter" for the normal resistance/voltage/amperage/continuity/diode testing measurements were when I either didn't have audible continuity testing, the probes were blunt (why that's considered okay I will never know), or it used those weird 12V batteries.

Edit: As a disclaimer, the cheap meters I've used were either freebies/near-freebies (under 10 bucks) or ones in the 10-25 buck range, and while we've got half a dozen or so of them floating around my lab, the only cheap meter I've ever hated enough to stop using was because it was tiny and the batteries cost more than the meter.

poeticoddity fucked around with this message at 03:35 on Dec 4, 2013

Aurium
Oct 10, 2010

ejstheman posted:

I'm actually pretty confident that I'll enjoy electronics; I just don't want to buy something that I don't entirely understand and then find out later that it sucks, which is what's been holding me back on Arduino stuff. I browsed for "starter kit" type stuff during the sale yesterday, but all the things where I thought "okay, this is definitely the right thing for a beginner to get" were out of stock.

I would really like to have a nice multimeter, so if people have suggestions on that I'd love to hear them. I just got the Radio Shack one because I needed a cheap clamp ammeter for a specific application that's now long past. I'd be interested in replaceable probes, auto-ranging, rugged chassis, and the ability to measure volts, amps, farads, and henries, along with anything else that would be helpful for physically building electronic things. I want something that I won't just have to replace later. The autoranging adafruit one that you mentioned has a weird storage configuration where the probe leads loop outside of the chassis. That makes me worry about durability, especially since the probes don't seem to be replaceable.

If you want a nice, but still budget priced multimeter, a common recommendation is the Extech EX330. It's $50-60, and is a pretty great meter. I've used one regularly, and it's a favorite in the electronics megathread. If you want to spend more the higher end Extechs are also pretty nice. Adafruit also has the EX330.

Fluke is the big name to beat. At a bit more than $100 the 17b is their low cost meter, and everyone loves the 87v (though it is over $300). Skip the 117, it is another electrician's meter. As an aside, inductance measurement is really rare on multimeters, usually you need a LCR meter for it. Fortunately, actually measuring inductance is pretty rare too.

I recommended that pocket meter for a few reasons:

1. Pocket meters are cheap. The radio shack meter you already had was a cheap one too, so that colored the recommendation.
2. As a good pocket meter, even if you get nicer meter later, it'll always be useful. Getting a cheaper larger meter first, and later getting a nicer one later you'd be more replacing instead of complementing it.
3. Despite being cheap and small, it's still autoranging.
4. It was offered by adafruit. You may as well find one store that has what you want.

It probably isn't the most durable one and most pocket meter's probes just aren't replaceable. It's also only CATII, and doesn't have the 10A range, just micro and milli. These are pretty much the size tradeoffs you make.

Having used meters in all of these categories, for my money, I'd get the EX330. Or camp ebay for a used 87v, though being the Christmas season, their prices have increased. And then I'd start eyeing some good pocket meters.

Dr. Despair
Nov 4, 2009


39 perfect posts with each roll.

My temperature controlled heater circuit seems to be working now. Just need to add the actual PID code to the sketch and cut a hole or 3 in the box to run the wires neatly.

Acid Reflux
Oct 18, 2004

I have a couple of nice (pricy) Fluke meters I use at work, and while they're all nice and calibrated and ridiculously accurate and whatnot, they are extreeeemely overkill for anything I do at home. On a whim, I bought a $20 Equus Innova 3320 off one of the tool trucks that comes by the hangar, and it's really a great little rig. Compact size, flip-out stand on the back, rubbery casing to help protect from falls, standard jacks that are compatible with all my expensive Fluke test leads (don't buy expensive Fluke test leads), and has all the basic functions most people will need for starting out. Also perfectly good for stabbing at wall sockets.

http://www.amazon.com/INNOVA-3320-Auto-Ranging-Digital-Multimeter/dp/B000EVYGZA

(edit) - I forgot to agree completely with the Extech 330 recommendation as well. That's a meter that will last a hobbyist a long, long time and is well worth the extra money.

Acid Reflux fucked around with this message at 03:35 on Dec 7, 2013

Optiquest
Feb 8, 2004

Any recommendations for parts kits preferably off amazon? I'm a first year EE student and got an Arduino and Pi for Christmas. How is this one?

http://www.amazon.com/Sunfounder-Pr...c+component+kit

Sagebrush
Feb 26, 2012

Looks fine, assuming that things like the accelerometer and the LCD work properly. How much experience do you have with practical electronics (ie. building circuits, not just the theory)? Do you already have the basic prototyping stuff like a soldering iron, multimeter, breadboard, helping hands, jumper wires, decent benchtop power supply (mine is an old computer PSU), etc?

e: I guess that already comes with the breadboard and wires. It's a good starter kit for $24, yes. If I were to expand on that set, I'd suggest adding a few servomotors, hall effect sensors, thermistors/temperature sensors, and photocells.

Sagebrush fucked around with this message at 05:24 on Dec 27, 2013

Optiquest
Feb 8, 2004

Sagebrush posted:

Looks fine, assuming that things like the accelerometer and the LCD work properly. How much experience do you have with practical electronics (ie. building circuits, not just the theory)? Do you already have the basic prototyping stuff like a soldering iron, multimeter, breadboard, helping hands, jumper wires, decent benchtop power supply (mine is an old computer PSU), etc?

e: I guess that already comes with the breadboard and wires. It's a good starter kit for $24, yes. If I were to expand on that set, I'd suggest adding a few servomotors, hall effect sensors, thermistors/temperature sensors, and photocells.

Besides the lab last semester, just working on my car and some guitar stuff. I've got some $5 soldering iron, breadboard, helping hands, and this multimeter. I just remembered I'm signed up for Introduction to Microcontrollers; should I hold off on buying parts?

e: If the multimeter displays a lower and lower number when measuring voltage with nothing connecting, could that be a busted fuse?

Optiquest fucked around with this message at 09:33 on Dec 27, 2013

Sagebrush
Feb 26, 2012

No, most multimeters with nothing connected to the leads will just float around some random value. Set it to voltage or resistance mode and touch the probes together, and it should drop to zero and stabilize in a few seconds. If it still floats with the probes touching, then the fuse is blown or the meter is broken.

I dunno what's in your microcontroller course, but no, the parts I've described and those in the kit are universal so even if you're using PICs or Cortexes or whatever you'll still be able to plug everything in. That's the nice thing about using a true general-purpose microcontroller instead of one of the lego kits or those sensor-block things etc.

Get a better soldering iron ASAP. You don't technically need one if you're just breadboarding, but it's a basic electronic tool and a temperature-controlled one is like a thousand times better than the cheap ones from rat shack. Check the main electronics thread for more info.

Sagebrush fucked around with this message at 19:37 on Dec 27, 2013

Dr. Despair
Nov 4, 2009


39 perfect posts with each roll.

Sagebrush posted:

No, most multimeters with nothing connected to the leads will just float around some random value. Set it to voltage or resistance mode and touch the probes together, and it should drop to zero and stabilize in a few seconds. If it still floats with the probes touching, then the fuse is blown or the meter is broken.

I dunno what's in your microcontroller course, but no, the parts I've described and those in the kit are universal so even if you're using PICs or Cortexes or whatever you'll still be able to plug everything in. That's the nice thing about using a true general-purpose microcontroller instead of one of the lego kits or those sensor-block things etc.

Get a better soldering iron ASAP. You don't technically need one if you're just breadboarding, but it's a basic electronic tool and a temperature-controlled one is like a thousand times better than the cheap ones from rat shack. Check the main electronics thread for more info.

I'm a big fan of the one sparkfun sells: https://www.sparkfun.com/products/10707

Hadlock
Nov 9, 2004

I ordered an Intel Galileo, how big of a mistake did I make over just getting a traditional Arduino? I was seduced by it's sexy dual USB and onboard 10/100 eithernet. For less price I probably could have gotten a Beagle Bone Black with HDMI out, but I'm buying this primarily as a microcontroller, not Yet Another Computer

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

Hadlock posted:

I ordered an Intel Galileo, how big of a mistake did I make over just getting a traditional Arduino? I was seduced by it's sexy dual USB and onboard 10/100 eithernet. For less price I probably could have gotten a Beagle Bone Black with HDMI out, but I'm buying this primarily as a microcontroller, not Yet Another Computer

Definitely not a mistake, but realize it will be better for some stuff and worse at other stuff compared to an Arduino. Because it's an x86 processor running Linux, it won't be good at super strict timing (since the OS can interrupt the program being run at any time) so it might not be good at running servos directly compared to an Arduino. However it will be much easier to play with internet connected stuff since it's running Linux and can connect to ethernet or wifi (through a PCMCIA slot) easily. It can't hurt to pick up a cheap Arduino too, like the Adafruit Trinket or Arduino Mini, so you have that available too.

Hadlock
Nov 9, 2004

mod sassinator posted:

Because it's an x86 processor running Linux, it won't be good at super strict timing (since the OS can interrupt the program being run at any time) so it might not be good at running servos directly compared to an Arduino.

Welp, my main purpose was to control five servos for (hopefully) a robot arm. The issue with timing, do you mean jitter or can you go in to more detail?

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

Hadlock posted:

Welp, my main purpose was to control five servos for (hopefully) a robot arm. The issue with timing, do you mean jitter or can you go in to more detail?

Yeah, like the Raspberry Pi you might get servos that jitter and move because the timing of pulses sent to them isn't exact. Something to look at though is a servo control board like this Adafruit one. You can communicate to it over the I2C protocol from the Galileo (I'm assuming like a normal Arduino the Galileo supports I2C, but you might want to check the docs/info to be sure) and the board will take care of generating all the pulses that are needed to move the servos. It's also nice because that board will distribute power to all the servos, so there's less clutter hooking each servo up to power, ground, and signal.

edit: Yeah looks like the Galileo does I2C just like an Arduino Uno, so you should be good to use that servo board. The tutorials on Adafruit's site are pretty good and go into more detail on using it: http://learn.adafruit.com/16-channel-pwm-servo-driver

mod sassinator fucked around with this message at 07:55 on Jan 28, 2014

Hadlock
Nov 9, 2004

Uhh so, $200 worth of gadgets and gadget accessories in, the Intel Galileo is very half-baked feeling

As you mentioned, servos are having issues, it has a low-res PwM capability. Someone adjusted the library to use the low resolution version but I'm still getting screwy results - and yes I'm powering the servo off of a seperate power supply. Dealing with servos is a pain and it's obvious that this really wasn't designed to do what is required for smooth servo control.

https://communities.intel.com/message/221795
https://github.com/mikalhart/galileo-Servo/releases

There's no tone()/tone.h library

After the 10th or so sketch upload, it starts running in to timeout issues. This is a known issue.

Also my board appears to be missing the USB Host adapter

Did not come with the PCB standoffs
No new firmware updates since October 7th 2013 (almost 4 months now)

Seriously considering boxing it up and sending it back at this point to replace with a Beaglebone Black which has 6x the GPIO pins and 1 extra analog in, as well as HDMI out... for about $15 cheaper

Also there's the Ardunio Yun which comes with WiFi and Eithernet, but no video out for about $75, looks like the Leonardo board with networking and a linux capable CPU wielded on

Definitely leaning towards a Beaglebone Black though, sounds like it will have no problem controlling servos. I would really like to get an Arduino Tre but they haven't even announced pricing yet, let alone availability yet.

Hadlock fucked around with this message at 10:25 on Feb 2, 2014

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
The beaglebone has some quirks too--from what I understand getting wifi USB adapters to work is challenging, and some folks have mentioned they are pretty easy to kill with a little too much voltage. They have an 8 bit microprocessor attached that can handle realtime stuff like servo control and pulsewidth modulation which is a plus though. I have one but haven't played with it enough to really understand it yet. I'm a little put off by the Angstrom Linux distro and kind of wish it was just Debian based like the Raspberry Pi.

The Yun is another good option--I have one and am really starting to like it. It has WiFi built in and is pretty easy to setup. It feels the most like a real Arduino because it basically is one, just with a small Linux machine attached to the serial port. The two processors are very separate and its a little weird to wrap your head around how to use them with the included bridge library. Compared to the Beaglebone and such it is not nearly as powerful or versatile of a Linux machine, however I think it's a lot stronger as an embedded/real-time machine. Its great for stuff that's using an Arduino today with servos, shields, etc. but also wants access to the internet.

The Tre seems kind of odd to me--it might be useful if you have a lot of Arduino shields you want to use with a beaglebone. Otherwise I'm not sure there's much the Tre will do that the beaglebone can't do already today.

Hadlock
Nov 9, 2004

I am pretty much sold on the Beaglebone black - however it looks like the BBB's digital IO is 3.3v vs 5.0v for the Arduino Uno etc, is this a problem

Also, selling my Galileo in SA Mart so I don't have to deal with the Newegg RMA process

http://forums.somethingawful.com/showthread.php?threadid=3606431

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Shouldn't be a problem, just be careful of any sensors or things you buy to check the data sheet and make sure they work with 3.3 volts. If you do find something that is 5 volts only, there are level converter boards and chips you can use to go from 3.3 to 5 volts and back. Most sensors that are made to work with Arduino already have level converters built in so they can work with 3.3 or 5 volts. Servos should be fine too, for example heres's a tutorial on using one with the beaglebone: http://learn.adafruit.com/controlling-a-servo-with-a-beaglebone-black/overview

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Also if you're really more interested in video or graphical stuff, be careful because the beaglebone black doesn't support 1080p over HDMI. The Raspberry Pi is much better at video stuff, and has a pretty decent GPU.

Amberskin
Dec 22, 2013

We come in peace! Legit!

mod sassinator posted:

Also if you're really more interested in video or graphical stuff, be careful because the beaglebone black doesn't support 1080p over HDMI. The Raspberry Pi is much better at video stuff, and has a pretty decent GPU.

Are you still constrained to use that horrible Angstrom distro if you want to use the BBB's GPU, or have someone added support for that to the debian image?

Hadlock
Nov 9, 2004

From what I've seen, you just need to import the python BBB hardware library and you're good to go, I'm not super excited about running Angstrom, I will probably always boot Debian from the SD card. Angstrom + wifi sounds like a complete disaster even for someone who's compiled their own wireless adapter drivers before.

I figure if I can get the BBB to show a slideshow, I'll consider it a success. I don't think I'll use the video out a whole lot, but it's good to have if I want to do something with it later.

TwystNeko
Dec 25, 2004

*ya~~wn*
So my latest project is a hat, with LED goggles on it. However, for added silliness, the goggles have eyebrows that are controlled via servos. :3:

The problem is I get jittery servos when using FastSPI to control the LED rings. I've minimized it as much as possible via the code here: http://pastebin.com/iyL1Hsvf

Is there a better, non-hardware way to solve this? I tried attaching to the servos just before I move them, then detaching right after, but that just causes them to not do anything, and I'm not sure why.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
The servo needs a constant signal of pulses at a certain frequency to move. I bet the LED or SPI code is disabling interrupts because it has timing critical code, but as a result the interrupt that powers the servo library's signal generation isn't getting fired. Try switching to a servo library that uses the hardware PWM output to generate the signal: http://arduiniana.org/libraries/pwmservo/ You might need to switch your servo signal wire to use a different pin (looks like 9 or 10 on an uno).

TwystNeko
Dec 25, 2004

*ya~~wn*
I tried that, and now it works perfectly! Thanks!

Hadlock
Nov 9, 2004

Intel has laser cut plans for a robot arm, I got mine (mostly) assembled tonight. Well the mock-up at least, I need to go purchase about 20 1/8" machine screws and nuts. Cost about $60 shipped. Pretty cool getting something with real LASER SCORCH MARKS on it in the mail. And then building something from it. We live in the future



https://communities.intel.com/thread/46682

mod sassinator your Galileo is in the mail, my lack of working car + hellish dallas icestorm delayed getting to the post office on my bicycle by a few days

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Very cool--no worries on the Galileo too, I'm still trying to think of some good uses for it.

Rubiks Pubes
Dec 5, 2003

I wanted to be a neo deconstructivist, but Mom wouldn't let me.
I broke a pin off in one of the ports on my arduino. How the hell do I get it out?

Sagebrush
Feb 26, 2012

Inside one of the female headers? Tweezers, I guess. Or maybe put a drop of hot glue on the hole with the pin stuck inside, let it sink in and harden, then pull it off?

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

Worst case, I guess you could desolder the female headers and solder on a new block? You'd want to be careful about solder bridges, though.

Hadlock
Nov 9, 2004

Ok I've been holding off, but I can't resist... Have you tried chewing gum? The older gum might be tacky enough..

Combo
Aug 19, 2003



Ok, if this comes off as too "do my homework" ish, I don't mean it this way, I'm just trying to source some things for a project.

For a class, we had to come up with some projects to build and automate something. We came up with 3 different projects, and I'm on the group that will be building an automatic drink dispenser. Seems like the arduino is perfect for this.

I have a couple of different design ideas based on what I've seen online. One is a stepper motor on a slide like this video: https://www.youtube.com/watch?v=68-8QC2qU5w (though ours would be way slimmed down and nowhere near as cool as that, plus I'd want to do a few things differently on it to make it our own thing, I just like the slide assembly). It may be possible to scavenge this from an old printer?...though I'd probably have to come up with some way to control it.

The other, probably cheaper idea, was to put the cup on a lazy susan and use a servo to rotate it. My fear with that is that the servo will be too weak, but I don't know a ton about how powerful a servo can get.

Am I off base on that?

Sagebrush
Feb 26, 2012

Combo posted:

One is a stepper motor on a slide like this video: It may be possible to scavenge this from an old printer?...though I'd probably have to come up with some way to control it.

The other, probably cheaper idea, was to put the cup on a lazy susan and use a servo to rotate it. My fear with that is that the servo will be too weak, but I don't know a ton about how powerful a servo can get.

Yep, you can almost certainly get a stepper, belt system and linear shaft like that from an old inkjet printer. Depending on how it's made, you might have some trouble getting everything mounted up correctly once you take it out, but fortunately the driving part is super easy. Thanks to 3D printers being a thing, plug-and-play stepper drivers are getting really cheap and common these days.

Guaranteed good quality for $16: https://www.sparkfun.com/products/10267
Anyone's guess, probably at least 3/5 of them will work, but it's 1/5 the cost: http://www.aliexpress.com/item/5pcs-lot-EasyDriver-Stepper-Motor-Driver-V44-A3967-Free-Shipping/1470167262.html

Those boards should work with steppers that have four, five or six wires. Four-wired steppers are the most common these days though.

As for putting a lazy susan on a servo: not the ideal solution. A large, powerful servo could drive the table around and index to different locations easily, but it can only rotate in a 180-degree arc. A continuous-rotation servo can spin 360 degrees but you need an encoder of some kind for your positioning to be reliable. A stepper motor, when properly sized and powered so it doesn't skip steps, is the best option for speed, accuracy and continuous rotation. Put a timing belt around the bottom of the turntable, run it onto a toothed wheel on something like a NEMA17 stepper, and use the same driver as above.

Sagebrush fucked around with this message at 06:30 on Feb 11, 2014

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
I would go even simpler and just have all the bottles pour into the same large funnel. That way you have less to worry about with moving stuff, knowing the cup position and whatnot.

See this: http://www.evilmadscientist.com/2011/drink-making-unit-2-0/

Sagebrush
Feb 26, 2012

I'd argue that knowing the position of the cup is pretty trivial if you have a designated spot for it on the wheel, and a drink mixer that whirls around like a gatling gun is way cooler than something that just bubbles liquid out of a tube into a funnel. But yeah, that would work too.

Adbot
ADBOT LOVES YOU

Combo
Aug 19, 2003



Sagebrush posted:

Yep, you can almost certainly get a stepper, belt system and linear shaft like that from an old inkjet printer. Depending on how it's made, you might have some trouble getting everything mounted up correctly once you take it out, but fortunately the driving part is super easy. Thanks to 3D printers being a thing, plug-and-play stepper drivers are getting really cheap and common these days.

Guaranteed good quality for $16: https://www.sparkfun.com/products/10267
Anyone's guess, probably at least 3/5 of them will work, but it's 1/5 the cost: http://www.aliexpress.com/item/5pcs-lot-EasyDriver-Stepper-Motor-Driver-V44-A3967-Free-Shipping/1470167262.html

Those boards should work with steppers that have four, five or six wires. Four-wired steppers are the most common these days though.

As for putting a lazy susan on a servo: not the ideal solution. A large, powerful servo could drive the table around and index to different locations easily, but it can only rotate in a 180-degree arc. A continuous-rotation servo can spin 360 degrees but you need an encoder of some kind for your positioning to be reliable. A stepper motor, when properly sized and powered so it doesn't skip steps, is the best option for speed, accuracy and continuous rotation. Put a timing belt around the bottom of the turntable, run it onto a toothed wheel on something like a NEMA17 stepper, and use the same driver as above.

Awesome, thanks for the help on that. The first thing that popped into my head when I was looking at the design in that video was "that slide looks like the inside of a printer", and it made sense that it would use a stepper motor.

So that seems like the way to go, just have to find a nice (cheap?) linear assembly, or scavenge one.

As far as the lazy susan idea, what about a little motor with an encoder, rather than a servo?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply