home  >  Loki 29 November 2021

Loki Log


22Sep21 fitted optical Whisker sensors
phototransistors pushed into a 3mm hole from the back and glued, same with a 5mm hole for the LEDs

16Sep21 added optical Shin Feelers

30Jul21 - added IR LED in parallel with Ultrasonic sensor to Transmit IR cmnds
11Jul21 - added 4pin 0v,5v,C.6/hserout,Serin header for Alitalk etc

Changed the brain to Loki-6_PicAxe40x2 and ported software from Ullr. Having control from a serial terminal makes the software easier to use. Whatever was wrong with the servo supply is now right and Loki now walks properly again. I added a HC-SR04 ultrasonic ranger and a back panel with coax power socket and voltmeter like on the other of the Aesir but the relay to switch to external power had to go by the side of the new battery box which holds 4xAA cells. Also because the servos now work properly I removed the two 'helper' springs on the ankles.
          The circuit shows the IR LED added on 30Jul21

27Jun2021 Loki fitted with a New Brain

Old Loki with Stamp brain

  • Loki software
    '21Apr18 Added blue eys on what were SharpIRranger 28x2pins, IRranges not now sent from Cerebellum
    'Loki-20.bpe -------------------------------------------------------
    '23Mar18 rearranged for bpe and STORE
    'Loki-19 .bpe ------------------------------------------------------
    '20Dec17 reduced sm and sf to 2,4

    Changed left hip servo, pot was noisy and made walking jittery.
    '26Jun14 f_wtfG and f_bfs were on different bits in prog0 and prog1 - mistake
    '26Jan14 f_halt f_8.bit2 deleted
    '24Jan14 fsQ,_fsQ_fsQi,_bfsQskip,CRAM_BfsQ changed to fsA,_fsA_fsAi,_bfsAskip,CRAM_BfsA
    '24Jan14 BfsC changed TO BfsA (A FOR Action)
    '24Jan14 Action on foot sensors changed so it works,

    Photos of Loki's circuit boards.
    '22Jan14 added 1000uF fed through 1N4001 diode to power electronics, servos now do not brownout the electronics
    'DEBUG 0,"L18",CR  'see cold:
    'Loki-18  ------------------------------------------------------
    '25Oct13 1CF added ss sm sf vl vn vh       '5 bytes spare!!!!
    'loaded to here
    '25Oct13 ??? added f_B and turns going backwards
    '18Oct13 200 Zilch and QC sections moved round, _IO rewritten
    'Loki-15f  ------------------------------------------------------
    '19Aug13 21B Zilch and IR entries rewritten. added Si StandInitialise.
    '19Aug13     Reset toggle removed, not needed with IRcmnds
    'Loki-15e  ------------------------------------------------------
    '19Aug13 1EB QDo changed to QTasker
    '18Aug13 1EB added IR cmnds for TVR010_PicAxe_IR_controller
    '18Aug13 211 added Fw,Bw,Rw,Lw,Hw,Sw because they run once and wait for a new cmnd

    Hooray!!! At long last Loki is working again and receiving and acting on IR codes from a remote as well as the task selected by the hex switch. I do need though to set the minimum leg lift in turns which needs to be higher than for forwards and backwards.
    Revised the Piggyback board and the BS2 code so the BS2 can talk to either the PicAxe08m2 Actor or the PiccAxe08m2 IR-ear. Had to change the PicAxe08 Actor for a PicAxe08m2 so it could SERRXD the command from the BS2.
    Remade the piggyback Tasker board and added a PicAxe08m2 and IR receiver to read Sony IR commands from a remote-control and to control the PicAxe08 Actor.
    Added an IR whisker board with LDR.
    Added a bright orange Voice LED across the beeper and a dropper diode in the servo supply.

    Cerebellum PicAxe28X to read sensors and drive servos, communicates via 5v RS232 to BS2.
    To suit connectors on Loki board, servo-power and serial to Cerebellum is by one 'servo' lead and 5v and serial from Cerebellum is by other lead.
    The TalkAli module was too big to fit under the main PCB with the Cerebellum module so I cut up and mounted it on stripboard.

    '04Mar11 1CD got rid of f4_Sinc AND MoveCalcs AND put INC/DEC test in MOVE
    '11Feb11 1A6 changed to LokiActor -change Act5v and ActSer from 0 1 after PicAxe28 does feet
    '   Loki-14
    '11Feb11 1B9 change Do to Task and pDo to pT
    '01Feb11 1B3 removed F,B,R,L, from Do to MetaAct, hole test only done for forward foot.
    '  CURRENT LOKI PGM is Loki-13
    Piggyback board - 16 Routine Selector and EEPROM
    Built a piggyback board with a PicAxe08 and Hex switch for selection of 16 routines.
    The main board was designed for either a BS2 or a Milford Schools Stamp and the daughter board fits the sockets for the Schools Stamp.
    The PicAxe08 serials the switch setting to the BS2 at power-on.
    Removed the old 4 routine selector.
    The spare socket is for an 8kx8 EEPROM for commands.
    The RA headers are for active eyes.
    The PicAxe is powered from BS2pin0 or 5v by the red jumper,
    it has to be moved from BS2pin0 hdr (TL) to 5v hdr (by PicAxe08 pin1) to program the PicAxe. The programming current must be too much for the BS2 pin.
    '11Feb11 1B9 change Do to Task and pDo to pT
    '01Feb11 1B3 removed F,B,R,L, from Do to MetaAct, hole test only done for forward foot.
    '  CURRENT LOKI PGM is Loki-13

    Moved Hole Sensors and added LEDs
    I never liked the hole sensors on Loki's feet they didn't look right and spoiled the lines of the feet.
    I realised I could put them on the inside of the toes.
    I added two yellow (hole) indicator LEDs which meant running an extra 5v (red) wire, and I shortened the long sensor arm at the same time.
    '27Jan11 1C8 reorganised _Qhdo:, removed f_hdo from _Ah:
    '26Jan11 1BB created CON potscale =43 for in Calcspeed:
    '24Jan11 1BB AdjPose: commented out -Sspeed(RA) ':DEBUG"ruc",CR 'Sspeed(RA) for slugish servos
    '        added debug LEDs to toe sensors, LED on = foot up,  5v -> 200R+yellowLED
    '24Jan11 %XXXX,BholeX corrected, _ACs: corrected to use HipPos instead of AnklePos
    '07Jan11 1B4 renumbered Act, Do cmnds so ankle speeds are available to Do
    '13Dec10 1B4 added D to do a Do and Act: _ap1: and NewAct0: to do a page 1 act from an act
    '12Dec10 1D8 a big tidyup and rewrite (so inline Pose and Act cmnds work)
    '            pDo and pDostore made a byte; f_page f_inlinePose added, acts2 changed to acts1
    '11Dec10 1E4 added YouPretty, I'mPretty to TalkAli_
    '08Dec10 1EC removed f_bfs=0 in _QhS: so f_bfs doesn't go down to servo level

    New Battery holders - with external power 2.5 coax skt and charger 3.5 jack skt.
    The 3v battery holder had split, and Loki had trouble perfoming properly because AA cells don't seem to be able to deliver the current for 4 servos.
    Loki worked fine from a 3A bench PSU at 5v but not from 4AA cells, I tried Nicad, NiMh, Alkaline, all the same.
    So I replaced the 4AA and 2AA holders with 2 x3AA holders and added chassis lugs to reinforce the ends, and added a charger socket.
    The servos now work from 6AA cells in series with a 3A Si diode.
    '14Dec09 1E6 shortened code at _ADoCmnd: and default Do code
    '14Nov09 removed 9v battery and added 2xAA cells in series with servo 4xAA cells.
    'CURRENT LOKI PGM is Loki9 '14May08 1D3 added reset toggle code, moved a2 back to Do cmnd '06Sep07 1F2 _cmnd added to subroutine names to indicate returned VAR '06Sep07 put hStand = hSon,p_Stand,z and chain to hStand instead. saved 12 DATA bytes '06Sep07 NewAct and NewPose in DoAct were in wrong order so couldn't chain Acts '14May07 1E0 in _p read_pDoandInc used, cmnd used instead of temp_DoPause '14May07 1DA sub read_pDoandInc added '28May07 changed Beeper from logic to ordinary piezo, (needed it for Cycler!)

    Added Routine Selector - 4 options
    Added Hole Sensors - I/O pulled high, sprung to contact 0v
    Shortened Loki's Heels by 5mm
    '31-10-06 added a switch on pin0,pin1 connector and d_Dos DATA entry and pDoInit to read selection
    '30-10-06 f_fsON made active for one Pose only, fs behaviors made re-entrant until feet safe.
    '16-10-06 Behavior processing added with foot sensor testing after each move and
    '         delay to make sure foot is down. 2 flags to turn off testing and turn off response
    '         not much room left
    '16-10-06 Loki9 inline servo calcs replaced by slower ForNext, needed room '15-10-06 hS0,hS1,f_hS added and test after servo pulses for f_hS '_p, rand, 'jscale min 1 '9-10-06 altered Servo arrays to be logical values about 150, loops slower now '8-10-06 _Jpose1 _Jpose4 indexing wrong, had / instead of // '8-10-06 Talkpin changed from 8 to 15 '04Oct06 Ax,Hx combined in Mx and cmnd values now nibbles, ignore 0 '19Sep06 in sync with Freya for code. '19Sep06 h in DO changed to p and p now pauses instead of driving servos, Acts page 2 done '18-09-06 changed ankle servos from ht-615 to SuperTec-S06, Loki works much better but angle/us is different '18-09-06 testing RightAnkleSero failed as right kicking, no load, got hot and takes current. 'CURRENT LOKI PGM is Loki8 '11-9-05 Seems to all work now. '30-8-05 Loki8 under new editor just in case I don't like it, changed case of cmnds! ' 256 -, changed TO 255 -, works better!!!! '6-1-05 speed put under behaviour and cmnd values altered '1-9-04 various mods - jmidSoffset removed, 150 changed to logical mid, ' logical joint positions added - eg actual jLHmid, logical LHmid ' cmnd =....max 255 added in _Jpose4 ' naming of flags changed to reflect number of bits '14-7-04 300 in servo reversal in _Spulse: changed to 256 '8-5-04 comments added for Roger '10-10-03 Loki7 - another new format for Acts and Poses ' but still requires BS2 to organise names in DATA ' only just larger than Loki5. ' not testd on Loki yet '1-10-03 Loki6 - new format for Acts and Pose 'CURRENT LOKI PGM is Loki5 '30-9-03 all servo values now logical, ' and servo reversal and mean-offset done at pulse time. ' Pot on board rewired so don't have reverse in software. 'Loki5 all value 10ms resolution, means won't move very slowly.

    Added a speech module from a greetings card - Ali - "I am the greatest...". Goes well with the Kata.

    Loki's circuit board, is an Ambler first prototype I had (the second prototype is on Joe Ambler). It is for a Parallax BS2 and has a set of headers for a Milinst Schools Stamp module which is an OEM version of the BS2.
    December 2002
  • LokiDesign1 LokiDesign2 - squares are 5mm.

    home   top