|
Page 1 of 1
|
[ 6 posts ] |
|
Sensor Multiplexer (SMUX)
Author |
Message |
theboss4545
Rookie
Joined: Sun Sep 25, 2011 1:52 pm Posts: 16
|
 Sensor Multiplexer (SMUX)
Hello, I am trying to use a HiTechnic SMUX to collect data from 4 sensors ( Vernier and other kinds). I would read the value from each sensor , and then save it in the datalog. I am having difficulties understanding how the multiplexer works. I have read the programming guide PDF by Xander Soldaat. Your help is appreciated! Thank you.
|
Wed Feb 20, 2013 11:36 am |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Sensor Multiplexer (SMUX)
You should check out some of the examples for the light sensor (lego-light-SMUX-test1.c and 2). I don't support the Vernier sensors. The reasons being that they seemed to be unwilling to help me with some hardware when I approached them about it. This is what their CEO had to say to me: The Vernier is analogue, so your best bet would be to see how the lego-light driver does its thing  = 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 Feb 20, 2013 11:56 am |
|
 |
theboss4545
Rookie
Joined: Sun Sep 25, 2011 1:52 pm Posts: 16
|
 Re: Sensor Multiplexer (SMUX)
So in the code , is it reading the raw value from the sensor?Thank you.
|
Wed Feb 20, 2013 2:35 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Sensor Multiplexer (SMUX)
Well, sort of. The SMUX polls the sensor and then makes that data available to the NXT. You may find that you have to do a bit of calibration as the analogue value read by the SMUX is based on 3V3 and not the 4V3 that the NXT uses. In most cases this not an issue, but with the Vernier it might be.
= 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 Feb 20, 2013 3:20 pm |
|
 |
theboss4545
Rookie
Joined: Sun Sep 25, 2011 1:52 pm Posts: 16
|
 Re: Sensor Multiplexer (SMUX)
Is it going to be a simple linear calibration? If I have two solutions of known values,and I take two measurements with the sensor , then I do the calibration , is that going to be enough? Also, if I am trying to read the values from 2 sensors, would it be as simple as : const tMUXSensor LEGOLS= msensor_S1_1; const tMUXSensor LEGOLS1= msensor_S1_2; raw=LSvalRaw(LEGOLS); nxtDisplayTextLine(0,"Sensor 1: %4d",raw); wait1Msec(1000); raw=LSvalRaw(LEGOLS1); nxtDisplayTextLine(0,"Sensor 1: %4d",raw); Thank you!
|
Wed Feb 20, 2013 3:37 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Sensor Multiplexer (SMUX)
That looks about right  As for linear or not, that's something you'll have to find out experimentally. As I said before, I have no experience with Vernier, so I have no idea how they perform with 3V3. = 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 Feb 20, 2013 4:31 pm |
|
|
|
Page 1 of 1
|
[ 6 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
|
|