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.

Microcontroller's ADC acts strange when powersupply other than USB used

Status
Not open for further replies.

secretagent

New Member
Hi I am using a PIC18f4550 and when I use a computer power supply to run it I get a slight input from the ADC when it is to ground... It doesn't do this and actually functions fine when it is connected to USB any ideas?
 
I have found that you can get odd effects if any of a PIC's pins, especially ones that are physically close to the ADC input in question, are outside the power supply voltage range.

The data sheet says that the allowed input voltage range for a digital input is -0.3 V to Vcc+0.3 V. That won't damage the PIC, and its logic will work OK with inputs that are above the power supply by less than 0.3 V or below ground by less than 0.3 V. However, I have found that you can get leakage currents to nearby pins unless you keep the voltages between 0 V and Vcc.
 
I do not... It works only on computer USB not on computer PSU or regulated with 1000uf cap
 
Like others said. Your problem is a noisy PSU.

One 1000 uF cap is not enough, you should add lots of bypass capacitors, and it is a good practice to use a bypassing capacitor after each logic chip, also.
 
I would have said that a computer PSU the output should be "pretty stable" I'm very surprised... What is the value of the USBcap on pin 18 of the micro? also which output from the PSU are you using 5 or 3.3V.
 
Computer supplies can have a lot of noise.

A 1000uF capacitor may be ok for large ripple currents but it won't filter out some of the higher frequency components.

Make sure you have a few 0.1uf and maybe a 1uf ceramic capacitor between the power pins as close to the PIC as you can.
 
Computer supplies can have a lot of noise.

A 1000uF capacitor may be ok for large ripple currents but it won't filter out some of the higher frequency components.

Make sure you have a few 0.1uf and maybe a 1uf ceramic capacitor between the power pins as close to the PIC as you can.

Agreed.

I'd rather using a 0.1uF ceramic instead the 1uF.
 
Status
Not open for further replies.

Latest threads

Back
Top