EV3 New Tacho
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
EV3 New Tacho
Hey,
I found that the firmware identifies my small motor as TYPE_NEWTACHO rather than TYPE_MINITACHO as seems to be the case for the author of the library.
Does anyone know what the difference is between the two?
This sort of ruins portability of detection code, if one set's small motor is a MINITACHO while another set contains a NEWTACHO. Could it be said that NEWTACHO and MINITACHO are both the small motor, or are there other kinds of motors that also identify as NEWTACHO?
I found that the firmware identifies my small motor as TYPE_NEWTACHO rather than TYPE_MINITACHO as seems to be the case for the author of the library.
Does anyone know what the difference is between the two?
This sort of ruins portability of detection code, if one set's small motor is a MINITACHO while another set contains a NEWTACHO. Could it be said that NEWTACHO and MINITACHO are both the small motor, or are there other kinds of motors that also identify as NEWTACHO?
-- Pepijn
http://studl.es Mindstorms Building Instructions
http://studl.es Mindstorms Building Instructions
Re: EV3 New Tacho
The logic is as shown below. Perhaps the value of Value5Float can be affected by batter voltage levels? Do you see different results with nearly dead batteries vs brand new alkaline batteries?
John Hansen
Code: Select all
if (OutputPort[Port].Value5Float < OUT5_BALANCE_LOW)
{
if (OutputPort[Port].Value5Float > OUT5_MINITACHO_HIGH2)
{
(*pAnalog).OutDcm[Port] = TYPE_NEWTACHO;
}
else
{
if (OutputPort[Port].Value5Float > OUT5_MINITACHO_LOW2)
{
(*pAnalog).OutDcm[Port] = TYPE_MINITACHO;
}
else
{
(*pAnalog).OutDcm[Port] = TYPE_TACHO;
}
}
(*pAnalog).OutConn[Port] = CONN_OUTPUT_TACHO;
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Re: EV3 New Tacho
The NXT and EV3 large motors are both detected as TYPE_NEWTACHO, iirc.
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: EV3 New Tacho
What is this "Value5Float" thing? I don't have alkaline batteries, but for me, the large motors are "normal" tacho and the medium is "new" tacho. My Glide Wheel is detected as error.
-- Pepijn
http://studl.es Mindstorms Building Instructions
http://studl.es Mindstorms Building Instructions
Re: EV3 New Tacho
I believe that Value5Float is a floating point typed variable containing the value read from pin 5 but I could be wrong. How are you determining the value that the firmware is reporting for your motors? This is not something easy to see other than via pictures shown in the EV3 software or via the on-brick port view tool. What picture shows for these motors using these two tools (or the BricxCC live sensor view tool)?
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 175
- Joined: 28 Dec 2011, 13:07
- Location: Gelderland, Netherlands
- Contact:
Re: EV3 New Tacho
That just show m-motor-deg and l-motor-deg respectively. These map to type 7 and 8. NEWTACHO is 9, which seems to map to FREE?!
I got the NEWTACHO value from the C++ api aholler is writing. Though I just replaced my batteries, so I will need to check with the C++ API to compare.
I got the NEWTACHO value from the C++ api aholler is writing. Though I just replaced my batteries, so I will need to check with the C++ API to compare.
-- Pepijn
http://studl.es Mindstorms Building Instructions
http://studl.es Mindstorms Building Instructions
Re: EV3 New Tacho
just out of interest:
why has the C API to detect a motor anyway?
Rotating either motor 360° keep rotating either motor 360°, even if I exchange 1 motor by the other, pls CMIIW....
why has the C API to detect a motor anyway?
Rotating either motor 360° keep rotating either motor 360°, even if I exchange 1 motor by the other, pls CMIIW....
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: EV3 New Tacho
The movement may be the same (though actually I have a feeling the kernel module may use slightly different PID values for the two motors), but you may want to have software that says "plug the large motor into one port and the medium motor into another" and have the software auto configure, just like it can for the sensor ports. Also the different motors certainly have different characteristics so I can imagine you may want to adjust control parameters in some circumstances. You may not need it all of the time but I can see it having uses.
Re: EV3 New Tacho
There are different PID values in the kernel that get used, depending on the motor type.
= Xander
= Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: EV3 New Tacho
The different PID values are for large and small motors.
But the original question was, what the differences is between the small motor which (internaly) identifies as TYPE_MINITACHO (I have got such a small motor with my EV3 set) and the small motor pepijndevos seems to have got with his EV3 set, which identifies as TYPE_NEWTACHO.
My large motors (both NXT and EV3) do all identify themself as TYPE_TACHO.
So it looks like there are two types of small EV3 motors around which do look the same but identify internally as different types.
And I don't see how those two types of small motors are handled different. In fact d_pwm.c only knows about TYPE_MINITACHO and TYPE_TACHO, I don't see TYPE_NEWTACHO mentioned there. There is even that line in the source:
which doesn't mention TYPE_NEWTACHO.
Alexander Holler
But the original question was, what the differences is between the small motor which (internaly) identifies as TYPE_MINITACHO (I have got such a small motor with my EV3 set) and the small motor pepijndevos seems to have got with his EV3 set, which identifies as TYPE_NEWTACHO.
My large motors (both NXT and EV3) do all identify themself as TYPE_TACHO.
So it looks like there are two types of small EV3 motors around which do look the same but identify internally as different types.
And I don't see how those two types of small motors are handled different. In fact d_pwm.c only knows about TYPE_MINITACHO and TYPE_TACHO, I don't see TYPE_NEWTACHO mentioned there. There is even that line in the source:
Code: Select all
SETMotorType(Tmp, Buf[Tmp + 1]); // Motor types can be: TYPE_TACHO, TYPE_NONE, TYPE_MINITACHO
Alexander Holler
Who is online
Users browsing this forum: No registered users and 0 guests