Sensor Multiplexer

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

Sensor Multiplexer

Postby dendrobates » Mon Sep 23, 2013 7:38 am

Good morning
Is there a sensor multiplexer that is supported by the new lejos? Thanks for your replies.
Kind regards
Beat
dendrobates
New User
 
Posts: 16
Joined: Tue Sep 10, 2013 7:08 am

Re: Sensor Multiplexer

Postby gloomyandy » Mon Sep 23, 2013 8:54 am

Not yet. I don't have one. If you have one feel free to create a driver and submit it for inclusion in leJOS... If a driver already exists for the NXT it should not be too hard to port it to the EV3... But be aware that this entire area is currently under review and will almost certainly change (it is after all only an alpha release)....
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3642
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Sensor Multiplexer

Postby dendrobates » Thu Sep 26, 2013 8:49 am

Dear Andy
Thanks for your reply. I bought already the TouchMux form mindsensors. But as I'm new in Lego programing, I think it's better not to try writing a driver :D. So I wait until it's supported.
Kind regards
Beat
dendrobates
New User
 
Posts: 16
Joined: Tue Sep 10, 2013 7:08 am

Re: Sensor Multiplexer

Postby skoehler » Thu Sep 26, 2013 8:59 am

That's a very simple (and possibly error prone) multiplexer. Here's what I think they did: they connect the three touch sensors with a bunch of resistors to the analog signal wire. Basically, you have a variable voltage divider. Depending on which sensors are pressed, the voltage level will be different. Now this may be error prone, as the AD port may very well return intermediate values and a driver should make sure that 2 or 3 consecutive readings were in the same voltage interval.

However, on the mindsensors homepage the compatibility icons say, that this sensor does NOT work with the EV3.
Also, it certainly has been designed and tested with NXT touch sensors only.

Also see http://www.mindsensors.com/index.php?mo ... AGE_id=135

I'm not sure, why they say that the multiplexer is not compatible. Is it the lack of drivers? Is it the autodetection mechanism of the EV3? Is it an incompatibility with the new EV3 touch sensors? Does the ADC of the EV3 return values different from the values return by the ADC of the NXT? Who knows.
skoehler
leJOS Team Member
 
Posts: 1350
Joined: Thu Oct 30, 2008 4:54 pm

Re: Sensor Multiplexer

Postby gloomyandy » Thu Sep 26, 2013 9:08 am

There is an updated driver for the TouchMux in the EV3 release. I have one and my quick test showed that it seems to work, note however that you need to use the old NXT touch sensors not the new EV3 ones.

The AD converter on the EV3 does not return the same readings on the EV3 as on the NXT as it uses a higher resolution. The range on the NXT is 0-1023 on the EV3 it is 0-4095. The methods in the sensor port code that provide NXT compatibility scale the result appropriately and with this scaling the old driver for the touch mux seems to work pretty well.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3642
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Sensor Multiplexer

Postby dendrobates » Thu Sep 26, 2013 9:13 am

Oh this is good news. So I gonna buy two "new" sensors. Thanks a lot for your support.
Kind regards
Beat
dendrobates
New User
 
Posts: 16
Joined: Tue Sep 10, 2013 7:08 am

Re: Sensor Multiplexer

Postby dendrobates » Fri Oct 11, 2013 12:30 pm

Hello Andy
Where do I find the driver. I tried to implement the old class. But there I have a problem with the ADSensorPort. Or do I implement it totally wrong? Thanks for your help.
Kind regards
Beat
dendrobates
New User
 
Posts: 16
Joined: Tue Sep 10, 2013 7:08 am

Re: Sensor Multiplexer

Postby gloomyandy » Fri Oct 11, 2013 2:31 pm

The driver is in our git repo along with all of the other leJOS source. What problem did you have?
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3642
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Sensor Multiplexer

Postby dendrobates » Tue Oct 15, 2013 8:57 am

Hi Andy
I'm back to my programing. How do I initialize the AnalogPort? Is there an example how to use the TouchMUX? I couldn't find any code snippet on the internet.
Kind regards
Beat
dendrobates
New User
 
Posts: 16
Joined: Tue Sep 10, 2013 7:08 am


Return to EV3 Software

Who is online

Users browsing this forum: Google [Bot] and 0 guests

more stuff