Solved: My ColorPal randomly shuts down

kaboomkaboom Posts: 12
edited 2016-02-28 - 19:58:59 in Accessories
I got a ColorPal for my birthday. I have decided to start using it with my Arduino. I am starting with color generation. Here is my code.
/*Color sensor has 4 direct comands
 * = to begin buffering
 * ! to execute buffer
 * # to save code to EEPROM
 * + to get "network" adress
 * r to display color
 * t to set transition rate
 * s to sample ambient/radiant light level
 * m to sample reflective light color
 * h for high sensitivity
 * l for low sensitivity
 * p to pause for set time*5ms
 * ( to begin a loop with a number of times to execute, 00 for forever.
 * ) to end a loop
 * > is GOTO
 * ? for random deviation
 * v to get firmware version
 * Predefined colors are in datasheet at https://www.parallax.com/sites/default/files/downloads/28380-ColorPAL-Documentation.pdf
 */
void setup() {
  Serial.begin(9600);
  Serial.print("=tFFrFFFFFFr000000(00t3FrFF0000r00FF00r0000FFrFF00FFrFFFF00r00FFFF)!");
  }
And I am executing "=tFFrFFFFFFr000000(00t3FrFF0000r00FF00r0000FFrFF00FFrFFFF00r00FFFF)!" without the quotes on my sensor.
My issue is that, sometimes the device will randomly shut down. For those who don't know what "=tFFrFFFFFFr000000(00t3FrFF0000r00FF00r0000FFrFF00FFrFFFF00r00FFFF)!" means, it tells my ColorPal to slowly fade from off to white, then fade out, then fade between colors. This actually happens, except...
When I move my system (Arduino, Breadboard, ColorPal, and battery combination) quickly or the ColorPal jiggles or vibrates, it shuts down, flickers a few times, then stays off. When this happens, I must press the reset button to send "=tFFrFFFFFFr000000(00t3FrFF0000r00FF00r0000FFrFF00FFrFFFF00r00FFFF)!" again. Why do I like including that so much?

Comments

  • Seems like it's been fixed. I had to pull it high to prevent a low signal, which resets the unit. Your manual needs to explain that better.
  • @kaboom,

    Good that you got it going.

    Could you provide a specific link to the instructions that need to be fixed?

    Infernal Machine
  • kaboomkaboom Posts: 12
    edited 2016-02-29 - 23:29:42
    @Publison
    I may also need a servo cable... But I have one just lying around!
    The instructions that need fixing are at https://www.parallax.com/sites/default/files/downloads/28380-ColorPAL-Documentation.pdf. This is the link in my source code. The issue: It is not obvious that you need to force the pin high.
  • Thanks!

    I'll check it out.
    Infernal Machine
  • kaboom wrote:
    The issue: It is not obvious that you need to force the pin high.
    You do not need to force the pin high. In fact, you should not do that. The pin is pulled high internally. As the document you've cited states at the top of page 5,

    "Communication with the ColorPAL takes place using serial I/O, transmitting and receiving at between
    2400 and 7200 baud, using a non-inverted, open-drain protocol. The ColorPAL includes a pullup
    resistor to Vdd, so you do not need to apply one externally. Because of the open-drain protocol, the pin
    used to communicate with the ColorPAL should always be configured as an input, except when being
    driven low.
    Also, when starting up, you should wait for this pin to be pulled high by the ColorPAL before
    trying to send it any commands. This is particularly important when connecting it to one of the BOE’s
    servo headers, since the three-way power switch will start your PBASIC program before powering up the
    ColorPAL.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Ok. I'll try fixing those soon. I'll see if that solves it.
  • Per Phil's response, (the designer of the ColorPal), there is no need to change the instruction manual. The protocol seems to be explained in detail.
    Infernal Machine
  • OK. I may also want to try using a server cable. I think something is wrong with my breadboard >:( .
    I think the ColorPal is a great device. Phil did a great job designing it. :lol:
Sign In or Register to comment.