Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Proteus help

Status
Not open for further replies.

kulanga

New Member
Hi
I need help with Proteus 7.4 about how to connect AC induction Motors with the variable speed drive.I searched for the Induction motors and found BLDC-star,and BLDC-triangle, and connect(BLDC-star) it with my simulated VSD but it didnt work,,, but i have only the mobile vesion of proteus 7.4 which doesent have help file.....

SO I need a simple help about how to do it in the Proteus that I can make simulation for my whole circuit


kulanga
 
Can you try unipolar stepper motor, for incase to see if you will get an output. I used it in my project. check page 45 on the attachment.:)
 

Attachments

  • Home Automation.pdf
    1.5 MB · Views: 1,632
thanks

thanks for ur valuble information, i am going to moddle a VSD using proteus and i wana know whether the proteus have induction motor modle or how 2 use BLDC-star,and BLDC-triangle, in proteus 7.4
 
When you post a thread, try to make sure that you avoid usage of abbreviations because we can interpret them in different ways. For instance, I do not understand which VSD moddle you’re talking about. Can you explain and I would like to help you if I can.
 
helping

When you post a thread, try to make sure that you avoid usage of abbreviations because we can interpret them in different ways. For instance, I do not understand which VSD moddle you’re talking about.
 
WTF is the point of that post??
When you post a thread, try to make sure that you avoid usage of abbreviations because we can interpret them in different ways. For instance, I do not understand which VSD moddle you’re talking about.
 
k sorry lambohang
so yea Variabe speed drive which changes induction motor speed by using 6 IGBTs(Insulated Gate Bipoler transistors,,which act as switches).. if i explain the drive first it converts standerd AC supply to DC by 6 diode bridge and then the DC is converted to variablefrequency,variable voltage (by using Pulse width modulation) supply to the induction moter by switching the IGBTs)
I just wanna modle this befor making it ..pl help
 
Hi
I need help with Proteus 7.4 about how to connect AC induction Motors with the variable speed drive.I searched for the Induction motors and found BLDC-star,and BLDC-triangle, and connect(BLDC-star) it with my simulated VSD but it didnt work,,, but i have only the mobile vesion of proteus 7.4 which doesent have help file.....

SO I need a simple help about how to do it in the Proteus that I can make simulation for my whole circuit


kulanga
Hi Kulanga can you post the circuit where you connected BLDC-star and the code. that would be helpful because we can be able to
see where corrections have to be made. For instance look at my circuit diagram on the attachment and the code I used to run the program.


Code:
;PROGRAM FUNCTION:turning motor
    list        P=16F877a
    include    "P16F877a.inc"
                __config 0x3D18

    CBLOCK 20h   ; Temporary storage
         dc1
     ENDC

    org     0x0000
    goto Start

;Program Start:
 Start
    call Init                ;to initialize portb
;-------------------------------------------------------------------------
;Subroutines: wait
  ; Outer loop iteration count
       movlw   5            ;count 5 times
       movwf   dc1
       decfsz  dc1,F        ;Decrement 5, Skip if 0
       goto    $-1          ;wait for loop count to finish
       return
;-------------------------------------------------------------------------
Init
       clrw                 ; Zero.
       movwf   PORTB        ; Ensure PORTB is zero before we enable it.
       bsf     STATUS,RP0   ; Select Bank 1
       movlw   0xF0         ; Set port B bits 0-3 as outputs
       movwf   TRISB        ; Set TRISB register.
       bcf     STATUS,RP0   ; Select Bank 0
;---------------------------------------------------------------------------
Main
  ;applying different sequence of pulses to drive motor
       movlw b'1001'
       movwf PORTB
       call wait

 end
 

Attachments

  • tst.jpg
    tst.jpg
    106.2 KB · Views: 2,609
Hello! I am building an incubator. I am posting here because in my thread no one responded, maybe it's because of the title. I have created the biggest part of my code so far, but I reached the point where I really need some help! I need to turn the eggs every 8 hours. I configured TMR0 to give me an interrupt when 8 hours pass, but I don't know how to control the motor. I never worked with motors before. I am thinking about using a DC motors with Hall sensors to make it stop when it has reached the limit of tilting the racks with eggs. I need to tilt the racks 30 degrees up and 30 degrees down.
This is also a project for my college so I am supposed to do it in asm. Here is the link to my thread :https://www.electro-tech-online.com/threads/full-option-egg-incubator-help.114276/#post941001

Here is the code I made so far:

Code:
#include <pic.h>
__CONFIG(HS & WDTDIS & PWRTEN & BORDIS & LVPDIS & DUNPROT & WRTEN & DEBUGEN & UNPROTECT);
#include "delay.h"
#include "stdlib.h"
#include "delay.c"
void initializari(void)
	{
	GIE=1;			// initializeaza intreruperi globale
	INTE = 1;
	ADCS1 = 0;		//select Fosc/8
	ADCS0 = 1;
	ADCON1=0;		// A/D port configuration 0
	ADFM = 1;		//right justified result
	ADON=1;			// porneste conversia A/D	
	T0IE=1;
	TMR0=0;				//initiere TMR0
	T0CS=0;				//clock intern
	T0SE=0;				//numarare pe front crescator
	PSA=0;				//utilizare prescaler
	PS0=1;				
	PS1=1;				//prescaler de 256
	PS2=1; 
	}

unsigned int read_adc(unsigned char channel)
{
	channel&=0x07;			// trunchiem canalul la 3 biti	
	ADCON0&=0xC5;			//eliberam canalul curent
	ADCON0|=(channel<<3);	// aplicam noul canal selectat
	DelayMs(10);
	ADGO=1;					//initiem conversia pe canalul selectat
	while(ADGO)continue;
	return(((ADRESH&0x03)<<8)+ADRESL);	// returneaza rezultat pe 10 biti
}

float temp_usf(void)
{
	int  i;
	float temp_an, temp, temp1;
	temp_an=0;
		for(i=0; i<4; i++)
		{
		temp_an =temp_an+read_adc(0);
		DelayMs(5);
		}
		temp_an=temp_an/4;
		
	temp =temp_an*((5.0*100.0)/1023.0);
	temp1=temp*100;
	
return(temp1);
}

float temp_umf(void)
{
	int  i;
	float temp_an, temp, temp2;
	temp_an=0;
		for(i=0; i<4; i++)
		{
		temp_an =temp_an+read_adc(1);
		DelayMs(5);
		}
		temp_an=temp_an/4;
		
	temp =temp_an*((5.0*100.0)/1023.0);
	temp2=temp*100;
	
return(temp2);
}

void InitUSART() //rutina de setare si initializare a modulului USART
{
//	SPBRG=64;	//19200 baud la 20 MHz
	SPBRG=25;	//9600 baud la 4 MHz
	BRGH=1;		//high speed
	SYNC=0;		//modul asincron
	SPEN=1;		//activare port serial

	TXIE=0;		//dezactivare intrerupere USART la transmisie
	TX9=0;		//transmisie pe 8 biti
	TXEN=1; 	//activare transmisie 

	RCIE=0;		//dezactivare intrerupere USART la receptie
	RX9=0;		//receptie pe 8 biti
	CREN=1; 	//activare receptie
}

void TransmitUSART(unsigned char c)	//Rutina de transmitere a unui octet la portul serial
{
	while(!TXIF);	//asteapta sa se termine transmisia precedenta
	TXREG=c;	//incarca si transmite noua valoare
}

void TransmitUSARTC(const char* c)
{
	int i =0;
	while(c[i]!=0x0 && c[i]!=0xd)
	{
		TransmitUSART(c[i]);
		i++;
	}
//	TransmitUSART(0xd);
}

unsigned char ReceiveUSART()	//Rutina pt receptia unui octet de la portul serial
{
	unsigned char c;							
	while(!RCIF);	//asteapta pana se incheie receptia
	c=RCREG;	//octetul receptionat este preluat din RCREG	
	return c;	
}

void afisare_usart(unsigned int i)
 {
	int zeci,unitati;
	zeci = i/10 + 48;
	unitati = i%10 + 48;
	while(!TXIF);
	TXREG = zeci;
	DelayMs(5);
	while(!TXIF);
	TXREG = unitati;
	
}

void afisfloat(long i)
{
	int nr1, nr2;
nr1=i/100;
nr2=i%100;
	if (nr2>0)
	{
	afisare_usart(nr1);
	TransmitUSARTC(",");
	afisare_usart(nr2);
	TransmitUSART(0xd);
	DelayUs(250);
	}
	else
		{
		afisare_usart(nr1);
		TransmitUSART(0xd);	
		DelayUs(250);
		} 
}

volatile int intoarce,count;

void interrupt isr(void) //este apelata cand este generata o intrerupere
{ 
 
  if(T0IF)//intreruperea este generata de timer0 ?
   {
      count++;
      if(count==152){ //de test , ar trebui sa seteze "intoarce" la 10 sec
         intoarce=1;
         count=0;
      }
      T0IF=0;//am procesat intreruperea, resetam flag-ul pentru a se putea apela din nou
   }
}


void main(void)
{
float temp_uscat,temp_umed,umid,dif,dif1;
int temp,sw,um;
long count;

   	
	initializari();
   	DelayUs(20);
   	InitUSART();
   	TRISB = 0x01;
   	TRISC = 0x80;
	TRISD = 0;

while(1)
{
	temp_umed=temp_umf();
	DelayUs(250);
	temp_uscat=temp_usf();
	DelayUs(250);
	dif=temp_uscat-temp_umed;
	dif1=dif/100;
	DelayUs(250);

	temp=temp_uscat/100;					
	if (temp < 38)							//daca temperatura scade sub 38 grade
			 RD6=1;							// pornesc rezistenta de nichelina	
			else 
			 RD6=0;
							
				TransmitUSARTC(" 1.Temperatura uscata este : ");
				afisfloat(temp_uscat);
				DelayUs(250);
				
				TransmitUSARTC(" 2.Temperatura umeda este : ");
				afisfloat(temp_umed);
			    DelayUs(250);

				TransmitUSARTC(" 3.Diferenta este : ");
				afisfloat(dif);
				DelayUs(250);
  
if ((dif1 < 5)  || (dif1 > 7)) umid=0;							// umiditatea se alege in functie 
	else if ((dif1 >= 5) && (dif1 < 5.5 )) umid=70;				// de diferenta dintre 
			else if((dif1 >= 5.5 ) && (dif1 < 6)) 	umid=65;		// cele doua temperaturi
				else if((dif1 >= 6) && (dif1 < 6.5)) umid=62;
						else umid=60;

				TransmitUSARTC(" 4.Umiditatea este : ");
				afisare_usart(umid);
				TransmitUSARTC("  %");TransmitUSART(0xd);	
				DelayUs(250);
			
	RD5=0;
	if(intoarce)
		{
      intoarce=0;
      RD5=1;
	  // DelayMs(1000);
   		}

 				 
DelayMs(1000);   DelayMs(1000);   DelayMs(1000); //delay ca sa mearga mai lent pe terminal afisarea
 } 
}

I tried implementing some asm code in my project but I got so many errors I didn't know where to start.
I also need to control 2 fans, that is like controlling 2 BLDC motors, so i need all the help you can give me.
If anyone needs help with the comment just say, and I will translate them.
Thanks in advance!
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top