Eb011 and stepper motor / E-blocks and DC motor / Switch

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Walik
Posts: 5
Joined: Sat Apr 21, 2012 11:16 am
Has thanked: 5 times
Contact:

Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by Walik »

Hello everybody, I am here because i have three questions that need answers for a project.

1) I want to use an eb011 in order to drive a 4 phases unipolar stepper motor, so I will connect the 4 coil ended wires to the outputs 1, 2, 3, 4 but where should plug the two common wires in ? Should I connect them to the ground ?

2) i want to use an other E-block in order to control a simple DC motor that I just want to run during the whole program, what E-block should I use ?

3) I want to user to be able to change a variable (I'm building a card dispenser and the user got to be able to choose if he wants 2 or 3 cards each time) how can I achieve this ?

Thank you in advance :)

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by dazz »

Im answering based on the assumption that you want to use a stepper motor to control the card dispenser, the reason i suggest a stepper and photointerupter is that its a simple and accurate hardware solution, in the industry i used to work in this combination was used on copiers printers,card printers and dispensers and is relatively cheap or mainly free ;)

1 look at the stepper motor datasheet or search on google as there are lotsa of sites about stepper connections
2 not sure someone else will answer soon ( but if you want to use a dc motor to dispence then i would use a slotted disc on the motor and a photointerupter and run the motor for a set number of pulses )
3 search on this forum for button control as there are loads of posts on either using a single button, multiple buttons or a keypad, one thing to look at on the dispensing side would be using a photointerupter to detect the leading edge and trailing edge of the card then set up a count so that a count of two = 1 card 4= 2 cards etc, then when the interupter is triggered by a card being dispensed it will say send 15 pulses to the stepper and increase the count.

so your flowcode could look something along these lines
input from keypad
decition based on how many cards selected
edge detect starts count
stepper operated
check count against cards requested
either restart stepper or finish


decide on the hardware then it will be easier to get help as there are lots of combinations of code to use depending on the hardware
Not a lot of help but some ideas to play around with hth
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Walik
Posts: 5
Joined: Sat Apr 21, 2012 11:16 am
Has thanked: 5 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by Walik »

Ideally, my system would work like the one on this video : http://www.youtube.com/watch?v=q8f2kCMyg2A

You see, there is a stepper to make the system rotate vertically, the DC motor is always spinning during the "card launch" time and the third motor, the other stepper is there in order to just let pass one card at a time.

I'm gonna use a EB006 with a 16F877 (I think, maybe a smaller, I'll see), plus one EB011 (power board) for each stepper, and maybe a third for the DC one, now I know I've got to use an EB007 (push-to-make swith board) to manage the two inputs I needed.

An other question, the EB006 requires a 13.5V supply, but would 12V be enough ? It would simpler considering the fact that my two steppers need 12V each.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by dazz »

ah cheers for the video link, ok a few things, the motor that passes a card to the exit feed assembly isnt a stepper motor(although theres no reason why a stepper could not be used) that looks like a photocopier motor assembly, these are normally dc motors with either a fixed internal photointerupter or a hall effect switch and magnet inbuilt. if you have one of those you need to set up the pulses for a card etc, that one is basically a simple photocopier exit/delivery system without jam detection, heres a link#[youtube=]http://www.youtube.com/watch?v=QdyzgpKL ... re=related[/youtube] to a simpler system that uses just two motors again just like a simple copier pick up system, this one is easier to implement in software just requiring a fixed number of forward pulses followed by a few reverse pulses to feed one card at a time .


for the normal dc motors that just rotate i would use a relay to simply switch on and off the motor
The base motor again a stepper you would need to code for various players , so you would need 2 variables one for the number of players and another for the step count(or pulses) so if you had say 3 players you would need to divide the steps in one revolution of the base by 3 and so on the simplest way to implement this would be using a decition branch, one of the easier ones to do as you know the number of motor steps eg
players =3 (Yes) step count =3
no
players = 4 (yes) stepcount =4 and so on

you would then be looking at a chart along the lines of

set initial variables
input number of players
input number of cards

rotate base motor
switch on exit motor
switch on card feed
rotate base etc

hth


I dont have an EB006 but looking at the datasheet you can use 12v matrix can supply a power supply with the board, one thing to look at is the bundles on the main site as this looks a cost effective way to get a bundle of boards and software at a discounted price for the cost of flowcode v5 and a eb006 you can get a switch block,led block and lcd block( at a real good price)
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Walik
Posts: 5
Joined: Sat Apr 21, 2012 11:16 am
Has thanked: 5 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by Walik »

Thank you for all the informations :D

i have no time to start from scratch so I will conserve my design idea (but the lego one is really nice)

About the number of players thing, it wasn't required in the objectives I have (it's a school project) but I will certainly integrate it.

Finally, I will only use a 16F88 :

- Port A : EB011 (power board) --> I will drive the two steppers with this one (A0-A3 for the first one, A4-A7 for the other)

- Port B : EB038 (relay board) --> In order to drive the DC motor
EB007 (push-to-make switch board) --> To manage some inputs in my program (start a cycle, 2-3 card, and maybe number of player)

So I will use a 12V battery to power the whole thing (EB006 and EB011 ; EB038 and EB007 are powered by EB006).
I still have a question though, my DC motor is a 3V one (from 1.5 to 4.5), will it be okay to power it with the EB038 (relay board) ? And how should I connect it ?

Thnak you again :)

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by medelec35 »

Walik wrote: I still have a question though, my DC motor is a 3V one (from 1.5 to 4.5), will it be okay to power it with the EB038 (relay board) ? And how should I connect it ?
That will be very easy.
The relay is just an electromechanical switch.

So you connect the +ve motor power supply to common.
Connect the +ve motor to NO (normally open)
the -ve of motor supply and motor connected together.

With 0V at the i/p of Bit 0 for example, relay1 off so contacts will be open, so motor will not be running.

With 5V at the i/p of Bit 0, relay1 will be on so contacts will be closed, so motor will be run.

If you want to control the speed of dc motor then you can use a FET (Field Effect Transistor) to supply the motoe, then use PWM for controlling the speed.
That method is very popular and works well.

Martin
Martin

Walik
Posts: 5
Joined: Sat Apr 21, 2012 11:16 am
Has thanked: 5 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by Walik »

Ok, so if I want to power my motor with the EB006 :

I connect the 5V out of the EB006 to COMMON
I connect the +ve of my motor to NO
But what about the -ve of my motor, where sould I put it ? Sould I connect it to the ground ?

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by dazz »

i would do it slightly differently, one of the best things about a relay is that the output is seperated from the input so that you can use a very small voltage or current to switch a much larger voltage or current, i would build a simple 5v regulator
and connect as follows 12v battery to regulator- regulator output to (5v or 3V)fuse (measure current drawn by motor and work out a fuse rating just slightly above the max current drawn) to common on relay board
positive of motor to normally open on relay board
-ve of motor back to 0v of battery

why i would do it that way is if the motor stalled then as the current rose it would pop the fuse, if connected to the eb006 theres a chance that if the motor stalled then it could destroy the board(these things do sometimes happen)

so although my way would require a voltage regulator and a fuse( cost a couple of quid) , if it did stall and destroy the fuse you are only a few quid down ,if the motor feed was coming from the eb006 and it got destroyed then that would cost one hell of a lot more

hth
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by medelec35 »

Walik wrote: But what about the -ve of my motor, where sould I put it ? Sould I connect it to the ground ?
medelec35 wrote: the -ve of motor supply and motor connected together.
Yes the -ve we normally connect to ground so all the negatives of supplies are connected together, if isolation is not necessary.

So yes, if using a relay, you can connected the -ve of motor to ground so long as -ve power that supplies motor is also connected to ground.

I would also agree with dazz,
I would not use the EB006 to supply motor.
Use a separate supply!
Martin

Walik
Posts: 5
Joined: Sat Apr 21, 2012 11:16 am
Has thanked: 5 times
Contact:

Re: Eb011 and stepper motor / E-blocks and DC motor / Switch

Post by Walik »

Ok, I think I have all the informations I needed to finish my system, thank you, the two of you have been a great help :D

See you another time ;)

Post Reply