Pages: 1 [2]   Go Down
Author Topic: Using pulseIn() to read PWM stream for radio control  (Read 3193 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So far this project has gone well, but so far i have only tested it with a standalone receiver and all works as it should.
I've now come to connect it all together for final testing and discovered a problem,

My 328 chip works the winch when it's connected to a standalone receiver and the controller board in the boat works when connected to the same receiver but then i connect them together the 328 stops responding, i should explain that both the boat control board and 328 are running of the same power (5v) and i have spliced into the ppm signal lead from the receiver so it goes to both the boat control board and 328.

Im wondering if the boat control board is holding the ppm input high and is affecting the operation of pulseIn() on the 328, but now i've just tested it and the signal pin is floating around 0.5v so now i really dont know
Logged

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

I don't understand exactly what you're trying to do there, but if you have two devices trying to drive the same output then you can expect trouble.
Logged

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

0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Start at 1st post, but in brief I have 2 uC's sharing & reading from 1 ppm signal
Logged

0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One final update, Ready to rock, Boat is finished, wireless night camera on the front 800m range, the other two antenna's are for fish finder sonar and wireless camera on the back, the headlights are 10mm IR emiters


The winch attached to the back with ball joints for ease of removal, 2x 3.5mm stereo plugs, one for power and ppm signal to arduino nano, the other for video


another picture of the winch showing the ball joints and servo modded for continuous rotation which drives the cable drum


The control box, this contains the nano and is sealed with silicone, one extra thing i haven't done yet but intend to is add a micro switch and paddle to sense when the camera is fully retracted


This is probably the only project i have seen through to completion and has been an interesting learning curve, so thanks to everybody who contributed to this post
« Last Edit: October 01, 2012, 05:37:49 pm by P18F4550 » Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 252
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am amazed with how this was worked out,
I , by coincidence am now returning to the thread to get the link for the RC code again because im making an rc controlled winch for a boat, hahaha what a coincidence,

Im currently working on adding two switches with paddles to sense when fully up and fully down because my winch payload has to reach the sea floor.

it weighs more than yours , so I have to use a large winch operated with a RC esc.

how did everything work out in the end?
Logged

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

Try this -

http://rcarduino.blogspot.com/2012/11/how-to-read-rc-receiver-ppm-stream.html

Duane B

rcarduino.blogspot.com
Logged


Offline Offline
Sr. Member
****
Karma: 0
Posts: 252
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

duane,
in my case i only need to read one channel , is there any reason to change the code from the simple one channel code that I had working before?
Logged

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

No, no reason at all, I read the topic as PPM, not PWM, sorry.

Duane B
Logged


Offline Offline
Sr. Member
****
Karma: 0
Posts: 252
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wait,
i did too,

Logged

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

Its the word stream that does it, we tend to talk about PPM Streams, and PWM as inputs or signals.

Duane B

rcarduino.blogspot.com
Logged


0
Offline Offline
Sr. Member
****
Karma: 5
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@spruce_m00se
so how did it work out?
well the cheap camera was rubbish, the glass broke after a few meters, so another camera with heavier glass in front of the lens did the job, only tested to 15 meters but i know it will go deeper, the camera housing was heavier too so i swapped the standard servo to a HS645mg which has plenty of torque.
Logged

Pages: 1 [2]   Go Up
Jump to: