Go Down

Topic: [Q] Robot with dual batteries and relay for 2nd battery (Read 2545 times) previous topic - next topic

CrossRoads

Seems like you'd have plenty of incoming power available.

I recall seeing someplace that the controller LEDs were turning on?

The data sheet says:
"If an invalid character or an invalid message is entered, the device will echo an error response back on the serial
interface and no changes will be made to the motors speed or direction."

Can you connect the controller's Tx line to your MEG2560 and see if you are getting anything back?

Are these LEDs turning on:

"Also if an over-current event is detected one of the two LEDs will turn on until the condition is resolved.
Stat 1 LED will turn on if M1 is in over-current, Stat 2 will turn on if M2 is in the over-current state."
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MobileWill

#31
Mar 23, 2011, 07:15 am Last Edit: Mar 23, 2011, 07:25 am by MobileWill Reason: 1
I updated the schematic.

If the Arduino is powered an not sending commands and I have the TX/RX connected,(the MC is off)  the Power LED on the MC will turn on but not as bright as when it is powered by the battery. This happens if at least the ground is connected to the MC. I can also measure some voltage coming from the step-up.

Most of the time the MC will only be off for a second unless it is shutdown to decrease charging time.

Neither STAT LEDs come on or have been on.

I don't know I am almost thinking now with the DPDT switch that I should skip the relay, but at the same time I want to figure it out as a learning experience and I think this is a good feature/option/just in case to have on the robot.
Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

MobileWill

#32
Mar 23, 2011, 07:21 am Last Edit: Mar 23, 2011, 07:25 am by MobileWill Reason: 1
On a side note, I am thinking once I get everything working and designed that I would create a custom PCB that has everything on 1 PCB. Except for the Arduino, shields and motor controller. I think it would be more efficient and take less room, possible use less battery as well.

Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

CrossRoads

"If the Arduino is powered an not sending commands and I have the TX/RX connected the Power LED on the MC will turn on but not as bright as when it is powered by the battery. This happens if at least the ground is connected to the MC."

Ok, that part is certainly possible if the Mega2560 line are sitting at  high levels - there could be leakage thru the internal circuiry that shows up on the Atmega168 5V line and turns on the power LED which is connected to 5V as well.
You are not supposed to apply highs on the I/O lines without power being applied, is bad for the part.
If the mega2560 is powered, the MC should be powered at the same  time.

Re: PCB - if  you are not using all the mega2560 capacity, you could probably reduce all this to a couple of atmega328s, an L298, and the battery charger chip on a PCB. (and the crystals and caps and screw blocks/or similar for the battery & motor connections.)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MobileWill

#34
Mar 23, 2011, 07:41 am Last Edit: Mar 23, 2011, 07:46 am by MobileWill Reason: 1
I noticed that it doesn't happen until the Arduino is fully booted, which is I think when it initializes the Serial2 as active in my code.

So I should skip the relay and maybe software limit how fast the motors can go without making the battery cut out. I asume when its idle it isn't drawing much, I do hear a buzz from the motors when its powered though. Shouldn't affect charging time/rate much.


I am starting to use a lot more of the Mega2560. Both in code space and GPIO's.

I will add the rest to the schematic this week.

Here is a ruff list

Camera Power Control
Power control of 5v Regulator (for sensors/servos/Xbee/WiFi, that way it doesn't overload the Arduino built-in regulator)
LCD TX (LCD has a Arduino Controlled backpack)
2 IR Distance Sensors
1 UltraSonic
2 IR Distance Switches
Voice Shield
Xbee/WiFi
Current Sensor
2 Battery Levels Sensors (Voltage Divider)
Audio Sensor
2 Servos (Camera Pan/Tilt)
Motor Controller > 4 Motors

Haven't added
2 Charging Stats Sensors (Voltage Dividers connected to charge LED's on the chargers)
LED Headlights (not need since camera has IR, but good for looks)

Everything is mounted on this platform
http://www.dfrobot.com/index.php?route=product/product&keyword=4wd&category_id=0&product_id=97


I think that is it.
Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

MobileWill

Either way I want to see this relay work from a Arduino Pin. I think tomorrow I will try it with my Arduino UNO and see if I can't get it to work with basic code and nothing else connected.

Is it possible just the motors stopping which take the load off is enough to reset the protection circuit on the battery.

I think I will sleep on it and try the robot without the relay and do some testing tomorrow.

Thanks again. I will posting progress on my blog. I posted today and should be posting soon about this robot.

Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

Go Up