Author Topic: controlling motors  (Read 3406 times)

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
controlling motors
« on: December 16, 2010, 08:27:23 AM »
I have a little brother who is really into nerf guns, so i'm making him one for christmas however i need help.
I have a small 3v motor i need to control ideally with a tact switch i need it to turn one way then when the button is pressed switch direction, then switch back when the button is released.
so my question to you guys is how would i do this?
i'm assuming it would need some sort of H-bridge?
i would experiment myself but do not really have time before christmas so any help would be appreciated :)

Offline frenulem - No.5417

  • Ultimate Badass
  • Blogs & Media Team
  • Acid Modder
  • *
  • Posts: 633
  • Post quality +23/-0
  • Gender: Male
  • Learning Pascal Cuz i'm dumb and 'Ting
Re: controlling motors
« Reply #1 on: December 16, 2010, 09:33:41 AM »
Can be done with a DPDT switch, not to sure about the tact but will look into it, your good with pic right? if you can be bothered that might be a way, and are you worried about back EMF, whats the motor going to be used for?

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: controlling motors
« Reply #2 on: December 16, 2010, 12:23:53 PM »
hmmm well...
-what is back emf??? :P
-i like the feel of a tact and i would struggle to get  a momentary dpdt switch, also i didnt mention i'd like to keep the ability to trigger with the output from a pic if possible
-i cannot use a pic to drive the motor directly as it cannot supply enough current
-the motor is used to sort of "kick" the darts, from behind, forward out of a clip and into the two flywheels when the tact is switched

will it cause a problem if the motor is stopped but current is still suppplied? would it  then draw excessive current?

ive never really had any projects involving motors so my knowledge is very limited

Offline frenulem - No.5417

  • Ultimate Badass
  • Blogs & Media Team
  • Acid Modder
  • *
  • Posts: 633
  • Post quality +23/-0
  • Gender: Male
  • Learning Pascal Cuz i'm dumb and 'Ting
Re: controlling motors
« Reply #3 on: December 16, 2010, 12:43:38 PM »
Well you know motors and Dynamos/genertators are basicly the same thing, motors need current to spin and if you turn the motor manually it generates current, so back EMF if when you turn the motor and it sends current back potentialy damaging the compnanets, if you shove a diode in there it stops that but for what you doing i doubt you'd need to do that as you can't get to the motor.

And you could ude PIC if you used a transistor with it, i will make a digarm of how to do it if you like

But i will look for way to do so without it
[I'll update with more in a min]

Offline FOOKz™

  • Hardware Modder
  • Moderator
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: controlling motors
« Reply #4 on: December 17, 2010, 06:27:05 PM »
*No Back EMF to worry about
*nearly isolated control circuit
*Speed control capability via PWM
*1 tact button control

(i wish i could test it but i picked up a free box of relays a bit back and just now found out they don't work  :eyebrow:  :x:)

OK here is a DPDT switch diagram:


You can do that same idea with a DPDT Relay.

Here is a circuit that i put together in like 15 minutes so yeah...




To code your PIC:

Your PIC is going to look for a Low on pin S. When pin S is High, pin K will be Low.

If pin S is low (tactile switch is pressed) make pin K High but when S is low then K is high for 3 more seconds to keep the motor ON so it can reverse direction.
« Last Edit: December 17, 2010, 06:44:26 PM by FOOKz »

Follow my Instagram and subscribe to my YouTube

Offline Rodent

  • XBOX,XBOX360,PS3,WII
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 2983
  • Post quality +75/-5
  • Gender: Male
  • MODDER, REPAIR, CUSTOM IDEAS.
Re: controlling motors
« Reply #5 on: December 17, 2010, 08:44:53 PM »
WOW thats awsome you came up with that , very fast and looks very easy to make.     

I had to read it twice to see what he was looking to do.....lol

nice work FOOKz

 Tracey: I cant believe Rodent of all people made my damn day
3D0: snacks cartoons and naps  lol sounds like rodents typcial day :rofl:
Rodent consoles mods

Offline FOOKz™

  • Hardware Modder
  • Moderator
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: controlling motors
« Reply #6 on: December 17, 2010, 09:54:35 PM »
thanks rodent.

I want to test this out when i have a bit more free time on sunday night (no work! holiday break for 2 days :w00t: ).

I have a basic stamp thing and i'll go out and buy some working relays for future projects. [actually the relays i have are $12 each but i found them at my bro's company Phoenix Contact; he works logistics and we snagged a few boxes of free samples: LEDs, PIC chips, relays, regulators, ethernet connectors lol]


Adding a PWM speed control:

Just add 2 extra buttons right into the PIC chip where they increase/decrease PWM duty cycle. However a cap is going to be needed on the bilateral transistors' base.


The capacitor helps smooth out the nasty PWM signal and increases "non-real resistance" aka "impedance" on the base of the transistor.

The capacitor helps out by making the PWM signal less stressful to the transistor and motor. Capacitors also remove that jittery effect you see too.

please don't click spoiler if you get confused easily.
[spoiler]PWM works on the AC principle called "Volts Average" which is a DC related equivalent of AC by a factor of 63.7%

So a 1vPK AC Square wave (2vP-P) at 50% duty cycle will dissipate the same power and current as 0.7vRMS AC or 0.637v VAV DC.[/spoiler]

As Duty Cycle increases Volts Average increases because there is "more to go around".

« Last Edit: December 17, 2010, 10:02:39 PM by FOOKz »

Follow my Instagram and subscribe to my YouTube

Offline Rodent

  • XBOX,XBOX360,PS3,WII
  • Acidmods Alumni
  • Around the block
  • *
  • Posts: 2983
  • Post quality +75/-5
  • Gender: Male
  • MODDER, REPAIR, CUSTOM IDEAS.
Re: controlling motors
« Reply #7 on: December 18, 2010, 04:03:16 AM »
I am just getting in to this stuff , I am up there in age so feel so far behind, hope i can learn alot, and hope to go back to school if things work out been out of work for 9 months now, so time to get in to new trade

 Tracey: I cant believe Rodent of all people made my damn day
3D0: snacks cartoons and naps  lol sounds like rodents typcial day :rofl:
Rodent consoles mods

Offline frenulem - No.5417

  • Ultimate Badass
  • Blogs & Media Team
  • Acid Modder
  • *
  • Posts: 633
  • Post quality +23/-0
  • Gender: Male
  • Learning Pascal Cuz i'm dumb and 'Ting
Re: controlling motors
« Reply #8 on: December 18, 2010, 06:24:27 AM »
Hyper, just a thought, you could use the DPDT with two tact switches and just hot glue a peice of plastic to the top of both, so they both press at the same time, should work....right?

Offline FOOKz™

  • Hardware Modder
  • Moderator
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: controlling motors
« Reply #9 on: December 18, 2010, 01:17:10 PM »
no you can't.

Follow my Instagram and subscribe to my YouTube

Offline 802Chives

  • Sargeant at Arms
  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1304
  • Post quality +10/-0
  • Gender: Male
Re: controlling motors
« Reply #10 on: December 18, 2010, 02:19:06 PM »
I have use these in the past for quick and dirty DC motor controll:

http://ww1.microchip.com/downloads/en/devicedoc/21421d.pdf

TC4424


Offline frenulem - No.5417

  • Ultimate Badass
  • Blogs & Media Team
  • Acid Modder
  • *
  • Posts: 633
  • Post quality +23/-0
  • Gender: Male
  • Learning Pascal Cuz i'm dumb and 'Ting
Re: controlling motors
« Reply #11 on: December 18, 2010, 02:37:53 PM »
no you can't.
Haha thought so, just sprung up in my mind and wrote it before i looked into it

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: controlling motors
« Reply #12 on: December 18, 2010, 02:57:23 PM »
could do it with just one tact switch and the relay but the motor would always be on. i might do this depending on how long the parts take to arrive

Offline FOOKz™

  • Hardware Modder
  • Moderator
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: controlling motors
« Reply #13 on: December 18, 2010, 04:27:21 PM »
theres 1001 ways to do the same thing lol bilateral transistors have always worked for me :D bilateral mosfets do even better IMO

You could use a d-type flip-flop with a 4011B NAND gate to control motor direction with a 1 or a 0 input.


Follow my Instagram and subscribe to my YouTube

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal