2
\$\begingroup\$

It's a long story. Please bear with me as I try to describe what I intend to accomplish.

I've got a Raspberry-PI controlled Lego Technics (pre-Mindstorms era stuff) construction.
It uses a couple of 1980's Lego motors, that are normally be powered by 3 C-size 1.5V batteries in series: Effectively some 4V to 4.5V.

The motors appear to be just that: No fancy electronics, overload protection, rectifier circuity, at all. (There may be an internal capacitor in parallel, like in the newer 9V Lego motors, but that would be just about it.) The battery-box only contains a mechanical switch with neutral, left and right positions. Single 2 wire lead from battery-box to motor. (Polarity gets reversed to change direction of motor.)

I'm not directly switching the power to the motors from the PiFace. I found a relay with 2 inputs (cutoff and polarity) which mimics the behavior from the mechanical switch on the battery-box and which completely isolates the "controlling" circuitry from the "controlled" circuitry. (I know I'm not using the proper terminology for relays, but I hope I'm clear.)

It made sense for me to use that, to make sure the rather delicate Pi/PiFace doesn't get sprayed with electric noise from the motors, when the polarity reverses.

The entire setup is now working, using the original battery-boxes, to power the motors.
As they eat batteries at an alarming rate I'm interested in powering these motors with a 5V feed from the power-supply that currently feeds the Raspberry-Pi and PiFace that control the Lego motors.

The PSU is actually a normal 450W computer PSU, where one of the 5V leads is brought outside the case to feed the hobby-project. The computer itself is always on (drawing abotu 250W), so there is no issue with using an unloaded or severely under-loaded switching PSU.

My days of analog electronics are 25 years behind me. I was never any good at it either. (I'm a digital guy.)

Even so I'm quite certain I better not wire this up "as is". (I do know enough to know when I need a bit of help.)

  • Will 5V straight from the PSU fry the motor? I guess some sort of voltage (and maybe current) limiting circuit is desired. (I don't have any spare motors, so this really worries me.)
  • Will the induction of the motor-coils cause stability issues with the PSU when suddenly reversing polarity to the motor. I can, in software, introduce a "not-powered" period, between reversing the polarity if needed, but how long should that period be?
  • If a limiting circuit (1st point) is used how will that affect point 2?

Has someone tried something like this before? Any guidance will be appreciated.

\$\endgroup\$

4 Answers 4

2
\$\begingroup\$

In my opinion you are good to go.

.5V more for a dc brushed motor that normally accepts 4.5V is not an issue at all. That's a bit over 10% increase in voltage, that's not much. You can assume that the lego guy that designed the system choose a motor with a maximum voltage much higher than its normal operating voltage. If there's a cap inside it's probably (certainly) rated for much more than 4.5V

About the EM emissions/disturbance on the power lines remember that:

  • the Pi has its own filtering stage that is probably designed to handle much worse disturbances
  • the psu is so oversized that it would barely notice a change in load
  • there's plenty other disturbances going around coming from your pc

My advice is: try it out. It's not like you are going to blow up anything. Keep the motors on and see if they get hot (that is very unlikely), then sketch down a program that switches polarity (no off time) let's say once a second or so, and see if the pi is concerned about that. If something go wrong come back here and we can help you to design a filter circuit that can reduce the disturbances on the power lines.

I'd like to see the circuit you are using to power the relays from the Pi, that's because disturbances are much more like coming from there.

disclaimer
I think my advice applies here because it seems we are talking of a guy who wants to hack together a robot or something similar. If you want to design a reliable thing that will be produced you better choose carefully the motors and their power sources.

\$\endgroup\$
7
  • \$\begingroup\$ The relays are operated by the Pi without issues. I don't use the 5V from output block on the PiFace, but straight from the PSU. The relay is in series with a 1K-Ohm resistor and an OC contact on the PiFace. This is taken straight from the reference sheet from the relay which had a sample "how to control the relay by an OC output" schematic. \$\endgroup\$
    – Tonny
    Commented May 30, 2014 at 9:46
  • \$\begingroup\$ do you include a protection diode? I did not know that the pi could supply that much current. \$\endgroup\$ Commented May 30, 2014 at 9:48
  • \$\begingroup\$ The setup is a double bascule-bridge (somewhat like Tower bridge in London) which opens and closes and has moving traffic barriers and working traffic lights. The motors operate the bridge and barriers. Pi controls the motors and the traffic lights. Whole thing is used for school-demo's to get kids (age 9-11) interested in technology. \$\endgroup\$
    – Tonny
    Commented May 30, 2014 at 9:51
  • \$\begingroup\$ Oops, my bad. 1 MegaOhm and I forgot about the diode. \$\endgroup\$
    – Tonny
    Commented May 30, 2014 at 9:52
  • 1
    \$\begingroup\$ I take your word for it. (In fact I wondered if it was right too.) I didn't make this circuit myself, my cousin did. The actual equipment is currently 300 kilometers away and that includes the schematics. Last I've seen them was 3 months ago. It works, but I am far from certain if it is really wired up as that schematic he showed me then. I never bothered to check the circuit myself. I just did the software and (part of) the mechanical build. \$\endgroup\$
    – Tonny
    Commented May 30, 2014 at 10:00
2
\$\begingroup\$

Will 5V straight from the PSU fry the motor? I guess some sort of voltage (and maybe current) limiting circuit is desired. (I don't have any spare motors, so this really worries me.)

5V will probably be OK. The amount of work the motor does depends on the mechanical resistance. If you hold the motor to stop it turning then it will draw more current. The current is what causes the heat in the coils.

Will the induction of the motor-coils cause stability issues with the PSU when suddenly reversing polarity to the motor. I can, in software, introduce a "not-powered" period, between reversing the polarity if needed, but how long should that period be?

DC motors draw a lot of current when they start. The motion of the motor generates a field which opposes the field in the coil which drives it, so the moving of the motor is what limis the current. No movement means no limit. The good side of this is that you get enormous amounts of power when the motor is just starting. That's really useful if you are a tram or a railway locomotive and you need to start moving a heavy load. It is bad news if you are a power supply.

A delay will not completely solve this. A big capacitor can help supply that initial current.

If a limiting circuit (1st point) is used how will that affect point 2?

A current limit will kick in as the motor starts for a breif period. It would also protect the motor if it were to become mechanically jammed

\$\endgroup\$
1
\$\begingroup\$

Brand new Alkaline batteries have a charge of 1.65V. So 3 in series is 4.95V. That quickly drops to 1.5V each in use or over time. 1.5V is the nominal voltage.

Even with 4.5V, 5V is only .5V more. That is exactly 11.11% more. Most motors have a typical voltage, as a function of the required current and coil resistance (and rpm and load), but have a wide range of what voltage ranges will allow it to start spinning (trigger voltage), and what voltage range will keep it spinning once started (Hold voltage). 11% is within even the most sensitive motor's range.

Keep in mind that increasing the voltage increases the current pulled, and the speed and torque of the motor.

If you really wanted to drop the voltage, a single silicon diode in series would work (but makes it complicated to reverse the direction). Or an H-bridge to drive the motor, as you see some drops from the transistors controlling the motor.

As for emi or motor surge, a flyback diode across the motor helps. And computer psus are fairly robust. They are used to powering cd and harddrive motors, as well as many hobbyist projects without any emi concerns.

\$\endgroup\$
0
\$\begingroup\$

I'm powering nine of the 4.5V motors through my benchtop DC power supply, at about 3 amps. Fun and quite reliable. This is my model: https://www.brickhacks.com/v8.php

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.