Go Down

Topic: *VIDEO* Program react differently regards of POWER source - USB/BATTERY (Read 1 time) previous topic - next topic

Gabriel_swe

Have you measured voltage to ultrasonic sensor when on USB power and on battery power?


TruePatrick

How am i suppose to measure it? Sorry for asking, i'm a beginner. I measured the voltage from the external battery when usb cable was pluged into board. In theory usb has 5V (distance sensor is connected to the red 5V on the board) and when i measured the voltage which was in the external battery which was connected to the board (but the switch was OFF) it dropped like 2V!!! From 10V to 8V. Program worked perfectly. How is this possible that besides the switch on the board from the external battery was off (http://imgur.com/a/6Y6w4 - first left Green on the top, lower is the switch), board still collect voltage from the external battery. ---------
3 days ago i accidentaly switched that switch ON when USB was connected, and program schuted down that day. I've read that you musnt do that. 10V from batteries + 5V USB = 15. Max voltage that board can handle is 20V so i didn't worry about it much, i switched it off after 0.5 sec.

Gabriel_swe

Motors are always powered from external source. Switch only separate system power from motor power.

To measure voltage, measure on the red pins between GND and 5V, GND and 3,3V and finally between GND and Vin. Do it for both USB power and battery power. I would start with 6 volt battery power as power regulator might be broken.
 
https://www.dfrobot.com/wiki/index.php/Romeo_V2-All_in_one_Controller_(R3)_(SKU:DFR0225)
Big warning from DF Robot.
"Please Turn OFF the Motor Power Switch when debugging Romeo through USB cable. Or the external power supply(>12V) will destroy your Romeo."

It is possible power regulator on your board is toast from having both USB and battery power source connected. Board can't give you 5V any longer and no power to ultrasonic sensor.

If your servo doesn't move you need to connect 5V to servo power terminal

TruePatrick

Do Debugging mean - reuploading code that has a little change in it?
I hope i didn't toast any circuit on the board.
I will try to connect SERVO to
Motors are always powered from external source. Switch only separate system power from motor power.
That's helpfull answer. When i connect board via usb, and deconnect external power, servo and distance sensor works(i'm sure) BUT not motors.

I would start with 6 volt battery power as power regulator might be broken.
In the house i've found little battery from rc car - 7,2V 500mAh. Tried it but i chave to charge it.
Here's one thing, Seems like board doesn't like external battery at all. When i only on EX battery -code works weird(like i sad before), but when i connect powerbank 5V to the usb port - WORKS perfectly like from PC. I can't find any problem in the code. Ehhh

I will check the voltage later - tomorrow cuz it's 10:30 p.m. and i'm tired.
UPdate: Voltage
USB (powerbank 5V) + 8x 1,5V AA battery (their actuall voltage is ~10V) and switch OFF:
5V - GND: ~5V
3V3 - GND: ~3,3V
Vin - GND: 0  (nothing shows)
8x 1,5V AA battery and switch ON:
5V - GND: 5V
3V - GND: 3,3V
Vin - GND: 9,8V - program starts runnig in circle - starts stoping - the L diode flashing - and the runing for like 1 sec and voltage drops to ~6,3V. -  do you want a video that shows how program works on external battery?


Gabriel_swe

Better than expected, even if I thought Vin would be 5V running from USB power.

Voltage drop when battery powered is too much. From 9.8 down to 6.3 is 35% drop and will most likely reboot the unit. Fresh alkaline will be closer to 12 V with low voltage drop. Even fully charged NiMH I would expect to be a little more than 10V and less than 1V drop.

Voltage drop most likely comes when motors start to rotate for first time. To get a visual indication of a reboot you can add a for loop to blink a led in setup() for 10 or 20 seconds.
If you after the blinking just get a tiny movement and it start to blink again - you had a reboot.

TruePatrick

Yep, you were right.
When the motors starts, program starts rebooting. What can i do for it? Reduce the external battery voltage?

Gabriel_swe

What types of batteries do you have now?
Voltage should match your motors. Most ebay ads for those says 3-6V.
Even if you run motors on low speed they will get full voltage, as power is applied in pulses (PWM)
2 cells LiIon 18650 in series is 7-8 volt and should have no problem deliver current needed.

Another solution is to have separate power to motors and system.

TruePatrick

So i have to use only that much voltage that motors need?
https://botland.com.pl/podwozia-robotow/7289-podwozie-robota-4wd-czterokolowe-z-silnikami-prostokatne.html
Here's the platform with motors - in the description below they say that they need maximum 6V. I used 8x 1,5V alkaline power battery AA from Philips. I though that i can use higher voltage and board will take only that much voltage that needs.
I searched in my desk some batteries, and have found 2 batteries from the head lamp - each Li-ion 18650 8800mAh 3,7V.
How can i separate power? Using separate 6V to the engines port on the board, and for example powerbank 5V to the usb?


aarg

Cease and desist with the videos if you want help. Instead, please provide proper schematics and clear photographs. Attach them to your post, don't use offsite links.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

TruePatrick

Yes but since i have posted this post we have already solved some of the problems, and another just appeard. Do i have to modify the whole? Read last answers cuz there is completly description for all of the problems.

Gabriel_swe

USB power bank to the system and 4x1,5V battery to motors are good. In that way system gets a stable power source. You could also get a battery holder for 2 pcs of 18650 to get ~7,5V. I don´t think it will damage the 6V motors. Battery holders can be bought cheap on ebay, or that polish site.
Those batteries you have, they are not 8800 mAh. Roughly 3500 mAh is the most a 18650 can hold.

TruePatrick

I have 4 battery holders for 8x AA batteries. So Either i use 4x AA 1,5V or 2x 18650? Is there a way to don't use powerbank to usb port? Is this Green Port on the board accountable for ONLY motors power or motors power and the board system power? There's not much room for a powerbank so i would not use it

Gabriel_swe

I have successfully used 2x18650 but my robot only had 2 motors. (Most) Li-ion batteries can supply plenty of current without voltage drop. In that case you can have switch to ´on´ and only need a single power source.

You have a few power options listed at DFRobot.
Switch ´off´, separate power source.
5V to either USB port or 5V pin, or 5~23v power source to VIN.

TruePatrick

I'm back with project.
5V from usb when "OFF" is set and 6V from batteries is an option. But why when i connect 10V from batteries to this port and set "ON" program keeps reseting? And what's going on with this "Vin" thing. I can see "Vin" port on my board, but i hadn't connected to this single wire.

Go Up