RC India
Welcome Guest, please login or register.
 
Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools Topic Tools 
Read
« on: July 01, 2018, 11:41:24 AM »
taksh
Plane Lover
Forum Hero
*****

Reputation Power: 10 
taksh has no influence.
Offline Offline

City: GHAZIABAD
State: Uttar Pradesh
RC Skills: Beginner
Posts: 661
Join Date: Nov, 2017




I am working on diy radio transmitter & receiver.
I found difference in pwm values. On Serial moniter, pwm values are constant.
I have made an another arduino system to check pwm values but pwm values are not constant.
Why pwm values are not constant?
I tried many times to get no difference but there is a difference of 4~11. (Usingg servo functions)
when I changed code and applied interrupts then difference is so large.
1472 1468 1468 1420 1416 1468 1472 1468 1468 1420 1420 1468 1468.
too much difference in values.
but using servo.h,
I am getting pwm values 1495 1489 1495 1496 1489 1496 1489 1496 1489 with difference of 4 ~ 11.
Receiver sending 1500 pwm value but pwm checker(arduino with pulseIn function) getting values with difference of 4 ~ 11.
Why i can't get exact 1500 value?
Problem with arduino pwm value system?
If problem is not with pwm value checker system then what is the problem?
How to fix this?
Any solution ?
Please tell me .....



« Last Edit: July 01, 2018, 07:35:17 PM by taksh » Logged
 

Read
« Reply #1 on: July 01, 2018, 09:53:19 PM »
KALYANPRODHAN
Global Moderator
Forum Hero

*****

Reputation Power: 17 
KALYANPRODHAN has no influence.
Offline Offline

City: Kolkata
State: West Bengal
RC Skills: Intermediate
Posts: 1584
Join Date: Jul, 2010

Information sharing improves knowledge of both.



Check LPF at output and/or filters in your power line.
The dropped ticks are on leading edge, not trailing edge of the square wave envelop.
Stray capacitance of the final stage buffer transistor (MOS) of your arduino chip may be the cause.
Also keep eye on error signal.. If your A/D resolution, not proper, hunting may occur.
Logged

We have to unite and to prove ourself to make indigenous products as well as marketing / Canvasing them. I'm sure we must achieve success if we try unitedly.
 

Read
« Reply #2 on: July 02, 2018, 05:28:26 AM »
ghoshatanu56
Plane Lover
Senior Member
***

Reputation Power: 3 
ghoshatanu56 has no influence.
Offline Offline

City: Kolkata
State: West Bengal
RC Skills: Beginner
Posts: 144
Join Date: Jul, 2011



Taksh I don't know if you have mapped the reading of adc from 0-1024 to 0-255 for transmission of one value  in one byte. If that's the case then it might be the culprit.
Logged
 

Read
« Reply #3 on: July 02, 2018, 08:37:36 AM »
taksh
Plane Lover
Forum Hero
*****

Reputation Power: 10 
taksh has no influence.
Offline Offline

City: GHAZIABAD
State: Uttar Pradesh
RC Skills: Beginner
Posts: 661
Join Date: Nov, 2017



i am using int to store 1000-2000. byte can't store more than 255. so i used int.
Transmitter system is off So receiver will know that signal is lost so default values will be  used & send via pwm
Throttle 1000 and other 1500
I used 1500 pwm output pin and pwm value checker system is getting values but with difference.
« Last Edit: July 02, 2018, 08:48:02 AM by taksh » Logged
 

Read
« Reply #4 on: July 02, 2018, 12:14:32 PM »
Balakrishna Reddy
Plane Lover
Forum Hero
*****

Reputation Power: 8 
Balakrishna Reddy has no influence.
Offline Offline

City: Hyderabad
State: Telangana
RC Skills: Intermediate
Posts: 698
Join Date: Feb, 2015



I tried to understand your problem by reading your post couple of times but unable to interpret your problem.
First tell me few things.
What serial monitor is giving you constant PWM values?
Indeed I am unable to understand what is your entire setup.
What all are you connecting to what?

I would not suggest you to build a transmitter of your own. Better would be to try for a mod for an existing tx. I don't say it is impossible indeed that is not much complicated at all. But building a good transmitter is difficult job which involves countless hours of investment.

Anyway you need to be clear on your problem statement and what all have you setup.
Logged
 

Read
« Reply #5 on: July 02, 2018, 03:48:21 PM »
taksh
Plane Lover
Forum Hero
*****

Reputation Power: 10 
taksh has no influence.
Offline Offline

City: GHAZIABAD
State: Uttar Pradesh
RC Skills: Beginner
Posts: 661
Join Date: Nov, 2017



@Balakrishna Reddy

Serial monitor with Recevier's  port showing constant  but Serial monitor with arduino pwm checker system showing pwm values different values.
Diy transmitter & receiver is my project.
I will not use diy radio for rc planes.
I will use diy radio for quadcopter.
I will make video and i will upload on youtube and i will share video with you.

Logged
 

Read
« Reply #6 on: July 02, 2018, 04:38:31 PM »
tictoc21
Heli Lover
Forum Veteran

****

Reputation Power: 6 
tictoc21 has no influence.
Offline Offline

City: mumbai
State: Maharashtra
RC Skills: Intermediate
Posts: 439
Join Date: Jun, 2015



What is purpose in building building own tx and rx
Logged
 

Read
« Reply #7 on: July 02, 2018, 04:54:50 PM »
ambattuhari
Plane Lover
Senior Member
***

Reputation Power: 2 
ambattuhari has no influence.
Offline Offline

City: Kottayam
State: Kerala
RC Skills: Intermediate
Posts: 175
Join Date: Oct, 2017



Reinvent the wheel  Roll Eyes
Logged
 

Read
« Reply #8 on: July 02, 2018, 04:56:11 PM »
tictoc21
Heli Lover
Forum Veteran

****

Reputation Power: 6 
tictoc21 has no influence.
Offline Offline

City: mumbai
State: Maharashtra
RC Skills: Intermediate
Posts: 439
Join Date: Jun, 2015



 Grin Giggle
Logged
 

Read
« Reply #9 on: July 02, 2018, 06:09:18 PM »
taksh
Plane Lover
Forum Hero
*****

Reputation Power: 10 
taksh has no influence.
Offline Offline

City: GHAZIABAD
State: Uttar Pradesh
RC Skills: Beginner
Posts: 661
Join Date: Nov, 2017



@tictoc21
Purpose is "knowledge" I am from electronics field and want to gain knowledge of making good tx & rx.
Logged
 

Read
« Reply #10 on: July 02, 2018, 06:14:53 PM »
taksh
Plane Lover
Forum Hero
*****

Reputation Power: 10 
taksh has no influence.
Offline Offline

City: GHAZIABAD
State: Uttar Pradesh
RC Skills: Beginner
Posts: 661
Join Date: Nov, 2017



@ambattuhari
This thread is not related for reinventing wheel.
You may try to reinvent wheel & make another thread for reinvention of wheel. Okay.  Giggle
All the best for your reinvention Thumbs Up
Logged
 

Read
« Reply #11 on: July 02, 2018, 06:50:27 PM »
girishsarwal
Plane Lover
Forum Hero

*****

Reputation Power: 17 
girishsarwal has no influence.
Offline Offline

City: Gurgaon
State: Haryana
RC Skills: Beginner
Posts: 1420
Join Date: May, 2012

DIYer



- Show us some hardware of how you've setup things
- How are you generating the signal? i am assuming a pot leading to the ADC pin. On the pot, have you connected VCC and GND to the end pins? Also cover with heat-shrink
- int on the arduino is a 16 bit so byte clamping or byte rollover is not a problem

Logged

gs
 

Read
« Reply #12 on: July 02, 2018, 08:22:14 PM »
taksh
Plane Lover
Forum Hero
*****

Reputation Power: 10 
taksh has no influence.
Offline Offline

City: GHAZIABAD
State: Uttar Pradesh
RC Skills: Beginner
Posts: 661
Join Date: Nov, 2017



@girishsarwal
A transmitter & receiver & pwm value checker system(PVCS) made with arduino.
Transmitter is not in use. Receiver & PVCS are in use.
Receiver is generating pwm signal and i have used electronoobs codes.
Servo.h is used for generating pwm signal. PWM PINS - D2(throttle),D3(yaw),D4(pitch),D5(roll)
When transmitter is not working & signal is lost then receiver have default system to send 1000 as throttle 1500 as other values(roll,pitch,yaw). So there is no role of transmitter & receiver is sending default values.
So, receiver is sending 1500 & 1000 by default.
I connected D3 pin of Receiver to D3 of pwm value checker system(PVCS) via jumper wire.
but i am getting a constant value(1500).
I am getting value with difference.
1489 1495 1502
not exact 1500

Sir please see video

(sorry for tv serial sound)

Logged
 

Read
« Reply #13 on: July 03, 2018, 05:26:27 PM »
girishsarwal
Plane Lover
Forum Hero

*****

Reputation Power: 17 
girishsarwal has no influence.
Offline Offline

City: Gurgaon
State: Haryana
RC Skills: Beginner
Posts: 1420
Join Date: May, 2012

DIYer



This is most likely due to stray noise on your PVCS made using arduino. you might want to insulate it properly and ensure that all ADC pins besides D3 are not floating. ground them if necessary for testing.

You are using a 0-5v range with a 10 bit ADC resolution which means each value represents (5-0)/1024 = 0.00488v/notch
Your worst value is 1489 which is 11 notches below 1500 means 11 * 0.00488 = 0.0537v,  noise is a possibility

Arduino ADC's are pretty basic and do get thrown off at times. Also, it'd be useful to know what are you using as Vref on the ADC? see https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/

As a general rule of thumb, when one is dealing with analog circuits, one must step up to deal with "windows" of signals rather than discrete values in digital.
Logged

gs
 

Read
« Reply #14 on: July 03, 2018, 05:31:05 PM »
girishsarwal
Plane Lover
Forum Hero

*****

Reputation Power: 17 
girishsarwal has no influence.
Offline Offline

City: Gurgaon
State: Haryana
RC Skills: Beginner
Posts: 1420
Join Date: May, 2012

DIYer



And this as well:

https://www.arduino.cc/en/Tutorial/AnalogInputPins
Logged

gs
 

Pages: [1]   Go Up
Jump to:  

Related Topics
Subject Started by Replies Views Last post
UAVs to keep Kolkata city under constant surveillance during Durga Puja.
Chatter Zone
meet2ami 11 4443 Last post October 09, 2013, 10:47:44 PM
by meet2ami
60 in KFm 2 Constant Chord Flying Wing Glider
Electric Planes
bmblb 6 9135 Last post January 01, 2016, 09:41:37 PM
by bmblb