Pages: 1 2 [3]   Go Down
Author Topic: [Q] Robot with dual batteries and relay for 2nd battery  (Read 2223 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26933
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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."
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Monterey CA
Offline Offline
Sr. Member
****
Karma: 1
Posts: 323
Addicted to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 23, 2011, 01:25:38 am by MobileWill » Logged

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

http://mobilewill.blogspot.com

Monterey CA
Offline Offline
Sr. Member
****
Karma: 1
Posts: 323
Addicted to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

« Last Edit: March 23, 2011, 01:25:59 am by MobileWill » Logged

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

http://mobilewill.blogspot.com

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26933
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"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.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Monterey CA
Offline Offline
Sr. Member
****
Karma: 1
Posts: 323
Addicted to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 23, 2011, 01:46:05 am by MobileWill » Logged

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

http://mobilewill.blogspot.com

Monterey CA
Offline Offline
Sr. Member
****
Karma: 1
Posts: 323
Addicted to Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

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

http://mobilewill.blogspot.com

Pages: 1 2 [3]   Go Up
Jump to: