How can i tell if my low-volt DSMC is bad?

I just got my first (pair of) the low-voltage DSMC, and I soldered the pin header that came with it, plugged it into my BASIC Stamp Homework Board™, wired it like p.4 in the DSMC manual, and tested it. Problems! :frowning:

  1. instead of soldering caps across the motor leads as suggested, i plugged in two 0.1uF caps across the DSMC motor pins using the solderless breadboard on the Homework Board; i thought that would be equivalent. Is it?

  2. I typed in the sample from p.10. When I ran it with a pair of NiMH AAs in series as the motor supply, but no motors attached (with those caps across the motor pins, though!), the red LED nearest the biggest chip on the DSMC lit, glowed gradually brighter (until very bright!), gradually dimmed to off; then the green LED next to it did the same; then the power LED on the Homework Board went off. This was repeated several times by pushing the reset button on the Homework Board. I thought all was well. Was it a bad idea to test it like that, with the motor supply power but no motors (and with the caps as described)?

  3. When I hooked up the motor & the (~3V) motor supply, it worked OK but the motor ran pretty feebly (it barely ran). So I tried using a 4 AA pack; the motor ran better, but the batteries became very hot – so hot they melted the plastic battery holder, in fact, ruining it! Note that the motors I’m using (Tamiya twin gearbox) run fine with a pair of AAs directly connected. How can I tell if I burned out my DSMC, or shorted something while soldering the header pins on?

  4. Speaking of soldering header pins, is it possible to buy the DSMC with header pins pre-soldered? I have a hard time soldering on such a small scale, so the odds that I shorted two adjacent pins are pretty good.



I’m sorry to hear about your problems. Here are responses to your questions:

  1. Your capacitor setup is not equivalent to having the caps on the motors. The caps should be as close as possible to the motors, but I don’t think that is the cause of your problem.

  2. Your test is fine. One more intermediate step would have been not applying the motor power and running your program since the LEDs would still give you feedback.

  3. It sounds like you have some kind of short. Can you look at your board with a magnifying glass to see if you can locate it?

  4. If you can’t get it working, contact us directly for return authorization, and we will fix your unit or send you another one with the pins soldered in (make sure you ask whoever you talk to).

- Jan

well, under the magnifying glass, I can’t see any actual solder bridging adjacent pins, but the PCB looks shiny between the pins in several places. From what I recall about soldering, that’s not a good thing?

Since the sample program only exercises one of the motors, I wanted to see if the second motor would work, so I did some copy-paste-modify on the code so that all four LEDS now light in sequence, red, green, red, green (I just copied the four loops to make 8, and changed the last 4 to control motor 1 instead of motor 0). It runs fine without the motors (I removed the caps), with or without the motor supply (2 AAs in series) – based on seeing the LEDs light up in sequence, that is. But when I hook up a motor to either of the outputs, the program seems to hang up before the first red LED (if I connect motor 0 and not motor1) or the second red LED (if I connect motor 1 and not motor 0) reaches full brightness. The motor spins, and the batteries aren’t getting hot, but the program just remains in that state until I reset it.

Does this provide a different clue, or does it still sound like a short?

By the way, if I am able to exchange it for one with pins soldered, that seems like pretty good service – I would not complain about that. Thanks!


It sounds like a different problem now. Perhaps you just had temporary short in your wiring earlier.

The new problem is probably due to noise from the motors. The motors that come with the Tamiya gearboxes can be extremely noisy, and that noise can get into your circuit in all kinds of ways (just having the motor running nearby, in a completely separate circuit, can cause enough noise to make circuits stop working). Here are a few tips for dealing with the noise:

Keep your power wires as short as possible and away from your signal wires.

Twist your power wires together.

Put capacitors on all lines that don’t need to change rapidly (i.e. the serial line–caps on that would degrade your signal). Something like a 0.1 uF and 1-10uF cap in parallel could be good on the logic supply and the reset line; for the motor power line, pretty much anything you can get on there will help. (Small caps in parallel with big capacitors might seem counterintuitive if you only look at the total capacitance, but the frequency responses of different-sized capacitors vary.)

You might have to give up on wiring things through the breadboard.

Keep the grounds as separated as possible. Ideally, the grounds of your two supplies would meet just at the motor controller.

- Jan

“keep power wires … short”
“Twist your power wires together.”

I’m sorry, I don’t know which wires to twist together.

which are the “power wires”? All my wires are as in the manual’s p.4 diagram. I have soldered a 0.1uF cap across the motor leads as in the bottom motor in the p.4 diagram. Power wires are the two from the motor battery? Or all the wires colored red in that diagram? Or all the wires colored red or black? Why is their length an issue?

“Put capacitors on all lines…”

What does that mean? Can you be more explicit about how to connect these caps? I understand what it means to put two caps in parallel; is breaking a line into two parts, connected by a capacitor, what you mean? Like:

from: a-----------------b
to: a-------||--------b

I tried connecting the Vdd (5V logic supply) from the Homework Board header to the Pololu through a 0.1uF cap like that, but that didn’t work at all (the DMSC LEDs never even lit up).

Why do I have to give up the breadboard? I also don’t understand the benefit of keeping the grounds separated, since they are electrically connected at the DMSC pin anyway.

This is proving to be harder than I had hoped – but I imagine you have an even harder job, trying to help someone as clueless as I am!

additional clues:

  1. everything still works when no motor is connected (as indicated by the LVDSMC LEDs, that is).

  2. When the motor is connected, it usually starts and just continues indefinitely; occasionally it starts and stops almost immediately; and usually, the power light on the Homework Board goes off just after, or as, the motor starts running. There is often an audible “hiccup” from the motor coincident with this, as though it is momentarily losing its power.

The motor is an Aristo-Craft CRE-RE260, fwiw; voltage range 1.5-3.0V, no-load current 250mA, according to the package.

reluctant to abandon my breadboard, I conducted some more experiments. I changed the pins being used for the reset and serial lines from 15 and 14, as in the sample on p.10, to 11 and 0. Theory being: maybe when I had the short, I damaged the BS2 somehow. The behavior changed: now, with the motor connected as motor 0, the system acted as though the BS2 was being reset when the motor sped up to a certain point. The red LED increased in brightness up to a point, the motor speed increased to that point, then the Homework Board power light would flicker momentarily, and the cycle would repeat… indefinitely.

Next, I tried to rewire the same circuit using a Board of Education & BS2 I also have, trying to isolate that variable, as it were. Same behavior!

Next, based on some comments I saw here in other threads, I removed the reset line entirely. Bingo! Now it works as expected. I have two motors, each with a 0.1uF cap across its leads, everything wired as in the p.4 diagram, code as on p. 10 but modified to exercise each motor in turn, and it all works! So, motor noise may have been the cause, but removing the reset line has apparently “solved” the problem, whatever it was.

Now to wire it up to the actual robot… :slight_smile:

After I got it to work on the Board Of Education, I tried to move the circuit back to the Homework Board, with the reset line removed – but that still did not work. I conclude that the Homework Board can’t quite supply the juice that the LVDSMC needs. I think it might work if I kept the motor speed low enough.

I tried a servo test circuit & code from the Homework Stamp manual, using the Homework Board, & it works as expected, so apparently the Homework Board wasn’t damaged (at least, I can still use it for some things).