My Lego R2-D2 (L3-G0.blogspot.com) is using an 18v7 controller to turn the dome, and to accept 2 channels of input for the dome and a “spray” control. To handle that an Arduino listens over the serial and echos the dome speed back to the controller, but triggers a relay on an 8 channel relay board for the spray. The arduino only has the one digital output to the board, and a couple serial lines to this and an mp3 trigger.
Mostly it works “fine” (eg: for days), but after running for some time it appears to get confused and stop talking to the Arduino. The rest of the arduino’s sketch runs fine (it’s a fairly simple loop), so I think that it’s the controller that’s confused, or the serial connection. It’s basically acting like the Arduino and Motor Controller are sending eachother random bytes on the serial port no matter the state of the rest of the controller.
If I reset it, it then behaves for a little bit (<1 minute) before blowing up again. The symptoms are that the dome motor doesn’t run (which makes sense if the Motor Controller’s hearing random data), and that the spray toggles rapidly (which makes sense if the Arduino’s seeing random data).
Has anyone seen anything like this? The serial rate is only 38.4, which doesn’t seem like a lot, and the controller is only 8 inches or so from the Arduino, so it seems unlikely to be noise. I’d suspect low voltage, but it’s in a 12V system so never gets near either the Arduino or the Motor controller’s needs. The “big” drive motors run fine even when this system is acting up. (They’re 12A controllers, and don’t bother with the serial handshaking, they just listen to the RC signals and run the motors).
I’ve pretty much ruled out the Arduino since A) it can communicate with the rest of the system ‘fine’, and the sketch loop is pretty simple, B) it runs fine 99% of the time, and C) the symptoms exactly match what random data on the serial lines would look like.