Show Posts
Pages: 1 ... 3 4 [5] 6
61  Forum 2005-2010 (read only) / Interfacing / MaxSerial Diecimila spontaneous reset problem on: June 18, 2008, 11:59:24 am
A little background:  When the distance from computer to Arduino reached 150 feet, I had to switch from a USB-based Arduino to a MaxSerial (which uses a Max232 chip to communicate using standard old-skool RS-232 serial).  

Everything worked great for a week or two, but then the board started resetting itself sponatenously after only a few seconds of uptime.  I isolated the problem to the Max232 chip - with it removed from the socket, the Arduino worked perfectly, though (obviously) with no serial communication. With the Max232 back in place, it resumed its spontaneous resetting. I tried different Max232 chips and they all have this problem, so I suspect it is related to noise in the long serial line.  I looked at how the Max232 connects to the Arduino's reset pin (necessary so that the IDE can tell the Arduino to reset prior to uploading new software, the great new Diecimila feature), and I see it goes to pin 12 (RS1) through a 0.1microfarad capacitor and that the reset line is held to 5volts through a 10k resistor. are there any modifications i should attempt to keep spontaneous resets to a minimum?
62  Forum 2005-2010 (read only) / Interfacing / Re: Changing I2C pins in Wire Library on: August 16, 2008, 10:38:58 am
That's useful information I hadn't seen anywhere else.  I had no idea the Atmega168 had I2C support built in (of course, I never noticed I2C until it was a feature I needed) - I assumed the Wire library was an all-software implementation.  Ok, so I have to use the analog pins.  As you probably have guessed, I'm using those analog pins.  I guess I could replace those pins with an I2C analog-to-digital converter once I got I2C working. The problem with analog pins is you can't exactly multiplex them unless you use a bidirectional switch (which, of course, imposes its only analog effects which would have to be programmatically accounted for).
63  Forum 2005-2010 (read only) / Interfacing / Changing I2C pins in Wire Library on: August 15, 2008, 11:55:13 pm
I have a question for those who know about such things:  is there any particular reason for the Wire (I2C) library to communicate on Analog pins 4 and 5?  The signals in the protocol are all standard TTL-style digital signals, so why can't the library be modified to use some combination of the Arduino's digital pins?  And if this was done, where in the library would it be done?  I looked at Wire.cpp and my eyes began to fog over.  I did a search for "4" and "5" (as well as their binary equivalents) and they didn't come up anywhere.
64  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: June 04, 2008, 12:38:54 am
I got the MaxSerial kit today, soldered it together, and then figured out how to get the RS-232 data the 150 feet from my "laboratory" (where my computer is) to the basement (where the Arduino figures out when to circulate water through the solar panel). I'd considered using the 150 feet of shielded USB cable but opted instead to use a few conductors inside a mostly-unused CAT3 cable (I have a lot of CAT3 that I run to sensors and what not).  The data to and from the MaxSerial is very reliable, and it's great having the Diecimila-vintage ability to upload software any time without a reboot - I just change the software, upload it, and sit back and watch the effects.  It's like communicating with a probe on Mars, but without the speed-of-light latency issues.
65  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: May 23, 2008, 05:23:25 pm
Oh, for some reason I was using the term "MaxSerial" wrong - I meant a serial chip such as the Max232, and your use of it primed my brain with the right idea but the wrong word.  I didn't know about MaxSerial - it looks like exactly what I need - a serial version of the Arduino that plugs in where the NG was.  Thanks!  I'll look further at your stuff to see what's what. You should get yourself listed on this page:
or is it another Iduino-type situation?  Sometimes the distinguishing characteristics between different open source licenses and their commercial derivatives gives me a headache.
66  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: May 23, 2008, 03:59:44 pm
Does anyone know where I could buy an old Serial Arduino?  I could hook up a MaxSerial or retrofit one of my Arduino-capable & serial-equipped Olimex boards, but a Serial Arduino would plug right in and require a minimum of work.  If anyone here has one, are you interested in selling it? It doesn't even need to come with a working Atmega processor.
67  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: May 23, 2008, 03:45:51 pm
In this case I'm powering it with USB and "reboot" means to completely disconnect the USB cable, which kills the power to the board.  When I'm programming it remotely, I use a relay to jumper the reset button (in these old Arduino NGs you must reboot before reprogramming, though there's too much noise in a line that long to run the reset wire 150 feet without getting constant reboots - thus the relay).  This setup allows me to update software on the Arduino from my computer at the other end of the house as I add more routines and nuances to the solar panel control algorithm.

When you say "CAT6 with USB ends" - you mean just the connectors, no repeater hardware?  And that actually worked (albeit imperfectly) across 150 feet?  And without shielding?  I've actually thought about doing a simple serial link, since I have no need for high speed communications. I could just remove the repeater hardware and the USB connectors and use DB9 instead.  The cable is shielded and the individual conductors are twisted - even with primitive RS232 tech it should be able to work reliably for 150 feet.

I'm pretty sure from my tests that all my reliability issues come from the cable. I guess this is why it was discontinued.
68  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: May 22, 2008, 05:49:21 pm
Restarting the serial port from the Arduino would actually be an ideal way to handle the problem. I could do it every hour even, since in this application constant communication isn't essential, but eventual communication is.  Is there an easy way to do this?  I know how to do all the usual things with the serial port, but I've never seen an example of someone restarting it.
69  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: May 22, 2008, 09:57:31 am
I should add, by the way, that the serial port lockups I'm talking about only affect the Arduino's serial port - the program it's looping through is unaffected.  But when this happens, my communication with the Arduino is cut off until I reboot it.
70  Forum 2005-2010 (read only) / Interfacing / Re: serial port unreliable on: May 21, 2008, 05:26:08 pm
i've hooked up a laptop near the Arduino to see if the problems are cable related, but...

The 150 foot USB cable has hardware repeaters built into it and is exactly what it is -- a prebuilt USB cable, but it is cheap and Chinese, so perhaps it is the problem.  But why should the serial port require an Arduino reboot when there is a problem?  Shouldn't it be able to handle issues more gracefully?  I don't mind occasional occurrences of bad data -- I just can't handle the lockups.
71  Forum 2005-2010 (read only) / Interfacing / serial port unreliable on: May 21, 2008, 01:04:39 pm
I've had an Arduino-based circuit controlling a solar hydronic installation for one and a half years now (it's  an Arduino NG with an ATMEGA168 chip). This system is completely reliable, making sure water gets heated when the sun is out and turning off everything when the water coming from the panel is too cool to be useful.  I can monitor this Arduino remotely using a 150 foot USB cable (they used to be available for cheap from until that company started charging a minimum of $35 for shipping and handling).  My question concerns the reliability of the Arduino serial port.  It seems to work for awhile (a few hours) and then it inevitably locks up, requiring the board to be rebooted in order to resume communications. I've seen this behavior with several NG boards, connected to both Windows and Debian machines.  At least on the Windows machine, I'm running the latest version of the FTDI USB Drivers. Does anyone know how to improve the reliability of the serial port?
72  Forum 2005-2010 (read only) / Interfacing / Re: Proto Shield v.1a questions on: November 19, 2006, 09:14:14 am
i've only used the avr-pg1 with the Olimex avr-p28 board, which is a great cheap $16 substitute for an arduino, though it trades USB support for open breadboard space. you can examine the schematic of that board and compare it to the arduino to deduce the mapping.


73  Forum 2005-2010 (read only) / Interfacing / Re: What USB does Arduino Use?? (USB1.1 or USB2.0) on: October 20, 2006, 11:01:49 am
50 meters is a long distance.  If you want to go with a USB-only solution, you can try using cheap Chinese usb 1.1 extension cables:
they're 30 meters, only $19 each, and if you put a hub halfway between them you could probably keep them going.

I'm using one of these lengths to successfully control an Arduino solar heat sufficiency controller down in the house's boiler room.
74  Forum 2005-2010 (read only) / Interfacing / Arduino Atmega8 vs Atmega168 pin mapping on: October 29, 2006, 02:39:44 pm
Does anyone know to what extent the Atmega168 and Atmega8 have different PDIP pinouts?  I'm noticing a strange behavior with my Arduino board when I use Atmega168 vs Atmega8.  When I set Arduino's Digital Pin 13 to input, I can use it that way successfully if the processor is an Atmega8.  But if it's an Atmega168 it always reads as 0.  Pin 12 works fine with both processors.  Now it's possible I have a defective Atmega168 - but I've seen this behavior with two Atmega168s.  

I just looked at the Arduino USB schematic
and see that there is a 1K resistor only on Digital Pin 13 - perhaps the Atmega168 is more sensitive to its effects than the Atmega8.
75  Forum 2005-2010 (read only) / Interfacing / Re: 1-wire on: October 23, 2006, 01:04:28 pm
unless, of course, you're making a generic USB-to-one-wire interface with an Arduino board.  that would be a useful gizmo.  i imagine the protocol is some sort of serial thing with device addressing, sort of like usb but half-duplex.
Pages: 1 ... 3 4 [5] 6