lundi 21 février 2011

Calibration done !

Here is the law between the actual battery voltage and the decimal value sent by the ADC0831 :

Ubatt (volts) = 0.04 * adcbits (one byte variable) + 0.6163



Monitoring methods :
Since the BS2 is not very convenient with fractional calculus, the decimal value sent by the ADC will probably be processed by the PC104. I will still use the BS2 as an interface allowing "on demand voltage monitoring", or when it's useful to know / show the actual voltage value.

I may just test the [adcbits] variable with a simple IF...THEN loop. If it's below a threshold, then it's time to charge the robot. Easy programming, but the voltage will remain unknown from the user. Hey wait ! It's supposed to be an autonomous robot... I guess this method will be my favorite !

_______________
Edit (March, 1st) : I corrected a little mistake in the chart and in the linear interpolation equation...

mardi 15 février 2011

Power supply, test and calibration - Alimentation, essai et étalonnage

After a couple of modifications on the new PCB, I mounted it on the robot and started to use the new voltage monitoring function.

Yes, I had to modifiy it :
First, I must admit that a I made a major mistake when designing it... The ADC0831 input line was not at the right polarity. It would have not been a big deal if I had tested the PCB without the ADC on its socket. I should have gone to sleep instead of burning one these integrated circuit... Good thing I ordered a spare one.

Moreover, The potentiometer I chose for the voltage divider bridge (9,6 V to 5,2 V max) was to light, which means the current accross it was to high, which means it got warm pretty fast and it was probably consuming way to much power...

It's always good to remember the basics like ohm's law...


Layout for prototyping board


Everything seems to work properly now. I started to try the embedded voltage monitoring tonight. What I need now is to figure out a conversion law between the actual voltage and the value read through the ADC. I run the code below on the BS2 to collect these values in excel :

' {$STAMP BS2}
' {$PBASIC 2.5}

'mesure tension
'ADC0831

'init
adcbits    VAR Word

cs         PIN 9
clk        PIN 10
dataoutput PIN 11

DEBUG CLS

'main
DO
  GOSUB adc_data
  GOSUB calc_volts
  GOSUB display
LOOP

'subs
adc_data:
  HIGH cs
  LOW cs
  LOW clk
  PULSOUT clk,210
  SHIFTIN dataoutput,clk,MSBPOST,[adcbits\8]
RETURN

calc_volts:
RETURN

display:
  DEBUG HOME
  DEBUG "8 bit bin val : ", BIN8 adcbits
  DEBUG CR, "dec val : ", DEC3 adcbits
RETURN

After collecting around 10 values, I should be able to write a "standard" piece of code, easily reusable in each new mission / program.

mardi 8 février 2011

Power supply PCB - Carte d'alimentation

I just finished the new power supply PCB  !


I used prototyping board because the layout is very simple. I also re-used a lot of the components from the previous version.

Implemented functions :
  • Bipolar on/off switch
  • Charger connector with possible LiPo balance extension
  • Connectors to/from the 5V regulator
  • Connector to 5V devices (PC104, BS2...) with status LED
  • Current monitoring connectors (battery 9,6V and regulated 5V), yellow jumpers on the picture below
  • ADC with serial communication protocol for voltage monitoring from the BS2



Before mounting it on the robot, I need to check it completely, add an insulation on the copper side and change the battery cable.

"A suivre..."

lundi 7 février 2011

Work in progress

Je viens de démonter la carte d'alimentation du robot. Son unique fonction était de distribuer l'énergie aux différents composants. La nouvelle version est déjà en cours de montage !

Elle permettra d'élever le niveau d'autonomie :

mercredi 2 février 2011

Une nouvelle page ! A new page !

Pour compléter les photos accompagnant chaque amélioration matérielle, je vous invite à visiter la nouvelle page "Photos".

You are invited to check the new "Photos" page, with close ups and facts about my robot.