ROBOTC.net forums
http://robotc.net/forums/

Read TACHO value
http://robotc.net/forums/viewtopic.php?f=1&t=720
Page 1 of 2

Author:  Thibaud [ Thu Sep 11, 2008 5:05 am ]
Post subject:  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

Author:  Dick Swan [ Wed Sep 17, 2008 8:50 pm ]
Post subject:  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

Author:  Thibaud [ Thu Sep 18, 2008 3:42 am ]
Post subject:  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.

Author:  Dick Swan [ Thu Sep 18, 2008 9:36 am ]
Post subject:  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.

Author:  starwarslegokid [ Sun Sep 21, 2008 5:48 pm ]
Post subject:  Re: Read TACHO value

The Hitechnic motor controller looks really nice

Image

Scott B-)

Author:  Ford Prefect [ Sun Sep 21, 2008 6:14 pm ]
Post subject:  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?

Author:  starwarslegokid [ Sun Sep 21, 2008 6:17 pm ]
Post subject:  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-)

Author:  Ford Prefect [ Sun Sep 21, 2008 6:42 pm ]
Post subject:  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 :?

Author:  Jeff McBride [ Sun Sep 21, 2008 7:09 pm ]
Post subject:  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

Author:  starwarslegokid [ Sun Sep 21, 2008 7:17 pm ]
Post subject:  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

Author:  Ford Prefect [ Sun Sep 21, 2008 7:21 pm ]
Post subject:  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 :?

Author:  Ford Prefect [ Sun Sep 21, 2008 7:25 pm ]
Post subject:  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: )

Author:  Jeff McBride [ Sun Sep 21, 2008 7:26 pm ]
Post subject:  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

Author:  Ford Prefect [ Sun Sep 21, 2008 7:35 pm ]
Post subject:  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

Author:  Jeff McBride [ Sun Sep 21, 2008 7:53 pm ]
Post subject:  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 8661 times ]

Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/