Hi,
I’m using the SparkFun DE2120 2D barcode scanner with an Arduino Uno via hardware serial (TTL/RS232 mode). The scanner is powered directly from the Arduino’s 5V pin — no USB cable is connected.
The problem:
In most cases, the scanner starts up correctly in TTL/RS232 mode. However, very rarely (not every time), scanner.begin(hardSerial) returns 0 and the scanner’s illumination light turns off almost immediately after startup, as if it has reverted to USB Mode.
When this happens, pressing the scanner’s button to force a scan restores normal operation. After that, scanner.begin() succeeds again.
Questions:
- Could a brief power instability (e.g., brownout on startup) cause the scanner to reset to factory defaults?
- Has anyone else experienced this kind of rare, intermittent reversion to USB Mode?
- Is there a reliable way to prevent this, or should I send the
POR232.command programmatically at every startup as a workaround?
Any insight would be appreciated. Thank you!