Pages: [1]   Go Down
Author Topic: Need to use all three timers in Arduino  (Read 646 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi.

i'm working on a project to build a soft starter for 3-phase AC induction motor. i need to use all three timers that included in aTMega328. but i don't understand anything about setting up the register. is there any library that using all three timers?

thx u.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is there any library that using all three timers?
No you generally need on timer for the hose keeping like the millis() task.
If you need three timers then go for a Mega, that has four timers, one for housekeeping and the other three to play with.

Quote
but i don't understand anything about setting up the register
I am not sure what you are going to use the timers for and if you actually need three of them but they are all different, see the data sheet for the chip to learn how to set them up.
Logged

Global Moderator
Online Online
Brattain Member
*****
Karma: 485
Posts: 18780
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The three timers actually have 6 outputs. Each one has an A and B side. As for Timer 0, you may or may not care about the housekeeping Grumpy_Mike refers to, and in any case you could run the timer at the right speed to keep doing that.
Logged


Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 207
Posts: 12912
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


The ATtiny861 (and family) is probably a better choice...

http://www.atmel.com/Images/doc7827.pdf

Quote
The Timer/Counter1 (TC1) module of the ATtinyX61 family is very well suited for driving threephase motors.

http://www.atmel.com/devices/attiny861.aspx
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The three timers actually have 6 outputs. Each one has an A and B side. As for Timer 0, you may or may not care about the housekeeping Grumpy_Mike refers to, and in any case you could run the timer at the right speed to keep doing that.

yes i understand that each timers have 6 output, but how do i set that up for my program?

i read the TimerOne library and that library is using the timer1. i need a library like that but using the timer0 and timer2. because in my problems i need to control TRIACs firing signal for 3 phase system. and i realize that i cannot use just one timer.

can you help me setting up the other timers?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The ATtiny861 (and family) is probably a better choice...

http://www.atmel.com/Images/doc7827.pdf

Quote
The Timer/Counter1 (TC1) module of the ATtinyX61 family is very well suited for driving threephase motors.

http://www.atmel.com/devices/attiny861.aspx


i know that another microcontrollers are capable of doing 3 phase motor drive, but i want to use arduino because the power of sharing that arduino have is priceless   smiley-lol

but i'm having trouble with the programming right now....
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
need to control TRIACs firing signal for 3 phase system. and i realize that i cannot use just one timer.
Why not?
I am assuming it is for phase angle control, once you have detected the zero crossing for one phase you know it for the others. Are you going to have different delays for each phase?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
need to control TRIACs firing signal for 3 phase system. and i realize that i cannot use just one timer.
Why not?
I am assuming it is for phase angle control, once you have detected the zero crossing for one phase you know it for the others. Are you going to have different delays for each phase?

yes, it is for phase angle control. but my system is using feedback from speed sensor and current sensor, so i'm thinking that the delay will change if i change the load for the motor.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes but do you want the same dealt on all three phases, I am assuming that you would. Therefor you only need to time the delay and then a repeat. I make that only two timers at most.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes but do you want the same dealt on all three phases, I am assuming that you would. Therefor you only need to time the delay and then a repeat. I make that only two timers at most.

didn't i need to detect every phase zero crossing?

so i just need to detect the first zero crossing and firing the other phases at every 1200 delay?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so i just need to detect the first zero crossing and firing the other phases at every 1200 delay?
Yes they are all going to be hard locked in phase so ther is no need to detect the zero crossing for each phase.
Logged

Pages: [1]   Go Up
Jump to: