View unanswered posts | View active topics It is currently Tue Jul 22, 2014 10:25 am






Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Read TACHO value 
Author Message
Novice

Joined: Sun Feb 24, 2008 6:15 pm
Posts: 50
Post Read TACHO value
Hi,

Is it possible to read independently value from TACHOA1 and TACHOA2? I know that it's to independent wire.
Is it possible to create our own driver to read this value?

THanks

Thibaud

_________________
My Eurobot team website :
http://blog.mlrobotic.com/


My MOCs :
http://nxtgen.6mablog.com


Thu Sep 11, 2008 5:05 am
Profile WWW
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Read TACHO value
These are not currently user accessible.

If you had a really cool application that would use these, then it might be possible to make them end user accessible. What is the application that you have in mind? How fast do you expect them to change?

A couple of notes:
1. For the motor encoder use, it's possible that these are changing faster that once per millisecond.
2. These are read only values.

If you don't want to post your reply on the forum, then send me a email at dickswan@sbcglobal.net


Wed Sep 17, 2008 8:50 pm
Profile
Novice

Joined: Sun Feb 24, 2008 6:15 pm
Posts: 50
Post Re: Read TACHO value
In order to multiply the number of motor by two , I want to connect 1 motor on a mux from mindsensor, and connect his tacho1 pin to the tacho1 pin from the NXT port A and then connect a second motor on the Port A but just connect the TACHO2 to tacho2 pin. By this way i can use the encoder of 3 motor connect on a motor MUX.

_________________
My Eurobot team website :
http://blog.mlrobotic.com/


My MOCs :
http://nxtgen.6mablog.com


Thu Sep 18, 2008 3:42 am
Profile WWW
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Read TACHO value
With only one pin, you can't use a motor encoder to detect direction of movement. Only that the motor has moved; i.e. you'll get an encoder that is monotonically increasing.

Don't assume that you can look at the speed setting of the motor to determine direction. SUppose you have a motor moving forward and you change it to a reverse speed. It still moves foward while it deccelerates.

Is this what you expected?

You might want to look at using the new HiTechnic Motor Controller used in the FIRST FTC competitiion. These are fully supported in ROBOTC. Each one supports two motors with encoders. Up to four controllers can be daisy chained on a single sensor port. They are designed for external 12V power but should also work with a LEGO 9V battery pack. These should be commercially available soon.


Thu Sep 18, 2008 9:36 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post Re: Read TACHO value
The Hitechnic motor controller looks really nice

Image

Scott B-)

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Sun Sep 21, 2008 5:48 pm
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Read TACHO value
well- - -
if it could control 8 motors instead of just 2, THEN it was real nice...

why did they make it so poor? After all, for those 2 motors 1 sensor port is missing.
and where are the sensor multiplexers to make up for this?

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Sun Sep 21, 2008 6:14 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post Re: Read TACHO value
Hey Ford,

Remember every I2C device can be given its own address, so you can put as many as you want in parallel, still only using 1 port.

Scott B-)

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Sun Sep 21, 2008 6:17 pm
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Read TACHO value
no - actually not:
- not every Lego sensor got an adjustable I2C address
- the maximum power of each nxt sensor port is limited to 20mA - so probably only up to 2-3 sensors may be attached simultaneously :evil: (so I've been told by a specialist Image )
- port splitters are not distributed by any German shop, and importing 4 or 5 from America is much too expensive
- I don't see how to get the sensor values by a "convenient" RobotC command if maybe at port 0 both a compass sensor, a color sensor, and a ultrasonic sensor have been attached :?

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Sun Sep 21, 2008 6:42 pm
Profile
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: Read TACHO value
The way the new HiTechnic FTC motor and servo controllers work is that they allow a daisy-chain of up to four controllers per sensor slot in any order. Each motor controller supports two motors with shaft encoders (rotation counters) and each servo controller supports up to 6 servos. All of the servo and motor controllers daisy-chain the 12V external battery power as well as the NXT I2C connection. In theory your NXT could have up to 32 (12V) motors or 96 servos or any combination thereof. This year's FTC competition is limited to 6 servos, 4 DC motors and 3 NXT motors which leaves us with 3 sensor ports. HiTechnic has already released a 4 port touch sensor mux and is working on a general purpose sensor mux. They are also working on an NXT motor mux.

I do not know how they plan to handle the addressing of specific sensors in a general purpose mux. Their touch sensor mux returns a single value that encodes the state of all four touch sensors.

They handle the motors and servos by having using virtual arrays motor[] and servo[] which are big enough to support the maximum possible number of each. The index valued constants defined for RobotC are in the form mtr_S2_C4_1 which represents the first motor on the fourth controller in the chain on port S2.

Jeff

_________________
Jeff McBride
Benson Robotics Club


Sun Sep 21, 2008 7:09 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post Re: Read TACHO value
Thanks for the info Jeff! That explains allot :-)

Hey Ford,

You are correct, not all the lego sensors have adjustable I2C addresses. The newer custom interfaces thou usually give you this ability. Since they will be able to be daisy chained, they will all have to have their own I2C address.

I haven't heard of the mA limitation, I have gotten three sensors to work fine at once. Three or four is still better than one B-)

As for the port splitter, its nothing fancy, all you have to do is wire all the sensors in parallel. I made my own port expander, very cheap:
http://www.freewebs.com/robotprojects/nxtportexspander.htm

the easiest way to get the sensor values iv found is to define the sensor port as a constant at the top of the page and have all your get sensor value functions use the constant as an input to the function.

Hope this help B-)
Scott

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Sun Sep 21, 2008 7:17 pm
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Read TACHO value
Jeff McBride wrote:
The way the new HiTechnic FTC motor and servo controllers work is that they allow a daisy-chain of up to four controllers per sensor slot in any order. Each motor controller supports two motors with shaft encoders (rotation counters) and each servo controller supports up to 6 servos...

ok - that's not bad 8)
daisy chaining it lets you get an amazing count of motors and servos (although I unfortunately have no good experiences with servos). But 8 motors are fine. I'm curious how much 1 controller will cost :?

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Last edited by Ford Prefect on Sun Sep 21, 2008 7:28 pm, edited 1 time in total.



Sun Sep 21, 2008 7:21 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Read TACHO value
starwarslegokid wrote:
As for the port splitter, its nothing fancy, all you have to do is wire all the sensors in parallel. I made my own port expander, very cheap:
http://www.freewebs.com/robotprojects/nxtportexspander.htm

hey, great!
Can you ship me 4 or 5 of 'em?
I can pay by VISA or PayPal ( as far as the American dependencies are not bankrupt yet :wink: )

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Sun Sep 21, 2008 7:25 pm
Profile
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: Read TACHO value
The prices are available on Lego's web site:

http://www.legoeducation.com/store/detail.aspx?CategoryID=187&by=9&ID=1648&c=1&t=0&l=0

_________________
Jeff McBride
Benson Robotics Club


Sun Sep 21, 2008 7:26 pm
Profile
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: Read TACHO value
oh, *surprise* never heard of this type! :shock:

the only I've seen is this one: http://www.hitechnic.com/index.html?lang=en-us&target=d14.html (development lab)

unfortunately the American Lego shop will not ship to Germany - and I'm still curious how the gear motors can be fixed to the Lego technic bricks and bars. But maybe some day this mux will work even with the original nxt motors :D

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Last edited by Ford Prefect on Mon Sep 22, 2008 4:17 am, edited 1 time in total.



Sun Sep 21, 2008 7:35 pm
Profile
Professor

Joined: Fri Sep 19, 2008 1:22 am
Posts: 200
Post Re: Read TACHO value
They aren't attached to the LEGO parts. They are attached to the Tetrix parts. Notice the NXT CPU...


Attachments:
Tetrix Bot.JPG
Tetrix Bot.JPG [ 61.34 KiB | Viewed 3030 times ]

_________________
Jeff McBride
Benson Robotics Club
Sun Sep 21, 2008 7:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page 1, 2  Next

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.