Trex Junior Connection Question

I am working with the Trex Jr hooked up to a computer, I am troubleshooting some unexpected behavior:

My program basically sends 4 bytes through Pololu’s USB Serial adapter 15 times a second.

Here’s what the bytes are:

motor 1 Set Speed Command (0xCA or 0xC9)
motor 1 Speed - (0-127)
motor 2 Set Speed Command (0xC2 or 0xC1)
motor 2 Speed - (0-127)

Another part of the program changes the speeds based on input from a webcam. It was working for a while, but recently started either stopping unexpectedly, or not stopping unexpectedly. The program still sees the device as connected, and continues sending bytes, but the Trex Junior seems to stop receiving new commands.

Any ideas?

Hello.

Can you tell me more about your setup? What is your power supply? What kind of current do your motors draw? How have you verified that the problem is with the TReX and not your code?

- Ben

The two motor’s specifications are:
RPM: 5040-6300 (5040 Max. Efficiency)
Voltage: 1.5-3V (1.5V Recommended) (4.5 V max)
Amperage: .64A

The power supply is:
9Volt
1.5Amp

The max power going to either of the motors is 90 (out of 127)

You still haven’t really answered my questions, at least not to the point where I can help you much. What exactly are you using for a power supply? What is putting the 1.5A restriction on its output? When you say the motor amperage is 0.64A, is this stall current or free-run current, and at what voltage is this current draw being measured?

One problem I immediately notice is that you’re putting 9V across your 1.5V-recommended motors. If your system used to work and now it is experiencing problems, perhaps the motors have been damaged from using them out of spec?

Also, you didn’t address my question about the steps you have taken to check whether the problem is with your code.

- Ben