View unanswered posts | View active topics It is currently Thu Jul 31, 2014 2:52 pm






Reply to topic  [ 5 posts ] 
Question about HiTechnic Color Sensor V2 
Author Message
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Question about HiTechnic Color Sensor V2
Hi,

Quick question. Is there a way to disable the white LED on the sensor when the sensor is not in use? Seems odd that the LED comes on with NXT boot, seems like it should not waste battery power until needed.

Thanks,
Chris


Sun Jun 20, 2010 11:49 pm
Profile
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Re: Question about HiTechnic Color Sensor V2
Hi,

Can anyone help me with this? Appreciate it.

Thanks,
Chris


Thu Jun 24, 2010 10:05 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3165
Location: Rotterdam, The Netherlands
Post Re: Question about HiTechnic Color Sensor V2
You could disconnect it. The LED takes about 5mA, even with the 1400mAh rechargeable battery pack from Lego, you'll be able to run that for about 280 hours. Ok maybe not that long, but if you're worried about power consumption, you'd be better off disabling things like BT.

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 Jun 24, 2010 10:09 am
Profile WWW
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Re: Question about HiTechnic Color Sensor V2
Hi,

There's no firmware support for keeping the LED off? Seems like it should be OFF by default (like the active light sensor) and LEGO Color Sensor. Then you could have an api call to enable/disable it from code as needed. Certainly seems like it shouldn't waste battery power if it's doing nothing (yes, I know it's only a few ma, but every bit helps!). Is this an issue for it in general, or just under RobotC? Is it ON by-default if running under NXT-G? Haven't tried it, but I'd guess not.

There's also the visual issue of having the LED on all the time. Yes, in my case it could actually matter. I know you can disable/enable it when using the passive parameter on the RGB call, but that only works if you specifically code for it. That's what I'm doing now and it appears to work fine, but it's just more code needed to fix something that appears broken in some way by default.

This is the application where I needed to talk to 4 NXTs from the PC via Bluetooth or IRLink. I've actually got the Bluetooth code running now (well, for the most part!) and am able to communicate with the 4 NXTs. I'm already shutting down BT when not being used and re-enabling to reduce battery drain, but I can't turn it off fully in this application unfortunately. Appreciate the reply.

Thanks,
Chris


Thu Jun 24, 2010 5:50 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3165
Location: Rotterdam, The Netherlands
Post Re: Question about HiTechnic Color Sensor V2
The trouble is, the firmware doesn't know it has an NXT 2.0 colour sensor connected to a specific port until *you* configure it as such. There's no auto-detect, if you know what I mean. So you when you switch on the NXT, it doesn't know how many motors or how many sensors are attached to it. This isn't a bug in the firmware, it's a hardware design choice by Lego.

The NXT 2.0 colour sensor is *nothing* like the old light sensor. It's a mix between analogue and digital, but not I2C. It uses a custom protocol (SPI-like) to initialise and configure its internals. It also doesn't use the standard AD (Analogue to Digital) conversion technique (which makes use of the ATmega8), instead it uses the ARM7's own ADC (AD Converter) to speed up conversion. So the sensor is fast, much faster than any true I2C sensor, but the trade-off is that most of the conversion/calculation work is done by the NXT's hardware and firmware. It also requires the coloured object to be very close to the sensor and it's much more influenced by main's power induced light flickering (50/60Hz) than the HiTechnic colour sensor.

A small init function in your program to turn off the LED is the way to go. When life gives you lemonade...

- 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 Jun 25, 2010 12:56 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

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