0
\$\begingroup\$

I have an old robot (named qu-bot) that I had used in a school project. A few days ago, I began taking interest in Arduino. On closer inspection, I found that the old robot contains the ATMEGA16 chip. The robot came with a software that was used for programming it. It had a rather basic and limited programming language that is useless beyond school projects. But, it has quite a lot of sensors for me to practice on.

I was thinking of uploading Arduino's bootloader on it. A bit of research online revealed that repurposing old hardware often turns out to be a quite difficult task. Hence, the first step I tried was communicating with it on the serial terminal (UART) of Arduino IDE instead of terminal of the inbuilt software.

It turns out, as soon as Arduino's monitor tries to connect to Qu-Bot, it "locks down" itself. All functions stop and LEDs and sensors get turned off. When I reconnect it to inbuilt monitor, Qu-Bot gets "cured".

So, I thought of tapping into the communication going on in the COM port. I tapped into communication of Arduino IDE as well as inbuilt software. However, the report of the tap looks quite meaningless to me. Can someone please help me decipher the report and tell what is causing the Qu-Bot to "lockdown"?

Report of communication b/w Arduino IDE and bot

Report of communication b/w inbuilt software and bot

\$\endgroup\$
11
  • \$\begingroup\$ What did you use to "tap" into the communication? Some kind of USB sniffing software? If you don't have a serial bootloader flashed into the ATMEGA in the robot, you won't be able to use the Arduino software to program it, you'll have to flash the bootloader first. \$\endgroup\$ – Ron Beyer Apr 30 '20 at 15:56
  • \$\begingroup\$ @Ron Beyer There is a bootloader that comes inbuilt in the bot. I used "Eltima Serial Port Monitor" to tap \$\endgroup\$ – Fitz Watson Apr 30 '20 at 16:00
  • \$\begingroup\$ Does the robot communicate with its normal programming software over its serial port or in some other way? If it does use the serial port is that working correctly? \$\endgroup\$ – Graham Nye Apr 30 '20 at 16:10
  • \$\begingroup\$ @Graham I can't answer all of these questions as I don't know the answer to many. These I know: I'm running Linux(Solus). Robot works normally if I don't try to connect arduino's monitor to it. If I try to, it locks down till the in-built software contacts it. It uses PL2303 programmer. UART Baud rate can be set using the same inbuilt software. Other questions in your comment are beyond my knowledge level. \$\endgroup\$ – Fitz Watson Apr 30 '20 at 16:11
  • 1
    \$\begingroup\$ @GrahamNye don't confuse the OP - a lot of those questions do not apply. \$\endgroup\$ – Justme Apr 30 '20 at 16:11
1
\$\begingroup\$

The simplest way to do it would be to get a blank Atmega16 and an ISP cable.

Burn the Arduino bootloader to the new Atmega16 (instructions at various places on the internet.)

Pop the Atmega16 out of the Qu-Bot and plug in your new one. Experiment to your heart's content.

This keeps the original Atmega available for comparison if you need it. Besides, it may no be possible to overwrite the bootloader on the existing chip.

\$\endgroup\$
11
  • \$\begingroup\$ There are two reasons I'm avoiding this method: 1) The ATMEGA is strongly soldered on the bot. Removing it will most probably cause irreversible damage. 2) Even if I'm ready to take the risk of damaging the chip, the current Covid-19 lockdown means I can't go out to purchase a new ATMEGA16 \$\endgroup\$ – Fitz Watson Apr 30 '20 at 17:15
  • \$\begingroup\$ Even in normal times there are very few places where on can purchase an ATmega16 in person (most that had something would have the 328p). It's pretty much something you'd have to order. \$\endgroup\$ – Chris Stratton Apr 30 '20 at 17:22
  • 1
    \$\begingroup\$ @JRE Here are some closeups of the chip. Does it look removable? imgur.com/a/lQ49ZAq If yes, then I,ll unscrew the wheels and try pulling out the chip \$\endgroup\$ – Fitz Watson Apr 30 '20 at 17:42
  • 1
    \$\begingroup\$ That looks more like it's in a socket than that it's soldered in. \$\endgroup\$ – JRE Apr 30 '20 at 17:43
  • 1
    \$\begingroup\$ Use a small screwdriver. Push it in under one end, and twist it. Raise that end a little bit, then do the other end. Back and forth, each end a little bit at a time until it comes out. You need to be careful so as not to bend the pins. \$\endgroup\$ – JRE Apr 30 '20 at 18:12
0
\$\begingroup\$

By looking at the device schematics, the USB serial port chip DTR# output is directly connected to AVR reset pin. If the terminal program on PC opens up the serial port and sets DTR# pin low, it will keep the AVR in reset. Since the pin is active low, it means DTR is on. Terminal programs typically enable DTR, but it depends on handshake settings.

\$\endgroup\$
7
  • \$\begingroup\$ Basically, Qu-bot keeps infinitely resetting itself till the inbuilt software interferes? \$\endgroup\$ – Fitz Watson Apr 30 '20 at 16:01
  • \$\begingroup\$ No, it's not the qubot resetting itself infinitely, the PC serial terminal keeps the AVR reset. Until something on the PC commands the DTR line which lets the AVR run. \$\endgroup\$ – Justme Apr 30 '20 at 16:10
  • \$\begingroup\$ If the IDE keeps repeatedly saying "Reset yourself", then Qu-bot should stop resetting itself & work normally when I disconnect USB. But it doesn't normalise on disconnection or even powering the bot on and off. It normalises only when the inbuilt software communicates with it \$\endgroup\$ – Fitz Watson Apr 30 '20 at 16:14
  • \$\begingroup\$ You can't assume the output of PL2303 USB serial chip DTR# state unless a PC program has set the pin state. Get a terminal program where you can yourself control the DTR state. \$\endgroup\$ – Justme Apr 30 '20 at 16:42
  • \$\begingroup\$ A side question: Is the end result (using Qu-bot via Arduino IDE) possibly achievable or practically impossible without expertise in the field? \$\endgroup\$ – Fitz Watson Apr 30 '20 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.