BOT120 - Copy of the originally loaded program.

Thanks for looking, but the Versabot code can't be the same (I don't get the serouts that should be present and get beeping and flashing, that shouldn't :( )

EDIT

After much digging, I found a copy of the video (such as it is) :-

 
Last edited:
I just found my half-built BOT 120 two days ago. Never turned on, has the original code in it I'm sure. A shame I can't extract it for you.

Must finish it over Christmas break! Been slammed here.
 
The available sample BOT120 programs are found in PE6 from the File>Open Samples>Flowcharts>BOT120-microbot menu. However we don't believe the factory test flowchart is there and so, no, it is not available.
 
Bot 120 Code

Hope this what you require.

It looks like a comprehensive run-through of all the available functions, so is a useful bit of code to have - thank you :)

I don't think it's the original program loaded on to the 20X2 at manufacture though...

Let me describe why I wanted to 'have sight' of the original program:


I built the BOT120 and finally established contact with the Picaxe (after my weird 3.5mm socket experience). On power-up, the BOT120 flashed both LEDs and ran both motors when I pressed the momentary switch - this seemed like a reasonable self-test state.

Since then, I've been wrestling with mounting an ebay-sourced HY-SRF05 on the BOT120, rather than the Rev. Ed. SRF005, but have finally managed it.
Now when I apply power, the left-hand LED flashes and a tone sounds in unison. Rather than working my way round the BOT, diagnosing what (if anything!) it is trying to tell me, I thought a glance at the program would quickly point me in the right direction.

Does anyone know/remember what the significance of the beeps and flashes might be?
 
Does anyone know/remember what the significance of the beeps and flashes might be?

Having done a bit more programming, I'm guessing that it's related to the left-hand motor's occasional reluctance to spin in a forward direction - i.e. stall detection.

The BOT120 has the ability to measure the motor current - but the question is, what value represents a stall?

(Before you say, just measure it - it's not that easy, when your project is propelling itself off the workbench❗
Of course, I can lift the wheels clear, to stop it moving, but then it's not really an accurate measurement :unsure:)

Does anyone have any representative values for the corresponding READADC10 statement?

The Bot120 manual says said:
Motor Current Sense (advanced feature)
There is a Motor Current Sense input from the motor drive circuitry to
the C.7 pin (ADC channel 3). Using a ‘readadc’ command on analogue
channel 3 will return a value which is proportionate to the current drawn
by the motors; the higher the current draw, the higher the reading.
In advanced programs the Motor Current Sense can be read and used to
determine when the motors are struggling or have stalled. A program
may then take appropriate action when that occurs.
Note that when a motor starts it will draw much higher current than
when it is up to speed and running unhindered. This is known as ‘in-rush
current’. When starting a motor you will likely need to leave a short
period before reading the Motor Current Sense level to avoid the turn-on
in-rush current being misinterpreted as a motor stall.
 
A quick browse of the program has almost your comment "Now when I apply power, the left-hand LED flashes and a tone sounds in unison. Rather than working my way round the BOT, diagnosing what (if anything!) it is trying to tell me,".

Lights and beep are the "Waiting for IR input" signal. Try that first.
 
I found the original CD that came with my BOT120. There are sample programs in the PDF file on the CD.

Bill
EDIT: BOT120.PDF. File is too large to attach. If required PM me so I can email file.
 
Thanks for looking, but the Versabot code can't be the same (I ... get beeping and flashing, that shouldn't

Phil,
I found this comment in the section Programming Example 1 - LED Eyes of the bot120.pdf manual:
"Note that the LED eyes will always briefly flash when the Microbot is first switched on or after it is reprogrammed. This is to indicate that the Microbot is working correctly. After the eyes flash the Microbot will then start running the program that is stored in it’s flash memory."

This would mean that you get the flashing LEDs when you download or power up with _any_ program, including the Versabot code.
This is one behaviour of the bot120 that you can test by downloading any program that does not flash the LEDs or sound the buzzer. i.e. download and empty program with no commands and see if the LEDs flash then power the bot off and on again and see if the LEDs flash.

From this it sounds like the version of the PICAXE firrmware programmed into the 20X2 chip on the Bot120 is defferent from the version programmed into individual 20X2 chips in that it is hardcoded to flash the two LEDs connected to B.1 & B.3 on power on and after reprogramming.

I didn't find any comment about the beeping being similar behaviour but as the LEDs and the buzzer are on the motherboard flashing the LEDs and beeping the buzzer would indicate to both the owner and RevEd support that the 20X2 chip, the two LEDs and the buzzer on the motherboard are all working correctly. A test with an empty program would also show whether the buzzer is being sounded on power on and after reprogramming.
 
Does anyone know/remember what the significance of the beeps and flashes might be?
The microbot flashes the on-board LED/piezo briefly at reset just to show it is alive and working. This is to aid educational classroom checking of batteries etc. It doesn't have any other purpose/significance.

The microbot runs a slightly customised version of the 20X2 firmware that
1) flashes on-board LEDs at startup
2) forces B.4-B.7 (the motor outputs) to always be outputs, so commands such as readtemp, servo etc. won't work on these 4 pins (as they are hard wired to the motor controller chip on on the motherboard PCB)
3) uses tmr3 to pulse the motor outputs to give fast/slow speed control (see manual for more details, controlled by C.5)
 
The microbot runs a slightly customised version of the 20X2 firmware that...

The significance of this statement has just dawned on me ...:oops:

By firmware, I assumed we were still talking about that originally loaded Basic program - but we're not are we? - we're literally talking about the Picaxe firmware, I believe...

I want to understand the BOT120 board, because I intend to transplant it into my long-dormant CYBOT :) so I've been studying and testing the motor driver section. I could see no correlation between the logic levels of [b4:b7] and what the motors were doing. Even weirder, I could see no correlation between what I was setting the pins to and what they were actually being set to! Now I know why!

(I started looking at this aspect, because it seemed clear that the motor driver transistors would self-destruct :eek:, if either (b.4 and b.5) or (b.6 and b.7) were set low at the same time. I entered the schematic into a circuit emulator and it agreed with me - yet it wasn't happening in practice...

It appears that pin settings for [b4:b7] are intercepted and massaged into values that make sense to the driver board (and keep the magic smoke in)).

If anyone is interested, here is a list of the Port Pin settings and their actions. "Set pins" is what the code sets the pins to, "Read pins" is what they are actually set to - confirmed via a subsequent 'read' and a voltmeter. (Some of this, is no doubt the influence of the external 'pull-up' resistors).

Code:
         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   0   0   0 --- 0000    NOTHING
Read pins 1   1   1   1 --- 0000

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   0   0   1 --- 0000    LEFT-FORWARDS
Read pins 1   1   1   0 --- 0000

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   0   1   0 --- 0000    LEFT-BACKWARDS
Read pins 1   1   0   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   0   1   1 --- 0000    NOTHING
Read pins 1   1   1   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   1   0   0 --- 0000    RIGHT-FORWARDS
Read pins 1   0   1   1 --- 0000

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   1   0   1 --- 0000    BOTH-FORWARDS
Read pins 1   0   1   0 --- 0000

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   1   1   0 --- 0000    LEFT-BACKWARDS + RIGHT-FORWARDS
Read pins 1   0   0   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  0   1   1   1 --- 0000    RIGHT-FORWARDS
Read pins 1   0   1   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   0   0   0 --- 0000    RIGHT-BACKWARDS
Read pins 0   1   1   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   0   0   1 --- 0000    RIGHT_BACKWARDS + LEFT-FORWARDS
Read pins 0   1   1   0 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   0   1   0 --- 0000    BOTH-BACKWARDS
Read pins 0   1   0   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   0   1   1 --- 0000    RIGHT-BACKWARDS
Read pins 0   1   1   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   1   0   0 --- 0000    NOTHING
Read pins 1   1   1   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   1   0   1 --- 0000    LEFT - FORWARDS
Read pins 1   1   1   0 --- 0000

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   1   1   0 --- 0000    LEFT - BACKWARDS
Read pins 1   1   0   1 --- 0001

         b.7 b.6 b.5 b.4   [b3:b0]
Set pins  1   1   1   1 --- 0000    NOTHING
Read pins 1   1   1   1 --- 0001
 
Last edited:
Back
Top