2 A motor shield

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

2 A motor shield

Postby zhengkoon8 » Wed Mar 28, 2012 8:58 pm

Hi,
I am doing some FYP, I look and learn the code programming for Arduino, and I am wonder can I program Arduino using this shield to perform speed and different direction? I know that the shield can perform PWM and PLL but i can only choose one of it to perform. if there any suggestion?

secondly, is the any way i can know the duration time when the current is supply to the motor for programming? i know that is a millis() function. but it cannot be use to detect when i start supply current for the motor.

Please reply as soon as possible. thank you very much and very appreciate for answering the question.

regards

zheng koon
zhengkoon8
Newbie
 
Posts: 10
Joined: Mon Mar 05, 2012 3:34 pm

Re: 2 A motor shield

Postby robosang » Wed Mar 28, 2012 9:27 pm

zhengkoon8 WROTE:Hi,
I am doing some FYP, I look and learn the code programming for Arduino, and I am wonder can I program Arduino using this shield to perform speed and different direction? I know that the shield can perform PWM and PLL but i can only choose one of it to perform. if there any suggestion?

secondly, is the any way i can know the duration time when the current is supply to the motor for programming? i know that is a millis() function. but it cannot be use to detect when i start supply current for the motor.

Please reply as soon as possible. thank you very much and very appreciate for answering the question.

regards

zheng koon


You say you study PWM and PLL? So what is the PWM and PPL?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: 2 A motor shield

Postby zhengkoon8 » Wed Mar 28, 2012 9:47 pm

PWM is pulse mode modelation while PLL is phase lock loop.

can advice will you give me so that i able to do what i want?

thank you very much for your reply
zhengkoon8
Newbie
 
Posts: 10
Joined: Mon Mar 05, 2012 3:34 pm

Re: 2 A motor shield

Postby ABSF » Wed Mar 28, 2012 10:01 pm

zhengkoon8 WROTE:PWM is pulse mode modelation


No, PWM is Pulse Width Modulation.

Do you know what is BMW?

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: 2 A motor shield

Postby zhengkoon8 » Wed Mar 28, 2012 10:10 pm

Hi Allen,

thanks for reply. sorry for typing wrong for it. but i seriously dont know what is BWM. can you tell me? thanks

regards

zheng koon
zhengkoon8
Newbie
 
Posts: 10
Joined: Mon Mar 05, 2012 3:34 pm

Re: 2 A motor shield

Postby ABSF » Wed Mar 28, 2012 10:24 pm

BMW is "Black Magic Woman" :lol: :lol: :lol:

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: 2 A motor shield

Postby Brian Griffin » Wed Mar 28, 2012 10:30 pm

ABSF WROTE:BMW is "Black Magic Woman" :lol: :lol: :lol:

Allen


Man, it's been some time since I heard of that song. My pa's old vinyl collection still has it! :)
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: 2 A motor shield

Postby ABSF » Wed Mar 28, 2012 10:52 pm

@Brian, was it sung by Santana or something like that?

zhengkoon8 WROTE:secondly, is there any way i can know the duration when the current is supplied to the motor for programming purpose? i know there is a millis() function. but it cannot be use to detect when i start supply current for the motor.


millis() is a non-stop running variable counting in milli-seconds. It expires in 50 days so it should be good for timing any events. So if you want to know the duration the motor is running, just do it this way:

1. start the motor.
2. take unsigned long T1=millis()
3. do your other stuffs
4. stop motor
5. take unsigned long T2=millis()
6. duration of motor running=(T2 - T1) in ms.

Is that what you want?

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: 2 A motor shield

Postby Brian Griffin » Wed Mar 28, 2012 11:11 pm

@ ABSF - yes, it's by Santana and some other guys which I don't really know them. My sibling's a blues enthuiast, maybe he'll know.

Btw, PWM = pulse width modulation. The ON/OFF width of the square pulses determines the amount of voltage.

I can't explain to you what's a PLL because I had not studied much on it. Others can give a more layman explaination on PLL.
PIC - UIC00B from Cytron (replacement for my broken PICKit 2), Pickit 3, MikroC for PIC
dsPIC - MikroC for dsPIC, mikromedia board (dsPIC33)
AVR - AVR Dragon
Parallax - Prop tool
User avatar
Brian Griffin
Enthusiast
 
Posts: 403
Joined: Mon Jan 17, 2011 9:36 am

Re: 2 A motor shield

Postby zhengkoon8 » Wed Mar 28, 2012 11:16 pm

Hi
Thanks Brian for reply :) appreciate it
zhengkoon8
Newbie
 
Posts: 10
Joined: Mon Mar 05, 2012 3:34 pm


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 39 guests

cron