Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

New low voltage code ? please help

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
9 postsPage 1 of 1
9 postsPage 1 of 1

New low voltage code ? please help

Post by rep001 » Tue Mar 21, 2006 9:38 pm

Post by rep001
Tue Mar 21, 2006 9:38 pm

Chaps what am i doing wrong.My RB has a constant flashing head ?
I thought i may need to lower the voltag threshold and have tried to do so,but he still flashes from a fresh charge with 7.6v at least in the pack.here is a copy of the code i changed and really need someone to help or tell me i am a muppet .........
robot_voltage: ' [ 10 x Value / 256 = Voltage]
DIM v AS BYTE

A = AD(6)

IF A < 128 THEN ' 5.0v

FOR v = 0 TO 2
OUT 52,1
DELAY 200
OUT 52,0
DELAY 200
NEXT v

RETURN

HELP !!
Chaps what am i doing wrong.My RB has a constant flashing head ?
I thought i may need to lower the voltag threshold and have tried to do so,but he still flashes from a fresh charge with 7.6v at least in the pack.here is a copy of the code i changed and really need someone to help or tell me i am a muppet .........
robot_voltage: ' [ 10 x Value / 256 = Voltage]
DIM v AS BYTE

A = AD(6)

IF A < 128 THEN ' 5.0v

FOR v = 0 TO 2
OUT 52,1
DELAY 200
OUT 52,0
DELAY 200
NEXT v

RETURN

HELP !!
rep001
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 193
Joined: Thu Mar 09, 2006 1:00 am
Location: HERTS UK

Post by ucrobots » Tue Mar 21, 2006 11:28 pm

Post by ucrobots
Tue Mar 21, 2006 11:28 pm

I think the formula is wrong.
Try 58 instead of 128.
I think the formula is wrong.
Try 58 instead of 128.
ucrobots
Robot Builder
Robot Builder
User avatar
Posts: 12
Joined: Mon Mar 20, 2006 1:00 am
Location: Essenrode near Braunschweig, Germany

Post by rep001 » Tue Mar 21, 2006 11:30 pm

Post by rep001
Tue Mar 21, 2006 11:30 pm

HOW DO YOU COME TO 58 ?
HOW DO YOU COME TO 58 ?
rep001
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 193
Joined: Thu Mar 09, 2006 1:00 am
Location: HERTS UK

Post by rep001 » Tue Mar 21, 2006 11:35 pm

Post by rep001
Tue Mar 21, 2006 11:35 pm

THAT HAS STOPPED HIM FLASHING BUT NOT SURE ,DONT WANT TO PULL THE BATTERY DOWN TO FAR ? HAVE YOU ANY EXPERIENCE WITH ADDING A GYRO.
THAT HAS STOPPED HIM FLASHING BUT NOT SURE ,DONT WANT TO PULL THE BATTERY DOWN TO FAR ? HAVE YOU ANY EXPERIENCE WITH ADDING A GYRO.
rep001
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 193
Joined: Thu Mar 09, 2006 1:00 am
Location: HERTS UK

Post by bauermech » Wed Mar 22, 2006 2:19 am

Post by bauermech
Wed Mar 22, 2006 2:19 am

You can find mentions of this same problem in some of the previously listed topics. Topics like 'Blinking headlight oops' and 'Working with my Robonova'. They go through what some of us have already gone through. For those of you who may be newer to the forum, it is suggested that you read through past postings and add to the ones that already exist (that relate to your problem) rather than starting a new topic. This will make referencing questions and their answers easier as more and more people join. Anytime you add to one of the existing topics, it moves to the top so we all know it's been changed or added to, and can then respond. :D
You can find mentions of this same problem in some of the previously listed topics. Topics like 'Blinking headlight oops' and 'Working with my Robonova'. They go through what some of us have already gone through. For those of you who may be newer to the forum, it is suggested that you read through past postings and add to the ones that already exist (that relate to your problem) rather than starting a new topic. This will make referencing questions and their answers easier as more and more people join. Anytime you add to one of the existing topics, it moves to the top so we all know it's been changed or added to, and can then respond. :D
bauermech
Site Admin
Site Admin
User avatar
Posts: 318
Joined: Sat Feb 04, 2006 1:00 am
Location: Defiance, Ohio, USA

Post by RubikCube » Wed Mar 22, 2006 4:24 pm

Post by RubikCube
Wed Mar 22, 2006 4:24 pm

I think you need to put a resistor cicrcuit between +votlage and ground

' {Value(A) / 256} * 5.0V * {(R1 + R2) / R2} = BATT-Voltage

'{sample schema}
' BATT --[R1]-+
' |
' +--- AD(6)
' |
' GND --[R2]-+ ex. R1=10k,R2=10k
I think you need to put a resistor cicrcuit between +votlage and ground

' {Value(A) / 256} * 5.0V * {(R1 + R2) / R2} = BATT-Voltage

'{sample schema}
' BATT --[R1]-+
' |
' +--- AD(6)
' |
' GND --[R2]-+ ex. R1=10k,R2=10k
RubikCube
Robot Builder
Robot Builder
User avatar
Posts: 23
Joined: Mon Mar 06, 2006 1:00 am

Post by subpilot » Wed Mar 22, 2006 7:47 pm

Post by subpilot
Wed Mar 22, 2006 7:47 pm

I agree with Rubik and you need to add the circuitry. R1 & R2 do not refer to existing resistors on the 3024 board. If you check the input pin for AD(6) you will see that there is no voltage on it. Just comment out the voltage check routine call until you add the required circuitry but be aware that you can over-discharge the batteries.
This is a glaring problem with the setup. There needs to be an under-voltage cutoff circuit to prevent that from happening. I have added one to my Nova. It is connected to the output enable line of my DC\DC converter.
I use one of these: http://ww1.microchip.com/downloads/en/a ... 00779a.pdf
Maybe tying the output of the TC54 to the processor reset pin would do the trick? Would probably be pretty erratic when at the setpoint though.

I think at a minimum you should add the resistors and change the code so that the robot sits down and powers off the servos when an under voltage occurs.
I agree with Rubik and you need to add the circuitry. R1 & R2 do not refer to existing resistors on the 3024 board. If you check the input pin for AD(6) you will see that there is no voltage on it. Just comment out the voltage check routine call until you add the required circuitry but be aware that you can over-discharge the batteries.
This is a glaring problem with the setup. There needs to be an under-voltage cutoff circuit to prevent that from happening. I have added one to my Nova. It is connected to the output enable line of my DC\DC converter.
I use one of these: http://ww1.microchip.com/downloads/en/a ... 00779a.pdf
Maybe tying the output of the TC54 to the processor reset pin would do the trick? Would probably be pretty erratic when at the setpoint though.

I think at a minimum you should add the resistors and change the code so that the robot sits down and powers off the servos when an under voltage occurs.
subpilot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 146
Joined: Sat Feb 25, 2006 1:00 am
Location: Lake Arrowhead, Ca,USA

Post by Octovir » Tue Apr 25, 2006 7:12 am

Post by Octovir
Tue Apr 25, 2006 7:12 am

for what its worth, i hooked up a digital meter to my batt as i played with the voltage code. The meter showed 6.8v at no load. I figure my battery was less than half charged.. anyway, hooking it up and powering on, voltage dropped by about .2v. After a few minutes of multiple compling and uploadings and loading the servos a bit, it seemed a value of 85, triggered right around 6.2v, so i powered off and began this message. But for consistency's sake i decided to double check and out the door went consistency!.. i started moving the values up to try and match the 6.6v i was getting and 86 seemed to trigger the led at about 6.35 volts, but other times i could bring it down below 5v and still a solid LED..

conclusion:
im willing to bet my battery that "Value/13.5 = Voltage" is a suitable equation for determining a cutoff point (im picking 77 because i feel lucky..)

besides that its my first reply so i wanted to say something useful.. :roll:
for what its worth, i hooked up a digital meter to my batt as i played with the voltage code. The meter showed 6.8v at no load. I figure my battery was less than half charged.. anyway, hooking it up and powering on, voltage dropped by about .2v. After a few minutes of multiple compling and uploadings and loading the servos a bit, it seemed a value of 85, triggered right around 6.2v, so i powered off and began this message. But for consistency's sake i decided to double check and out the door went consistency!.. i started moving the values up to try and match the 6.6v i was getting and 86 seemed to trigger the led at about 6.35 volts, but other times i could bring it down below 5v and still a solid LED..

conclusion:
im willing to bet my battery that "Value/13.5 = Voltage" is a suitable equation for determining a cutoff point (im picking 77 because i feel lucky..)

besides that its my first reply so i wanted to say something useful.. :roll:
Octovir
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Mon Apr 24, 2006 1:00 am
Location: Here, Now

my posts useful? psh..

Post by Octovir » Wed Apr 26, 2006 6:22 pm

Post by Octovir
Wed Apr 26, 2006 6:22 pm

Ok, so i guess i lost my battery...
My RN1 passed out on me while holding a steady light. I'll try upping the value a little, but it seems very inconsistent.. Does adding the resistors make it more reliable or is it basically the same as changing the code, but in hardware form?
Ok, so i guess i lost my battery...
My RN1 passed out on me while holding a steady light. I'll try upping the value a little, but it seems very inconsistent.. Does adding the resistors make it more reliable or is it basically the same as changing the code, but in hardware form?
Octovir
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Mon Apr 24, 2006 1:00 am
Location: Here, Now


9 postsPage 1 of 1
9 postsPage 1 of 1