Show Posts
Pages: 1 ... 64 65 [66] 67 68
976  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.
977  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.
978  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.
979  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?
980  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
981  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.
982  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
983  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.
984  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?
985  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.
986  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.
987  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.
988  Using Arduino / Project Guidance / Re: wich arduino to purchace on: April 21, 2012, 06:49:27 pm
thanks i will use mosfets to do the work of the relays just to find sutable mosfets now mm smiley-red
Search Ebay for "logic mosfet". If you use low voltage lights (e.g. 12V or 24V), it's easy to do. For high voltages you could use photoMos relays, or a high DC voltage with high voltage mosfets.
989  Using Arduino / Project Guidance / Re: Need Help with LED Binary Counter on: April 21, 2012, 06:45:38 pm
You might want to rewrite your loop.
The digitalWrite uses HIGH and LOW, but the bitRead returns '0' or '1'. I don't know if that is valid, but I think it is not.

Perhaps you can start simple:
Code:
if bitRead(i, 0)
  digitalWrite(LED0,HIGH);
else
  digitalWrite(LED0,LOW);
That would result in a blinking led.

And I would do the same for all bits:
Code:
for ( int j = LED0; j <= LED4; j++ )
{
  // Check the bit in counter 'i',
  // and set the according led.
  if bitRead(i, j-pinShift)
    digitalWrite(j,HIGH);
  else
    digitalWrite(j,LOW);
}

As you can see, I use "j <= LED4". That is to avoid problems, since "LED4 + 1" might not be valid in some cases. You could do the same for the loop with the "i" counter.
990  Using Arduino / Project Guidance / Re: Arduino issues with accurate ADC and heat? on: April 21, 2012, 06:22:37 pm
1MOhm is too much for a good reading.
The analog input should have 10k, so you could use a diviver of two 22k resistors (or less).
Do you also have a delay of 20ms after setting: analogReference(DEFAULT);

Now you mention it, ground current could be a problem. That can cause all kinds of strange effects.
Pages: 1 ... 64 65 [66] 67 68