JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

LEGO power functions
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - General Forum
View previous topic :: View next topic  
Author Message
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Sun Dec 13, 2015 9:12 pm    Post subject: LEGO power functions Reply with quote

I'm contemplating using IRscope to learn the signals of a LEGO remote. It'll be in couple of weeks.
It's a really neat remote. Controls several trains beautifully.
http://shop.lego.com/en-US/LEGO-Power-Functions-IR-Speed-Remote-Control-8879
There is a description of IR signals here:
www.philohome.com/pf/LEGO_Power_Functions_RC_v110.pdf (cached version)
I only understand, a little bit, of pages 13-14.
There are rotary buttons, which probably preclude any upgrade working in my remotes, but I thought I ask anyway.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Sun Dec 13, 2015 9:30 pm    Post subject: Reply with quote

It looks like a custom protocol, so once you get some learns to confirm the structure, we can build an executor for it and the PDF that you found will make it easier to make sense of the learns and create an upgrade.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Sun Dec 13, 2015 9:35 pm    Post subject: Reply with quote

Thanks, Rob. Stick around please.
Pages 13 and 15 of the pdf describe encoding and decoding.
The earlier pages I think give command codes. Also about Toggle.
I looked in PB, for starters, but I don't think I will do it right.
It'll be after Christmas they'll let me play.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Sun Dec 13, 2015 10:26 pm    Post subject: Reply with quote

I'd rather base the build on learns than what someone wrote in a doc because the main problem with remote signals is terminology, as there really isn't a standard notation. And, I know how to read learned signals very well. But the doc will help explain everything that we see in the learns, so that will eliminate all the usual guesswork.

What you need to do is, as soon as the Legos arrive, before you wrap them up, grab the remote and capture the signals. Or, if you don't want to break the sealed packaging, as soon as it's out of the box grab the remote. I'll only need 1 or 2 signals that capture properly and work as I can base the rest of it on the doc.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3224

PostPosted: Mon Dec 14, 2015 12:18 am    Post subject: Reply with quote

Liz,
The link you have is to version 1.10. Here's a link to 1.20, which apparently has changes to the commands. Also, some LIRC files have been generated, so IrScrutinizer could probably provide you with some decodes.

I suspect that using a remote of the type we're used to will restrict you to transmitting on a single channel.
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 786

PostPosted: Mon Dec 14, 2015 7:15 am    Post subject: Reply with quote

I managed to understand the document, and write an IRP description. Here is the main protocol in a for that IrScrutinizer will accept
Code:

[protocol]
name=lego
irp={38k,1p,msb}<6,-10|6,-21>(6,-39,nibble_1:4,nibble_2:4,F:4,LRC:4,6,-39) \
{ nibble_1 = 8*T:1 | 4*E:1 | D:2, \
nibble_2 = 8*a:1 | mode:3, \
LRC = nibble_1 ^ nibble_2 ^ F:4, \
T = 1-T } \
[T@:0..1=0,a:0..1=0,E:0..1,D:0..3,mode:0..7,F:0..15]
[documentation]
Protocol for Lego remote control, see
http://storage.technicbricks.com/Media/2010/TBs_20100304_1/LEGO%20Power%20Functions%20RC%20v120.pdf. Also see http://www.hifi-remote.com/forums/viewtopic.php?t=16630.
For compatibility with other protocols, the data payload (nibble 3) is here called F, and the channel (CC) D.

This can just be appended to IrpProtocol.ini in IrScrutinizer, and it will generate the signals.

There are then four (in version 1.10 even more) "special cases". I have implemented those as inherited protocols. These are
Code:

[protocol]
name=lego-extended
irp=lego{E=0,mode=0}[a:0..1=0,T@:0..1=0,D:0..3,F:0..15]
[documentation]
See page 7 of http://storage.technicbricks.com/Media/2010/TBs_20100304_1/LEGO%20Power%20Functions%20RC%20v120.pdf

[protocol]
name=lego-combo-direct
irp=lego{E=0,mode=1}[a:0..1=0,T@:0..1=0,D:0..3,F:0..15]
[documentation]
See page 8 of http://storage.technicbricks.com/Media/2010/TBs_20100304_1/LEGO%20Power%20Functions%20RC%20v120.pdf

[protocol]
name=lego-single-output
irp=lego{E=0,mode=4*1:1 | 2*M:1}[a:0..1=0,T@:0..1=0,M:0..1=0,D:0..3,F:0..15]
[documentation]
See page 9 of http://storage.technicbricks.com/Media/2010/TBs_20100304_1/LEGO%20Power%20Functions%20RC%20v120.pdf

[protocol]
name=lego-combo-pwm
irp=lego{E=1,nibble_2=output_B}[a:0..1=0,T@:0..1=0,output_B:0..15=0,D:0..3,F:0..15]
[documentation]
See page 10 of http://storage.technicbricks.com/Media/2010/TBs_20100304_1/LEGO%20Power%20Functions%20RC%20v120.pdf. Note that there, a takes the place previously occupied by T. This appears to be a mistake.


Also these should be appended to IrpProtocols.ini.

Anyone up to writing an IRP -> PB translator?

Quote:
I'd rather base the build on learns than what someone wrote in a doc because the main problem with remote signals is terminology, as there really isn't a standard notation.

Funny, for me it is exactly the other way aound... Wink The notation the author is using is in general not too hard to understand.

Edit: This is all untested, since I do not have the hardware. Please test and report.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Mon Dec 14, 2015 2:51 pm    Post subject: Reply with quote

I can't tell whether the signal is meant to repeat, but I have started the PB file:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=13772
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Mon Dec 14, 2015 5:55 pm    Post subject: Reply with quote

Rob, do you want a .ict or .rtf files?
The learning is difficult, clear as mud to me at this point.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Mon Dec 14, 2015 7:43 pm    Post subject: Reply with quote

Barf's .pdf link and amazing work made me look harder.
Remote has a hardly visible 2008 imprint, so I found this earlier .pdf
www.philohome.com/pf/LEGO_Power_Functions_RC.pdf
doesn't look much different than the other two, other than that single pin stuff.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Mon Dec 14, 2015 9:27 pm    Post subject: Reply with quote

ElizabethD wrote:
Rob, do you want a .ict or .rtf files?
The learning is difficult, clear as mud to me at this point.

Ideally, I'd like an IR.exe file.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Mon Dec 14, 2015 9:53 pm    Post subject: Reply with quote

Ouch!! I just came in with .rtf files, and will post them. I don't think i know how to push stuff into IR, but will try.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Mon Dec 14, 2015 9:57 pm    Post subject: Reply with quote

See picture in the zip file.
Remote controls 4 receivers - that's what the channel slider is for. Channel slider doesn't sent IR signal.
Each receiver controls 2 devices. That's what the wheels and brakes are for.
I recorded the signals for the brake functions on the outermost shell - channels 1-4. Will skip learning all channels later.

Short press seems to send few signals and stops transmitting after 5 blips independent if I hold the button or not.
So I recorded on 3 channels doing both tap then press and hold after stops transmitting, and holding also stops transmitting.
Let me know if it makes sense or if to learn another way.
zip file contains 8 short files and an annotated picture.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=13773
I haven't yet figured out how best to learn the wheels. If I do step by step, each is identical to another (starts at zero always), so I probably need to do a quick sweep of a wheel.
So more to come. Comments welcome.

Edit:Rob, the .rtf files include Raw timing similar or identical to what I remember from IR. So maybe, just maybe, you'll be ok.
The reason for separate files is that since everything is GAP, I can't tell where one signal ends and another begins.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Mon Dec 14, 2015 10:49 pm    Post subject: Reply with quote

How did you create the rtf files? They look like they're just cut & pasted from IR or RMIR
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2271

PostPosted: Mon Dec 14, 2015 10:55 pm    Post subject: Reply with quote

In IRscope is a Summary button which makes .rtf files.
I don't really like it because it wraps lines, but heck, that's all I know.
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 18131
Location: Chicago, IL

PostPosted: Mon Dec 14, 2015 11:01 pm    Post subject: Reply with quote

I'm guessing you don't have a learning remote, right? IR.exe is the only one of the tools that has some good tools for messing with learned signals. But I can use these too, it's just gonna take a bit longer.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - General Forum All times are GMT - 5 Hours
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
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 vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Get Smart! the band's official homepage Rockabilly Central