Page 3 of 6
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 08:39
by HaWe
Sounds like you just need more NXTs.
I have 4 of them but I also only have room for 4, and I can connect them only by BT (because of construction reasons), so having more wouldn't help. :(
(edit: and I already am using sensor multiplexers!)
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...
gladly looking forward to your reports if you have managed to figure it out!
:)
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 09:37
by mattallen37
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...
Steve
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.
@helmut, how about using a stock NXT motor, as well as the tetrix motor. Instead of using the NXT motor only as an encoder, you could also power it so you don't have to worry about the drag. Both the tetrix and the NXT motors are geared to around the same speeds. You could use the NXT motor encoder to determine rotation like you want. This setup should be as good as any involving using an NXT motor for it's encoder.
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 10:15
by HaWe
thank you matt,
that indeed was what I already was thinking about too. But as usual of course it won't be as easy to do as it sounds at the first sight:
I always have to be sure that both motors will run synchronized with 10, 20, 30,...90, 100% power forward and the same backwards all the time. A little tricky if the motors are ramped up or down and rather tricky if the Tetrix and the NXT motors are to be run by PID mode to reach a target, because I can't predict at what time they will run by which power (forward, reverse, or alternating forw/rev when approximating a target in cases they have been intermediately overshooting the target).
But a good idea anyway, I'll try it and will see if the issues can be handled.
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 10:30
by mattallen37
Or if you are willing to deal with electronics, you could use the tetrix motor output PWM to drive an H-Bridge that is connected to 9v, and to the NXT motor. This would run the NXT motor at the same PWM duty cycle as the tetrix motor.
Another option, is to risk burning the NXT motor, by running it at 12v. You could connect it in parallel to the tetrix motor. This would be the easiest, but it would also burn out the NXT motor sooner.
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 10:41
by HaWe
Building a H-bridge for the Tetrix motor is too much a botched job to me (do you say so?)...although it would be the easiest way for motor control because I could use the NXC fw IOmap.
Another option, is to risk burning the NXT motor, by running it at 12v. You could connect it in parallel to the tetrix motor. This would be the easiest, but it would also burn out the NXT motor sooner.
yeah, that's indeed a real good new idea - maybe with a resistor in line...? (not sure about that, perhaps it means grilling the resistor over the time - what Ohm should it have if possible?)
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 11:35
by mattallen37
doc-helmut wrote:Building a H-bridge for the Tetrix motor is too much a botched job to me (do you say so?)...although it would be the easiest way for motor control because I could use the NXC fw IOmap.
It actually wouldn't be all that hard IMO, to build an H-Bridge running on 9v. It wouldn't be for the tetrix motors, but rather for the NXT motors. I am not sure what you mean about the IOmap though.
doc-helmut wrote:yeah, that's indeed a real good new idea - maybe with a resistor in line...? (not sure about that, perhaps it means grilling the resistor over the time - what Ohm should it have if possible?)
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.
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.
And yet another option, is to make room for another NXT to use rotation sensors (either the HT ones, or the old RCX ones). You could connect this NXT to one of the others through RS485. It would add two sensor ports (the original NXT as you have now with all four ports used, minus port 4 for RS485, plus 4 ports on the new NXT minus port 4 equals 6 ports; four for the original sensors, plus two for the rotation sensors) exactly the same number, plus 2 for the rotation sensors.
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 16:29
by HaWe
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 mybe 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.
Also hardware programming is not my part.
What I'm doing is programming artificial intelligence robotic algorithms (pathfinding, neural nets, self-training and modifying programs, hierarchical behavioral programming by subsumption, pattern recogniton, and trying approaches of classical and operand conditioning to robots), using a high-level programming language (almost likely to C), no low-level or hardware thing.
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 16:46
by sidneys1
doc-helmut wrote:...I can't build H-Bridges because I can't solder anything...
Then why don't you get a
soldering iron kit? (some soldering required!) [/offtopic]
I like this idea, however, mattallen is correct. The motor drive shaft needs to be in place to connect the encoder to the output shaft. However,
you don't need to break the orange peice to gain access. It's just tricky. If you can find a 10-tooth gear to bridge where the motor shaft goes, then this idea should work fine.
Have a nice day,
~Sidneys1
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 16:48
by HaWe
as I 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.
@matt:
And yet another option, is to make room for another NXT to use rotation sensors
no way.
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? ;)
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?
Re: NXT motor: use as an encoder with removed motor?
Posted: 06 Apr 2011, 16:59
by philoo
how many Ohms should the resistor have?
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 then
Also hardware programming is not my part.
... something that I perfectly understand since I am on the other side of the frontier