Show Posts
Pages: [1] 2
1  International / Portugues / Re: Mega 2560 Entradas Analogicas não estão funcionando. on: October 22, 2012, 09:00:28 am
Quote
Caraca, meu! Não faça isto não! O que acontece é que quando dá fim de curso no potenciometro, com R = 0, a corrente entre o pino de entrada e o +V fica infinita e pode queimar a porta.
Esta tua afirmaçao estara correcta se ligares o pino do meio a uma partes tipo xunte.
Se assim nao for esta errada!!

Se o pino do meio do potenciometro estiver a ligar directamente na entrada e apenas na entrada do arduino nao ha problema pois o adc tem uma alta impedancia de entrada smiley-lol




Pois é , eu segui o tutorial do proprio site do arduino, então provavelmente eles não botariam lá se causasse algum problema ao arduino. Queria ajeitar esse Mega, pois tive que comprar um Uno que por sinal funciona perfeitamente , mas com menos portas :/ . Tem alguma idea do que possa ser?
2  International / Portugues / Re: Mega 2560 Entradas Analogicas não estão funcionando. on: October 10, 2012, 12:46:23 pm
O pino central no A0(Tentei todos os pinos analogicos , do A0 ao A15) do arduino, o pino da esquerda no 5v e o da direita no gnd.

Caraca, meu! Não faça isto não! O que acontece é que quando dá fim de curso no potenciometro, com R = 0, a corrente entre o pino de entrada e o +V fica infinita e pode queimar a porta.

Mesmo usando um potenciometro, é necessário fazer um divisor de tensão para a corrente não ficar alta demais e proteger a porta do arduino. eu sugiro algo perto de 500 Ohm.

Coloque mais um resistor entre o terceiro pino do potenciometro.

Outra alternativa é colocar um único resistor de 1K junto do +5V. Com isto você não precisa de nenhum dos outros 2 resistores. A sua porta de INPUT do arduino não lerá até os 5V obviamente, mas aí você faz o cálculo para saber o máximo e minimo do potenciometro e ajustar seu range de leitura de acordo.

Lembre-se do "I = V/R": quando a resistência tende para zero, a corrente tende para infinito, mas neste caso o infinito dela é o máximo da fonte de energia sendo usada. Se for USB, são 500mA, só que uma porta de arduíno tolera no máximo 40mA.




Mas cara utilizei o mesmo codigo e circuito em um arduino UNO e funcionou corretamente. O exemplo que usei foi este http://arduino.cc/en/Tutorial/ReadAnalogVoltage
3  International / Portugues / Re: Mega 2560 Entradas Analogicas não estão funcionando. on: October 09, 2012, 06:07:36 am
Mediste o que tens no pino? E a resistência? Também mediste para garantir que o problema não está aí?

Medi com um multimetro os pinos do arduino e os mesmos mostram as tensões corretas, tanto o de 5v quanto o de 3.3v ,o potenciometro parece ser invisivel pro arduino, pois o mesmo mostra 5v quando conectado na placa. E sim, medi os pinos certos do potenciometro. Mas o que é estranho é que usei as mesmas coisas em um arduino UNO e tudo funcionou normal nele.
4  International / Portugues / Re: Mega 2560 Entradas Analogicas não estão funcionando. on: October 09, 2012, 05:39:14 am
e o que é que recebes na serial?

Todas as vezes recebo 5V.
5  International / Portugues / Re: Mega 2560 Entradas Analogicas não estão funcionando. on: October 08, 2012, 06:18:55 pm
Talvez os pinos estejam em lugares diferentes?

Como ligaste o potenciómetro?

O pino central no A0(Tentei todos os pinos analogicos , do A0 ao A15) do arduino, o pino da esquerda no 5v e o da direita no gnd.
6  International / Portugues / Mega 2560 Entradas Analogicas não estão funcionando. on: October 08, 2012, 06:16:06 am
Pessoal , é o seguinte, comprei um arduino mega2560 , porém estou com um problema ao tentar utilizar os exemplos mais simples que vem com a ide. De maneira alguma não consegui obter os resultados esperados dos exemplos: ReadAnalogVoltage e o AnalogReadSerial, porem os exemplos Blink e Fade , funcionam corretamente. Qualquer outro exemplo que use algum tipo de entrada analogica não surte nenhum efeito no circuito, por exemplo, no AnalogInOutSerial, quando o potenciometro é girado , ele varia o tempo em que o led pisca, porem no meu arduino isto não acontece, o led fica no brilho maximo o tempo inteiro.

O que poderia ser? Algum curto na placa? o ATMega pode ta queimado?

Obs: Utilizei o mesmo Potenciometro em um arduino Uno e o mesmo circuito e codigo funcionam corretamente.
7  Using Arduino / General Electronics / Re: Arduino Mega 2560 ground pin short-circuiting? on: October 08, 2012, 05:57:19 am
oh, WOW! that was stupid! and very simple! thank you so much.

Can u tell me the code that you used?  The example codes that come with arduino ide, which uses pots, doesn't work with my mega, the one named ReadAnalogVoltage, the output at SerialMonitor is always 5v or 1023.
8  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 05, 2012, 12:30:53 pm
Quote
Sorry it was the digital 9 next to the pwm. I used the digital pin 9 to the example AnalogInOutSerial, but the led got the 5v all the time.
You're on the wrong side of the board. The PWM pins are output only. Reading an analog value is done on the analog pins. The ones on the other side of the board.

Yes... and thats why i used the AnalogInOutSerial example that come with arduino 1.0 ide. Using the led at port 9...
9  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 05, 2012, 08:31:58 am
Quote
And i havent tried the 54 digital pins , only the pwn outputs
This phrase worries me.
What have the PWM outputs got to do with the problem here?

Sorry it was the digital 9 next to the pwm. I used the digital pin 9 to the example AnalogInOutSerial, but the led got the 5v all the time.
10  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 05, 2012, 08:08:57 am
I already did it, but it only shows 1023...

So you are saying that even running a wire from A0 to ground you are getting 1023?  Are you connecting a wire from A0 to the GND port on the Mega directly?

If so something is wrong.  Even if there is a short running it directly to ground should bring it down.  
Is your Mega sitting on top of a metal table or something?  There are no shields installed right?



Yes i connected a wire from A0 to GND directly too, and tried the ReadAnalogVoltage program, but it shows only 5v. And i havent tried the 54 digital pins , only the pwn outputs, but i think the problem is with the ATMega2560 ;/. And it doesn't have any shield on it, and i am using it on wood table.
11  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 04, 2012, 10:09:48 am
Even grounded?
Sounds like a short somewhere, but if you ground it, I'd expect that to short the supply.
Can you post your actual code, not the stuff you posted in reply #2.

But i am using only the examples that come with arduino ide, the only thing that i change is the port....
12  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 04, 2012, 09:29:50 am
It sounds like your pot is hooked up wrong or something electrical is wrong with the Mega since you said the Uno works.

Did you try running the A0 pin straight to ground?  Just to see if the Mega will report back 0?  If that works take the wire out of A0 completely and see what the results are.  'Normally' you get fluctuating values.  If it comes back as 1023 there is a problem.   

I already did it, but it only shows 1023...
13  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 03, 2012, 01:08:26 pm
Well the picture doesn't tell us if you correctly identified the pot's wiper terminal to wire to the analog input pin. You should take a multimeter voltage reading from ground to the input pin to see if the voltage does change from 0 to +5vdc as you move the pot's know through its range. Also 110K ohm pot is awful large value, analog input pins work best with 10k ohm or less of source impedance.

Lefty




I correctly identified the pot's outputs, because i  tested it on the arduino uno today , and it worked perfectly, the same code, all works fine with uno but not with this mega 2560.

I can only tell you how I would approch troubleshooting this symptom. I would first take a meter and measure the actual voltage applied to the pin and see if it tracks with turning of the pot. That would give me a good indication to next look at wiring or the sketch code. If you don't own a meter you should get one soon, as anyone building even simple projects using an arduino should.

Lefty

While the pot was connected(it was connected right) to the arduino , i used a meter to measure the voltage in the pot, while i changed the resistance value, but the output of the pot was at 5 v all the time...

Sounds like the ground end of the pot isn't connected correctly to arduino ground, or bad wire connection, bad pot terminal, or something of that manner. If you measure only +5vdc on the pin then your software will only read values of 1023.


The pot is fine , i tested it on UNO, works perfectly. I connected the Pot terminals even at solder in the back of the board. NONE of the analog ports is working,but the DIGITAL are okay.
14  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 02, 2012, 02:10:11 pm
Well the picture doesn't tell us if you correctly identified the pot's wiper terminal to wire to the analog input pin. You should take a multimeter voltage reading from ground to the input pin to see if the voltage does change from 0 to +5vdc as you move the pot's know through its range. Also 110K ohm pot is awful large value, analog input pins work best with 10k ohm or less of source impedance.

Lefty

I correctly identified the pot's outputs, because i  tested it on the arduino uno today , and it worked perfectly, the same code, all works fine with uno but not with this mega 2560.

I can only tell you how I would approch troubleshooting this symptom. I would first take a meter and measure the actual voltage applied to the pin and see if it tracks with turning of the pot. That would give me a good indication to next look at wiring or the sketch code. If you don't own a meter you should get one soon, as anyone building even simple projects using an arduino should.

Lefty

While the pot was connected(it was connected right) to the arduino , i used a meter to measure the voltage in the pot, while i changed the resistance value, but the output of the pot was at 5 v all the time...
15  Using Arduino / Programming Questions / Re: None of the Analog Read Examples are working with 2560 on: October 02, 2012, 01:32:48 pm
Well the picture doesn't tell us if you correctly identified the pot's wiper terminal to wire to the analog input pin. You should take a multimeter voltage reading from ground to the input pin to see if the voltage does change from 0 to +5vdc as you move the pot's know through its range. Also 110K ohm pot is awful large value, analog input pins work best with 10k ohm or less of source impedance.

Lefty

I correctly identified the pot's outputs, because i  tested it on the arduino uno today , and it worked perfectly, the same code, all works fine with uno but not with this mega 2560.
Pages: [1] 2