Predetermine stop start of dc motor - General Discussion - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Predetermine stop start of dc motor


  • Please log in to reply
8 replies to this topic

#1 JohnBreeds

JohnBreeds

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 February 2014 - 12:53 AM

Hello Guys

I'm trying to make a toy Hickory Dickory Dock for the local playgroup.

Imagine a piece of plywood about 15 inches high and say, 4 inches wide, to represent the grandfather clock.

For a bit of fun I want to incorporate a mouse that runs up and down each side.

I know that I can do this with a couple of 6v dc motors; a couple of furry mice (not real ones) attached to some cord looped round some pulley arrangement.

However, how can I control the ‘start’ and predetermined ‘stop’ positions of the mouse (ie before it runs over a pulley and jams)? 

I thought of tagging the cord so that it runs over a micro switch but this would just shut down the power for the whole lot.  I want to be able to restart the motor but reversed – so that the mouse runs back down again, etc.

Any ideas please?

 

Oh, and before you say – I really do NOT want to spend the next 12months training a couple of mice :)

John

Attached Files



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 February 2014 - 01:05 AM

Hi John,

 

Have you thought of using steppers or continuous-rotation servos?  That way you could specify or track how far the motors move.

 

You could also use little mechanical or optical trip sensors to trigger when the mice arrive.

 

Welcome to the Netduino community,

 

Chris



#3 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 28 February 2014 - 01:09 AM

Hi JohnBreeds,

 

First off welcome to the community! That sounds like a fun project. I love any project that provides smiles for kids. :)

 

Though small dc motors may be fairly easy to operate and cheap they do present some challenges for a simple project in that they really don't have any sort of feedback system. What I mean by that is the motor itself can't tell you how many rotations or the speed at which it's moving without some extra circuity or devices like wheel encoders or switches that let you know where your mouse is at any given point. 

 

To keep things reasonably simple and low cost, and assuming you are using a Netduino to control everything, I think a 360 degree full rotation servo would be ideal. These can be purchased for under $15 bucks at most electronics stores and give you the ability to know how many rotations have occurred and the position of the shaft. There are a few tutorials on the wiki and forums on how to use a servo, and I'd be glad to help with it if you need any additional help. 

 

Of course there are plenty of other solutions, but this may be the simplest. 

 

Cheers,

Steve



#4 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 28 February 2014 - 01:27 AM

Sorry, I didn't see that Chris had posted while I was writing my response. To add to what Chris suggested:

You could also use little mechanical or optical trip sensors to trigger when the mice arrive.

 

I was thinking you could use a reed switch and place a small magnet on the mouse. A reed switch is activated when there's a presence of a magnetic field, which you can use as an indicator to stop the motor. 



#5 JohnBreeds

JohnBreeds

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 February 2014 - 02:19 AM

Boy oh Boy - How I love this place!

 

Several real practical suggestion in less than warp speed - Thank you so much my friends.

 

John



#6 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 28 February 2014 - 08:04 AM

Hi John,

 

I agree with Chris and Steve that a Servo would be a good way to drive the mice, especially since they include the gearing and they are getting so cheap. However it does then rely on the software working properly to prevent damage, a traditional motor could be wired up through a DPDT "change-over" micro switches with diodes such that at the end of each travel, one direction of current is cut off, but the other direction will still work. See picture.

 

One thing I was wondering about was the mice going back down again. Were the mice going to end up going backwards?

Is there a way you could have each mouse on a loop that goes over the top of the pulleys allow the mouse to go forwards up and down?

If they could loop, all risk of damage goes if the mechanism does not shut off the motor at the right time.

 

If the mice can't loop at the top and bottom, could you add a peg to the rear of each mouse that follows a slot on the side of the clock - when the mouse gets to the end of its up and down travel, the slot veers to the side to turn the back of the mouse around to 90 degrees, so that when the mouse goes back the other way, the head is at the front again. The peg would push a (micro or reed) switch at the ends of the slots to signal the end of travel.

(When I had this idea I was thinking of a lift up kitchen cupboard we have where the arm of the cupboard has a pin that goes into a slot in a plastic block so that when you lift the cupboard door, it locks open, and then lifting it a small amount again, the peg follows a slightly differerent route in the block allowing the door to close again.)

 

Remeber to have fun - Paul

Attached Files



#7 JohnBreeds

JohnBreeds

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 February 2014 - 03:23 PM

Thanks Paul (and Chris and Steve)

I had already figured the attached circuit as the most simplest.  As you can see it's just DPDT with center zero for 'off'.  In this way I can reverse the direction of the motor and thus the mouse.

 

But I just don't know how to stop the motor after the mouse has travelled say 14" to the top.  At this stage the Clock's top structure hides the mouse.

 

After suitable byplay with the kids I can toggle the switch so the mouse runs down again.

 

I do like the idea of a magnet in the mouse and a reed switch (in motor circuit) placed near to the top.  But of course once power switches off it shuts down forever (unless I physically give the furry thing a nudge).

 

You will see on the attached sketch that I have 'doubled -up' the mouse arrangement.  This is so that while I'm looking at the LH side for the mouse, he runs down the RH side (which I don't see - but the kids do and will roar!)

 

JohnAttached File  Pulley_MouseArrangement_01.png   100.38KB   0 downloadsAttached File  Hickory_Circuit_01.png   41.03KB   0 downloads



#8 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 28 February 2014 - 04:22 PM

OK, my first circuit used a diode so that when the mouse gets to one end, even though the micro switch cuts the power, when the reverse current is applied, the diode allows current to get to the motor in the opposite direction and bring the mouse back again.

 

If you are now going to keep the mouse going in the same direction, things are a bit easier.

Lets say you go with the reed switch and magnet idea, with one double pole reed switch at each end (top and bottom of clock) wired up so that the normally closed contact allows current to flow to the motor when the magnet is not present. The current should pass through both reed switches so that if either switch activates, the current is cut.

As you say the mouse will stop when the magnet reaches the reed switch - so you then use another switch to short out the reed switches. Imagine a push button from the input of the first reed to the output of the second - press the button, the mouse will move, once the mouse is past the reed - it will keep moving until the next one.

To make it controlled by Netduino - don't use a push button - use a relay. The Netduino can turn the relay on for about a second to start the mouse moving. The Netduino then waits long enough to be sure the mouse will have stopped, and then gives the next pulse to the relay to get it going again.

 

(I have assumed one mouse and two reeds, you might chose two mouses with one reed and motor each. Or some other combination - the more reeds you use, the more places the mouse(s) will stop.)

 

Hope this helps - Paul

Attached Files



#9 JohnBreeds

JohnBreeds

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 February 2014 - 06:04 PM

Paul

 

Thank you for this -

you must have a spatial ability near to a million :)

 

So now:

 

1) The mouse will stop at the upper and lower limit - BUT be able to reverse move upon my toggle action,

2) The mouse can be controlled to go up and down BEFORE it reaches the upper or lower limit, ie either reed switch.

 

John






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.