Show Posts
Pages: 1 ... 3 4 [5] 6
61  Forum 2005-2010 (read only) / Interfacing / Re: MaxSerial Diecimila spontaneous reset problem on: August 06, 2008, 10:54:07 pm
My MaxSerial Diecimila has been working nicely now for some weeks, although it occasionally resets spontaneously because of noise coming down that very very long 100 foot RS-232 cable (which is now shielded, by the way).  

I noticed that lots of spontaneous resets seemed to happen under certain conditions the moment I turned on the light in the boiler room (it's a 23 watt compact fluorescent - 100 watt incandescent equivalent). Those who have been following this thread might find my solution to this problem helpful.  I wrapped the 12 volt DC power line (containing a +12volt and Ground pair) around a donut-shaped ferrite toroid approximately seven times. This was totally a cargo-cult science experiment, because electro magnetic inductance is still basically magic to me.  But the spontaneous resets, which had been so common before, are now completely gone.
62  Forum 2005-2010 (read only) / Interfacing / Re: MaxSerial Diecimila spontaneous reset problem on: June 18, 2008, 07:52:08 pm
Good advice on the caps. I still don't know enough about the Diecimila reset protocol to know what combination of levels on the serial cable would result in a reset on the Freeduino end.  Might it be the sort of thing that would crop up frequently in noise?  My question, I guess, boils down to this: does anyone know what exactly causes the RS1 pin (pin 12) to change state on the Max232 chip?
63  Forum 2005-2010 (read only) / Interfacing / Re: MaxSerial Diecimila spontaneous reset problem on: June 18, 2008, 06:15:44 pm
Remember. the problem isn't reliability of communication with this 150 foot RS-232 setup (it uses unshielded CAT3 cable), it's the propensity to randomly trigger the Diecimila autoreboot-before-software-upload routine.  I'm using a Freeduino/MaxSerial, so an actual Arduino might not have this problem.  Then again, an actual Arduino can't communicate this far, because USB over these distances is a mess (believe me, I've been there, tried lots of niche products).  I do see that the MaxSerial reset only looks at the RS1 pin (pin 12 of the Max232) whereas the actual Diecimila's reset looks at two pins on its USB chip (DTR -pin 2, and RTS - pin 3).  And, at least with my particular MaxSerial Freeduino, the propensity to reboot spontaneously exists in either of two situations, only one of which involves long cable:  when there is a long RS-232 cable attached via a USB-to-Serial adapter to a distant computer, or when the there is no cable attached at all. It seems to be reliable when using a short RS-232 cable or when a long RS-232 cable connects directly to a distant computer's RS-232 port.  

Official Arduino Diecimila schematic:

MaxSerial Freeduino schematic:
64  Forum 2005-2010 (read only) / Interfacing / Re: MaxSerial Diecimila spontaneous reset problem on: June 18, 2008, 01:38:32 pm
actually the 150 feet of rs-232 was working great until the usb-to-serial adapter blew (lightning??).  still, i'm guessing i should terminate it and perhaps take surge-arresting measures to keep such adapter blowouts to a minimum. also, i'd like to make it so the maxserial doesn't spontaneously reboot when there is no serial cable plugged into it at all. perhaps there's a defect in the way i made that particular board (which i did from a kit), but it seems to require a serial connection to a computer or else it reboots spontaneously every seven or eight seconds.
65  Forum 2005-2010 (read only) / Interfacing / Re: MaxSerial Diecimila spontaneous reset problem on: June 18, 2008, 12:47:32 pm
I've confirmed that the source of my problems is pin 12 on the Max232 chip. With it kept out of the socket, all was well.  
Actually, the problem seems to be coming from a USB-to-serial adapter i'm using 150 feet away on the computer end of the serial cable.  Plugged directly into the computer's god-given rs-232 ports, it works fine, but with the serial cable either plugged into the USB-to-serial adapter or removed from the Arduino (technically it's a Freeduino) it spontaneously resets.  perhaps i need to try some sort of termination of the cable on one end or the other.  i've been doing this stuff for 25 years but i've never really understood termination. perhaps someone could break it down for me.
66  Forum 2005-2010 (read only) / Interfacing / Re: MaxSerial Diecimila spontaneous reset problem on: June 18, 2008, 12:26:14 pm
This leads into a question that I have about the Diecimila generally.  Could someone give a concise description of what the Arduino IDE does that causes the USB chip on the Arduino to reset?  Understanding this mechanism a little better would be helpful in fixing problems of this sort.  I know I'm using a slightly off-brand Arduino in this case, though I'm sure the knowledge I seek would be helpful to everyone.
67  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?
68  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).
69  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.
70  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.
71  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.
72  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.
73  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.
74  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.
75  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.
Pages: 1 ... 3 4 [5] 6