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
Acid Reflux
Oct 18, 2004

I'm really intrigued by the Arduino, but I'm still a little confused about all the different types. If we assume that money's not a huge issue and I just want to get the most (currently) powerful/expandable/whatever-able Arduino board, what should I be looking at?

Adbot
ADBOT LOVES YOU

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

The Arduino Mega has a huge amount of i/o pins and the best chip, to my knowledge, but most Arduino shields are for the Uno. The Uno's the baseline one and going to be solid for most projects.

Unless you specifically need ~50 i/o pins, the Uno's the way to go I think.

Edit: If you have a general idea of what you want to be doing (learning, making a specific project, etc) that could help us help you.

Acid Reflux
Oct 18, 2004

I appreciate the fast reply!

Honestly, I don't have any definite projects in mind right now. I see a lot of stuff on Instructables I'd like to tinker with, have a few generic ideas of my own, and...well, basically I just want to get my feet wet while still having the option of "going big" if I want. Having a shitload of I/O pins isn't necessary at this point. Worst case right now, I might be looking to drive a few servos or tinker with driving some relays. If the Uno is a good jumping-off point then it's likely to be more than I even need. I'm just one of those people that hates to buy something, only to realize that if I'd gone one step higher I would have been much happier. :)

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

Yeah, an Uno would work fine. All I'll say is that if you don't know what you're really gonna be doing, it's gonna be the list of other goodies (on Adafruit or Sparkfun or whatever) that's gonna be the real cash sink. Of course, that's half the fun.

Bad Munki
Nov 4, 2008

We're all mad here.


Uno, hands down. Probably 95% of the guides and tutorials out there will be based on the Uno. And if you do actually get to the point where you run out of I/O pins, well, at that point it's probably high time you look into how to mux/demux I/O! ;)

Delta-Wye
Sep 29, 2005
That, and there are plenty of tricks to multiplex inputs and outputs to get more if you need to - shift registers, analog muxes, etc. The number of I/O pins usually isn't the limiting factor.

EDIT: ^^^^ I appreciate your :flashfap: posting style.

EDIT2: VVV I think the big thing I've seen is additional serial pins, but I don't remember what protocal. SPI bus or a second UART or something.

EDIT3: Like 4 UARTS and a bunch of other stuff.

Delta-Wye fucked around with this message at 01:47 on Jan 31, 2013

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

I can't really see what sort of project would require a Mega.

Bad Munki
Nov 4, 2008

We're all mad here.


Well, say you wanted to submit a project to hackaday, and you had 50 LEDs...

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

Bad Munki posted:

Well, say you wanted to submit a project to hackaday, and you had 50 LEDs...

Yeah but you can just multiplex the Hell out of 'em. I've never done it (though I have some shift registers laying around), and I immediately know that's the route to take.

I've been trying to imagine an actual physical task that requires that many i/os and I can't envision anything. Most things would be suited to a more elegant solution than "have each LED use its own pin".

I can't really imagine what prototyping something with 50 i/o needing components would be like anyways without picturing a tangled rat's nest of wire and ten breadboards in a heap.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Capntastic posted:

I can't really see what sort of project would require a Mega.

http://reprap.org/wiki/RAMPS

This is probably the most popular controller setup for RepRap 3d printers. Interprets gcode sent over USB serial, controls up to 5 bipolar stepper motors, heated bed w/ thermistor sensor, hotend w/ thermistor sensor, optional 2nd hotend w/ thermistor, fan cooling, limit stops, optional sd card interface.

http://reprap.org/mediawiki/images/6/6d/Rampswire14.svg

Though I think the community is slowly moving towards more ARM based stuff now or in the near future.

nightchild12
Jan 8, 2005
hi i'm sexy

Capntastic posted:

I can't really see what sort of project would require a Mega.

Something with a lot of inputs/outputs with a design goal of "as few parts as possible"? Or if you're unable to get shift registers, muxes, etc? I can buy a Mega locally in a store, but not the ICs I'd need to get more I/O out of an Uno. Like, I want to drive >2 strings of RGB LEDs independently of each other - the Uno only lets me do 2 (6 PWM channels, 3 per LED string), but the Mega lets me do up to 5 without needing to find and figure out new hardware. Or something along those lines, maybe?

edit: Or just something with lots of I/O needed. I have a garden sensor / automatic gardener project I've been kicking around in my head that gets way simpler if I use a Mega vs an Uno.

double edit: I refuse to let any one pin have more than one purpose since I think it is an affront to God.

nightchild12 fucked around with this message at 01:47 on Jan 31, 2013

Bad Munki
Nov 4, 2008

We're all mad here.


Capntastic posted:

Yeah but you can just multiplex the Hell out of 'em.
No no, you see, it's for hackaday.

The only remotely plausible actual reason I can come up with is maybe if you were doing some software serial communication and you literally had a ton of external devices going with continuous data streams? But even then, the frequency you can fiddle the outputs and control a mux/demux would be fast enough to reduce it back down to just a couple pins with at least a moderate baud rate. I mean, it's not like you can set two pins faster than you can set one pin twice, since the operation is, I believe, blocking. On the other hand, setting up such a scheme in software would be more of a hassle than just having each serial comm use its own pins.

Isn't the mega also sporting a beefier processor? In which case, that might have been the original impetus behind the mega, and during the development process they said, "Well, we have all these extra pins on the processor, might as well make them available on the board," and thus a surfboard was born.

B-Nasty
May 25, 2005

Bad Munki posted:

Isn't the mega also sporting a beefier processor? In which case, that might have been the original impetus behind the mega, and during the development process they said, "Well, we have all these extra pins on the processor, might as well make them available on the board," and thus a surfboard was born.

A bit: 4x the RAM, EEPROM space, and flash memory. 15 vs 6 PWM lines (maybe that's the draw?) and over double the analog pins. My guess is the program space. Once your start dealing with networking, you need to get a Rpi the extra space for holding strings for network protocols and junk.

Aurium
Oct 10, 2010

Bad Munki posted:

No no, you see, it's for hackaday.

The only remotely plausible actual reason I can come up with is maybe if you were doing some software serial communication and you literally had a ton of external devices going with continuous data streams? But even then, the frequency you can fiddle the outputs and control a mux/demux would be fast enough to reduce it back down to just a couple pins with at least a moderate baud rate. I mean, it's not like you can set two pins faster than you can set one pin twice, since the operation is, I believe, blocking. On the other hand, setting up such a scheme in software would be more of a hassle than just having each serial comm use its own pins.

Isn't the mega also sporting a beefier processor? In which case, that might have been the original impetus behind the mega, and during the development process they said, "Well, we have all these extra pins on the processor, might as well make them available on the board," and thus a surfboard was born.

The hardware UARTS have their own buffers, which could potentially speed up sending and receiving data. The cpu can just dump data directly into the UART's buffer, and the UART can just send it without any further interaction from the cpu. The same goes in reverse, the UART can receive data without bothering the CPU at all, and when its received, it can be taken out of the buffer as a complete byte. The UARTS effectively work in parallel with the cpu.

Even on the GPIO side, depending on the pins, setting 2 pins at once can be much faster than setting one pin twice. The pins are grouped in sets of 8* by the hardware. These sets can be written to or read from simultaneously. You do need to do direct port manipulation there, you can't just use digitalWrite.

It also has more internal timers as well as independent pwm pins.

More external interrupts too.

Native GPIO is always faster than any kind of external stuff too. Though I'll admit that this doesn't matter as often.

*This is almost entirely true. The packaging of the chip matters, and portG is only 6 pins in this family for some reason.

B-Nasty posted:

A bit: 4x the RAM, EEPROM space, and flash memory. 15 vs 6 PWM lines (maybe that's the draw?) and over double the analog pins. My guess is the program space. Once your start dealing with networking, you need to get a Rpi the extra space for holding strings for network protocols and junk.

Same clock speed and thus same calculation speed though.

RPi is quite I/O limited too. And the standard distributions aren't hard real-time. Different problems call for different tools.

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

Is anyone using the new Due version? I was intrigued, until the Raspberry Pi started catching up with demand and I got a new toy. :3:

Admittedly, that's not ideal for beginners, as it's a departure from the AVR chips and uses 3.3v logic as opposed to other Arduino boards using 5v.

If there were an easier way to hook the teensy chips up to shields, I'd recommend that, as I tend to reach for it since it fits on a breadboard. It'd probably be trivial to design a PCB that links the teensy to shields, though. Maybe it does exist...

TVarmy fucked around with this message at 11:22 on Jan 31, 2013

huhu
Feb 24, 2006
I'm trying to build this: http://bildr.org/2011/06/easydriver/ and it calls fora 12V power supple. I'm finding a bunch of conflicting information on the internet and don't want to get the wrong power supply. What should I be doing to get the 12V to the easy driver?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Use an old ATX power supply or a find a 12V wall wart like in the picture, or a lab bench power supply set to 12V, or 8 alkaline cells in series, or a 12V lead acid or 10 NiMh or NiCd in series or pretty much anything that's even close to 12V. It will accept a wide range of power supply voltages, from 7V up to 30V actually, as long as you are properly limiting the current (it explains using the current limiting pot in the article).

huhu
Feb 24, 2006

peepsalot posted:

Use an old ATX power supply or a find a 12V wall wart like in the picture, or a lab bench power supply set to 12V, or 8 alkaline cells in series, or a 12V lead acid or 10 NiMh or NiCd in series or pretty much anything that's even close to 12V. It will accept a wide range of power supply voltages, from 7V up to 30V actually, as long as you are properly limiting the current (it explains using the current limiting pot in the article).

Ugh. I looked at the power supplies on Sparkfun and there was no 12V supplies. Then I searched for "12V wall wart" and the first result was for a 12V power supply from Sparkfun. Thanks.

Edit: If the Rated Voltage is 12V and the Rated Current is 0.33A, should I be using this wall adapter: https://www.sparkfun.com/products/9442 that has a .60A output?

huhu fucked around with this message at 19:42 on Jan 31, 2013

Aurium
Oct 10, 2010

huhu posted:

Ugh. I looked at the power supplies on Sparkfun and there was no 12V supplies. Then I searched for "12V wall wart" and the first result was for a 12V power supply from Sparkfun. Thanks.

Edit: If the Rated Voltage is 12V and the Rated Current is 0.33A, should I be using this wall adapter: https://www.sparkfun.com/products/9442 that has a .60A output?

That's fine. For a few reasons infact.

One, this stepper driver has a current regulator. As long as you set it correctly, it's fine. This is why the input voltage can vary so much as peepsalot said.

Two, the resistance of the load and the voltage of the source determines current. The relationship is ohm's law I=V/R. If I put a 40ohm load across that power supply, it would put out .3a. If I put a 80 ohm resistor across it, it would put out .15a. If I put a 20 ohm resistance it would put out .6a. It cannot push more current though it, because the force that pushes the current is the voltage, and that's constant.

The amperage rating on a voltage power supply is the max current it can produce. So if I put a 10 ohm resistor resistor across this power supply, I would not get the expected 1.2A. I'd still only get .6A, assuming that I didn't damage it.

In short, if it's a motor rated for 12v, you can put any 12 volt supply on it, as long as it can supply at least the minimum amount of current. If you had a supply that could supply 1000A, it'd still only give .3a though that motor.

Delta-Wye
Sep 29, 2005

Aurium posted:

That's fine. For a few reasons infact.

One, this stepper driver has a current regulator. As long as you set it correctly, it's fine. This is why the input voltage can vary so much as peepsalot said.

Two, the resistance of the load and the voltage of the source determines current. The relationship is ohm's law I=V/R. If I put a 40ohm load across that power supply, it would put out .3a. If I put a 80 ohm resistor across it, it would put out .15a. If I put a 20 ohm resistance it would put out .6a. It cannot push more current though it, because the force that pushes the current is the voltage, and that's constant.

The amperage rating on a voltage power supply is the max current it can produce. So if I put a 10 ohm resistor resistor across this power supply, I would not get the expected 1.2A. I'd still only get .6A, assuming that I didn't damage it.

In short, if it's a motor rated for 12v, you can put any 12 volt supply on it, as long as it can supply at least the minimum amount of current. If you had a supply that could supply 1000A, it'd still only give .3a though that motor.

This isn't a bad summary, but it's missing a few details. Very few wallwarts are properly current limited. The rated current is a side effect of it's rated power output, and drawing too much current will usually have one of several possible effects depending on the quality of the wallwart. The voltage may start to sag, it may get incredibly hot, it may just warm up then suddenly turn off, or it may catch fire and destroy your house. Either way, staying below that current limit will keep everything happy.

As an aside, a lot of cheap wallwarts also don't provide voltage regulation. If you draw close to the rated current, you will get the expected voltage. Less than the rated current, and the voltage climbs up - ive seen a lightly loaded 12V wallwart put out 20ish volts. Pretty much the opposite of a brownout, which is what will happen with a cheap wallwart if it's over loaded. Some of them are as simple as a diode strapped to a transformer :cry:

For what you're doing, a 600mA should be okay unless you have /really/ beefy motors. The current limit on the EasyDriver can go up to 750mA so your limiting factor on driving big motors will be the power supply.

FYI, I went to look up particulars on the power supplies you were asking about and found this article explaining in detail what I was blathering about earlier. It has pictures! http://www.sparkfun.com/tutorials/103

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

I have this LCD shield, and when it's stacked on top of this currently empty protoshield, the LCD is incapable of powering up fully. That's just voltage drop, right, and not something weird I'm failing to consider?

If that's the case then if I want to use the LCD shield while still having access to the digital pins, I'd need to get some stacking headers and sand down the LCD's board that's fixed to the top of the shield itself.

Rat Poisson
Nov 6, 2010

Capntastic posted:

I have this LCD shield, and when it's stacked on top of this currently empty protoshield, the LCD is incapable of powering up fully. That's just voltage drop, right, and not something weird I'm failing to consider?

If that's the case then if I want to use the LCD shield while still having access to the digital pins, I'd need to get some stacking headers and sand down the LCD's board that's fixed to the top of the shield itself.

Did you try adjusting the contrast with the potentiometer on the LCD board? It's probably just that, because the prototype board shouldn't be causing any noticeable voltage drop.

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

Rat Poisson posted:

Did you try adjusting the contrast with the potentiometer on the LCD board? It's probably just that, because the prototype board shouldn't be causing any noticeable voltage drop.

The backlight doesn't even come on, so I dunno what else it could be.

Edit: It's just lovely batteries, disregard.

Capntastic fucked around with this message at 08:52 on Feb 2, 2013

Acid Reflux
Oct 18, 2004

Finally just headed over to Radio Shack and bought an Uno yesterday. Already in love with the whole concept, and I don't even remotely understand the programming language yet. What I *do* understand is that I was controlling the position of an RC servo via a small pot in a little under 20 minutes...it's the little things that make me happy. :)

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Acid Reflux posted:

Finally just headed over to Radio Shack and bought an Uno yesterday. Already in love with the whole concept, and I don't even remotely understand the programming language yet. What I *do* understand is that I was controlling the position of an RC servo via a small pot in a little under 20 minutes...it's the little things that make me happy. :)

Congratulations on writing some C! :)

Seriously, Arduino's language is C with a little bit of sugar in the IDE to insert the right headers and such, and some predefined functions to set things up for you.

Acid Reflux
Oct 18, 2004

I'd love to take credit for the code, but it was just a copied/pasted sample from the Arduino web site. *sheepish grin* But really, it's the fact that it just worked that made me a little giddy. I know precisely squat about programming in anything other than Commodore 64 BASIC...it's been that long since I've dabbled in it. It doesn't look all that daunting though, at least for the starter projects. Just have to sit down and dedicate the time to learning some of it after the initial "ooooh, blinky!" excitement subsides a bit.

JesusDoesVegas
Jul 8, 2005

The Funk Ambassador
Lipstick Apathy
I was in your position when I started. Just find someone else's code for a neat project and mess with it. Even with very little programming experience its pretty easy to pick up.

There are some books out there that are pretty good for laying out the basics. I got one from makershed. However if you go through the example sketches and look what's going on it will get you there as well.

bobsacks
Feb 7, 2013

Acid Reflux posted:

Finally just headed over to Radio Shack and bought an Uno yesterday. Already in love with the whole concept, and I don't even remotely understand the programming language yet. What I *do* understand is that I was controlling the position of an RC servo via a small pot in a little under 20 minutes...it's the little things that make me happy. :)

They sell Arduino at RadioShack? I haven't been in one of those in a decade - creepy lookin guy behind the counter. You know the dude was some kind of serious perv.

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

bobsacks posted:

They sell Arduino at RadioShack? I haven't been in one of those in a decade - creepy lookin guy behind the counter. You know the dude was some kind of serious perv.

Yep, along with shields and decent component kits now, too. They're starting to improve.

Capntastic
Jan 13, 2005

A dog begins eating a dusty old coil of rope but there's a nail in it.

TVarmy posted:

Yep, along with shields and decent component kits now, too. They're starting to improve.

Either time I went to one recently the employees had no idea what the Arduino / Maker display was even for, or what it did (R/C cars??), and I ended up explaining it to them.

If you're not sure what you need, unless you need to grab an Arduino right now immediately, your best bet is gonna be ordering from Adafruit or Sparkfun, solely because they stock stuff in the general direction of what you want and have good descriptions and links to datasheets.

Acid Reflux
Oct 18, 2004

bobsacks posted:

They sell Arduino at RadioShack? I haven't been in one of those in a decade - creepy lookin guy behind the counter. You know the dude was some kind of serious perv.

The closest Shack to me is staffed by two giant goony neckbeards most of the time. Neither one of them has a clue about anything in the store except for the cel phones. Thankfully, I never need their help for anything unless it involves checking for inventory, and I always come armed with specific catalog numbers.

I try not to go there much, but sometimes you need a small DPDT toggle switch right loving now.

Arduino update: I'm now the proud owner of a 2-line LCD shield, a PIR sensor, an ultrasonic sensor, and a 3-axis accelerometer. Everything runs great with the sample code. I also have an old 4x4 RC truck that's begging me to turn it into an autonomous cat-chasing machine of doom. I guess it's actually time to sit down and learn some of that damned programming language now!

Cockmaster
Feb 24, 2002

peepsalot posted:

http://reprap.org/wiki/RAMPS

This is probably the most popular controller setup for RepRap 3d printers. Interprets gcode sent over USB serial, controls up to 5 bipolar stepper motors, heated bed w/ thermistor sensor, hotend w/ thermistor sensor, optional 2nd hotend w/ thermistor, fan cooling, limit stops, optional sd card interface.

http://reprap.org/mediawiki/images/6/6d/Rampswire14.svg

Though I think the community is slowly moving towards more ARM based stuff now or in the near future.

Yeah, I've been wondering if it would be worthwhile to design a version of the RAMPS board for the Due. I had heard that the latest controller firmware had been pushing the Mega to its limits.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

If I were buying new electronics I would probably go for a 4pi now that they are available. It was still in design phase when I put together my reprap.

Its made by kliment who also wrote printrun 3d printing host that a lot of reprappers use.

Captain Capacitor
Jan 21, 2008

The code you say?
Just a quick heads-up: SeedStudio's TFT Touch screen that is currently at RadioShack is not compatible with the Leonardo. I didn't discover this until I left the US and have no way of returning it and getting the SPI version.

Also you can get the Esplora there, too, which is pretty awesome just to mess around with.

TVarmy
Sep 11, 2011

like food and water, my posting has no intrinsic value

Am I the only person who doesn't like using shields? I'd rather just use discrete components so that if I want to keep the project, I can solder everything to a perfboard and use a bare Atmega to control everything.

Captain Capacitor
Jan 21, 2008

The code you say?
Some of us aren't good enough with discrete components yet. Or are still in the prototyping stage. Or both.

I mean, sure, I could try to bug solder the ridiculously tiny EEPROMs I got from Atmel, or I could get some more soldering practice in and wait until I can pick up some SOIC breakout boards or somehow manage to create my own PCB.

Huskalator posted:

Where is the best place to purchase one of these to be shipped to the US?

I have found a site that has an UNO for 10.95 with 2.95 shipping but I'm kinda skeptical about that.

I'm not a shill I swear. I just know I saw them there a few days ago.

Captain Capacitor fucked around with this message at 01:49 on Feb 10, 2013

Huskalator
Mar 17, 2009

Proud fascist
anti-anti-fascist
Where is the best place to purchase one of these to be shipped to the US?

I have found a site that has an UNO for 10.95 with 2.95 shipping but I'm kinda skeptical about that.

huhu
Feb 24, 2006

Huskalator posted:

Where is the best place to purchase one of these to be shipped to the US?

I have found a site that has an UNO for 10.95 with 2.95 shipping but I'm kinda skeptical about that.

It's mostly produced in China and not an actual Arduino board. I would say Sparkfun is a good place to order from, they have a ton of other stuff as well.

Bad Munki
Nov 4, 2008

We're all mad here.


You can buy them on Amazon for $25, prime-eligible if you have it (and if you don't, you can sign up for a free trial month of prime, which means free 2-day air, or $4 per item for next day.)

Adbot
ADBOT LOVES YOU

huhu
Feb 24, 2006
Decided what better way to spent Saturday night then to get out the Arduino. :science: Made a dimmer that goes through the full range of the RGB colors. Was rather confusing to setup because I used PWM pins as grounds so all the values were inverted so that 0 was high and 255 was low. Any suggestions for another way to do this?

View My Video

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