Analog ports disturbed

Here ther is the project with freezing

Can you post a photo of your setup?

It is not a photo is it?

Your diagram shows a transistor of some sort connected to digital pin 11. What type is it?

Sketch? Are you doing anything with the potentiometer value that might have an impact on the supply voltage?

Sorry, I thought that the wiring was a bit confusing!

The transistor is a TIP121

The potentiometer is connected just like in the sketch!

:slight_smile:

One obvious problem is that you are overloading the Arduino digital output by connecting it direct to the base of the TIP121. You need to use a series resistor. 1K is a suitable value.

Your Fritzing diagram doesn't show a connection between the pot and +5V, but from the photo I can see that there is one.

Sorry in the skatch I miss to drag the wire to the edge of the board! :~

Thank you for the resistor, i really don't know where arduino need those pieces, but this question is off topic! :zipper_mouth_face:

MarkT:
Sketch? Are you doing anything with the potentiometer value that might have an impact on the supply voltage?

Ding ding ding, give that man a cigar. Look at the pot in the fritzling thingy. It's not wired right, it's pulling the voltage down when adjusted. It's set up to where it can completely short the power rails if it is adjusted all the way to one side.

The wiring of the pot in the photo looks correct to me, assuming it is a normal pot with the wiper being the middle connection.

dc42:
The wiring of the pot in the photo looks correct to me, assuming it is a normal pot with the wiper being the middle connection.

Ok I'm blind, I magnified it and now I can see that the orange wiper wire extends beyond the power bus and into A1. What about the red wire on the outer tab of the pot? It "appears" to be connected to an empty bus strip I think. Also I see a ground wire connecting the bottom negative bus to the top one, but I don't see a positive wire extending to the bottom bus.

I found the problem. When I store a value from analogRead and then use it in analogWrite, all the other analog ports gets disturbed.

Do you have the same problem?

If analogWrite interferes with analogRead, this normally means that you have a common ground wire serving your input and output devices, and a dodgy connection in that ground wire.

Yes you are right!!! Thank you so much!!!

But What should I do to solve the problem?

Make the contact secure soldering wires is a good idea.
Or route the grounds separately so they converge at one point on the arduino ground.

Now all the GNDs are converging at one pin next to the 5v, are you saying that i should wire them that the pmw Ground ends at the GND next to digital pins? :drooling_face:

Best is to use 2 ground pins on the Arduino. Use one to connect the ground side of your analog input devices (the pot, the temp sensor and the voltage divider). Use the other one to connect the ground side of your ourput devices (TIP121 and associated 12V supply), and power to the Arduino if it is not coming from USB.

Did you add that resistor in series with the TIP121 base?

Now i'm at school, when I get back home i will let you now!
:grin:
Yes i added it! Excuse me ignorance, but why Arduino needs it?

but why Arduino needs it?

To limit the base current to a safe level.

My Arduino burned up... I am literally crying. After one year and an half of service. I tried to upload blink sketch and it works but after a while the atmega328 starts to heat... I'am so sad =(

olimex:
My Arduino burned up... I am literally crying. After one year and an half of service. I tried to upload blink sketch and it works but after a while the atmega328 starts to heat... I'am so sad =(

Well for about $5-6 you board can enjoy another year and half of service, that's pretty cheap entertainment.

Maybe you weren't storing your board away in a ESD bag or using a grounded wrist strap. :wink:

Lefty