Problem with Low Voltage Dual Serial Motor Controller

Hi,

I’ve just got an Orangutan Controller and a Low Voltage Dual Serial Motor Controller and I’m having trouble getting the motors to run. Here are the details:

  • Orangutan Controller powered from its own pack of 5-NiMh cells (~6V)
  • LVDSMC powered from its own pack of 3-NiMh AAA batteries (~3.6V).
  • Both ground lines from the controller and the LVDSMC are connected together.
  • The Logic Supply for the LVDSMC comes from the Orangutan board (middle terminal in JP7).
  • The reset line to the LVDSMC is connected to PD0 in the Orangutan and kept high after initialization.
  • The serial control input to the LVDSMC is connected to PD1 in the Oranguntan and commanded using USART0.
  • ALL the connections at the LVDSMC are soldered directly to the board without any connectors.
  • The LVDSMC is connected to a pair of motors from the Tamiya Double gearbox.
  • I put a .1uf ceramic capacitor across the leads of each motor.
  • The motors turn just fine when powered directly from the battery pack.
  • If the motor supply to the LVDSMC is NOT connected, the green or red LED’s in the LVDSMC light up as commanded by the program running in the Orangutan, so conections, initialization, commands, etc. seem to be OK.
  • I did not reconfigure the LVDSMC and I’m issuing commands for motors #2 & #3 (default settings).

Now to the problem: if the motor supply to the LVDSMC IS connected, the green or red LEDs light up very briefly (the motors might even move a bit), but the LVDSMC doesn’t accept any further commands until re-initialized. It seems it resets itself right after starting to move the motors.
This happens if I try to move either one or both motors at the same time, either in forward or reverse direction.

I checked with a scope for a sudden voltage drop in either the Motor or Logic Supplies, but I could’t notice anything significant.
I also checked for a raise of ground voltage at the LVDSMC terminals, but I didn’t see anything abnormal there either.

I found a problem with the reset line (connected to PD0), though: I noticed that with Motor Supply voltage present, the reset line went low and stayed there (~1.5V). This does not happen without the Motor Supply connected. I even switched to a different pin in the Oranguntan (PC3) and same result.

After everything initialized, I disconnected the reset line at the Oranguntan connector and then the motors ran just fine, no problems. The reset line at the LVDSMC stays high, save for a very brief drop (this might be causing some kind of lockup with the output in the Orangutan).

I’d appreciate any help as to why this reset line behavior might be happening (bad LVDSMC perhaps?). Thank you very much in advance for your cooperation.

Best Regards,

Nicolas

OK, I found a workaround, but I don’t think this is the way it is supposed to be done…
I ended up adding a diode (1N4148) with its anode to the LVDSMC reset line and the cathode to the PD0 output in the Orangutan. This way, PD0 can pull the reset line low, but not the other way around. It is working OK now, but I’d like to know if this is the way the connection to the reset line on the LVDSMC should be done. THANK YOU!

Nicolas

Hello,

I have just been looking into a similar problem reported by another customer. The problem you are seeing is probably due to noise from the motors since that is the main thing that connecting motor power would do. If you connect the motor supply but disconnect the motors, do you still have the problem?

Your solution with the diode is clever, and it does seem to indicate that the problem originates from the reset pin going low on the motor controller. I don’t know how that would happen since the pin is just the physical reset pin on the microcontroller (PIC12F629 ~MCLR input, in case anyone knows of problems with that pin)

If you want to avoid using the diode, you could try using your AVR output as an open-drain output: set the pin to low output for resetting, then switch back to input rather than driving high. The motor controller has a pull-up resistor on the reset line, so you don’t need to enable the pull-up on the AVR I/O line, though it shouldn’t hurt.

We will continue trying to reproduce the problem here; we would appreciate any additional details or ideas you can provide.

- Jan

Hi jan,

Thanks for the reply. I like the idea of switching the pin to an input; I’ll have to try it. I would also like to try with a 2ohm resistor (~1.5A, linear and no noise) and with a 5W, 3V light bulb (higher inrush current and no noise), just to see if it is an initial load problem or just noise.

I am going to be away until next week so I won’t be able to try anything else for now. As soon as I come back, I’ll get back on it and I’ll let you know if I found anything else.

I’ve got to make a confession, though. Hopefully it wasn’t the cause, but it might be related: initially, I had wired the connections to the LVDSMC “assuming” that the top row in the Oranguntan was Vcc and the middle row was Signal, whereas they are actually the other way around…So, the LVDSMC was receiving Vcc from PD0 & PD1 in the Orangutan, and the Reset and Serial Input lines were tied together to +5V. They were connected like this for less than a minute or so. Nothing smoked. Anyway, this obviously didn’t catastrophically destroy any components but it might have given them a different “character”.

I checked the I/O port diagrams from the spec sheets for the PIC12F629 and the ATMega168, but those diagrams are too simplistic to draw any conclusions.

Anyway, again, thank for the help. I’ll keep you posted if I find anything of interest.

Best Regards,

Nicolas

I recently had what may be a similar problem with a PIC16F88. It was hard to find, but I had forgotten to set the NOBROWNOUT fuse. When a load was turned on, the Vdd line on the PIC board dropped locally for a very short time to the point where the brownout detector caused a reset. Setting the proper fuse and adding a cap fixed it.

I looked at the 12F629 data sheet and was unable to determine whether it is possible for the ~MCLR line to be driven low. However, there is a comment that the WDT does not drive ~MCLR low, implying that other resets might.

Note that ~MCLR is also a programming pin so that subjecting it to voltages > Vdd might have unanticipated side effects.

–Jim

Hello,

I also have this problem. I’m using a MAVRIC IIB controller board (Atmega128 microcontroller), and would like to control a FA-130RA motor (3v, mabuchi-motor.co.jp/cgi-bin/ … D=fa_130ra) with the LVSDM. The symptoms were the same as described by Nicolas in his first post.

After implementing the solutions proposed in the previous posts (adding a diode on the reset line, setting the output pin as input on the AVR), the motor is now running, but still stops when I try to set a speed bigger than 0x20. I also tried to disable the brown-out detector, but it didn’t help.

Any idea?
Thank you very much for you help, it’s very frustrating to have this motor stopping before reaching maximum speed… :?

Guillaume

This probably isn’t going to help any of you guys, who are clearly well beyond my level in electronics. But in case some other newbie reads this thread, here’s another anecdote.

I saw the same problem yesterday when first testing a carrier board for the micro motor controller. The motors would turn briefly and then immediately stop. This was because I had neglected to connect the reset pin to anything; it was just floating. Adding a 4.7K resistor to Vcc (as described in the manual) cured the problem.

So, while it sounds like you guys are dealing with some more subtle problem, here’s a simple newbie mistake that can cause the same symptoms.

Best,
— Joe

If you’re getting predictable resetting as your speed setting goes up, it’s most likely your power supply not being able to deliver the necessary power. If you’re using one supply, consider using two or at least adding a lot of capacitance across it to help with the bursts of current the motors draw. If you’re already using two supplies, be careful about how your ground is wired (ideally, the two grounds meet at the motor controller, with power wires routed away from signal wires).

You’ll need to be more specific about your power setup if you need more specific responses.

- Jan