Page 1 of 1
EV3 New Tacho
Posted: 06 Oct 2013, 16:50
by pepijndevos
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?
Re: EV3 New Tacho
Posted: 07 Oct 2013, 13:18
by afanofosc
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?
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;
John Hansen
Re: EV3 New Tacho
Posted: 07 Oct 2013, 13:19
by afanofosc
The NXT and EV3 large motors are both detected as TYPE_NEWTACHO, iirc.
John Hansen
Re: EV3 New Tacho
Posted: 08 Oct 2013, 11:00
by pepijndevos
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.
Re: EV3 New Tacho
Posted: 08 Oct 2013, 17:46
by afanofosc
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
Re: EV3 New Tacho
Posted: 08 Oct 2013, 19:25
by pepijndevos
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.
Re: EV3 New Tacho
Posted: 09 Oct 2013, 09:53
by HaWe
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....
Re: EV3 New Tacho
Posted: 09 Oct 2013, 13:39
by gloomyandy
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
Posted: 14 Oct 2013, 05:24
by mightor
There are different PID values in the kernel that get used, depending on the motor type.
= Xander
Re: EV3 New Tacho
Posted: 22 Oct 2013, 16:30
by holler
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:
Code: Select all
SETMotorType(Tmp, Buf[Tmp + 1]); // Motor types can be: TYPE_TACHO, TYPE_NONE, TYPE_MINITACHO
which doesn't mention TYPE_NEWTACHO.
Alexander Holler