Pages: [1]   Go Down
Author Topic: PWM in  (Read 406 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, guys. Sorry for my english, i learn it not very well at this moment. Also, sorry, if i posted this topic in a wrong section. So, i have kind'a dumb question, maybe. I need to read an incoming PWM signal. This signal come from quadcopter controller. I have tryed to find an information about this question, but found info only about output PWM from arduino. So, guys, please, can you tell smth about arduino incoming PWM. Or can you give a link to related article. I'm a little confused, because arduino have a digital inputs and analog inputs, but PWM is not a digital signal, there is no TRUE or FALSE, and it's not an analog input, because we have only 5 volts and 0 volts. Or i'm just stupid, and don't understand something?
« Last Edit: June 07, 2013, 08:03:20 am by Ivanum » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24321
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have a look at some of DuaneB's solutions.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, DuaneB has a lot of stuff. Could you point to something more specific, if to you not difficultly. it's hard for me to understand all this articles.
At my Spektrum i have a button. I want to control a camera with this button, but a receiver operate with PWM, not with a logic "YES" or "NOT". I found a IR-control library for my camera, but i have no information about PWM control from reciever to arduino. This is my situation, i hope, that somebody already solved similar problem. But i cant find info about it on russian community smiley-sad
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think i found smth, that i needed. http://www.arduino.cc/en/Reference/PulseIn, thanks you AWOL, that oyu said about duaneB - one hour of searching, a i found it
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have managed to use Duane's code, together with GPS to make an autonomous vehicle navigate to a waypoint. 
It was very smooth and easy to understand his code before I got to it...
I can take over control at any time by turning on the transmitter.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

   Start here -

http://rcarduino.blogspot.ae/2012/01/how-to-read-rc-receiver-with.html

   Once you can read the incoming pulse width using the code above, you can add an if statement to turn your camera on and off, but the starting point is the code in the post above - or you could use the dreaded pulseIn function

Duane B

rcarduino.blogspot.com
Logged


Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have managed to use Duane's code, together with GPS to make an autonomous vehicle navigate to a waypoint.
It was very smooth and easy to understand his code before I got to it...
I can take over control at any time by turning on the transmitter.

Got a video ? I will put a link to your project on the blog if thats ok ?

Duane B
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 508
Posts: 31359
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but PWM is not a digital signal
Yes it is.
Quote
there is no TRUE or FALSE
Yes it changes rapidly but the logic levels are still true and false.

Quote
don't understand something?
See this:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html
Logged

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The video would be boring, it was a boat navigating a mile out into the lake. 
I posted my code in a different thread when they asked for it.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Pages: [1]   Go Up
Jump to: