Re: {LVL1} DC motor for torque

98 views
Skip to first unread message

Sean McPherson

unread,
Jul 14, 2012, 12:03:51 AM7/14/12
to lv...@googlegroups.com
Cordless drill? Would chuck right onto the shaft or could with easy machined bit. Plenty of torque, built in battery, settable speeds, etc. Dremel would work, too, prolly, even smaller.

Sean

On Friday, July 13, 2012, Joe Ibershoff wrote:
Hey folks,

I've been lurking on the listserv for a while, heard about this group at Code PalPOUsa last March.  I'm a software engineer by trade, but kind of a newb at hardware stuff.  I've got a project I'm working on right now where I want to turn this rotary switch (datasheet here) at something like 60 to 120 rpms while I'm pressing a button.  I only need to run this for short bursts, not for hours on end.  I'm somewhat limited in space and weight (and cost), and that will need to include the power supply -- which means I'm probably restricted to DC motors only.  The real kicker is that this switch requires about 25 in-lbs of torque to overcome the resistance of its detents.

Anyone have any suggestions?  I need to wrap this project up by Labor Day weekend, so I can't afford much lead time on ordering parts.  Bonus points if your suggestion is easily attached to this switch's flatted shaft (dimensions given in the datasheet).

Thanks,
 -- Joe Ibershoff

Joe Ibershoff

unread,
Jul 14, 2012, 6:29:12 AM7/14/12
to lv...@googlegroups.com
Sean, that's a beautiful suggestion!  A drill would almost certainly be too large for this project, but perhaps a cordless screwdriver would work.  I've got approximately 8" x 5" x 5" total to work with, and there are some other components taking up space as well -- I guess it would have made sense for me to figure that out and put the dimensions in the original question, huh?  Leaving additional room for the switch itself to attach to the end of my "motor", I think the device would need to fit within 6" x 3" x 3" in the worst case, but smaller would give me more flexibility in putting the rest together.

Whatever rotary device I go with, I'll probably need to open it up anyway so I can connect the button (which has to be external to the box) to it, so while I'm at it I can remove a little casing and/or move the battery or other components around to help make it fit, if needed -- I'm not necessarily limited by the advertised dimensions.  ;-)  I'm probably going to have to get a soldering iron before I go much farther in this project, heh.

Thanks Sean!
 -- Joe

#

unread,
Jul 14, 2012, 7:30:21 AM7/14/12
to lv...@googlegroups.com
junkyard a power window motor or power antenna motor 12vdc   ,


 Darlington transistor an a arduino to control speed with a push button  http://www.digplanet.com/wiki/Darlington_transistor   

Joe Ibershoff

unread,
Jul 16, 2012, 8:09:08 AM7/16/12
to lv...@googlegroups.com
Sean, I shouldn't have doubted you -- I found an old cordless drill I haven't used in years and decided to take it apart to see if it could fit after all -- sure enough, the internal components will just make it.  Unfortunately it doesn't have a check, just a hex socket, so I may have to ruin the drill with some gorilla glue to make it grab the switch's shaft.

Thanks again!

Brad Luyster

unread,
Jul 16, 2012, 8:23:51 AM7/16/12
to lv...@googlegroups.com
Just a heads up: At that speed, you're going to wear out the contacts on that switch pretty quickly.

Ben Hibben

unread,
Jul 16, 2012, 8:42:05 AM7/16/12
to lv...@googlegroups.com
Also: rather than glue something find a cheap (non-hardened) allen wrench that fits your hex socket and then round one side of it for the drill using our metal lathe.  I'll help if you like.  Go slow and don't try to take too much off at a time; patience will help save the part, your sanity, and the lathe.

Blenster

PS: if it is a hardened allen wrench just use sandpaper.  It's cheap, easy, and won't hurt the lathe and will eventually do the same thing; just slower due to the hardening.

Pat McCarthy

unread,
Jul 16, 2012, 9:57:41 AM7/16/12
to lv...@googlegroups.com

Not sure if this applies but if you are working with a cordless drill motor, and have removed the chuck, the shaft you are left with has an unusual property… the inner thread on the shaft (Used to attach the chuck)is reverse threaded… just an fyi from my battlebot days… (I used a ton of DeWalt Hammerdrill motors… still boxes of the motor/planetary gear components in the basement

The information transmitted is intended only for the person or entity to which it is addressed
and may contain CONFIDENTIAL material. If you receive this material/information in error,
please contact the sender and delete or destroy the material/information.

Joe Ibershoff

unread,
Jul 17, 2012, 3:56:14 PM7/17/12
to lv...@googlegroups.com
That's for all the suggestions folks -- I really appreciate it.

The note about wearing out the contacts is pretty key.  Now I'm rethinking how I want to approach this.  I've hit a lot of different little obstacles over the last few weeks that have made me alter my design, and I haven't sat down to really think about the big picture in a while...  Now I'm thinking perhaps I should use an arduino and some relays rather than the rotary switch.  It would be smaller and lighter parts, and presumably a more durable result.  (Or maybe that's a bad assumption...  Would I wear out the relay putting it through a lot of on/off cycles?)   There was a reason I originally didn't want to go that route, but I think my current idea doesn't have that limitation. 

Brad Luyster

unread,
Jul 17, 2012, 4:03:11 PM7/17/12
to lv...@googlegroups.com
Joe,

The relay would be a better option, but a lot of relays will suck down power at a pretty hungry rate (more than an arduino can provide, but not as much as a drill motor!).  Relays are usually rated in the tens-of-thousands of cycles arena.

Maybe you could describe what you're trying to do in a little more detail, and more suggestions will crawl out of the woodwork.

-Brad

Sean McPherson

unread,
Jul 17, 2012, 4:06:59 PM7/17/12
to lv...@googlegroups.com
I don't want to sound like I'm being snoopy, but if you don't mind my asking, what the heck are you trying to *do* at the end of the day? :) Given a better picture of goal (ie, "I have 25 different circuits that need to be turned on and off at a rate of 60 to 120Hz, and each circuit will carry 12VDC @ 200 mA, and the expected duration of the total runtime is 5 minutes with a 30 minute cooldown cycle. I have a budget of $500 for my prototype and I want to eventually get a design in place where I can produce 10,000 units for ~$50 each") I bet we can provide some alternate ideas that'll help meet the needs. In a lot of cases of high-spped switching, for example, it may mean using SCRs to control flow electrically rather than mechanically, which removes the isues of duty cycles to a greater extent and can provide much faster response times. But since I don't know the situation, I can't make any realrecommendations (and trust me, I'm one of the LEAST competent folks on the list to make suggestions; I just ride a broom most days).
 
Sean
 


 
On Tue, Jul 17, 2012 at 3:56 PM, Joe Ibershoff <j...@ibershoff.com> wrote:

#

unread,
Jul 17, 2012, 4:08:34 PM7/17/12
to lv...@googlegroups.com
first off , what is this switch controlling ?    a dial of some sort ?     
   your trying to turn this "dial"  that controls somthen else ?  what is it ?

you could delete the  "dial" all together !     not needing  a motor to turn it .      and controls  via  pulse width modulation an a triac an not need a relay either ,


  before i could type this post others are asking you the same question , heh  :) 

Joe Ibershoff

unread,
Jul 18, 2012, 10:54:15 AM7/18/12
to lv...@googlegroups.com
Nah, you guys aren't being nosey, and I really do appreciate the suggestions you're giving.  I usually try to censor myself because I tend to give too much unnecessary detail.  But, you asked for it, so here goes:
  • I have 5 identical components that require 4.8V power supply.  I'm not sure of the amperage they pull, but each was originally powered by a 4-cell pack of 250mAh NiMH batteries.  I guess if I knew how long it can run without a recharge, I could estimate the amps...  but you're not supposed to run this component continuously, so it would be a pain to do that.  The original wires are pretty thin, they feel like standard 24AWG to me, not sure if that says anything.
  • I need to be able to turn these components on in various combinations.  Sometimes they will be on individually, sometimes in pairs, and sometimes in triples.
    • For the sake of clear terminology, I'll label these components A through E.  I'll call each combination of components a "mode", and will label it by the components which are on at the time -- so A, B+D, and C+D+E are all modes.  There are 25 modes I will be using; 5 single-component, 10 double-component, and 10 triple-component.
  • The finished device will be active for short bursts, likely no more than 5 seconds at a time (probably 2 to 3 seconds).  Sometimes the rest period could be as short as 5 to 10 seconds, other times it could easily be 30 minutes to an hour or longer.  All said and done, I expect the device will be active for a total of no more than 30 to 45 minutes per day.
  • When the device is active, it will need to switch between modes frequently -- this is something I'll want to experiment with and tweak once I see the device in action, and is something that could yield to the limitations of my components to a certain extent.  For now let's say the mode will change on the order of 30 times per second, possibly at irregular intervals down to a granularity of 1/60th of a second.
  • Budget...  eh, I don't have a fixed budget, it's just that this is all coming out of my own pocket.  ;-)  I don't mind dropping some cash if it's going to make a big difference in the result, but if I can help it I'd like to keep this part of the project to $100 or less. 
  • I'm not concerned with production costs.  This is probably a one-time deal, and if I ever make another it will be another individual device, not part of a production run.
  • Longevity isn't too big a deal either -- if it can handle a week of that sort of punishment without replacing anything except batteries, I'd be happy as a clam.  On the other hand, I would like to be sure that any parts which are likely to wear out in that timeframe can be easily replaced.  (That's why I got gun-shy about the rotary switch wearing out, since attaching it to the drill motor was not going to be trivial.)
Right now, I'm looking at using an Arduino Mega 2560 (http://arduino.cc/it/Main/ArduinoBoardMega2560 probably overkill for this, but I might use it for other things too) with 5 relays controlling power to the 4.8V components.  I'd probably hook up an 8-pack of AA batteries to give 12V power to the arduino, which for convenience I would leave powered up a lot of the time, even when the device itself isn't active... but probably no more than 2 hours total in the day.

  • The coil operates at 5VDC, so it should run directly off I/O pins from the mega2560
  • The coil pulls 24mA, and the specs for the mega2560 say I can pull up to 40mA through each 5V I/O pin
  • The contacts can handle a load of 3A.
The only question mark is the 3A contact load -- I don't know how much my components are pulling.  An alternative relay would be this one (http://www.digikey.com/product-detail/en/G5CA-1A-E%20DC5/Z2161-ND/699988):
  • The coil operates at 5VDC
  • The coil would pull the full 40mA from the I/O pin
  • The contacts have a rated load of 10A at 30VDC, and a max current of 15A -- I think that means it could handle 15A at the 4.8V I'll be running through it.
Of course, these relays are more expensive and take up more space, so combined with the 40mA pull I'd rather get the others if they'll work for me.

So that's where I am -- any other thoughts, cautions, or suggestions?  Does anyone have an ammeter I could use to figure out what load I need to handle?

Thanks,
 -- Joe

#

unread,
Jul 18, 2012, 11:47:19 AM7/18/12
to lv...@googlegroups.com
this could be done couple ways i can think of ,   

 heres code example  of one ways using relays ,   ill see if i can dig up some more schematics an code for some of the other ways to do this

    one of the guys in LVL1 made a christmas light controller  http://www.solsticewerks.com /   its pretty close to what your trying to do ..     maybe he will chime in :)


Inline image 1

// constants won’t change. They’re used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int RelayPin = 3; // the number of the Relay pin

// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
int relayState = 0; // relay is off at start

void setup() {
// initialize the Relay pin as an output:
pinMode(RelayPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}

void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// change relay state
// see if relay is on or off:
if (relayState == HIGH) {
digitalWrite(RelayPin, HIGH);
relayState = 0;
// if relay is on, turn it off
// counterintuitive, but HIGH turns relay off
}
else {
digitalWrite(RelayPin, LOW);
relayState = 1;
// if relay is off, turn it on
// counterintuitive, but LOW turns relay on
}
delay(250);
// debounce
}
}

hb_relay5.jpg

Bill Piepmeyer

unread,
Jul 18, 2012, 2:05:35 PM7/18/12
to lv...@googlegroups.com
I will be happy to chime in. The light controller is probably overkill
for what you want to accomplish, mostly because it is all geared toward
switching A/C. But there are a lot of options to do this. The circuilt
below from "#" would work well. You could also order
a multi-channel relay board

This one you would need to order 2 but they are dirt cheap and I have
bought many things from this seller and I have always been happy with my
purchase and speed of shipment.

http://www.ebay.com/itm/4-Channel-12V-Relay-Module-For-Arduino-PIC-ARM-AVR-DSP-/250887128971?pt=LH_DefaultDomain_0&hash=item3a6a09c78b

This one from the same seller is an 8-channel

http://www.ebay.com/itm/8-Channel-Relay-Interface-Board-Module-DC-5V-DIY-for-ARM-PIC-AVR-51-MCU-/250890815741?pt=LH_DefaultDomain_0&hash=item3a6a4208fd

You can bid on this one, these usually can be had at the starting bid
price as not too many people bid on these things and they are listed for
auction very regularly.

Here is a 4 channel going soon
http://www.ebay.com/itm/4-Channel-Relay-Board-Module-Four-Channels-for-51-ARM-AVR-NEW-/230826229024?pt=LH_DefaultDomain_0&hash=item35be50bd20

You get the idea, there are lots to be found. These will interface
directly with an Arduino or similar such as the Teensy. We have Teensy's
available in the store too. You will just need to add something like a
12v wall-wart power supply to power the relay board.



There are several ways to accomplish the sequencing. You can simply
program the microcontroller directly to sequence or you can use
something like I used for the Christmas Light controller. It uses a
program called Vixen which allows you to setup a sequence of steps to
turn things on or off for a specified duration graphically. This makes
adjust the sequence and combinations trivial. You can use a Teensy in
Arduino mode (Teensyduino) and simply download the source code and/or
firmware to allow it to talk with Vixen over a USB cable and you are done.

BOM: Teensy $15
Relay Board $20
Power Supply $5 (or use an old PC power supply)
Misc hardware and wire $2
Total cost $42

Estimated Time to go from nothing to testing 3-4 hrs

This same setup works if you want to be standalone and have the Teensy
or Arduino do all of the sequencing and not have a PC connected then you
will just need to make sure you have power for the microcontroller
(Arduino, Teensy, whatever). If you use the Teensy an standard cell
phone charge with a mini-usb connector works great. I use my iphone
charger regularly to do this.


Hope this helps,

Bill


DE 'Tad' Heckaman III

unread,
Jul 18, 2012, 2:07:46 PM7/18/12
to lv...@googlegroups.com
If eBay isn't your thing, I've also purchased similar boards from Amazon: http://www.amazon.com/SainSmart-4-Channel-Relay-Module-Arduino/dp/B0057OC5O8/ref=sr_1_1?ie=UTF8&qid=1342634804&sr=8-1&keywords=relay+board
--
Tad Heckaman

#

unread,
Jul 18, 2012, 2:19:56 PM7/18/12
to lv...@googlegroups.com
i use Darlington_transistors alot to control relays , reason mainly is its cheaper an less soldering an if your controlling more then one relay at a time it saves space ...  just easier to me

J2 would connect to pins on your arduino you define in the code ,      im looking for a good code example         

Inline image 1
8_relay_sch.jpg

#

unread,
Jul 18, 2012, 2:22:11 PM7/18/12
to lv...@googlegroups.com
 *where it says +12 volts an its connected to the J2 ,, that will blow your arduino ,   ill edit it
8_relay_sch.jpg

#

unread,
Jul 18, 2012, 3:16:26 PM7/18/12
to lv...@googlegroups.com
this is basically a digital on/off switch if your wanting  presets  for instance "  push button X and relay # 1,2 and 4 activate on/off then code needs editing ,           


Darlington_transistor connected to pins defined in code ,     tactile pushbuttons on pins defined in code



Inline image 1



Inline image 2
#include <Bounce.h>    // http://www.arduino.cc/playground/Code/Bounce
#include "SeeeduinoRelay.h"

// Pin definitions for four buttons connected to the Arduino for testing. 

#define Button1pin 8
#define Button2pin 9 
#define Button3pin 10
#define Button4pin 11

// Define "bounce" objects for input buttons.
// Bounce is really nice, you should use it.  
// http://www.arduino.cc/playground/Code/Bounce
Bounce Button1 = Bounce(Button1pin, 5); 
Bounce Button2 = Bounce(Button2pin, 5); 
Bounce Button3 = Bounce(Button3pin, 5); 
Bounce Button4 = Bounce(Button4pin, 5); 

SeeeduinoRelay RELAY1 = SeeeduinoRelay(1,LOW); 
SeeeduinoRelay RELAY2 = SeeeduinoRelay(2,LOW); 
SeeeduinoRelay RELAY3 = SeeeduinoRelay(3,LOW); 
SeeeduinoRelay RELAY4 = SeeeduinoRelay(4,LOW); 

void setup()
{
  // Setup input pins 
  pinMode(Button1pin, INPUT); 
  digitalWrite(Button1pin, HIGH);  // Activate internal pullup
  pinMode(Button2pin, INPUT); 
  digitalWrite(Button2pin, HIGH);  // Activate internal pullup
  pinMode(Button3pin, INPUT); 
  digitalWrite(Button3pin, HIGH);  // Activate internal pullup
  pinMode(Button4pin, INPUT); 
  digitalWrite(Button4pin, HIGH);  // Activate internal pullup

  Serial.begin(9600);
  Serial.println("Ready"); 

}

// This is the demo loop.   Check state of each button, toggle relay
// and print out status of relays. 
void loop() 
{

  if (Button1.update() ) 
  {
    if (Button1.read() == LOW)  
    {
      Serial.print("Button #1 pressed: "); 
      Serial.print("Relay #1 state was "); 
      Serial.print(RELAY1.state()); 
      RELAY1.toggle(); 
      Serial.print(", now relay is "); 
      Serial.println(RELAY1.state());     
      if (RELAY1.isRelayOn()) Serial.println("Relay #1 is on"); 
      if (RELAY1.isRelayOff()) Serial.println("Relay #1 is off"); 
    }
  }  

  if (Button2.update() ) 
  {
    if (Button2.read() == LOW)  
    {
      Serial.print("Button #2 pressed: "); 
      Serial.print("Relay #2 state was "); 
      Serial.print(RELAY2.state()); 
      RELAY2.toggle(); 
      Serial.print(", now relay is "); 
      Serial.println(RELAY2.state()); 
      if (RELAY2.isRelayOn()) Serial.println("Relay #2 is on"); 
      if (RELAY2.isRelayOff()) Serial.println("Relay #2 is off"); 
    }
  }  

  if (Button3.update() ) 
  {
    if (Button3.read() == LOW)  
    {
      Serial.print("Button #3 pressed: "); 
      Serial.print("Relay #3 state was "); 
      Serial.print(RELAY3.state()); 
      RELAY3.toggle(); 
      Serial.print(", now relay is "); 
      Serial.println(RELAY3.state()); 
      if (RELAY3.isRelayOn()) Serial.println("Relay #3 is on"); 
      if (RELAY3.isRelayOff()) Serial.println("Relay #3 is off"); 
    }
  }  

  if (Button4.update() ) 
  {
    if (Button4.read() == LOW)  
    {
      Serial.print("Button #4 pressed: "); 
      Serial.print("Relay #4 state was "); 
      Serial.print(RELAY4.state()); 
      RELAY4.toggle(); 
      Serial.print(", now relay is "); 
      Serial.println(RELAY4.state()); 
      if (RELAY4.isRelayOn()) Serial.println("Relay #4 is on"); 
      if (RELAY4.isRelayOff()) Serial.println("Relay #4 is off"); 
    }
  }  
}


8_relay_sch.jpg
7relays_BreadBord_small.jpg

#

unread,
Jul 18, 2012, 3:19:11 PM7/18/12
to lv...@googlegroups.com
8_relay_sch.jpg
7relays_BreadBord_small.jpg
Reply all
Reply to author
Forward
0 new messages