Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

circuit and program problems...

Status
Not open for further replies.

khangzing

Full Member level 2
Full Member level 2
Joined
Feb 22, 2013
Messages
123
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Visit site
Activity points
2,148
is this circuit having any problems? project schematic.png

and i'm using this code to modulate the signal to get 38khz

#include <PIC.h>

void main()
{

CCP1CON = 0X08; //select PWM mode.
PR2 = 124; //Set period register for approx. 38khz.
CCPR1L = 62; //Set duty cycle for approx 50%
T2CON = 0X04; //Set timer2 pre/post scalers to 0 & start Timer2.
PORTC = 0x12;
TRISC2 = 0; //pin 17 of 16F877A DIP package.TRISC.2
//will act as enable/disable for PWM output


}

or


list p=16F877a
#include "p16f877a.inc" ;include the defaults for the chip

count equ 10

IR_PORT Equ PORTC
IR_TRIS Equ TRISC
IR_Out Equ 0x01

Start bsf STATUS, RP0 ;select bank 1
movlw b'00001111' ;set PortC 1st 4 bits outputs, next 4 bits input
movwf IR_TRIS

TX_Start movlw d'92'
call IR_pulse


IR_pulse
MOVWF count ; Pulses the IR led at 38KHz
irloop BSF IR_PORT, IR_Out
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
BCF IR_PORT, IR_Out
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP ;
NOP
NOP
NOP ;
NOP ;
DECFSZ count,1
GOTO irloop
RETLW 0
end

i tried to connect the sensor and microcontroller without the voice chip but it seem doesn't work....can anyone verify for me?@@
 

Your circuit has many drawing errors so if you have made a PCB from it then the PCB will also have errors and won't work. You have missing junctions on wires and wires shorting out components, for example. An ERC check would report them.

Keith
 

A part the drawing errors reported by keith, you have some design errors too. The capacitors near the 7805 should be polarized; the one near XR1 should probably be polarized too (but I'm not sure).
 

keith,u mean the wire and the component doesn't connect each other?what else?i'm new in this...

T3STY,what u mean polarised the capacitors?u mean use the electrolytic capacitor but not ceramic?
 

Yes, Electrolytic capacitors are polarized and they're suitable for the task, but you can use tantalum capacitors too. Have a look here for some info on the difference between polarized and non-polarized capacitors:
https://www.edaboard.com/threads/56473/
 

T3STY,keith mean the wire and the component doesn't connect each other?u know what error is that?
 

Yes, he meant that. And he also meant that there are a lot of short-circuit connections. For instance, have a look at the connections of Q2: both pins are connected on the vertical rail, which means that they're short-circuited - it means the component won't actually work. Also, there are a lot of rails that should (presumably) be connected to another another rail, but there is no node dot indicating it, so it means they're physically disconnected (look at the connection near the 100K resistor near LED2). I'm not sure the program you're using is meant to work like that, but the general rules in electronic schematics say that a 3-way (or higher) rail connection shall be defined as a node, indicated with a large dot; more rails crossing one over the other, but without a node dot, are physically disconnected.
Another issue is for example the 10K resistor connected on pin 1 (MCLR/VPP): it clearly shows a rail passing through. That's ambigous: is it connected or not? If it is, then the pins are short circuited (it's like the component is not even there); if it's not, what is the 10K resistor there for?

Please, check your circuit, try to rebuild it completely and the good way, so we may understand what's all about.
 
Last edited:

It's sort of OK now.

The connections on the PIC should be OK, but I'm having some troubles understanding a few connections on the other unit. You've connected A_IN with A_OUT, which will send any analog output back in, in a loop. Especially on turn on it may cause a noise loop and I'm not sure how good that is. The SP+ and SP- pins should be connected to the inverting and non-inverting inputs of the op-amp, while you've connected SP+ to the op-amp and SP- to GND; I'm unsure whether it will work... also, the op-amp has no feedback circuit, which means it's in open-loop amplification and it will have a very limited bandwidth (around 1MHz) loosing all the other bands; I don't know what you'll be using that op-amp for, but if it's for any audio listening application, it's not anywhere near good. But I suppose this circuit is only meant to generate some sort of output frequency (38kHz?) so it should be ok.

Have you built it yet? Are you having any troubles?
 

I'm doing a project that when obstacle detected the voice store in apr9600 will alert the user through speaker.the both sp pins wrong?and for the an_in and out I just follow the circuit in data sheet...
 

BTW - the battery is reversed (the short stub is the negative)

and why do you use such a low ohmic resistive divider (28 + 72 ohm)?

the capacitors on the 7805 should be a lot bigger (say 10µF)
 

sorry,previous 1 is wrong,i made the chances and i put the wrong schematic,u mean i need to change the capacitor near 7805?

the low resistive divider is because the max voltage for the tsal6200(LED3) which is infrared emitter is only 1.6v?

is that right?

https://elcodis.com/parts/766705/TSAL6200.html

- - - Updated - - -

sorry,previous 1 is wrong,i made the chances and i put the wrong schematic,u mean i need to change the capacitor near 7805?

the low resistive divider is because the max voltage for the tsal6200(LED3) which is infrared emitter is only 1.6v?

is that right?

http://elcodis.com/parts/766705/TSAL6200.html

- - - Updated - - -

for this circuit,is that better than the 1 i post previously?i made 3,i not sure which to use...the pin 15 no need connect to the negative of speaker?
 

Attachments

  • may30.png
    may30.png
    43.8 KB · Views: 67
  • may30-apr.png
    may30-apr.png
    22 KB · Views: 74
  • may30.png
    may30.png
    43.8 KB · Views: 75
  • project schematic updated.png
    project schematic updated.png
    39.6 KB · Views: 74

It depends on the application jayanth, the circuit he posted would work on very long distances while the IR sensors only work up to a few meters.

As I checked the APR9600 schematic the connections on your circuit should be right.
Pin 15, leave it disconnected as it's unused.
Only change the 7805 capacitors to be polarized (either electrolytic or tantalum), 10uF up to 47uF should be just fine.
And I quote that: (I didn't notice it before)...
BTW - the battery is reversed (the short stub is the negative)
 

so pin 15 no need connect anything?just leave it disconnect?the pin 4 of LM386 should just connect to ground?or connect to negative of speaker and then ground?
 

if i use copper strip board, how to isolate from 1 hole to another hole?for example i wanted to connect 28 pin Ic,i have to connect it horizontally which mean not in phase with the copper line otherwise will short circuit,but if i connect horizontally,pin1 and pin 28 will short also right?how to overcome this?
 
Last edited:

You should either use two separate pieces of strip copper board, or cut the strips between the IC pins so they're not short circuited anymore. If I may suggest, a breadboard would be better suited for prototyping.

Yes, simply leave pin 15 not connected to anything.

As in the schematics, pin 4 of LM386 has to be tied directly to GND. It has no other component in between.
 

now only i realise that pin 16 of apr9600 is VCCA which in datasheet should connect to AC supply whereas VCCD (pin 28 ) need to connect to DC supply,how to solve this?@@
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top