Go Down

Topic: Using pulseIn() to read PWM stream for radio control (Read 4286 times) previous topic - next topic

P18F4550

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

PeterH

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.
I only provide help via the forum - please do not contact me for private consultancy.

P18F4550

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

P18F4550

#18
Oct 02, 2012, 12:35 am Last Edit: Oct 02, 2012, 12:37 am by P18F4550 Reason: 1
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

spruce_m00se

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?

DuaneB

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

spruce_m00se

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?

DuaneB

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

Duane B
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com


DuaneB

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
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

P18F4550

@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.

Go Up