Show Posts
Pages: 1 ... 64 65 [66] 67 68
976  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:
This is about the same problem:
LadyAda writes about it:
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.
977  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.
978  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.
979  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.
980  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?
981  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.
982  Using Arduino / Programming Questions / Re: Troubles using "Serial." library on: April 29, 2012, 10:29:40 am
You could try my "ShowInfo" Sketch: 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.
983  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:
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:
984  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.
985  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?
986  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 uses a delay of 5ms very often.
This one uses a delay of 5ms after writing a byte.
This one uses a delay of 5ms after writing a few bytes in a page.
This one 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.
987  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.
voide loop()
  digitalWrite (LED0, HIGH);
  digitalWrite (LED0, LOW);
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.
988  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.
989  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.
990  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:
if bitRead(i, 0)
That would result in a blinking led.

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

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.
Pages: 1 ... 64 65 [66] 67 68