NXT motor: use as an encoder with removed motor?

Discussion specific to the intelligent brick, sensors, motors, and more.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: NXT motor: use as an encoder with removed motor?

Post by hassenplug »

mattallen37 wrote:
hassenplug wrote:...Thanks for a good idea. I have a couple spare motors sitting around, I just need to figure out how much needs to be removed, to make it work...
It is not really a matter of removing stuff from the motor. First, you need to break the orange piece to even get it apart. Once opened, you will realize that the motor shaft and gear itself are required to bridge mechanically to the encoder.
Well, yes, it is about removing stuff from the motor. And yes, if you take the motor shaft out, there will be problems. But maybe the magnets can be removed from the motor itself. I think that would allow it to spin more easily.

And, what else can come out?

Don't worry, Philo, if I do this, I'll send you the pictures. :)

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
philoo
Posts: 76
Joined: 29 Sep 2010, 09:04
Location: Paris, France
Contact:

Re: NXT motor: use as an encoder with removed motor?

Post by philoo »

Yes, that may be workable, the motor is relatively easy to remove. What I fear is that motor down gearing (which in this case will act as up gearing) will bring relatively high friction, even with disabled motor. But indeed that's something to try (for a very good price compared to other encoder solutions!). Thanks in advance for the photos ;)
Philo
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT motor: use as an encoder with removed motor?

Post by mattallen37 »

doc-helmut wrote:What I need is something to buy, connect, and run. I can't build H-Bridges because I can't solder anything, it must be something which is finished to plug it to Lego (ok, I can cut a wire in two and fasten some small banana plugs or a terminal block to both ends and a resistor in between, and I maybe can break a motor out of it's housing). I mentioned this already some times before.
In general I don't use any electronic equipment (and I didn't ever), that's why I use Lego and no other robotic accessory where you need experimental boards , capacitors, resistors, transistors, ICs or what else and soldering stuff.
A lot you can do with a solderless breadboard. I only solder maybe 10% of the successful circuits I build.
doc-helmut wrote: @matt:
And yet another option, is to make room for another NXT to use rotation sensors
no way.
Why not? This seems like the most effective method, and the easiest overall (especially if you already have the NXT).
doc-helmut wrote:
Another approach, would be to use the NXT motor ports to drive the tetrix motors through H-Bridges (forget about the tetrix controller). The main issue here, is that they can draw quite a bit of power, so you would probably have to build the H-Bridge using fets (not as simple as an IC H-Bridge). You would drive the NXT motors directly, normally.
can you build 2 of it and sell it to me? How much would it cost? ;)
I rarely build electronics to sell. This would be one of my most advanced projects to build on a perf-board. Can you use a multimeter enough to get me some basic information about the motors? I would need either that, or a datasheet for them. The actual cost, would be very hard to determine without knowing the max current the motor can pull, and any other possible requirements (size restrictions...).

Just as an idea for cost, here is a small list of parts that I think would be needed.
  • Perf board $5
    NXT sockets $6
    NXT motor H-Bridges $4
    Screw terminals $4
    misc. stuff (wire, solder...)<$5
This list does not include the H-Bridge for the tetrix motors. That could cost around $5-$25 (depending on power requirements). And of course I am forgetting something that I just can't think of yet.

Those price estimates are in USD, and are for two channels (two tetrix motors, and two NXT motors). The total based on my guesses would be around $40 USD for the parts themselves, excluding shipping from 2 or 3 companies to me, and then to you. My guess as to a total for parts and shipping would be something like $70 USD, or 50 Euro.

The only functionality issue I foresee, is the ability to brake the motors (shorting them to resist rotation), as you can with the NXT, and possibly with the tetrix controller. You could however, do a powered brake (set current position as absolute position) to stop the motors from turning.
doc-helmut wrote:
A resistor would work, but you would need a power resistor to get any motor power from it. Since the NXT motor is mostly for the encoder, you could use a resistor that is fairly high resistance, and not get much power from the NXT motor. Powering the motor would only be for it to turn over easily, not for added torque.
how many Ohms should the resistor have?
It is not as much a resistor ohm value, as it is a power issue. You would need a high power resistor. This is definitely not the way I would go. As an actual ohm value, probably anything from around 2-50 ohms. Using this method, the motor would only be powered to reduce drag (no torque advantage).

As a conclusion to all of this, I think building a controller/H-Bridge board is possible (somewhat risky that it would be a waste of money), but I would definitely first attempt the additional NXT with RS485, and rotation sensors.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT motor: use as an encoder with removed motor?

Post by HaWe »

Did you read what philo wrote...?
philoo wrote:No, a resistor is NOT a good idea. To drop 3V with motors consuming 1A, you need a 3 Ohm/3 Watts resistor. But this same resistor will drop only 0.3V when the motors are off and NXT consumes a mere 100mA -> the NXT will get 11.7V and will fry. What you would need is a voltage regulator...
But anyway, I don't use electronics, breadboards are far too big and too unstable, I own not even a multimeter (I never would use it). I simply don't like electronics (actually I HATE electronic parts, and there's definitely only 1 thing I hate that much: Java).
;)
Also an extra NXt is no option (just believe me), but I'll gladly take your H-bridge for the Tetrix motors (2 single better than a tandem system, each plugged to 1 NXT motor port (!!!), in order to control the 2 Tetrix motors directly by the 2 NXT ports ). I have no sensor port left!
Tell me when you're finished, I can send you the money by Paypal, you may ship it by UPS!

Meanwhile, I'll wait for S.H.'s reports of removing the NXT motor out of it's housing ;)
Last edited by HaWe on 06 Apr 2011, 20:23, edited 3 times in total.
nxtreme
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: NXT motor: use as an encoder with removed motor?

Post by nxtreme »

I could be wrong, but don't some motor driver chips (i.e. L293D) drop the voltage a bit? If this link is correct, they would drop the voltage by about 1.5V, and then a couple diodes could drop it the other ~1.5V. That would almost work. The SN754410 is a suitable replacement for the L293D, cheaper and it has built in protection diodes. I'm not sure about the voltage drop though...
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT motor: use as an encoder with removed motor?

Post by HaWe »

as I wrote, I don't use electronic parts (especially no ICs), and I guess diods will interfere with the +/- PWM control...
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT motor: use as an encoder with removed motor?

Post by HaWe »

Can you use a multimeter enough to get me some basic information about the motors?
no multimeter but some data:
12-15V=, 5A each
please notice that I need all motors ( 2* (1 NXT plus 1 Tetrix motor each)) to be attached at the 2 NXT motor ports just like the original 2 NXT motors!
(I have no sensor port left and I need the NXC motor control cmds for all of them (e.g. RotateMotorPID or the fixed encoder targetting))
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT motor: use as an encoder with removed motor?

Post by mattallen37 »

Okay, I think I understand what you are asking for. I also think I have found the solution. Take a look at this motor driver, and also this one. The first can drive 15 amps continuously, and the second can drive 9 amps continuously. Either should work with a 12v battery. I am pretty sure you could use either almost directly with the NXT motor output. I don't know specifically about the brake function though...

To drive the NXT motor, you could use a very simple, inexpensive H-Bridge IC.

The only thing I can see as a possible issue with this concept, is the fact that we wouldn't be using the H-Bridges exactly as they are intended (as far as hookup). To use them properly, the user would normally supply at least 4 IO's (for full function of the driver), but instead we would be trying to use just 2, with a very interesting twist. I can foresee a few things as a result. For one, it would probably be a braking PWM power mode (On for n% of the duty cycle, and brake for 100-n%). I am not sure, but I suspect the NXT might do this normally (I really should check). It would allow for better speed control, but requires more electrical power, and is somewhat harder on the motor. Also, it wouldn't allow for floating a motor. The other issue, is that PWM switching states might be slower, due to the fact that we would be providing PWM on the dir pins, and tying PWM high.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXT motor: use as an encoder with removed motor?

Post by HaWe »

matt,
I don't understand much (actually: nothing) of the technical stuff. I'm not experienced in any electronics and don't understand most of the terms.

To my opinion the original NXT PWMs should stay as they are, they should be led to the NXT motor without any change (also the encoder cables). So the NXT motor at each port can be controlled as usual.
Then the system should have a Y-splitter (port splitter) which leads only the 9V motor cables parallel to a sort of DC/DC power amplifier which has an extra power supply (12V) and does nothing else than amplify the ±9V NXT-PWM to a ±12V 5A = 60VA power PWM signal for the Tetrix motors. The only point is that it has to amplifiy both polarisations (for forward and reverse) in the same way.

If this won't ever work another option might be to build a construction to connect the RCX rotation sensors to the NXT MOTOR port encoder inputs.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT motor: use as an encoder with removed motor?

Post by mattallen37 »

I know what you want, but without hacking the PCB, I don't think you can have the exact control you are looking for. You would still have speed control, I just don't think you could have brake (or float?). If you added a PCF8574 (for extra IO's), you should be able to have float and brake (would require a very simple custom NXC function).

If the NXT motor is being driven directly by the NXT, and not through an "extra" H-Bridge, I think it might cause speed errors for the tetrix H. The motor will act something like a cap, potentially causing errors. For example, the high power H might see feedback, and think it is 100% duty, even at 20% PWM. I think the "extra" H-Bridge would be required.

Most of (actually, I think all of) these issues could be solved by hardcore hacking of the NXT PCB.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests