Question about Power PCB and battery switch

Paddy

Well-known member
Hello guys,

I made some progress with my ROSMower. I've build a base controller (Arduino Nano), which acts as Perimeter receiver as well as to monitor battery status and so on. This Arduino is attached to PowerPCB from Sascha or Bernard, not sure who designed it.

However, I had some hard time to get it running. Everything worked fine on PC but as soon as I tried it on Jetson Nano (which is inside the robot), it fails. After some days if testing, I noticed that it always occur when serial communication between Arduino and Jetson gets established.

First thing Arduino does during boot is setting the pin for battery switch to high. But when my ROs node connects to Arduino by USB, it causes a reboot of Arduino (which is normal, I know). Now, the pin gets low and everything shuts off.

I can imagine that you discovered similar so does anyone know, how I can keep the pin high during boot? I may can add a large capacitor between GND and pin of battery switch. But will I be able to control it afterwards when needed (i.e. battery is drawn empty?)

Patrick
 
I'm not sure, so whenever the serial connection is established, the PowerPCB goes off?
Does the Arduino restart?
Can you switch on the PowerPCB via the Jetson?
 
how I can keep the pin high during boot? I may can add a large capacitor between GND and pin of battery switch
Yes the capacitor is the solution and it is also use to flash the DUE using Raspberry pi on PCB1.3.
You have the explanation into sunray wiki in

Automatic robot switch off​

You can set jumper JP8 to 'Automatic' (near DC/DC module) to enable automatic robot switch-off for a) undervoltage and b) if the robot is in idle mode (you can choose both situations in config.h). If you enable automatic robot switch-off, it is recommended to add an additional capacitor (100 uF or higher, 63V) below the existing capacitor as shown below to be able to flash the Arduino without a sudden PCB switch-off. If not added the additional capacitor and automatic robot switch-off activated, you will have to press and hold the 'robot switch-on button' during the flash process.
Capacitor can be locate at different location :
You can try to replace the C1 100uf by something bigger (1000uf) and test to see the new delay , but power drain by Jetson can empty it too fast for Nano start.
You can also try to put a small one at the Q3 base with small diode (R10 is maybe not needed).

Capture d’écran 2022-01-15 210000.jpg
 
Thank you Bernard for highlighting this. This is exactly I'm looking for. It just need to keep the signal on for 1 sec or so until Arduino launches setup again.

Right now, I places 100uF between RST and GND of Arduino as this also prevent the reset during serial connection. But it can't be flashed and must removed to do so.

@Sascha, Jetson or even Raspberry PI shouldn't be used to control the power. First of all, you need to keep Button pressed until boot is complete and program starts. Hope it will start without error, otherwise it will crash right after releasing the button.
Same is true for battery monitor. Imagine your program terminates for some reason, you may closed it accidientally or it crashes, it will not turn off and drawn battery to dead.
I checked other commercial mobile robots like Clearpath or Turtlebot. All run Linux systems for navigation and so. But all of them use some low level MCU as base controller for safety reasons.
The base controller I've implemented monitors battery and charge, bumpers, mow motor etc. It needs to receive commands regulary (10Hz). If no messages occur anymore, it stops all motors. It also checks if message is valid by checksum calculation. Even more, it doesn't crash if message is corrupted. For example, it is incredible easy to turn Ardumover Azurit into a zombie. Simply send an unterminated string.
 
Back
Top