View unanswered posts | View active topics It is currently Wed Nov 26, 2014 6:40 am






Reply to topic  [ 12 posts ] 
Sensor multiplexer with 4 IR 
Author Message
Rookie

Joined: Mon Mar 28, 2011 4:53 pm
Posts: 2
Post Sensor multiplexer with 4 IR
I am working on a robot that needs 4 IR seekers a compass an ultrasonic and a sensor port left for motor controllers. the only way to do this is is to use a sensor multiplexer. my current setup is the multiplexer plugged into S1 an IR v2 seeker in S2 S3 is blank and an IRv2 in S4. in the multiplexer the IRv2 in 1 a compass in 2 a ultrasonic in 3 and an IRv2 in 4. I need to read from the 2 IRs in the mux I can read from one them if the other is unplugged but if the other is plugged in the HTIRS2-SMUX-test program returns all values as 0.

does the mux not support having 2 IRv2 plugged in at the same time or am i just doing something wrong?


Mon Mar 28, 2011 5:25 pm
Profile
Online
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Sensor multiplexer with 4 IR
Did you modify the test program at all? It shouldn't matter how many sensors are connected to the SMUX.

If you made any modifications, can you please attach the code? Are the batteries for the SMUX fresh?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Mar 29, 2011 3:48 pm
Profile WWW
Rookie

Joined: Mon Mar 28, 2011 4:53 pm
Posts: 2
Post Re: Sensor multiplexer with 4 IR
I have not made any changes to the test program and all my batteries are fresh.


Tue Mar 29, 2011 4:52 pm
Profile
Online
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Sensor multiplexer with 4 IR
I can replicate the issue (I happen to have two IRS2's as well). It also occurs with my version 2.0 (not released yet). I will see if it's a problem with the SMUX or my driver (more likely).

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Mar 30, 2011 11:55 am
Profile WWW
Online
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Sensor multiplexer with 4 IR
It seems to be a bug in my suite v1.8.1. If you are keen to do some testing with my pre-release version (2.x), contact me directly via email. It seems to work fine there. The address can be found in the header files :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Mar 30, 2011 3:47 pm
Profile WWW
Rookie
User avatar

Joined: Mon Feb 23, 2009 12:40 pm
Posts: 27
Post Re: Sensor multiplexer with 4 IR
Xander,

Is this only a problem with 2 IR Seekers or will it manifest itself with other combiniations of sensors? (or possibly with multiples of any other sensor type on the MUX). We have just finished building and our starting to test or final (hopefully) redesign before St. Loius and in addition to the 3 motor and 1 servo controller, we have 5 other sensors we will be using (with 3-4 on the SMUX).

Thanks,


Thu Mar 31, 2011 12:40 pm
Profile
Online
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Sensor multiplexer with 4 IR
I have used the SMUX with a multitude of different sensors. The IR Seeker is the only one I have more than one of that isn't a LEGO sensor.

http://www.youtube.com/user/mightor#p/u/3/rQQfMMzSWjo
http://www.youtube.com/user/mightor#p/u/4/fAzw5zMKGnE

Regards,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Mar 31, 2011 12:48 pm
Profile WWW
Rookie
User avatar

Joined: Mon Feb 23, 2009 12:40 pm
Posts: 27
Post Re: Sensor multiplexer with 4 IR
Xander,

It looks like there also a problem with our setup. We have an accelerometer on port 1, gyro on port 2, touch sensor on port 3 and a magnetic sensor on port 4. While testing the touch sensor we ran into problems. We determined that if we unplugged any one of the other sensors, the touch sensor worked fine. With all 3 other ports used, the touch sensor would not work. Could this be a result of the same bug?

Thanks again for your work on these drivers,

David


Thu Mar 31, 2011 6:06 pm
Profile
Online
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Sensor multiplexer with 4 IR
David,

Please send me your code so I can test this on my end. You have my email address. I will treat your code as confidential.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Apr 01, 2011 1:48 am
Profile WWW
Rookie
User avatar

Joined: Mon Feb 23, 2009 12:40 pm
Posts: 27
Post Re: Sensor multiplexer with 4 IR
Just an update, we think we tracked the problem down to our code and task implementation. At this point we do not think this was a problem with the sensor multiplexer driver.

Thanks again to Xander for all your help.


Sat Apr 02, 2011 4:06 pm
Profile
Rookie

Joined: Fri Apr 15, 2011 12:08 am
Posts: 5
Post Re: Sensor multiplexer with 4 IR
Quote:
we think we tracked the problem down to our code and task implementation


Can you explain this in any further detail? I'm about to start to try getting SMUX to work and I'm guessing I'm going to run into similar issues, if so many others did. Plus, others may want to know how to fix this.


Fri Apr 15, 2011 12:20 am
Profile
Online
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Sensor multiplexer with 4 IR
It's usually quite simple:

ROBOTC does not have any mechanism to allow you to have concurrent tasks that share functions in a thread-safe manner.

That means that you cannot have two tasks polling two sensors at the same time if you are using my driver suite. This is due to the fact that I use a multi-layered approach and that ROBOTC does not have a stack. You simply cannot have two tasks calling the same function at the same time. The "best" solution is to have a single task in charge of polling your sensors while the rest of your tasks use those retrieved values to do their thing.

I wish it weren't so, but unfortunately there is no way for me to fix this without causing serious code bloat in all of the functions. No platform is without its pros and cons and this one of those cons, unfortunately.

Regards,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu May 19, 2011 10:07 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 12 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.