Go Down

Topic: bluetooth RN41 resetting my arduino (Read 138 times) previous topic - next topic

mmmatjaz

Arduino pro mini reads some sensor data and streams it to serial port. Using FTDI works fine, but when I use a RN41 chip instead, arduino periodically resets every couple of seconds. For some reason, if i disconnect bluetooth's TX pin, streaming of the data works fine without resets. If I reduce the frequency of transmitting, the resets take place less frequently. It's like the RN41 counts the bytes sent and it resets after it sends 2kB or so :) What could the problem be?

Power_Broker

Post your code in tags, then I can help.
"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

mmmatjaz

Post your code in tags, then I can help.
Its pretty much serial.write in a while loop.

Any other ideas? What could RN's tx pin possibly do? Both arduino and RN are powered from the same source. In general, how do u make arduino reset with a signal on an I/O pin? Overvoltage?

Power_Broker

Its pretty much serial.write in a while loop.
That's not enough information. POST YOUR CODE. Also, what device are you trying to talk with? A PC, phone, what? Did you pair the devices properly?

What could RN's tx pin possibly do?
No offense, but the RN41's TX pin transmits data to the Arduino. From your project description, you don't even need the RN41's TX pin. Why bother with it if it wrecks your project?

Both arduino and RN are powered from the same source.
I don't think that is the problem, but try putting them on separate sources anyway.

In general, how do u make arduino reset with a signal on an I/O pin? Overvoltage?
No, usually Arduino's reset if you try to sink too much current. What happens is that the output pins will work up to a maximum power (DC power = Current * Voltage). So if you increase output current too much, the Arduino will proportionally drop the output voltage to keep the same power. Eventually the voltage will go so low, the Arduino will power off and reset. Overvoltage will just fry the Arduino.
"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

Nick_Pyner

Both arduino and RN are powered from the same source.
No hint of what the power source might be then?

mmmatjaz

Hi, thanks for the answers and sorry for the late reply. I had to set this aside but it remains unsolved.

No hint of what the power source might be then?
Tried both with this:
http://uk.rs-online.com/web/p/products/7336230/
and USB supplied power regulated by the 3V3 regulator onboard arduino. Same result in both cases. I also tried another RN41 and another arduino (pro mini and nano) without any luck.

mmmatjaz

New info. The resets were caused by a buffer overrun due to a bug in my receive code where I was writing characters into a buffer until '\r' arrived. That bug is fixed now but the problem is bigger. It looks like I have some crosstalk - when I'm streaming data I also get some random signals back to the RX pin! I get same result both with a custom made rn41 breakout and an off-the-shelf breakout. The data is not same, so the crosstalk is probably not due to a short between RX and TX (can't see a short with Ohm-meter either). Wires acting as antennas?

mmmatjaz

Actually, since I solved the problem of the resets, maybe the topic could be renamed to "Arduino - rn41 crosstalk". Is that possible, moderators?

Go Up