Recommended Posts

Anybody with experience with the IRLink sensor (NIL1046) when used with the EV3?

Seems to me to be a method to control PF motors and their own battery supply without tying up EV3 Motor ports.

Opinions?

Thanks,

Ed

Share this post


Link to post
Share on other sites

I've used it like that with the NXT. It should be possible to control 8 PF motors using 4 IR receivers and just a single NXT sensor port, though I didn't test using all channels at once. My guess is that you could do the same with an EV3. If not directly then certainly using a software sensor adapter.

Good luck!

Share this post


Link to post
Share on other sites

Hi,

There's two types of IR sensors supplied by HiTechnic:

  • IRReceiver
  • IRLink

The first is to Receive IR commands and the second is to Send IR commands. The IR Link will work with EV3.

Here's the software:

https://www.hitechnic.com/downloadnew.php?category=38

Or on the bottom of this page:

https://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NIL1046

According to HiTechnic, the complete range of sensors is now supported on EV3:

Share this post


Link to post
Share on other sites

Thanx a lot :classic:

You're welcome!

According to the read me file this will work with Lego's IR Receiver also.

It does. I have tested it and it's an easy way to control your robot.

Share this post


Link to post
Share on other sites

Thanks again -

It looks like this could be a real powerful tool to combine the EV3 with all those PF motors and sensors. I was considering daisy chaining EV3's, but this a very much cheaper way to go. 12 motors controlled by the EV3 should handle all my fantasy's for the foreseeable future.

Ed

Share this post


Link to post
Share on other sites

Exactly what I had in my mind. You can use the Mindstorms motor for precision control and the PF motors for auxiliary functions.

Share this post


Link to post
Share on other sites

According to the read me file you can do speed control of the PF motors. That would be a lot better than on/off.

Share this post


Link to post
Share on other sites

This NXT IRLink Sensor (NIL1046) is meant to be plugged to the sensor port or motor / output port of EV3? I struggle to find documentation on this.

Share this post


Link to post
Share on other sites

This NXT IRLink Sensor (NIL1046) is meant to be plugged to the sensor port or motor / output port of EV3? I struggle to find documentation on this.

If I am not mistaken, you use the sensor port.

Maybe this will help:

http://www.ev3dev.org/docs/sensors/

Share this post


Link to post
Share on other sites

I am learning about this cool thing from you guys. From what I understood, does this allow many degrees of freedom with a single EV3 controller?

Share this post


Link to post
Share on other sites

I am learning about this cool thing from you guys. From what I understood, does this allow many degrees of freedom with a single EV3 controller?

Exactly! You can send messages to 4 IR receivers, each with 2 motors. So you can control 8 motors with a single IRLink (if I am not mistaken).

(More if you run multiple motors on a single channel of course)

If you put your IRLink in a closed section with 4 receivers, you can use multiple IRLinks to control even more PF motors, but that's theoretical.

Be aware that you can't precisely control a PF motor.

Share this post


Link to post
Share on other sites

Hi guys,

Do you know if by chance there is a programming block available for the Ev3 mindstorms software that works with the irlink? I could not find any on the hitechnic site, but on this youtube video I can see what looks like one: 

Ultimately I want to use ev3dev but I want to start small and just see the irlink controlling the train pf motor in a simple example.

thanks in advance for the help!

 

Share this post


Link to post
Share on other sites

Ian-

Welcome to the wacky world of the IRLink sensor. Using it is a 'ball of worms' that I am trying my best to figure out. First of all there WAS!!! an irlink block that was supplied by hitechnic. HOWEVER, Lego changed the firmware on the EV3 in a later upgrade and it no longer works. According to HiTechnic there is no timetable for developing a new one. Their technical support person Colton has been a great help to me.

Alternatives:-

1- Robot C. That is the software recommendation of HiTechnic since it has the facilities to use the IRLink. [[[ Warning ]]] If you are planning on growing your layout and involvement in EV3, Robot C DOES NOT SUPPORT Daisy Chaining of the EV3's. Also RobotC has a reasonable cost associated with it and a 30 day trial. I made a post last week in this forum asking for help on finding a solution that would handle the sensor and chaining. No results.

2.Obtain a earlier release of the EV3 firmware and the control block from HiTechnic and see if you can get that working.I believe you have the sensor already, if that was your picture.The following was a e-mail from Lego I received yesterday. I have not tried it yet. If it doesnot work I may ask the Eurobrick community if someone has a 2-3 year old download that they would share.

""I hope all is well with you!  I would be happy to provide you with a link to the 1.2.1 version of the Education software as that is the earliest version that we still have available to us to send out.  Here is the link for both PC and Mac.   PC https://fileshare.corp.lego.com/t/3dbht8ws   MAc  https://fileshare.corp.lego.com/t/zjphriam""

3.EV3Dev - this is where I am now - trying to get it installed and communicating with the PC. Python has the necessary code to do the interaction but I have not gotten to the point of trying it yet.

4.SBrick and it's kin. I don't want to consider this yet. My hope was to develop  a smaller layout similar to the Sioux.NET on Track project. Utilizing EV3's.

SO! That's where I am. I have not given up---yet. Let us keep this thread going and share problems/solutions. Drop me a PM with your e-mail if you want to go private on our discussions.

I wish you the best of luck.

Ed

PS - If any of you other readers have ideas PLEASE jump in.

 

 

 

Share this post


Link to post
Share on other sites

For what it's worth, I had success with using both the IRLink and IRReceiver and LeJos with the NXT. I have not tried the EV3. I believe I used a bit of custom driver code found of the LeJos forum.

Share this post


Link to post
Share on other sites

Ian;

Progress - of a sort.

I have finally settled on RobotC. I'll have to re-learn C (it's been 25 years or so), but kinda looking forward to it. I found that Bot Bench, a RobotC support site, has a driver set that includes, I hope, all the stuff for the EV3 to use the link sensor. The drivers have to be compiled and included in the C code, so I'm pretty sure that I will have to use RobotC, not the graphical or natural language versions. I hope to have it tested out before my free trial is up.

As an aside the Bot Bench download also has test program source code. I believe the site will be a good resource. Xander, the owner of the site has answered questions and blog reply's very rapidly.

Ed

Share this post


Link to post
Share on other sites
On 25/01/2017 at 3:28 PM, knotian said:

3.EV3Dev - this is where I am now - trying to get it installed and communicating with the PC. Python has the necessary code to do the interaction but I have not gotten to the point of trying it yet.

if you're still considering ev3dev, I've got python working with the IRLink in ComboPWM mode:

http://ofalcao.pt/blog/2016/ev3dev-using-irlink-with-python

It's just an ugly conversion to python of parts of the code I found from Mike Hatton (“Parax”), Xander Soldaat and Lawrie Griffiths on GitHub, RobotC forum and LeJOS forum but it's a good start.

Share this post


Link to post
Share on other sites

(thank you so much to everyone for your help!)

MajorAlvega, I already found and stole your code :) thank you! I have it working in ev3dev, but the next challenge is the range on the Irlink (not so great) and also the sensor needs to point directly at my train. I also found that as soon as the train goes out of range it stops. I'm not sure yet if that's just how the code is written and there's a way to just have it start and keep going, then use something else to stop it (like another sensor when the train reaches a certain spot). I notice that with the regular remote that comes with the train I can start up the train and walk away holding the remote and it keeps going, so I would think there should be a way to do it. I also posted a question on Xander's site so I'll let you know what he says too. 

thanks everyone

Ian

Share this post


Link to post
Share on other sites

It is probably me, but attempting to follow the EV3Dev instructions to set up communications between the PC and the EV3 got me completely lost. Thats why I switched to RobotC. If I could get communications going I would rather stay with EV3Dev.

Ed

Share this post


Link to post
Share on other sites
11 minutes ago, Ian Kinnear said:

(thank you so much to everyone for your help!)

MajorAlvega, I already found and stole your code :) thank you! I have it working in ev3dev, but the next challenge is the range on the Irlink (not so great) and also the sensor needs to point directly at my train. I also found that as soon as the train goes out of range it stops. I'm not sure yet if that's just how the code is written and there's a way to just have it start and keep going, then use something else to stop it (like another sensor when the train reaches a certain spot). I notice that with the regular remote that comes with the train I can start up the train and walk away holding the remote and it keeps going, so I would think there should be a way to do it. I also posted a question on Xander's site so I'll let you know what he says too. 

Ian

Great, someone is using my ugly code :)

You are right about the regular train remote: it doesn't use Power Functions ComboPWM protocol, it uses ComboDirectMode. This mode sends a command to the IR Receiver and it keeps running these command until it receives another or until you press the small red buttons and reset the receiver. I only tried ComboPWM, sorry.

About the short range, that's the biggest problem I see when using IR. We can try to "focus" the IR beam but only when your device is stationery, not an option for trains.

Only solution is using radio. Nowadays everybody is crazy about Bluetooth 4 LE (SBrick, WeDo 2.0, Power Functions 2.0 when available) but LEGO also had the CyberMaster, you can use a serial port to send RCX byte-code commands through radio to it.

Share this post


Link to post
Share on other sites

Gentlemen,

I looked at the C code in Xander's drivers and it seems to support ComboDirectMode. Like I said I have not gotten that far yet.

Ed

Share this post


Link to post
Share on other sites

Ian,

I finally got everything running with RobotC and the EV3. I found good drivers and a test program. Works fine but the range is very poor. The normal Lego IR control for trains works very well and it's range FAR exceeds that of the IR-Link. Looking at the HT construction it may also have something to do with the design of the housing. Maybe you have a technical bent and can find the technical specs on the emitter and it's output power. I've looked and have had no luck.

I'm going to put this portion of the project on hold and get everything else running.

:classic: I was even wondering if a servo, hooked to  the dial, plus another motor to push the control button combined with the Lego controller would work - very awkward.

Good Luck in your project.

Ed

Share this post


Link to post
Share on other sites

I'm actually exploring a couple of different options now. I haven't figured out (yet) how to use the 'Single Pin Output Mode' needed to start my train and keep it running through python or nodejs on ev3dev together with the IRlink. I know from Xander (and your post knotian that's great!) that I can use 'Robotc' and his driver and he has it working (https://github.com/botbench/robotcdriversuite/blob/master/examples/hitechnic-irlink-test1.c), but the problem there is that I have to install Windows to install Robotc, and also I know zero about how the development for robotc works (for example does it need an SD card booted like Ev3dev?). So while I work on setting up a VM or bootcamp on my Mac for that, I'm also looking into a simple solution using a Raspberry Pi and IR transmitter (no EV3 or IRLink needed at all): http://www.internetoflego.com/lego-train-automation-ir-power-functions-with-nodejs-and-lirc/ . Obviously this is not a 'pure' lego solution though but it will work for my purposes.

Ian

 

Share this post


Link to post
Share on other sites

Ian

Just a quicky. Robot c changes the firmware in the EV3, BUT mindstorms still runs. No card needed. Robot c is pc based, has an development environment, and you just compile and download the programs to the EV3. You can run them with a debugger, from the pc that shows the EV3 screen on the PC. Cost is $49/ year or $79 permanent. I'm just getting started but it looks good so far.

Ed

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.