Pages: [1] 2   Go Down
Author Topic: Rotating an iPad long-distance  (Read 911 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My husband and I are adapting this project to work with an iPad running FaceTime:  http://blog.vmfarms.com/2011/10/how-we-solved-remote-employee-problem.html

We've got a socket open between the Arduino and a web server via a background app on the iPad, using the Redpark TTL cable (woo!), so we can send it the angle commands without needing a network connection on the Arduino.  

The last problem I need to figure out is how to elegantly provide power to both the iPad for charging, and to the Arduino/servo for rotating.  I'm already using the DockStubz pass-through between the Redpark and the iPad, but that leaves me with two separate cords coming out of the base of this thing.  I'd like it to be a single cord to plug in, that can deliver around 6v to the Arduino (with servo), and simultaneously 5v to the iPad.  iPad doesn't need to fast charge, trickle is fine.  

I have kind of a fuzzy idea of taking a 12v wall wart and using voltage regulators to simultaneously split it up into the two desired outputs, but this is all new territory for me.  I was also toying with the idea of opening up the actual iPad charger, and trying to somehow bring an additional 6v line out of that.

Suggestions much appreciated!  I'll post pics of this thing as soon as it's assembled; just needs one more coat of polyurethane (and some crossed fingers).  smiley

Thanks all,

Aja

« Last Edit: November 08, 2012, 01:43:22 am by Aja B. » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's what it looks like:





* IMG_4475.jpg (68.96 KB, 480x640 - viewed 12 times.)

* IMG_4474.jpg (73.18 KB, 640x480 - viewed 10 times.)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ended up figuring out the power supply question (I think)...  I'm using a stripped-down USB cable carrying a 10W current from an Apple iPad charger, and connecting it to both the Arduino and the mini-USB to charge the iPad.  Seems to be working fine...  only problem now is that the Arudino Pro Micro from SparkFun isn't reading the serial data from the Redpark cable.  The Redpark still communicates fine with my other boards (Uno and an old Duecimilasomethingsomething), but the Pro Micro just doesn't seem to recognize it.  

I had a little trouble with one of the TX/RX pins when I was soldering, and burned part of the trace that runs next to the pins on the Pro Micro.  Could that be causing the problem?  Photo attached.  [edit:  Uh, actually, is that just paint?]

Or is is that the Pro Micro handles serial connections differently, and won't work with the Redpark cable?  Do I need to modify the serial library or something?  



* IMG_4473.jpg (71.3 KB, 640x433 - viewed 14 times.)
« Last Edit: November 18, 2012, 12:18:42 am by Aja B. » Logged

Queens, New York
Online Online
Faraday Member
**
Karma: 65
Posts: 2929
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thats just paint.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-kiss

I did kind of wonder why on earth they'd draw a trace like that...  smiley  

So maybe it's not because of the bad solder job?  I noticed that TX and RX are reversed on pins 0 and 1 from what they are on the bigger Arduino boards.

Is there code in a library somewhere that assigns RX to pin 0 and TX to pin 1? 
« Last Edit: November 18, 2012, 12:36:26 am by Aja B. » Logged

Queens, New York
Online Online
Faraday Member
**
Karma: 65
Posts: 2929
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, Serial.begin() automatically sets pins 0 and 1 to RX and TX, they cannot be changed. HOWEVER, an ARD mega has 4 TX and RX pins, TX and RX (0 - 3)
by all means research it if your interested, but you dont need to worry about an ARD Mega for your project.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks! 

Thinking out loud... if the problem was the TX/RX pins being reversed, wouldn't reversing the connections fix it?  I've swapped the wires, and the serial connection still isn't recognized.

The Pro Micro uses a different processor than most of the other Arduino boards, one that handles the USB directly instead of through something else.  I wonder if that's getting in the way of my Redpark serial somehow. 
Logged

Queens, New York
Online Online
Faraday Member
**
Karma: 65
Posts: 2929
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What are you using, Bluetooth, RF or straight jumpers?
Because the Bluetooth has pins that say RX and TX, those get crossed wired to the RX and TX on the arduino. BT: RX  ==> ARD:TX  and same with the BT: TX  ==> ARD: RX.

RF is usually one direction. Transmitter only send and receiver only receives. Bluetooth can go both ways.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's all physically wired, no BT or RF.  The Arduino gets the servo angle from an app running on the iPad, which sends it through the Redpark serial cable to RX/TX. 

I'm ordering a Pro Mini, instead of a Pro Micro, to see if it's just the way the Micro handles the serial connection.  If that's not it, I'm stumped.  It's still possible I burned out the pins on the Pro Micro with my lousy soldering. 
Logged

Queens, New York
Online Online
Faraday Member
**
Karma: 65
Posts: 2929
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Redpark serial connection, that may be your problem. The arduino does not know what to do with the data it is getting from the iPad, it might not be seeing the correct data to begin with, therefore you are not able to do anything. It could be your baud rate, it could be how the data is being presented, I don't know exactly. Try sending data from your computer to the arduino via USB with the arduino serial monitor. If you can get the motor to rotate the way you want it to, then it is the redpark that is the problem.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, I thought so, too, but my other Arduino boards (Uno and Duemilanove) are able to read the data from the Redpark serial cable just fine, with the same sketch and same iOS app.  When I move the same exact setup to the Pro Micro, the serial connection breaks. 
Logged

Queens, New York
Online Online
Faraday Member
**
Karma: 65
Posts: 2929
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Those pins are small and very close on the micro, maybe you made a short somewhere.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11173
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know anything about the Pro Micro - is it possible it has a different clock and this is affecting the serial baud rate settings?

If you're concerned about the quality of your solder joints, have you done a continuity check between the components on either side of the joint?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know anything about the Pro Micro - is it possible it has a different clock and this is affecting the serial baud rate settings?

If you're concerned about the quality of your solder joints, have you done a continuity check between the components on either side of the joint?

No, I know I need to, but I don't have the tool that lets you do this.  This is a very amateur operation I'm running, here.  smiley
Logged

Queens, New York
Online Online
Faraday Member
**
Karma: 65
Posts: 2929
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try unsoldering the Tx an Rx pins, clean them , make sure they are not soldered together. Test with voltmeter, set to the buzzer if your voltmeter has that option.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Pages: [1] 2   Go Up
Jump to: