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
Sir Bobert Fishbone
Jan 16, 2006

Beebort

Parts Kit posted:

I've got one of those 4x4 matrix keypads and it's nice but it eats up 8 digital pins. Would it be possible to use a shift register to send that data down to the arduino onto just the 3 or so pins it needs total? Similarly could a shift register be used to reduce the number of pins needed for operating a little LCD?

For that matter if anyone has a good link on explaining how the shift registers work in code and such that would be super awesome.

I'd also like to see this--shift registers have never clicked with me and I don't know if it's just me being dumb or what.

Adbot
ADBOT LOVES YOU

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr

Amberskin posted:

There are a lot of examples in the internetz. For output you will probably want to use a 74HC595 or similar:

https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/the-74hc595-shift-register

If you want to multiplex inputs, you will probably want to use a digital multiplexer like the 74HC151.

http://playground.arduino.cc/Code/MUX151
Thank you very much. That first link has been pretty helpful.

Amberskin
Dec 22, 2013

We come in peace! Legit!

Parts Kit posted:

Thank you very much. That first link has been pretty helpful.

This one is also great:

http://arduino.cc/en/Tutorial/ShiftOut

Specially if you want more than 8 output lines.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


EDIT: Fixed! reset-en is cut, so it requires a manual reset every time a new sketch is uploaded. That's incredibly annoying.

I've got an older Arduino Mega board with a problem: it won't program over USB.

I've got an Uno that I programmed the ISP sketch onto, and now I can upload sketches using ICSP. However, I want to put that Uno back in the thing I took it out of.

How do I get this Mega working with USB again? It seems to be recognized when I plug it into the USB port; a device FT232R USB UART shows up. I got the newest version of the Arduino IDE, too (1.05), but that doesn't seem to have changed anything. Could the FTDI chip be fried? Arduino IDE bitrate different than what the FTDI is set up for? I don't see any options for setting COM port baud rate or anything.

The error is:
code:
avrdude: stk500_getsync(): not in sync: resp=0x00

babyeatingpsychopath fucked around with this message at 05:39 on Sep 15, 2014

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
I originally posted this to the electronics thread, and I think they're a bit out of my league. I have a nice 2A wall wort<>USB plug and an arduino project that simply uses too many servos. Assuming I can splice a USB cord correctly and wire it into the project correctly, can I just run the arduino and all the servos in parallel on the same input? That way the Arduino isn't trying to power all the servos.

The more I think about it, the more I oscillate between thinking it's really that easy, and then deciding I need some way to ensure the Arduino maintains 5V/500mA while the rest of the circuit gets whatever is left over from the original power source.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Cheekio posted:

I originally posted this to the electronics thread, and I think they're a bit out of my league. I have a nice 2A wall wort<>USB plug and an arduino project that simply uses too many servos. Assuming I can splice a USB cord correctly and wire it into the project correctly, can I just run the arduino and all the servos in parallel on the same input? That way the Arduino isn't trying to power all the servos.

The more I think about it, the more I oscillate between thinking it's really that easy, and then deciding I need some way to ensure the Arduino maintains 5V/500mA while the rest of the circuit gets whatever is left over from the original power source.

Is 2A going to be enough? Cheap wall wart power supplies get pretty bad at regulating their voltage near max current, and are also pretty bad at regulating when current changes wildly.

It is, in fact, just that easy to wire everything in parallel, but like they said in the other thread, put some largeish capacitors near the board to keep the power clean.

That being said, you can connect the arduino to the computer and all the servos to the power supply and then connect the ground pin of the arduino board to the - pin on the power supply. Clean power for all!

Poniard
Apr 3, 2011



Would this be the thread to post about Intel Edison poo poo?

Kasan
Dec 24, 2006

Poniard posted:

Would this be the thread to post about Intel Edison poo poo?

Here or the Raspberry Pi thread.

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

Poniard posted:

Would this be the thread to post about Intel Edison poo poo?

I'm really curious to hear about it from folks that have one. I'm kind of worried it's just going to be another flop like the Galileo. I really don't understand why Intel keeps pushing Arduino 'compatibility' when nothing in the hardware is compatible with the Arduino at all.

Aurium
Oct 10, 2010

Cheekio posted:

I originally posted this to the electronics thread, and I think they're a bit out of my league. I have a nice 2A wall wort<>USB plug and an arduino project that simply uses too many servos. Assuming I can splice a USB cord correctly and wire it into the project correctly, can I just run the arduino and all the servos in parallel on the same input? That way the Arduino isn't trying to power all the servos.

The more I think about it, the more I oscillate between thinking it's really that easy, and then deciding I need some way to ensure the Arduino maintains 5V/500mA while the rest of the circuit gets whatever is left over from the original power source.

Simply wiring voltage supplies in parallel is generally considered a bad thing. So I'm going to skip that. (but one of the possibilities might be what you're thinking of anyway).

You have a few choices. The first is that is that if you plug into the arduino's usb jack you bypasses the arduino's regulation so the onboard regulator isn't passing any current at all. This has the advantage of simplicity of wiring. One power source that you send everywhere. As other people mentioned, the USB supply may have awful regulation. If you also are supplying power via the barrel jack, it disables power from the USB jack so don't bother plugging both in at the same time, and it's actively worse in your situation as the USB supply can source much more power than the dc jack and regulator.

The other good option is that you can connect the USB V+ to the power supply of the servo, the signal to the arduino, and all the grounds together. (power supply, arduino, servo) and it'll work too. If you were using a higher voltage supply instead of the fixed 5v of USB, this would also a higher voltage for just the servo. They're pretty much all rated for 6v, and this will give more torque and speed. This might be what you were thinking of. Being a bit pedantic, this isn't really parallel, more of a tree.

mod sassinator posted:

I'm really curious to hear about it from folks that have one. I'm kind of worried it's just going to be another flop like the Galileo. I really don't understand why Intel keeps pushing Arduino 'compatibility' when nothing in the hardware is compatible with the Arduino at all.

They're kind of cargo culting the maker/arduino movement. They saw that atmel got a big boost, and they're trying to get in instead of arm and all.

Hadlock
Nov 9, 2004

mod sassinator posted:

another flop like the Galileo.

I really wanted to love the Galileo; however if I'm going to have half-baked arduino support I might as well go with the BeagleBone or just plunk down the cash and get an Arduino Yun or Tre and call it a day.

(I'm glad you bought that Galileo off me, jesus christ what a clusterfuck)

Full Circle
Feb 20, 2008

Thanks for the advice earlier guys, finally got my arduino in and went from a box of parts to triggering my amp via windows UI in under 2 hours. Now I've just got to get a handle on triggering it via the serial connection.

JawnV6
Jul 4, 2004

So hot ...
:psyduck: How'd you hook it up to a GUI without a serial trigger underneath?

Full Circle
Feb 20, 2008

JawnV6 posted:

:psyduck: How'd you hook it up to a GUI without a serial trigger underneath?

I just used Firmata to control the pin manually, which handled the serial communication itself. In the future I'll likely use an autohotkey library to trigger the pin toggling on the arduino via serial connection.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Aurium posted:

Simply wiring voltage supplies in parallel is generally considered a bad thing. So I'm going to skip that. (but one of the possibilities might be what you're thinking of anyway).

I just want to clarify that I wasn't saying to connect the supplies in parallel. Just connect the grounds together to get both the servos and the arduino on the same voltage reference. This may create some ground current, but probably not. Wall warts are isolated supplies, and USB stuff usually is, too. If the computer is a laptop, then it's probably isolated.

I'm doing stuff with arduinos and servos. I've got my servos on a 9v supply and my arduino on a 3.3V. I've got a wire going from arduino "GND" pin to the - rail on the servo the power supply board, and everything plays nicely. Without that wire, the servos jump around sporadically, probably because the pulse doesn't rise high enough or fall low enough to reliably be a 1 or 0. Not that I've tried to probe voltages or anything; I just connected the wire and continued working.

babyeatingpsychopath fucked around with this message at 00:23 on Sep 17, 2014

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Sanity check please -- in a sense is multiplexing a RGB LED array like refreshing rows of pixels on a monitor, or am I off base?

Aurium
Oct 10, 2010

babyeatingpsychopath posted:

I just want to clarify that I wasn't saying to connect the supplies in parallel. Just connect the grounds together to get both the servos and the arduino on the same voltage reference. This may create some ground current, but probably not. Wall warts are isolated supplies, and USB stuff usually is, too. If the computer is a laptop, then it's probably isolated.

I'm doing stuff with arduinos and servos. I've got my servos on a 9v supply and my arduino on a 3.3V. I've got a wire going from arduino "GND" pin to the - rail on the servo the power supply board, and everything plays nicely. Without that wire, the servos jump around sporadically, probably because the pulse doesn't rise high enough or fall low enough to reliably be a 1 or 0. Not that I've tried to probe voltages or anything; I just connected the wire and continued working.

The reason why the shared ground wire is needed is to give it a shared point of reference. Without a common point, high and low don't even have meaning. When there's only one wire connecting them, it could just as easily be read as unchanging and the ground of the other circuit is moving up and down.

It's kind of like asking which of us is at a higher elevation, and me answering with, I'm sitting 2 feet up in a chair on the ground floor. Even if you're standing in the observation deck of a hundred story building, we still have no idea who's higher. To actually answer the question we'd need to have a common reference such as our height above sea level.


Parts Kit posted:

Sanity check please -- in a sense is multiplexing a RGB LED array like refreshing rows of pixels on a monitor, or am I off base?

A fine analogy.

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Multiplexing is some whack poo poo. For now I'll stick with a more straightforward way to do a led matrix so I can work on my coding logic and come back to multiplexing later.

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
What gauge wire would be appropriate for these sorts of lower power circuits? I was doing some soldering on a led matrix earlier and when I got into my bit of wire left over from car work I realized it is grossly over sized for the job.

Captain Cool
Oct 23, 2004

This is a song about messin' with people who've been messin' with you

Parts Kit posted:

What gauge wire would be appropriate for these sorts of lower power circuits? I was doing some soldering on a led matrix earlier and when I got into my bit of wire left over from car work I realized it is grossly over sized for the job.
22ga is pretty standard. Use stranded if the connection needs to flex, otherwise solid.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Do solid if you're using a breadboard. Trying to jam stranded into a breadboard hole is a pain in the butt.

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Thank you both.

Sir Bobert Fishbone
Jan 16, 2006

Beebort
Has anyone (in the US) had any experience with using SMS capabilities on an Arduino? If so, please let me know what SIM you use, along with the actual GSM board/shield and any configuration snafus you ran into while configuring your project. I might be doing a project involving SMS read/send capability in the near future, and I just want to make sure it's feasible and cost-effective.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Adafruit has a board that uses the SIM800L chip and can send & receive SMS messages: https://www.adafruit.com/products/1946

I've used it and it works pretty well. You need to have a GSM 2G provider though, i.e. it won't work on 3G or 4G networks. In the US T-mobile works well.

Sir Bobert Fishbone
Jan 16, 2006

Beebort
Thanks! I'll look into it.

Hydrocodone
Sep 26, 2007

I'm gonna be visiting my parents for a bit and I'm interested in having a project to work on while there. I was thinking of ordering a simple Arduino tonight to meet me at their place. I did a couple programming summer camps long ago, but I'd say that at this point this experience would probably be like new to me.

What exactly do I need so that I can futz around with about 10-30 lights, ideally that I can arrange on a board or because of a flexible string, and play with making them blink in fun sequences of my own design?

I'm trying to google up the info I want but I'm afraid of missing a cable or connector I need to enjoy myself.

Delta-Wye
Sep 29, 2005

Hydrocodone posted:

I'm gonna be visiting my parents for a bit and I'm interested in having a project to work on while there. I was thinking of ordering a simple Arduino tonight to meet me at their place. I did a couple programming summer camps long ago, but I'd say that at this point this experience would probably be like new to me.

What exactly do I need so that I can futz around with about 10-30 lights, ideally that I can arrange on a board or because of a flexible string, and play with making them blink in fun sequences of my own design?

I'm trying to google up the info I want but I'm afraid of missing a cable or connector I need to enjoy myself.

I would get one of these and an arduino:

http://www.adafruit.com/products/1430

It's too bad it comes in a kit though :(

Hydrocodone
Sep 26, 2007

Delta-Wye posted:

I would get one of these and an arduino:

http://www.adafruit.com/products/1430

It's too bad it comes in a kit though :(

Thank you! I'll probably get that, an UNO, and a USB A to B just in case I can't find one in their jumble of cables.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Pick up a beefy 5V power supply too, since those NeoPixel lights take a lot of current. All 40 on at white/full brightness will pull about 2.4 amps (each one is 60mA). Grab a 4amp supply and a barrel jack to terminal adapter you can use to easily break out the positive and negative terminals. Also make sure you have a soldering iron because that shield needs a little soldering to work (have to solder the headers and power supply terminal on).

Hydrocodone
Sep 26, 2007

mod sassinator posted:

Pick up a beefy 5V power supply too, since those NeoPixel lights take a lot of current. All 40 on at white/full brightness will pull about 2.4 amps (each one is 60mA). Grab a 4amp supply and a barrel jack to terminal adapter you can use to easily break out the positive and negative terminals. Also make sure you have a soldering iron because that shield needs a little soldering to work (have to solder the headers and power supply terminal on).


Does this and these work?


VVVV Alright. I'll probably go with Adafruit, then. I have no idea what to look for in a psu. Thanks.

Hydrocodone fucked around with this message at 06:18 on Sep 25, 2014

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Yep those should work. If you can I would buy the power supply from a reputable vendor. Amazon affiliates can be anybody so it's kind of a crapshoot, especially with power supplies, if you'll get a good one or a piece of (potentially dangerous) junk.

Cool Matty
Jan 8, 2006
Usuyami no Sekai
So I'm currently working on a project that will involve two (or potentially more) Arduinos communicating over a distance of ~30 feet or less. I don't wish to use wireless, since the area will be heavily covered in existing wifi networks, and reliability is more important.

So my thought was to run some sort of cable from the main arduino (a Mega), to each separate arduino (a Trinket or similar). Ideally, I'd like the cable to provide data (2 pins) and power (2 pins). The question is then, what would the best connector/cable be for this sort of usage? The power draw would be minor, likely in the range of 100ma or less per arduino box.

I'm a bit wary of using something ubiquitous like USB since it wouldn't really be a USB port. I'm worried some idiot will walk up and plug in their phone, expecting it to charge.

Right now I'm thinking something like a MIDI connector?

Rexxed
May 1, 2010

Dis is amazing!
I gotta try dis!

Cool Matty posted:

So I'm currently working on a project that will involve two (or potentially more) Arduinos communicating over a distance of ~30 feet or less. I don't wish to use wireless, since the area will be heavily covered in existing wifi networks, and reliability is more important.

So my thought was to run some sort of cable from the main arduino (a Mega), to each separate arduino (a Trinket or similar). Ideally, I'd like the cable to provide data (2 pins) and power (2 pins). The question is then, what would the best connector/cable be for this sort of usage? The power draw would be minor, likely in the range of 100ma or less per arduino box.

I'm a bit wary of using something ubiquitous like USB since it wouldn't really be a USB port. I'm worried some idiot will walk up and plug in their phone, expecting it to charge.

Right now I'm thinking something like a MIDI connector?

I'd use cat5e and rj-45 connectors or only connect two pair and use rj-11. If someone might unplug it maybe put the breakout board or jack inside the case. A whole 15 pin connector is going to take up a lot more real estate than you need for 4 wires.

sbyers77
Jan 9, 2004

I know you said no wireless, but I have a couple of these I've played with and they seem to work well across the house/yard, so 30' would be a slam dunk.

http://lowpowerlab.com/moteino/

They do not run on wifi frequencies so you don't need to worry about crowded wifi bands. They work on free to use 433MHz or 915Mhz ISM band. And if equipped with onboard flash, you can wirelessly reprogram nodes (useful if they are placed in inconvenient places).

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Cool Matty posted:

So I'm currently working on a project that will involve two (or potentially more) Arduinos communicating over a distance of ~30 feet or less. I don't wish to use wireless, since the area will be heavily covered in existing wifi networks, and reliability is more important.

So my thought was to run some sort of cable from the main arduino (a Mega), to each separate arduino (a Trinket or similar). Ideally, I'd like the cable to provide data (2 pins) and power (2 pins). The question is then, what would the best connector/cable be for this sort of usage? The power draw would be minor, likely in the range of 100ma or less per arduino box.

I'm a bit wary of using something ubiquitous like USB since it wouldn't really be a USB port. I'm worried some idiot will walk up and plug in their phone, expecting it to charge.

Right now I'm thinking something like a MIDI connector?

5-pin XLR is probably the most robust solution. It's used for all kinds of digitally-addressed lighting and stuff, so the cable is nice and shieleded, and it's good for tons of power. Looks like about $50 for 100' of cable with ends and $8 each for connectors.

4-pin XLR is also available, but it's 4x the price because it's uncommon.

Cheapest is gonna be ethernet plugs.

Cool Matty
Jan 8, 2006
Usuyami no Sekai

Rexxed posted:

I'd use cat5e and rj-45 connectors or only connect two pair and use rj-11. If someone might unplug it maybe put the breakout board or jack inside the case. A whole 15 pin connector is going to take up a lot more real estate than you need for 4 wires.

Hah, I meant the 5-pin MIDI connectors, not the old 15-pin monstrosities.

That said, it never occurred to me to use a higher pin count XLR connection, so I might look into that. As long as the pricing isn't outrageous, I think it'll work great. It won't interface with anything else we have lying around and will be very reliable! Otherwise, cat5 might just be the best backup option. Thanks for the advice!

Hadlock
Nov 9, 2004

So I've become enamored with these $5 128x64 OLED displays, I have one locally and three on order, if I'm driving three of these I have to use the I2C bus, right? Any caveat emptors I should know about before I go down this rabbit hole?

TerminalSaint
Apr 21, 2007


Where must we go...

we who wander this Wasteland in search of our better selves?
Quick question for those more knowledgeable than myself. I'm just getting started with this stuff, and made a dedicated push to talk button with a Teensy 3.1 I'm fiddling with. It works as intended, but I figure everything could use more LEDs.

I want to set it up so the LED comes on when the button is active. I moved not too long ago, so I don't have any LEDs or resistors kicking around to test it. Here's what I came up with:

Should that work?

TheLastManStanding
Jan 14, 2008
Mash Buttons!
You don't need that diode (and it would actually prevent this from working unless there is an internal pull up). Just set the digital pin to an normal input (which it should be set to by default), the 3.3v pin will act as a pull up.

Adbot
ADBOT LOVES YOU

TerminalSaint
Apr 21, 2007


Where must we go...

we who wander this Wasteland in search of our better selves?
Ah, thanks. I'm completely new to ICs so I appreciate the help.

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