Show Posts
Pages: 1 ... 64 65 [66] 67 68
976  Using Arduino / General Electronics / Re: How to protect input, pins on: April 30, 2012, 01:21:08 am
There are diode clamps inside the AVR chip, but with long cable they could blow.
Just one resistor for every input pin is the most common solution. Say about 1K.
A coil with two capacitors is also a good solution, but the resistor in the line is most of the time a better solution. The input impedance of the AVR chip is very high, so the resistor does almost not influence the input signal.

If there are very heavy spikes or danger for high voltages, you have to add a good protection circuit. But that will probably slow the signal.
977  Using Arduino / Installation & Troubleshooting / Re: Uno does not respond on: April 30, 2012, 01:10:51 am
The Uno is probably defect.
You could use a magnifier to check for problems, or replace the electrolyte capacitors.
Is the ATmega in a socket? That could have bad connections. You could take the ATmega out and place it back.
978  Using Arduino / Installation & Troubleshooting / Re: Uno Rev.3 3.3V Source on: April 30, 2012, 01:00:59 am
So a TIL431 is an adjustable zener?

I think you made your point, and I agree with you. The I2C lines for a device at 3.3V while using internal pull-up resistors to +5V is not elegant. In every schematic I can found there are two external pull-up resistors to 3.3V. Or did you find a (very bad) schematic with two pull-up resistors to +5V ?

Can you name some links where you find the libraries and information ?
In the "Playground", I can only find this Bulgarian page: http://arduino.cc/playground/Bulgarian/BMP085
This is about the same problem: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275738825
LadyAda writes about it: http://www.ladyada.net/learn/sensors/bmp085.html
AdaFruit: http://www.adafruit.com/products/391
But I haven't checked the AdaFruit libraries.

A level shifter with mosfets seems to be the best way to deal with this.
Or two zener diodes, like you did, is also a good solution.
979  Using Arduino / Project Guidance / Re: HI, how to build osteoporosis detection device??? on: April 29, 2012, 06:20:48 pm
The arduino is good for fast prototyping. That's just what you need.
You probably need some extra electronics for the ultrasonic device.
But you need some microcontroller anyway.

That ultrasonic device is the most important part. You could test a few to see what they do.

Thinking about it, you need an ultrasonic pulse, and capture a number of analog samples of the echo of that pulse. Let's  say 1000 samples.
Those 1000 samples could be sampled with a chip, but perhaps the analog sample rate of the Arduino is high enough.
Those 1000 samples contain the information where the bone starts and how the density is.
980  Using Arduino / Sensors / Re: Vibrating motors at digital output affecting analog input on: April 29, 2012, 05:58:17 pm
A spike when the motors are turned on is hard to avoid.
I can add to MarkT comments: Are the capacitors of the power supply large enough ?

I have some vibrating motors, they shotcut with spikes. I opened one, but can't tell why they do that. It turned out that with low voltage and low speed they shortcut now and then. Only at 12V (full speed) they don't.
981  Using Arduino / Programming Questions / Re: Sketch resets unexpectedly on: April 29, 2012, 01:40:32 pm
Like Grumpy_Mike, the reset by starting a serial communication is what comes first to mind.

The DTR signal of the serial connection is connected with a capacitor of 100nF to the reset. If the ATmega is sleeping, some signals (TX perhaps ?) might be floating. That might influence the chip for the serial communication.
Can you disconnect everything from the /RESET and see if it still happens?
Did you already made a schematic? Perhaps you can upload it.
982  Using Arduino / Installation & Troubleshooting / Re: Programmer not responding/heavy serial usage? on: April 29, 2012, 01:31:30 pm
It could be in a watchdog loop.

If you burn the bootloader with the Arduino, the fuses are also set. Or did you do that already?
983  Using Arduino / Project Guidance / Re: Many flashing LEDs from few pins on: April 29, 2012, 12:58:06 pm
A shift register or charly plexing.

http://arduino.cc/en/Tutorial/ShiftOut
http://arduino.cc/playground/Code/Charlieplex
984  Using Arduino / Programming Questions / Re: Troubles using "Serial." library on: April 29, 2012, 10:29:40 am
You could try my "ShowInfo" Sketch: http://arduino.cc/playground/Main/ShowInfo there is a 'r' option to test the serial connection. It is a short loop, and during that loop you can type characters followed by enter, and see what it does.
985  Community / Website and Forum / Re: How to upload images + other beginners questions on: April 28, 2012, 06:53:36 pm
The Reference of sizeof() is now odd again: http://arduino.cc/en/Reference/Sizeof
The comment is about a string with a trailing NULL, but the example is with "myInts".
Even with 16-bit characters the variable would not be called "myInts".
And with an array of integer data, there is probably no trailing NULL.
This is confusing for new programmers.
Please make it two examples again, one for a string (with -1), one for integers (without -1).

The ATmega8 is no longer used on Arduino boards, but it is very cheap for home-made Arduino-compatible boards.
The new tone() library: http://code.google.com/p/arduino/issues/detail?id=292
986  Using Arduino / Programming Questions / Re: how to compile Atmega168PA_PU sketch on: April 24, 2012, 01:45:38 pm
Is the DTR signal connected (via a 100nF) to reset ?
Which bootloader did you use?
Burning the bootloader is not enough, did you set the fuses according to the Arduino fuse settings?
To add a new board to boards.txt is very well possible. Perhaps you made an error. Why is that not compiling?

So you see, there are many problems with this.

EDIT: I removed some lines that were wrong.
987  Development / Other Software Development / Re: yet another DHT11 Class for Arduino on: April 23, 2012, 03:04:29 am
Robtillaart,  Have you thought about using the (:source lang=c:) and (:sourcend:) for your code in the playground?
988  Using Arduino / Networking, Protocols, and Devices / Re: Arduino DS1307 with AT24C32 on: April 22, 2012, 04:01:06 am
RandallR, I think I found the problem.

I checked the return values of the Wire library, and was able to generate some errors.

Without the delay of 50ms, the device could be busy. In that case, every Wire.endTransmission() should be checked for an error. Both while writing and reading. And if an error occured, some time (5ms) should be waited before trying again.
That would increase the code size, but reading and writing would be fast.

A much simpler solution is to change your delay in the loop to 5ms, and add also a delay of 5ms to the other WriteMem() function (the byte write version).

Also other examples at the Playground use a delay:
This one http://arduino.cc/playground/Code/I2CEEPROM24LC512 uses a delay of 5ms very often.
This one http://arduino.cc/playground/Code/I2CEEPROM24C1024 uses a delay of 5ms after writing a byte.
This one http://arduino.cc/playground/Main/LibraryForI2CEEPROM uses a delay of 5ms after writing a few bytes in a page.
This one http://arduino.cc/playground/Code/I2CEEPROMBANK uses a delay of 5ms after writing a byte.

Testing: with those two delays of 5ms, eveything is okay. I can't generate any error. So that's what I'm using now.

I assume that 5ms is enough, since the datasheet of the AT24C64A says that writing is finished within 5ms. I don't know how it is for other I2C EEPROMs.
989  Using Arduino / Project Guidance / Re: Need Help with LED Binary Counter on: April 21, 2012, 07:09:22 pm
That's very strange.
It could be a low voltage, or watchdog timer, but then the result should not be like this.
So begin with something even more simpler: A blinking led.
Code:
voide loop()
{
  digitalWrite (LED0, HIGH);
  delay(100);
  digitalWrite (LED0, LOW);
  delay(300);
}
Would this result in a fast blinking led.
If not, go for something even more simpler: just turn on some leds and see if they stay on.

Are you sure that the code is actually what you test. Or do you use an analogWrite() or tone() function that uses outputs. I checked the video, and every second something happens, but sometimes there are small delays between the leds within that second. That is almost impossible.
990  Using Arduino / Project Guidance / Re: Arduino issues with accurate ADC and heat? on: April 21, 2012, 07:03:18 pm
I always use analogReference(), but after reading carefully I think it is not mandatory.
Pages: 1 ... 64 65 [66] 67 68