Самодельный передатчик (часть 2)

minhthien1988

hello Denn

you can post video your Project nrf24l01 , control servo or esc brushless ?

it can work 1km? atmega8 use crytal 8mhz ?

it is suitable for all TX have output PPM ?

Denn

I not have video.
Hobby King fine work more 800 m. I hope also 800 - 1000 m.
Crystal is 8 MHz.
Yes, only PPM.

minhthien1988

hi Denn

i hope you can post video here. i want to see it work . I think that project great .

thank you

Cheers

alexeykozin

радиомодули заказаны, как приедут обязательно поэксперементирую с вашей прошивкой

minhthien1988

hello Denn

i did circuit same you, but it do not work, have not signal from Pin atmega8 of RX.(

minhthien1988

Led off, i use ppm from TX flysky 9ch .
if you can post a video , or some picture i think i will see it work how

thanks

gorbln

Я правильно понял - в приёмнике простая дешёвенькая NRF-ка за 2 бакса, а в передатчике что-то серьёзное?

alexeykozin
gorbln:

Я правильно понял - в приёмнике простая дешёвенькая NRF-ка за 2 бакса, а в передатчике что-то серьёзное?

похоже на обычный nrf24l01+pa+lna 3.1
ru.aliexpress.com/item/…/731945644.html (вродебы от18 баксов на ебее)

belyay

Всем доброго дня.
Начал писать ПО кодера для автомобильной аппы (3 канала), камень ATMega32, LCD 5110, модули TX RX от хоббикинга 6-ти канального. приёмник 3 канала.
В чем собственно просьба помощи, расскажите пожалуйста как программно сформировать PPM сигнал и настроить таймеры, еще какими должны быть выходными данными с каждого канала для последующего формирования РРМ.
Спасибо.

alexeykozin

есть под ардуино

//this programm will put out a PPM signal

//////////////////////CONFIGURATION///////////////////////////////
#define chanel_number 8 //set the number of chanels
#define default_servo_value 1500 //set the default servo value
#define PPM_FrLen 22500 //set the PPM frame length in microseconds (1ms = 1000Вµs)
#define PPM_PulseLen 300 //set the pulse length
#define onState 1 //set polarity of the pulses: 1 is positive, 0 is negative
#define sigPin 10 //set PPM signal output pin on the arduino
//////////////////////////////////////////////////////////////////

/*this array holds the servo values for the ppm signal
change theese values in your code (usually servo values move between 1000 and 2000)*/
int ppm[chanel_number];

void setup(){
//initiallize default ppm values
for(int i=0; i<chanel_number; i++){
ppm[i]= default_servo_value;
}

pinMode(sigPin, OUTPUT);
digitalWrite(sigPin, !onState); //set the PPM signal pin to the default state (off)

cli();
TCCR1A = 0; // set entire TCCR1 register to 0
TCCR1B = 0;

OCR1A = 100; // compare match register, change this
TCCR1B |= (1 << WGM12); // turn on CTC mode
TCCR1B |= (1 << CS11); // 8 prescaler: 0,5 microseconds at 16mhz
TIMSK1 |= (1 << OCIE1A); // enable timer compare interrupt
sei();
}

void loop(){
//put main code here
static int val = 1;

ppm[0] = ppm[0] + val;
if(ppm[0] >= 2000){ val = -1; }
if(ppm[0] <= 1000){ val = 1; }
delay(10);
}

ISR(TIMER1_COMPA_vect){ //leave this alone
static boolean state = true;

TCNT1 = 0;

if(state) { //start pulse
digitalWrite(sigPin, onState);
OCR1A = PPM_PulseLen * 2;
state = false;
}
else{ //end pulse and calculate when to start the next pulse
static byte cur_chan_numb;
static unsigned int calc_rest;

digitalWrite(sigPin, !onState);
state = true;

if(cur_chan_numb >= chanel_number){
cur_chan_numb = 0;
calc_rest = calc_rest + PPM_PulseLen;//
OCR1A = (PPM_FrLen - calc_rest) * 2;
calc_rest = 0;
}
else{
OCR1A = (ppm[cur_chan_numb] - PPM_PulseLen) * 2;
calc_rest = calc_rest + ppm[cur_chan_numb];
cur_chan_numb++;
}
}
}

minhthien1988

hello Denn

i can not understand why it do not work .

project Nrf24l01 , led only flash, it can stop then turn off . have you a shematic complete ? where is pin 32 atmega8 of RX connect ?

Denn

pin 32 atmega8 of RX is input for filesafe. it connect to ground and disconnect for write filesafe.

minhthien1988
Denn:

pin 32 atmega8 of RX is input for filesafe. it connect to ground and disconnect for write filesafe.

ok Denn , add a few question to i can clear .

If i use tx create PPM is 2 channel ( tx of car ) , Circuit can work with 2 signal output ? Or only work with PPM 8 channel

And Pin IRQ my nrf24l01 name is CRQ , Is it difference ?

You can post few picture file Layout of TX ,RX by file PDF ? what are you use software to draw ?

thank a lot .

Cheer