SKKCA 21 with PIC16F877A

Bluetooth, XBee, RF......

SKKCA 21 with PIC16F877A

Postby Han Giap » Thu Apr 08, 2010 8:27 am

hi and greeting..

i be able to communicate with SKKCA 21 with PIC16F877.... example... i make my own GUI, with button ON OFF...

The communication was successful.. i can control the ON OFF of output at my PIC.
when i apply a motor driver L293, the output of the motor drive should voltage of 4.48V+,

example of code (to drive a dc motor through L293)

if(a=='u')//Base Up
{while(a=='u')
{
servo2=1; //Enable pin high
servo0=1;
servo1=0;
}
}
if(a=='s') //Base Stop
{while(a=='s')
{
servo2=0; //Enable pin low
servo1=0;
servo0=0;
}
}
if(a=='y') //Base Down
{while(a=='y')
{
servo2=1; //Enable pin high
servo0=0;
servo1=1;
}
}

the problems come when i connect the motor drive to a dc motor, i use the bluetooth module. when i press a button which i define as 'u' or 's' or 'y'. the motor rotate awHile.. then it stop.. then the bluetooth is disconnect..

may i know wat the problem?


thanks in advance
Han Giap
Novice
 
Posts: 20
Joined: Thu Mar 25, 2010 7:36 pm

Re: SKKCA 21 with PIC16F877A

Postby ober » Thu Apr 08, 2010 9:04 am

Seem like the whole system has reset after the motor started. Are you sharing the same power source for motor and PIC+SKKCA? Seem like the motor is taking too much power and at some moment the voltage is not enough for PIC and SKKCA, thus PIC reset, the motor stop, and SKKCA disconnect.

Supply your motor with separated power source, just common the gnd, it should be better.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: SKKCA 21 with PIC16F877A

Postby Han Giap » Thu Apr 08, 2010 1:20 pm

ooo... that why i tough so... but i not confirm wit it..

so, if i add an external power of 5V from another 7805 power regulator, same ground... does it will short circuit the bluetooth?

thanks again
Han Giap
Novice
 
Posts: 20
Joined: Thu Mar 25, 2010 7:36 pm

Re: SKKCA 21 with PIC16F877A

Postby sich » Thu Apr 08, 2010 4:55 pm

Better use two batteries or power supply sources. Connect the ground together.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: SKKCA 21 with PIC16F877A

Postby Han Giap » Thu Apr 08, 2010 8:55 pm

huh :shock:

which idea is better?

5v frm another power regulator or use battery?

supply to pin16 of L293 rite?
Han Giap
Novice
 
Posts: 20
Joined: Thu Mar 25, 2010 7:36 pm

Re: SKKCA 21 with PIC16F877A

Postby sich » Fri Apr 09, 2010 10:53 am

Now you supply your motor driver and motor with the same voltage regulator that supplies the circuit?
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: SKKCA 21 with PIC16F877A

Postby Han Giap » Sat Apr 10, 2010 9:09 am

hi,


yup... nw i trying to use L298 motor drive... hopes can solve the problem..

meanwhile...i duno wat wrong... i check my circuit more than 6 times dy.. but still cant find out wat wrong.... my RB0 pin wont come out as 5V while other pin is ok... but when i use the MCU on cytron SK40B... the RB0 got 5V @@ :roll:

thanks again
Han Giap
Novice
 
Posts: 20
Joined: Thu Mar 25, 2010 7:36 pm

Re: SKKCA 21 with PIC16F877A

Postby sich » Sat Apr 10, 2010 12:32 pm

Han Giap WROTE:my RB0 pin wont come out as 5V while other pin is ok... but when i use the MCU on cytron SK40B... the RB0 got 5V @@

I don't get what you mean... :? Please explain in details.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: SKKCA 21 with PIC16F877A

Postby Han Giap » Sat Apr 10, 2010 11:46 pm

sich WROTE:
Han Giap WROTE:my RB0 pin wont come out as 5V while other pin is ok... but when i use the MCU on cytron SK40B... the RB0 got 5V @@

I don't get what you mean... :? Please explain in details.



hi..

wat i means is..

example

i write... RB0 =1;
RB1 =0;
RB2 = 1;

what happen is RB0 n RB2 shows 5V on multimeter while RB1 shows 0V.. that what i try 2 weeks ago, either on SK40B or my circuit board.. but last few day.. i duno what wrong.. my RB0 shows voltage of 1.4V to 2.4V (PIC16F877 try on my circuit board) while other port is ok.. but on cytron SK40B is show RB0 =5V ... that why i confuse :shock:, what the heck is wrong :o

then this morning i try burn same code to another PIC16F877, RB0 shows 5V on board circuit board.. :o

thanks
Han Giap
Novice
 
Posts: 20
Joined: Thu Mar 25, 2010 7:36 pm

Re: SKKCA 21 with PIC16F877A

Postby sich » Mon Apr 12, 2010 10:37 am

Maybe there's something wrong with your circuit. Maybe the pin is connected to other pin (shorted slightly somehow) due to bad soldering. However, I'm not sure. You got to check it.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Next

Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 35 guests