Step motor clock .... confused!

MaxHeadRoom

Joined Jul 18, 2013
30,661
.

I see lots of drives from $10 to say $50.

This is just a toy I am playing with .... figure it is a good project to learn about Arduino's and step motors.
If you are doing very slow (rpm) stepping then you do not need a sophisticated drive and can probably use one that use a power supply for the rated plate voltage of the motor, high end drives use a P.S. rated much higher than the motor and the control ensures that the current conforms to the rated value throughout the whole range up to a relatively high rpm.
Max.
 

Thread Starter

xtal_01

Joined May 1, 2016
227
I actually had not bought any motors yet, going to do that this weekend.

I just want to get some very cheap common ones at first to "play with". I assumed these were all two phase.

Yes, the motors will be moving very slow. I was trying to get 60 distinct movements ... like the video posted (thanks).

I think I am getting hung up on two separate issues. First was the 60 movements. Somehow without gearing, it just does not make sense to me on dividing 200 to get 60 without an error occurring on every revolution.

With a 200 to 60 gear ration it makes sense. For every step of the motor (1/200 th of a revolution) , the clock will turn 1/60 of a revolution. This would give me 60 distinct movements (one per step of the motor). Then I just need to worry about timing the set (each step of the motor taking one second ... 200 seconds to complete a revolution).

I was just trying to figure out if there was a way of doing this without gearing.

Then the timing. I was thinking about a real time clock but honestly I know very very little about timing. I understand the idea of dividing down the clock pulse. I think this will take a lot more homework.
 

crutschow

Joined Mar 14, 2008
38,506
First was the 60 movements. Somehow without gearing, it just does not make sense to me on dividing 200 to get 60 without an error occurring on every revolution.
I trust you now understand that dividing the clock pulses as I proposed will give you an exact 200 steps per revolution without gearing?
I was thinking about a real time clock but honestly I know very very little about timing.
You could use the 60Hz line frequency as I suggested.
 

Thread Starter

xtal_01

Joined May 1, 2016
227
I do ... your explanation made complete sense!

I know this things must be second nature you you but all new to me. Industrial electricity is soooooo much easier. Simple motor starter ... almost everything is on or off.

Even things like tank levels are just wiring up pre-built modules that give say 4-20 mA output.

Most of the equipment I have used is very intelligent. Answer a few questions it it sets itself up.

The idea of using line frequency is interesting. I have used opto-isolators before so I get the idea of detecting zero crossing (had to have someone explain to my why you want to switch as zero rather then at the top of a wave).

I am just finishing up a rush panel for a client ... this weekend I want to get some part on order ... can't wait to try some of this stuff!

I think I may have posted this before but here is a typical panel I build:

https://www.facebook.com/pg/VermontCountryWorkshop/photos/?tab=album&album_id=433087233721468

Thanks so very much again !!!!!!!!!

Mike
 

John P

Joined Oct 14, 2008
2,061
If you're using the simplest kind of driver, where the processor controls the motor phases directly, you can very easily double the resolution of the motor, just by alternating between a single phase on, and two phases. That would give your 200-step motor 400 steps, and could you just fake it there, given that it's a beginner project? 400 divided by 60 simplifies to 20 divided by 3, and the answer is 6 with a remainder of 2. What you actually want to do is run a 3-second cycle where the number of steps adds up to 20 (so over 60 seconds, i.e. 20 of the 3-second cycles of 20 steps, you'd have the full 400). It's thus clear that within the 3-second cycle, you make 2 moves of 7 steps each, and one move of 6 steps. You keep using that pattern--7, 7, 6, 7, 7, 6--continuously. No, it won't stop the second hand on every little mark around the clock, only a third of them, but the rest of the time you'd be pretty close.
 

Thread Starter

xtal_01

Joined May 1, 2016
227
It is sooooo funny you say that! My original way of handling the 200 step problem was to do a 3, 3, 4 cycle over and over (you can see this in my first post on this thread). This would give me 10 steps per 3 seconds thus 200 steps.

I am thinking a step motor is relatively fast so if you did the three step ... pause for clock to say next second .... three steps ... pause .... 4 steps ... pause ... it would give the illusion of 1 second "clicks".

I thought it an odd solution but it was the only one that came to me.

WOW ... so may ways to get a working solution! You guys are amazing!

Thanks!!!!!!

Mike
 

crutschow

Joined Mar 14, 2008
38,506
it would give the illusion of 1 second "clicks"
I rather prefer a smooth moving second hand, which you don't see much now days, but there are a few digital-controlled analog clocks that do that, using a high frequency stepping motor, to avoid the annoying 1-second clicking sound.
 

Thread Starter

xtal_01

Joined May 1, 2016
227
Funny you say that .... I was born raised and educated in Canada (just outside Niagara Falls) but moved to the US in the mid 90's.

My brother who still lives in Canada always brags the best way to do anything is the "Canadian" way ... CSA.

I do these boxes for a lot of small companies, but till 10 years ago I actually worked for Westinghouse Nuclear in SC.

We never put the yellow ring on e-stops but doing a quick read I see that I definitely need to start.

I actually thought it was odd that I am still one of the few people who put e-stops on every panel I make. That panel was going to an environmental company. They were cleaning up an gas spill. They had to inject air in wells all around the perimeter of he spill and put a vacuum well in the center of the spill. The thing is, water gets pulled up with the air from the ground and is sent through a separator. The panel is simple. Don't turn the injections wells on unless the vacuum well is running (so you don't blow the spill in the wrong direction). Turn everything off and a pump on when the separator gets full. Turn everything off if the separator or product tanks are full.

All simple relay logic. In fact I put a PLC in once (larger box that had 28 relays in it) and they got very upset. They want panels that they can fix in the field without a computer.

Anyway, thanks so very much for pointing this out!
 

crutschow

Joined Mar 14, 2008
38,506
The idea of using line frequency is interesting. I have used opto-isolators before so I get the idea of detecting zero crossing
Here's an example circuit for generating a 60Hz square-wave from a 120Vac 60Hz power line using an optocoupler for isolation.
U3 is a CMOS Schmitt trigger inverter that squares-up the signal from the opto output so it will properly clock CMOS counters and flip-flops (they can misbehave if the clock rise-time is too slow).

upload_2018-6-7_21-17-20.png
 
Last edited:

Thread Starter

xtal_01

Joined May 1, 2016
227
Wow ...interesting! I have never used an opto isolator like this ... just the nice packaged ones (turning 120 vac on and off with say 24 vdc).

I see, since it is a diode (LED I assume), it only turns on when the wave is positive thus giving the pulse.

So I am guessing if you have two diodes in opposite directions, you can detect zero cross when there is no light from either one

Two new unrelated questions:

1) I have been eyeing a cheap oscilloscope. Lots of cheap ones all over ebay. Are these $25 ones worth anything? Just for things like this to see the output. https://www.ebay.com/itm/Fully-Weld...rentrq:dd5db1941630ac195db799f6fffcab18|iid:1

2) what software are you using? Is it a design and simulation package or ?

Thanks again soooooooooooooo very much !!!!!!!!!!!!!!!!!!

Maybe you can teach an old dog new tricks (my last year of college we were still using punch cards).

Mike
 

Thread Starter

xtal_01

Joined May 1, 2016
227
Hey!

I do refer to NFPA79 when ever I have a question (and I do from time to time).

I know that as a panel builder, I should be an "expert" and know the code backwards but honestly I don't. That said, after what I have seen in the field, I am surprised half the panels even work. I use what I will call "good practices". My panels are safe.

I am very anal about things like ground (you can see in my pictures, I am the only one I have ever seen ground the front door), using oversized wire and starters. After watching a so called electrician almost kill himself with 120 volts on a float switch, I decided about 20 years ago to make all my panels with 24 VDC controls. The only medium voltage wiring is the motors going through the starters and the main power before it hits the power supply.

You would be surprised how many panels have the installer tie onto the starter. I give well labeled terminal blocks for everything. All my wires are labeled and color coded for low and medium voltages. All my safety circuits (even things like high level switches) are wired fail safe (cut the wire and it shuts down).

After I graduated college, I was offered a job as an instrumentation designer. It was almost an apprenticeship, half designing and half building.

I took a few courses in instrumentation and plc's ... but most of this was in designing systems.

At Westinghouse, I would design a panel (including all the details ...sizing enclosures, components, wire size, ...) and a PE would go over the design. I would supervise the building and again a PE would look over the entire job before it was commissioned. Having a true "expert" look over my work was a great learning experience ... and they were very picky and conservative.

I will never say I am an "expert" but my clients say they are the best panels they have ever had supplied to them. One just admitted a few weeks ago he tried someone closer (he is in NC and I am in VT) ... total disaster.

Even Westinghouse still sends me work (mostly small jobs that the big shops don't want to deal with) ... I never turn them down. Money is money. Sometimes it may just be an overlay, sometimes just a simple cable.

Anyway, after midnight here. Got to get up early and finish up another panel. Repeat job (third time now). Just labor in this one ... they picked out all the parts and sent them to me to assemble.

Thanks again so much for all the advice!

Mike
 

MaxHeadRoom

Joined Jul 18, 2013
30,661
I am very anal about things like ground (you can see in my pictures, I am the only one I have ever seen ground the front door), using oversized wire and starters. all my panels with 24 VDC controls.
The panels I order usually either come with the door GND bonding conductor or at least have the threaded stud for adding it.
My preference is 24vdc also, I also received some push back when stipulating 24vdc solenoids for higher reliability,
"WE have always done it (120vac) this way"!!o_O
Max.
 

Thread Starter

xtal_01

Joined May 1, 2016
227
I get the same thing! Do you really need to spend an extra $100 for a power supply. And why not a cheap supply (because I don't want a horrible inrush current and accidentally trip the breaker).

Yes, all the panels I have used in the past few years come with a door stud. I am just amazed how many people don't use them!

Again, I am a bit of a fanatic ... crimp on a terminal ... solder it .... put on heat shrink. Over kill.

You can tell I am a machinist by trade. I hate self tapping screws. I tap every hole in the panel. Way over kill.

All the panels I build are overkill. Rather then do calculations for heat, I use over sized enclosures and make sure heat generating parts are spread apart. I have used heat exchange coolers if I am enclosing a drive. If I am told I need a 5 hp starter, I use a 7.5 or 10 ... (I use IEC contactors rather then NEMA just because of the price). This way no matter what the duty cycle (like switching on and off many times a hours) it will hold up.

One problem I have had it that I am not UL certified. Most of my client don't care but every so often I get one that says it is required because of the county or State.

On these rare occasions, the price of my panel was so little that they still had me build it and set it to someone else to be certified. Everyone they did this with passed with no problems.

Anyway ... really, I am just a jack of all trades (master of none).

My wife was paralyzed from the shoulders down in a diving accident when she was 12. She needs care every 4 hours and help through the day. So when we met 10 years ago, I quite my job with Westinghouse in SC and move up here to VT. To earn a living, I take in almost any job. This is spring and I have done over a number lawn tractors for people. A could weeks ago contractor I know cracked several welds on his backhoe in the middle of a job. He towed it over and asked if I could do a quick patch (out came my 40 year old stick welder and some 6011 rods). The other night I rebuilt a hydrostatic transmission for a farmer just a few doors down. He tried but put the thrust plate in upside down. When he it hit forward, it went reverse. Last week a neighbor called me over to fix his brand new saw mill. Turns out he wired all the e-stop switches to hot instead of ground when he put it together. It actually melted all the wires and started a fire. I built a new wiring harness for it. Side note ... bad design, e-stops were NO switches to ground. If you remove them, the unit still runs.

Large companies go to large panel shops. I get the small ones no one wants to play with. Westinghouse for example still sends me cables to wire up and overlays to design and have made. I never turn down work ... it is all money.

You can see I do a bit of everything.

For some reason, electronics is one of the things I just didn't do a lot of. I know the basics and what each component will do but that is about it. With lots of projects planned around the house, I want to get more into it.

Thanks again so much!

Mike
 

MaxHeadRoom

Joined Jul 18, 2013
30,661
I hate self tapping screws. I tap every hole in the panel. Way over kill.
Ditto!

You can see I do a bit of everything.
Most of my panel work is/was for PLC/CNC retrofits, where the panels contained anything from 5vdc equipment to 575 3ph.
On the mechanical side, Early on I had some good mentors that I picked up a few pointers from.;)
Even how to wipe a lead joint!!:eek:
Max.
 

Thread Starter

xtal_01

Joined May 1, 2016
227
WOW, not that is a lost art (hmmm and maybe a good one to lose).

I actually love old technology. My friend is a boy scout pack leader. I have given demonstrations of blacksmiths and sheet steel work. He wants me this summer to help them each make a funnel or dust pan (things I made when I took shop class in high school).

Even I still get a kick out of making a cat whisker or two tube regenerative receiver.

My latest project has been a house. Housing is expensive here and accessible houses are very hard to find. We decided to build with me doing as much work as I could. We even lived in an RV onsite for the first three years to save from paying rent (not easy when winter temps hit -30 F ...-34C).

Without going into a long story, we ended up building a two story house and needing an elevator. Another long story but it went from $5K (all kinds of promises of grant money) when we started building to almost $40K. Not having that kind of money, I got an old forklift ($850) and used the mast as my lift. I just got it working and am using manual controls for now. I bought a flow control valve with a 4 - 20 input so I can control the acceleration (no bump and the start and stop). I will interlock the doors and such. Total project cost $2K ... a lot better then $40K.

I even built the lift for the RV. Since she needs care every 4 hours, my wife had never traveled. I bought an old RV but when I went to have a lift put in they wanted $25K ... more then I paid for the RV!

Gutted the interior, cut a new door in the side, built a lift and even put a lift from the front to the back inside.

It really has been great. Drive for a few hours ... pull over anywhere to do her care and then off again.

As you can probably tell, I am just a big kid ... at 55, it's too late to grow up now.

Mike
 
Top