Archive for the ‘Uncategorized’ Category

Motors Demo

25 October 2017


I don’t use motors much in my projects, but they are everywhere now on our very mechanical world. So I am always running into them, and had a bunch set aside mostly from tearing down old printers. I have been particularly interested in stepper motors, as I had read about them a long time ago, and they are used a lot in industry.

Stepper Motors

This isn’t going to be a huge technical article, but: Stepper motors are used for positioning in all sorts of equipment, computer printers just being one example. They are designed to be moved an exact rotational amount (by counting the step signals sent to the motor) and to hold that position while energized.

The ordinary stepper motor is driven by two overlapping signals, as mentioned in my recent post about SerDes design. Finding new data about how these motors are driven inspired me to take another shot at creating a working driver. My previous attempt, based on sine waves amplified by audio amps, had not been successful.

Design by Numbers

Here is a rear view of my project, with numbers added to match the discussion below:


  1. AC terminals and connectors. I like to run my projects off AC-powered supplies. I get them cheap from thrift stores. Usually they are “wall warts” or otherwise portable / external power supplies, and I remove the plastic cover and use the board inside. Sometimes I keep half the cover if it helps for mounting purposes.The funny thing about all modern power supplies is that the first thing they do is convert your AC power to DC. Then they step down the DC (about 120V in the US, about twice that in many other places) to the power supply voltage. Most of these modules provide good regulation, because that’s built into the controller electronics, and it helps protect people and equipment.
  2. I stacked the two power supplies I used. The top one runs my control electronics. Most of it is 5V, but I also have some 12V relays.
  3. I used a 9 volt 3-1/2 amp module to run the motors. These are a little hard to find, so when I run across one I grab it for later use. 5V supplies are ubiquitous, as they are used now for phone chargers (phones generally have 4V batteries). But other voltages and power levels can be more scarce.
  4. Next in line is a board that monitors the motor supply for voltage and current output. You can buy panel meters with these features built in, but I built my own, as it’s not too hard. It then feeds generic panel meters. The hardest part to get right on this board was the current shunt. I used a bunch of SMT (surface mount) resistors in parallel.
  5. The motor driver module was purchased online from China. This particular one had some problems, and I basically had to repair it before I could use it. That sometimes happens with cheap stuff from China. They had installed the wrong part to function as a 5V auxiliary supply. It was supposed to be a fixed-voltage part and an adjustable-voltage part was installed. So I had to lift the adjustment pin off the board and add some components to get my 5V output.One of the drivers was also poorly soldered, so I went over the solder joints and added more solder as needed.

    The board uses a part that has been around for a long time (LM298). It is designed to drive stepper motors. It has four logic-level inputs (plus enable) and four power outputs. It can work up to 48V. I had planned to add a second higher-voltage motor driver supply to the project, but all the motors worked fine with 9V, so I left it out.

    You have to feed the driver the correct signals, and I made two more boards to do that. One board provides the four steps needed to generate the “quadrature” drive pattern and a pulse-width-modulated (PWM) signal to vary the amount of drive. The other board converts these signals to those needed to feed to the driver board.

  6. Another board just gets all the connections right.
  7. I used a four-position rotary switch to select between four different motors. Only one is a stepper motor. The ordinary DC motors are very easy to power on; you just apply power. You can modify their speed somewhat by changing the drive voltage or using a PWM signal which essentially does the same thing. I used one driver IC on the driver board to power the DC motors. I paired up the four drivers to make two. I can run the load in forward, reverse or braking mode.
  8. Here are the front panel controls for stepper speed, PWM, and forward – brake – reverse.
  9. Cheap panel meters from China indicate the drive voltage and total current being used. They have a nice auto-ranging feature which makes them usable up to about 50 volts input. Their electronics run on 5 volts. These digital meters only have three decimal places, but that was enough for this application.

Closing Comments

The biggest problem with motors is having them stall out due to mechanical overload, which can ruin both the motor and the drive electronics. As these motors are running no-load, that’s not a problem. You can grab the motor shaft with your fingers if you want to, and see what mechanical loading does to the current draw. But for real use, the electronics should include overcurrent protection to turn the power off if the motor stalls. Many industrial motor drivers also monitor motor temperature, which is another way to tell that something is going wrong with your motor.

I am very happy that I was finally able to get my stepper motor to run (both forwards and reverse!) and at a variety of different speeds. It turns out steppers are a bit sensitive to what speed you drive them at. Try to go too fast and they just won’t run. Go too slow and they use too much power (though there are ways around this). Most steppers have an optimum speed, and in most applications, you will see them operated at a constant speed, or maybe two, high and low (like in a scanner).

The driver module was designed for robotics hobbyists. It’s a neat design, but not well-documented. I had to look up the datasheets for the various parts used to get details. This is par for the course in hobby electronics.


Power Down in Pullman

6 December 2013

At about 9AM this morning (a Friday) power went out on the factory floor at SEL in Pullman. I thought some might be interested in a few of the technical implications of such an event.

Part of the plant contains equipment that is very problematic if it loses power unexpectedly. That part is protected by a local generator run by a diesel motor, and power to it was restored immediately.

However, that left a large part of the building without electricity.

Cold weather!

The weather here for the last few days has been very cold, never getting above freezing. The low this morning was about 1° F (-17 C) with an expected high of 18. This weekend it will get even colder before a “warm” front moves in next week and causes more rain or snow.

Air temperature and water vapor holding capacity

Very cold air can hold practically no water vapor, whereas hot air can hold a lot. This means that “humid” cold air is actually very dry. If freezing air with a relative humidity of near 100% were heated 40° F it would become very dry air, with a relative humidity of perhaps 25%. Our frigid air currently has a relative humidity of around 70%, which translates to less than 10% at a comfortable room temperature.

Making an ESD safe factory

Electrostatic buildup is a much bigger problem in dry air than in humid air. In a modern electronics factory, maintaining a humidity level of about 40% is an important part of minimizing damage to parts as they are assembled onto boards and the boards get assembled into equipment and tested.

Special equipment is installed to (usually) add water vapor to the factory air to keep it ESD (electrostatic discharge) safe. When our part of the factory lost power, the humidifiers went off, and the air started drying out. By lunch time the humidity had dropped to about 10%. We had lost our ESD-safe work environment. The factory was halted and workers sent home, as it will take about 2 hours after power is restored (which happened around 1PM) for the humidity to be brought back up to a safe level.

“Safe grid” no buzzword

That’s what you call a “negative economic impact” from a power outage.

About 4 hours of production time wasted, even though the power was restored in the middle of the day.

If the outage had lasted longer or been more extensive, it could have knocked out building heating and caused a real human problem, as has been caused by winter storms in the U.S. and elsewhere.

Most infrastructure on this planet has not been built with the idea that weather or other environmental hazards would ever be a major problem. Though this seems a bit fanciful at this point, it is where things stand. If things get real bad on the planetary surface, much of our infrastructure could be destroyed, even if our bodies survive. Evidently, something other than sustainability was on the minds of those who designed and built most parts of our current environment, including the power grid and the generating stations and substations that go with it.

The more sustainable portions of our infrastructure are usually kept secret, as you can imagine them being overrun if some sort of panic ever happened on the surface, if everyone knew where they were. This gives those who do know a short-term advantage. But it’s only short-term.

This planet, as a human society, will eventually pay for the shortsightedness of ourselves and our leaders in creating an environment where instant gratification is much more important than long-term survival. It would be one thing if we took this risk with full cognizance of what we were getting ourselves into. But it didn’t go down that way.

Many of the survivors of the last great cataclysm on earth carried forward lifestyles of (by our standards) severe poverty in order to preserve some semblance of a balance between short-term and long-term survival.

Certain groups took another approach, thinking that material technologies could protect them from any important threat. Though these groups effectively “conquered” the “primitive” groups, our sense of balance was also lost.

We now possess knowledge that could change the future outlook considerably.
We know:
1) We are actually eternal spiritual beings playing the “meat body” game as a sort of pastime.
2) We are not alone in this universe. Many other societies exist out there that are struggling with the same problems we are struggling with.
3) Physical technologies exist or could be developed that would far surpass what we now have and could, for all intents and purposes, solve the survivability problems of meat bodies if we wanted to. Contacts with those other (“ET”) societies have made us aware of this.
4) For the first time, spiritual technologies are also available to us that could enable us to gain full control over our own criminal tendencies and so solve our greatest survival problem, which was: Destruction from within.

Thus a “New Era” is possible on earth and many other locations, if we decide to embrace these various technologies and use them together to improve conditions and move the whole game up to a higher level. If we grab for the material technologies and neglect the spiritual ones, our game could dive to new lows. It’s really all up to us whether “power down” becomes a permanent condition or a thing of the past.

News of the Future – Drone Car

13 October 2012

I have added a new page to my other blog called “News of the Future.”

I invite you to check out my first article here.