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
Pollyanna
Mar 5, 2005

Milk's on them.


I bought a Raspberry Pi B+ starter pack from Adafruit, and I'm confused on connecting the ribbon cable to the cobbler. I know that it has notches to make sure you aren't putting it on backwards, but it feels like it's not on all the way, yet I'm meeting resistance. There's a point where it seems like it's supposed to snap in somehow, and it falls off very very easily, but I get some resistance pushing it in any further and that's a pretty clear sign to stop. Is it supposed to snap in, or is the loose connection normal?

This is the cobbler and cable I'm talking about : https://www.adafruit.com/products/2029

edit: Never mind, I got it to connect. I'm really really afraid of somehow breaking something after I learned that my breadboard's backing isn't supposed to be removed :saddowns:

Pollyanna fucked around with this message at 00:52 on Nov 22, 2014

Adbot
ADBOT LOVES YOU

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Yeah it will firmly slide into place. As long as all the holes are lined up with the pins you should be able to push it with some force and not worry about damaging anything.

Be careful removing it though, it's best to gently pry each end up a little bit at a time. If you just try to pull it straight up from one side it will usually come out way too quickly and can bend the pins.

Captain Cool
Oct 23, 2004

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

Parts Kit posted:

Should be a SSD1306. So what I should do is put a resistor between +5v and reset for one end of a tactile switch and then on the other put it to ground?
The switch is optional. You might not ever have a need to reset the panel.

RST --- resistor --- 5V
RST --- switch --- gnd

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Thanks. I think I'm going to put a switch on just because it has given me some random weird results in the past.

So to make sure I'm understanding this right:

Side one of switch:
5v - > switch leg -> resistor - > RST

And on the other:
Gnd

So when the switch is hit the current from 5v will want to travel down the closed switch instead of through the resistor right?

JawnV6
Jul 4, 2004

So hot ...
No. You do not want the switch to provide a 0-resistance path to ground when closed. You want it on the other side of the resistor with the RST pin.

Open switch means pin sees 5v, closed switch makes pin see 0v.

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Okay, so

Side one of switch:
5v - > resistor -> switch leg - > RST

And on the other:
Gnd

ed: actually since someone pointed out in the electronics thread that this chip is supposed to have RST connected to an I/O pin tracked down which in the .h file, hooked it up, and now everything is behaving as expected. Why it worked before this point but stopped when I removed the header is beyond me but what the gently caress ever.

Parts Kit fucked around with this message at 04:27 on Nov 22, 2014

Hadlock
Nov 9, 2004

I have 8 Tower Pro MG996R servos (medium torque, something like 100-130oz-inches) for a walker project. Supposedly these can pull over an amp each. My "chassis" weighs around 500g (plus electronics, battery, etc) and the legs will be around 160g each (plus knee servo, etc)

Adafruit suggests a capacitor in the 450uF range for 5 servos to smooth out flucutations on the power supply, should I be looking at just getting a 1F super capacitor? There's no downside to going big, right? Besides sucking a fresh set of batteries dry if it's fully discharged? And requiring a warning to people with pacemakers?

Would this 5.5v 1F work @ $6.50?
http://www.ebay.com/itm/5pcs-farad-capacitor-supercapacitor-NEC-TOKIN-5-5V1F-/271651653209?pt=LH_DefaultDomain_0&hash=item3f3fb34659

Alternately 2x2.7v 10F @ $8.50
http://www.ebay.com/itm/2PCS-10F-2-...%3D271651653209

Methylethylaldehyde
Oct 23, 2004

BAKA BAKA

Hadlock posted:

I have 8 Tower Pro MG996R servos (medium torque, something like 100-130oz-inches) for a walker project. Supposedly these can pull over an amp each. My "chassis" weighs around 500g (plus electronics, battery, etc) and the legs will be around 160g each (plus knee servo, etc)

Adafruit suggests a capacitor in the 450uF range for 5 servos to smooth out flucutations on the power supply, should I be looking at just getting a 1F super capacitor? There's no downside to going big, right? Besides sucking a fresh set of batteries dry if it's fully discharged? And requiring a warning to people with pacemakers?

In theory, no, not at all. The downside is the fact that the caps are pretty big. For short circuit, or hilarious overload conditions on servos, they work really well, since you can size a battery for the steady state loading, but have a supercap in parallel with the supply to deliver high loads for brief periods. The other downside is that by it's very nature, it takes god damned forever to charge, and can brownout everything else until it's up and ready.

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr
Since the bugs seem to be worked out with the current project I'm moving to a Adafruit Pro Trinket for the final (so it'll fit in an altoids tin sized enclosure). There is one common 'ground' pin, ignoring the ftdi header, which I'm assuming means I need to set up a common ground for all of the components, the Pro Trinket, and the battery. Is that right?

evilweasel
Aug 24, 2002

Are there any semi-long range (thinking 2-3 feet so well above contact rfid but well below like "picking up a car on a highway for a toll" range) passive RFID setups to tinker with that anyone knows about?

Rozzbot
Nov 4, 2009

Pork, lamb, chicken and ham
I was given a bunch of weather station sensors (rain collector, solar radiation, wind speed/direction) so I decided to build a small Arduino powered weather station.

I'm at the stage where I've got the sensors working correctly and now I want to move the station outside. Ideally I'm looking to connect the station to my wifi network and run it off solar power. I have a 12v battery, solar panel and charge controller with a 5v output that I was using for another project so power supply is already sorted.

I have no experience with wifi shields and was hoping someone would be able to recommend me one.
So far I'm looking at getting either a Yun Shield for my current board (a Freetronics "Eleven") or a WiDo board as the options within my budget.

If I go with the Yun I'll have to run the arduino on the 12v output of my charge controller while the WiDo seems okay with running at 5v.
I'm also curious as to why the WiDo is so cheap compared to other wifi capable arduinos?

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!

Parts Kit posted:

Since the bugs seem to be worked out with the current project I'm moving to a Adafruit Pro Trinket for the final (so it'll fit in an altoids tin sized enclosure). There is one common 'ground' pin, ignoring the ftdi header, which I'm assuming means I need to set up a common ground for all of the components, the Pro Trinket, and the battery. Is that right?

yeah that should do it for you. how do you like the pro trinket? I just found out about it recently.

Coldstone Cream-my-pants
Jun 21, 2007
I'm trying to make a servo sit at 90 degrees, and when I press a button have it go to 180, then to zero, then back to sit at 90 until another button press.

Following guides, I have a working button press -> LED blink setup. I can also plug my servo in and control it. The weird thing is that when I try to combine the two, it breaks my LED setup and I have no idea why.

As in I hit the button and my LED flashes on and off. I plug my servo cables into the PWM slot, ground on the power side, then to the 5V line on my breadboard, and it doesn't work and my LED setup stops working too. I just rebuilt it and the LED setup worked again (same slots), then when I tried to re-add the servo, it broke the LED setup again. Any ideas what I could be going wrong? Am I going to break anything mashing things together?

Edit- Here's my code. http://pastebin.com/swprNwRf

Coldstone Cream-my-pants fucked around with this message at 21:53 on Dec 5, 2014

TheLastManStanding
Jan 14, 2008
Mash Buttons!
I'd be more concerned about your set-up. I'm guessing your wiring something wrong and it's causing a short. It's also possible your power supply isn't strong enough.

Coldstone Cream-my-pants
Jun 21, 2007

TheLastManStanding posted:

I'd be more concerned about your set-up. I'm guessing your wiring something wrong and it's causing a short. It's also possible your power supply isn't strong enough.

That's what I'm leaning towards as well. I was plugged into the wall the first time, so it's not like I'm running off low-current USB.

Here's my wiring. Any tips on how I can hook a servo up to this as well would be much appreciated.



Should have lead with that :/

TheLastManStanding
Jan 14, 2008
Mash Buttons!
That part seems fine.

Coldstone Cream-my-pants
Jun 21, 2007
Yeah but that's without the servo. Adding that is what broke it the first 2 times by doing this:

Captain Cool
Oct 23, 2004

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

The Royal Scrub posted:

Yeah but that's without the servo. Adding that is what broke it the first 2 times by doing this:

What's your wall power supply, and what kind of current does the servo draw? The servo could be exceeding the current rating of the wall power supply or board power supply (if it has to reduce the wall supply to 5v). That pulls the voltage down which could reset the arduino.

Coldstone Cream-my-pants
Jun 21, 2007
Wall adapter was 9V 1000mA into the Arduino board. Not sure on the servo or how to check really- it's this one though https://www.sparkfun.com/products/11881 No current draw listed there but it's pretty hefty for sure.

Think I just shorted it out again somehow. No idea what's happening...going to see if I can get it working again without rebuilding it. I must be burning out the LED or something, I duno.

Thanks for all the help guys.

Coldstone Cream-my-pants fucked around with this message at 01:27 on Dec 6, 2014

TheLastManStanding
Jan 14, 2008
Mash Buttons!
Datasheet says 700mA at no load running, so you don't have anywhere near enough power. You're going to need a beefier power supply and you won't be able to power it off the arduino.

Coldstone Cream-my-pants
Jun 21, 2007
Oh, wow. I assumed the datasheet was the same thing that came in the box which didn't have it.

So, I need a different power source for the servo. I guess that's an easy solution. Does the Arduino board have a hard reset or something? I'm not sure what it is that's happening, but all my parts work. Whatever I'm doing makes it not work until I close/unplug everything and start from scratch.

Edit- Think I'm gona hook up 4 D batteries in series. 6V and like 10-12 hours of juice depending on current under load. I'll post some pics up if I ever get this project working!

Coldstone Cream-my-pants fucked around with this message at 04:16 on Dec 6, 2014

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

The Royal Scrub posted:

Oh, wow. I assumed the datasheet was the same thing that came in the box which didn't have it.

So, I need a different power source for the servo. I guess that's an easy solution. Does the Arduino board have a hard reset or something? I'm not sure what it is that's happening, but all my parts work. Whatever I'm doing makes it not work until I close/unplug everything and start from scratch.

Edit- Think I'm gona hook up 4 D batteries in series. 6V and like 10-12 hours of juice depending on current under load. I'll post some pics up if I ever get this project working!

There is a reset button on the board as well as a reset pin that you can toggle with a push button or something similar.
Normally the board is reset every time you establish a serial connection or upload firmware, but if you've got an external power supply attached, that may be throwing something off.

Coldstone Cream-my-pants
Jun 21, 2007
Welp now I did it. Servo started smoking immediately when I plugged it into a new configuration and now it won't work. It was only 6V so it must have been a short? Agh gently caress it was a $40 servo. Any chance it's not hosed? I was so close to getting this poo poo working :(

Ah whatever, I know you guys don't magically know the answer to my fuckups. Thanks for all the help today. I was figuring poo poo out until I started going crazy past my bedtime.

Coldstone Cream-my-pants fucked around with this message at 05:12 on Dec 6, 2014

Hadlock
Nov 9, 2004

Electronics have magic in them, once you let the magic smoke out it's all over.

I have a bag of high torque $15 metal gear servos sitting on the shelf, for a walker robot project; right now I'm experimenting with about 10 Tower Pro SG90's and four MG90S because they're only about $3 a piece. I just ordered 5 more SG90's for $12 shipped off of ebay (US seller, even!).

I think everyone learns the hard way that servos will gladly rip themselves apart if you aren't careful. It's kind of a right of passage. RIP your :20bux::20bux:

Here's my servo project I'm working on. Looking forward to finding out my chassis/legs weigh more than these servos have torque. That's ok, I've come up with a universal servo mount design to upgrade as neccessary :)

https://www.youtube.com/watch?v=LUtLss8zGU8

Aurium
Oct 10, 2010

The Royal Scrub posted:

Welp now I did it. Servo started smoking immediately when I plugged it into a new configuration and now it won't work. It was only 6V so it must have been a short? Agh gently caress it was a $40 servo. Any chance it's not hosed? I was so close to getting this poo poo working :(

Ah whatever, I know you guys don't magically know the answer to my fuckups. Thanks for all the help today. I was figuring poo poo out until I started going crazy past my bedtime.

Make a diagram of how you wired it up. We might be able to help prevent you from doing it again.

Even if it's broken, it still isn't trash. If you did nothing wrong, it might have been defective, so you might be okay with warranty.

Or, you can keep it around, even without the electronics, the motor is still probably fine, so then when you learn how to use an h bridge later you'll already have a nice motor, and a good gear train in a convenient box just waiting for you. Or you can build your own servo electronics, or even make some servo variants off them. This video does a good job going over the basics of how they work, and further possibilities.

Coldstone Cream-my-pants
Jun 21, 2007
That's a cool looking project Hadlock. Kudos to you if you get that thing walking because that's a tough nut to crack right there.

As for me breaking the servo, I'll post up a diagram when I get a chance. I'm trying to even remember how I had it wired up, but I'm 99% sure it was me. It started smoking as soon as I attached it to a new wiring setup. Now when I plug it in my computer acts like I unplugged my Arduino from USB lol, like as soon as I complete/disconnect the circuit my computer makes the "duh-Duh" noise.

But yeah, I got a $40 lesson on how not to do electronics. I went and found something to follow online so I got it working today. My code is actually kind of impressive now too if I do say so myself!

bolind
Jun 19, 2005



Pillbug
Just wanted to point out the Mono on Kickstarter. It's basically a touch screen + CPU + WiFi + Bluetooth Low Energy + sensors + buzzer thingie that's programmable, and, if I read it correctly, supports Arduino shields plus some of the Arduino programming is duplicated as well.

Full disclaimer: I'm backing this project and would like to see it reach funding, and I'm from the same city as the creators, but apart from that I have no affiliation with or economic interest in the project.

Hadlock
Nov 9, 2004

The Royal Scrub posted:

But yeah, I got a $40 lesson on how not to do electronics. I went and found something to follow online so I got it working today. My code is actually kind of impressive now too if I do say so myself!

If it makes you feel any better, I was trying to get the signal level of an IR sensor down to 1.8v for my BeagleBone Black late one night* and a stray positive lead scratched across the top of my BBB, shorting it out. This was after spending a week getting Debian on there and running and all the pins mapped out (previously they were running Angstrom which is terrible). $45 down the drain and had to wait 2 months for one to come back in stock anywhere, ended up paying $20 over MSRP for it + shipping.

* a common thread in all "I let the magic smoke out" stories is that they all happen after 1:30am, which is my new self-imposed bedtime when doing rewiring or testing servo code for the first time.

Delta-Wye
Sep 29, 2005
My favorite thing is the late night bumping of a resistor divider used to bring an input voltage into a safe range. If the ground pin of the resistor divider stops making contact, all the smoke escapes :ohdear:

Parts Kit
Jun 9, 2006

durr
i have a hole in my head
durr

Fanged Lawn Wormy posted:

yeah that should do it for you. how do you like the pro trinket? I just found out about it recently.
I haven't had a chance to do anything with it yet outside of load the code. There was going to be an opportunity for me to 3d print an enclosure .stl I whipped up, but that got canceled so the project is on the backburner until I can get my Shapeoko 2 up and running so I can finally make the loving enclosure and start finalizing everything.

Hadlock
Nov 9, 2004

Hadlock posted:

* a common thread in all "I let the magic smoke out" stories is that they all happen after 1:30am, which is my new self-imposed bedtime when doing rewiring or testing servo code for the first time.

Update: I burnt up another $3.50 servo last night, less than an hour after typing up that speech the other night. I think this one was already hosed up from a previous experiment and pulled it out of the wrong pile, but by the time I smelled the burning lithium grease it was all over for that broken soldier :patriot:

Coldstone Cream-my-pants
Jun 21, 2007

Hadlock posted:

Update: I burnt up another $3.50 servo last night, less than an hour after typing up that speech the other night. I think this one was already hosed up from a previous experiment and pulled it out of the wrong pile, but by the time I smelled the burning lithium grease it was all over for that broken soldier :patriot:

I had a $3.50 servo I could have burned up instead, but no, I needed to experiment with the badass one I just bought, obviously.

Here's the bad thing I did. My servo needed an external power supply, and I thought it only needed a PWM signal from the Arduino. Then I read some half sentence saying it needs to be connected to ground on both the battery and the board, so I threw in that final ground wire from the back of the breadboard to the Arduino. Pretty sure that's when the smoke escaped.

Aurium
Oct 10, 2010

The Royal Scrub posted:

I had a $3.50 servo I could have burned up instead, but no, I needed to experiment with the badass one I just bought, obviously.

Here's the bad thing I did. My servo needed an external power supply, and I thought it only needed a PWM signal from the Arduino. Then I read some half sentence saying it needs to be connected to ground on both the battery and the board, so I threw in that final ground wire from the back of the breadboard to the Arduino. Pretty sure that's when the smoke escaped.



Looks correct. The only thing I see is that you reversed convention (you have positive to blue, ground to red) on the lower rail, but the circuit itself is fine. That wouldn't have affected the servo anyway.

Rozzbot
Nov 4, 2009

Pork, lamb, chicken and ham
If you search "city sunrise time" on Google it'll tell you the time the sun will be rising that time in that city.
I've got an RTC module and an internet connected Arduino, is there a way for the board to grab the sunrise time off google each day and trigger some outputs at that time?

Delta-Wye
Sep 29, 2005

Rozzbot posted:

If you search "city sunrise time" on Google it'll tell you the time the sun will be rising that time in that city.
I've got an RTC module and an internet connected Arduino, is there a way for the board to grab the sunrise time off google each day and trigger some outputs at that time?

If you're on the internet already, it should be straight forward to download a page with that information (say a google search for "sunrise <location>") and just parse the resulting html for the time. In this case, it's tucked into a div container that should be pretty easy to find. Once you've parsed it, you can just compare that time to the current time according to the RTC and act accordingly.

JawnV6
Jul 4, 2004

So hot ...
Or something more reasonable like http://www.earthtools.org/webservices.htm#sun

sbyers77
Jan 9, 2004

Sunrise/Sunset data is fairly consistent year-to-year. This is how I solved that problem:

https://github.com/byerss/SUNDATA-RTC/blob/master/RTCSun.ino

Stores the sun data in flash tables and just looks up when they are for any given day. This is the flash library I am using http://arduiniana.org/libraries/flash/. They need to be stored in flash otherwise the arudino will run our of RAM.

Coldstone Cream-my-pants
Jun 21, 2007
Is it possible to organize serial outputs? It's good for practice/organization to send everything I can to the serial monitor, but it'd be a lot nicer with a table and some labels or something instead of an endless stream of a bunch of numbers in a row.

TheLastManStanding
Jan 14, 2008
Mash Buttons!
Serial.print(x)
Serial.print(" ")
Serial.println(y)

Gives you two values in two columns which you can then import into excel as a table.

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


Christmas is coming up, and I wanted to get myself some Arduino swag so I can really dive into it. I like flashy stuff like LEDs and LCD screens and music makers, but I also want to branch out to more advanced stuff. What are some good books/learning resources I can buy? Are there any particularly cool components people here would recommend?

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