EV3 New Tacho

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

EV3 New Tacho

Post 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?
-- Pepijn
http://studl.es Mindstorms Building Instructions
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: EV3 New Tacho

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: EV3 New Tacho

Post by afanofosc »

The NXT and EV3 large motors are both detected as TYPE_NEWTACHO, iirc.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: EV3 New Tacho

Post 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.
-- Pepijn
http://studl.es Mindstorms Building Instructions
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: EV3 New Tacho

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: EV3 New Tacho

Post 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.
-- Pepijn
http://studl.es Mindstorms Building Instructions
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: EV3 New Tacho

Post 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....
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Re: EV3 New Tacho

Post 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.
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: EV3 New Tacho

Post by mightor »

There are different PID values in the kernel that get used, depending on the motor type.

= 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)
holler
Posts: 23
Joined: 21 Oct 2013, 19:43

Re: EV3 New Tacho

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests