[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
RC Tanks Australia Forum • View topic - Heng Long tank RF receiver -> RX board protocol
Login    Forum    FAQ

Board index » Electronics » RC2HL




Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Heng Long tank RF receiver -> RX board protocol
 Post Posted: Sat Jun 23, 2012 1:39 pm 
Offline
King Tiger Commander
King Tiger Commander
User avatar

Joined: Tue May 10, 2011 1:17 pm
Posts: 1123
Hi ancvi_pIII

To show video you should upload the video to YouTube and then place the YouTube id number for the video witin the [YouTube] tags.

Cheers
Kevin G

_________________

rctanksaustralia.com


Top 
 Profile  
 
 Post subject: Re: Heng Long tank RF receiver -> RX board protocol
 Post Posted: Wed Jun 27, 2012 7:38 am 
Offline
Kübelwagen Driver
Kübelwagen Driver
User avatar

Joined: Mon May 28, 2012 10:47 pm
Posts: 7
Thanks for the new codes ancvi_pIII -- unfortunately three of them have the same problem as before; they don't seem to apply enough voltage to the motors to get them spinning with the full load of my gearbox and metal tracks. (You're right, it is the standard metal gearbox.) Your "fast reverse" produces a fairly slow reverse, while the others just make the motors strain and provide no movement.

Rather than bug you again, I figured I'd just stop being lazy and sniff the codes my tank uses myself! This is what I came up with:

FE40121C idle
FE401294 ignition
FE400608 left-slow
FE400010 left-fast
FE401930 right-slow
FE401E2C right-fast
FE200F34 forward-slow
FE000F3C forward-fast
FE580F08 backward-slow
FE780F00 backward-fast
FE408F0C tur-left
FE410F28 tur-right
FE404F3C tur-elev
FE442F34 shoot
FE440F78 machinegun-sound
FE420F24 recoil

I'll plot the bit patterns next to yours when I have time, and see if I can figure out a common pattern. Of course, that's also 17 more data points towards cracking that checksum algorithm! :)


Top 
 Profile  
 
 Post subject: Re: Heng Long tank RF receiver -> RX board protocol
 Post Posted: Thu Jun 28, 2012 9:11 am 
Offline
Kübelwagen Driver
Kübelwagen Driver
User avatar

Joined: Thu Jun 07, 2012 2:56 pm
Posts: 11
Hello tsuki,

I tried some of your codes and guess what, they work, I used the ignition, left-fast and recoil codes on my PC program
which sends the commands via rs232 to my encoding PIC which then sends the correct signal to my HL transmitter.

Did you use a fixed timebase routine to decode the hl signal?

In my PIC program I initially use a rising edge interrupt on the first part of the preamble then use a timer1 interrupt set to about 585ms to detect if the signal is either at logic 1 or 0.

As I stated in earlier posts the HL signal varies a little bit in its full bit time so with my time based routine it only has to be
slightly off and I get false readings.

What method for decoding did you use on your interface board?

regards Andrew


Top 
 Profile  
 
 Post subject: Re: Heng Long tank RF receiver -> RX board protocol
 Post Posted: Thu Jun 28, 2012 3:43 pm 
Offline
Kübelwagen Driver
Kübelwagen Driver
User avatar

Joined: Mon May 28, 2012 10:47 pm
Posts: 7
I tried to use a fixed timebase to start with, but it didn't work. Like you said, there's enough variation that assuming a fixed time between the start of the packet and the data bit you want will often fail. I did the timing in what I assume is the way the RX18 does it -- using those initial "high" bits (0xFE) as synchronisation pulses to figure out the timing.

I tried to find a logic analyser to do the job, but I couldn't find one -- so I wrote my own in software :) I used a National Instruments data acquisition device and a bit of LabVIEW code on the back end to sample, then decode, each signal.

I posted all the details on my blog, where you can download the source code if you have access to LabVIEW and a suitable DAQ device: http://blog.ianrenton.com/raspberry-tan ... ode-redux/


Top 
 Profile  
 
 Post subject: Re: Heng Long tank RF receiver -> RX board protocol
 Post Posted: Thu Jun 28, 2012 6:29 pm 
Offline
Kübelwagen Driver
Kübelwagen Driver
User avatar

Joined: Thu Jun 07, 2012 2:56 pm
Posts: 11
Hello Ian

I believe I may have found the solution to the checksum, I figured it out by adding your codes to the list.

Disregard the preamble byte 0xFE bits b31 - b24 in the calculation and treat

b23 - b20, b19 - b16, b15 - b12, b11 - b8, and b7 - b6 as 4 bit codes then XOR b23 - b20 with b19 - b16
then XOR the result with the next 4 bits b15 - b12 and so on.

for example the the idle codes

mine FE3C1038

3 0011
C 1100 - XOR becomes 1111

1111
1 0001 - XOR becomes 1110

1110
0 0000 - XOR becomes 1110

1110
0 0000 b7 - b6 as 4 bits XOR becomes 1110 checksum b5 - b2 is 1110


your idle code FE40121C

4 0100
0 0000 - XOR becomes 0100

0100
1 0001 - XOR becomes 0101

0101
2 0010 - XOR becomes 0111

0111
0 0000 b7 - b6 as 4 bits XOR becomes 0111 checksum b5 - b2 is 0111


I even tried my forward slow which is FE301008 with the machine gun bit b6 set which becomes FE30104C

3 0011
0 0000 - XOR becomes 0011

0011
1 0001 - XOR becomes 0010

0010
0 0000 - XOR becomes 0010

0010
1 0001 b6 set XOR becomes 0011 checksum b5 - b2 is 0011 so code sequence is FE30104C


All I need to do know is figure out how to set or clear individual bits in my PC software

I have tried the FE30104C and the tank moves forward and fires the machine gun sound.

I tried setting the turn turrett right bit b16 as well giving code FE311048 but at the moment
I have the turrett off doing a servo control of cannon recoil modification so I could not confirm if the
turrett turns with tank moving forward firing machine gun.

regards Andrew


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2

Board index » Electronics » RC2HL


Who is online

Users browsing this forum: No registered users and 0 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron