PICAXE 08M2 and 14M2

The cheapest Casio data logger - $4 chip, homemade sensor, BASIC (free)

← Casio calculator data logger – project overview

What if a calculator many students already own, or can buy second hand for $10, could be transformed into a general purpose tool for physical education, health, science, mathematics, Internet-of-things (IoT), and robotics / instrumentation?

The forgotten feature in the 2.5 mm port of a Casio FX-9750 and FX-9860 is now available on my GitHub, open-source and free. It takes the burden off the teacher, because the learners become the experts - constructing, coding and repairing their own smart data logger that also acts as a remote control, a PIN pad, and automation control interface.

This is an extension of my 2008 research, which carried classroom validation and student feedback, now with a modern facelift for the Picaxe family of microcontrollers. Learners can record heart rate, temperature, sound level, and other readings using sensors they build themselves, for cents or a few dollars.

The calculator needs no modification or firmware change. It does not need to know what is on the other end of the cross-over cable.

The cheapest way in. A PICAXE 08M2 is a single 8-pin chip that costs a few dollars, needs no development board, and is programmed in BASIC from a free editor. It was the platform the original 2007 datalogger was built on, and it is still the one to start a class on.

Before you wire anything

Check the wiring of every conductor with a multimeter first. The wire colours inside a bought SB-62 cable may not match the colours in any diagram, including this one. Check the tip, ring and sleeve against your own cable before connecting a calculator.

What you need

The interface circuit

Four components, and the same circuit on every platform. It serves both calculator generations and both board supply voltages.

The universal Casio interface circuit: 1N4148 on the transmit line, 4.7k pull-up and 10k series resistor with a 1N5711 Schottky clamp on the receive line.

Pins

SignalPICAXE 08M2PICAXE 14M2
To Casio RX – blue, ring, via the 1N4148C.0B.0
From Casio TX – yellow, tip, with the pull-upC.1B.1
Sensor 1, analogueC.2B.2
Sensor 2C.3 (digital)B.3 (analogue)
Sensor 3, analogue or DS18B20C.4B.4
Ground – black, sleeve0 V, connect this one first

C.1 is the hardware serial input, not an arbitrary choice. The receive pin has to be the one the EUSART owns.

The code

Two settings in the source are important:

setfreq m16                 ; 16 MHz - needed for clean 9600 baud
hsersetup B9600_16, %00     ; %00 = true polarity, idle high

Three requirements apply to every platform. They are why this works at all, and each of them was found by a link that would not run without it.

  1. Idle between bytes. An FX-9750G Plus needs roughly one bit period – about 104 µs at 9600 baud – of idle line between one byte and the next. A second stop bit supplies it; so does a deliberate delay. An FX-9750GIII does not care.
  2. A turnaround delay. About 5 ms before every transmission, so the calculator can switch its port from sending to listening. Without it the calculator answers 0x22 and never sends its request packet. On a PICAXE you get this for free – the shipped code sets symbol TURNAROUND = 0 and works on both calculators, because the interpreter is slow enough to supply the pause by itself. If you ever do see a Com ERROR here, set it to 20, which is 5 ms at 16 MHz.
  3. Build the packet, then send it. Nothing computed part-way through a transmission – a checksum between the last two bytes will insert a pause a G Plus refuses.

What goes wrong

Never send a packet with a single multi-byte hserout

The EUSART is 8N1 only and has no second stop bit to offer. A block hserout hands the hardware the whole packet and the bytes leave back to back, with no idle between them – which an FX-9750G Plus refuses. The shipped code emits one byte at a time through a put_byte routine, and the interpreter's own per-byte cost is comfortably more than one bit period. That is the entire fix, and it costs nothing in practice because a fifty-byte packet still takes about fifty milliseconds either way.

Other things worth knowing

Code, technical and teaching manual and the other platforms

WARNING - TAKE CARE!

NEVER connect mains electricity (240 V / 110 V) to the calculator, to the microcontroller, or to any sensor wiring.

NEVER use mains-connected equipment near water.

Keep every sensor signal within 0 V to 3.3 V. The ESP32 and ESP8266 are not 5 V tolerant. A bare ESP8266 A0 pin reads 0 to 1.0 V only; 3.3 V will destroy it. However, popular development boards like NodeMCU and Wemos D1 Mini include an onboard resistor voltage divider, which safely extends their external board tolerance to 0 to 3.2V–3.3V

Special Warning: DO NOT let students test boiling water.

There is no need to calibrate temperature sensors using boiling water. Where in the real world would a student expect to record that temperature? If you are investigating cooling curves, YOU should safely get sensor readings at 100 °C and PROVIDE THIS to learners.

READ THE DISCLAIMER in the Technical manual - No responsibility is taken for how you use this information! This is a research project provided open-source to educators.

Use it

Always remind learners that scientists and engineers work carefully and safely, no matter what they see in movies or TV.

Crime scene investigation: Make your own temperature sensor using a 50 cent NTC thermistor. Then test it by calibrating it (see the photo). Use it to investigate cooling curves - how long has the victim's coffee been cooling?

Casio FX-9750 calculator temperature data logging Casio FX-9750 calculator temperature data logging

Casi the Casio calculator controlled robot: The original Casio calculator-controlled robot. The Casio sends calculator key presses by radio to the robot (see the 2008 E-Learning report https://doi.org/10.5281/zenodo.19302276).

CASI - Casio FX-9750 calculator remote controlled robot

Mars surface surveyor: Attach a low-cost ultrasonic rangefinder module (Aliexpress) and map a simulated Martian surface from the air (see the 2008 E-Learning report https://doi.org/10.5281/zenodo.19302276).

Casio calculator range finder - Mars orbital surveyor calculus lesson CASI - Casio FX-9750 calculator remote controlled robot

Human-machine-interface: The calculator transmits user-entered numerical values to the microcontroller via the serial interface. The calculator’s tamper-evident keypad and display provide a secure input mechanism for applications requiring user-generated discrete values. One group sets up a model door lock with a 4-digit PIN and no lockout. A second group is asked to open it without being told the code. Teaches coding, cyber security, building systems safety, and the rule 'the secret belongs with the thing being protected, not with the thing a user is holding'.

INSERT PICAXE HMI VIDEO HERE!!!

IMC simulator: The Casio calculator and connected microcontroller form a closed-loop measurement and control system. The microcontroller reads one or more sensors, transmits them to the calculator for display. The student observes the live readings, makes a control decision, and transmits a control value back to the microcontroller via the calculator keypad. The microcontroller receives that value and adjusts a physical output accordingly; motor speed, heater power, valve position, or light intensity. The student then observes the effect of their intervention in the next sensor reading.

Over distance. A 433 MHz radio link has been proven. Use wireless remote control or wireless sensors.

Portable data logger units - wireless remote control mode

A renewed justification in a post AI-era.

When technology cost and availability is no longer a consideration, the use of simulated data for STEM learning is a decision that now requires justification, rather than being the default.

The original case for this work was equity: timed data logging for a few dollars instead of hundreds. There is now a second reason it matters. As generative AI is trained on a scientific literature increasingly polluted by fabricated paper mill studies (Richardson and Amaral, 2025, PNAS), simulated datasets can no longer be assumed to reflect physical reality. Subverting the Casio serial protocol so learners can gather their own first-hand measurements gives them data whose provenance is transparent and which can still surprise. The exploit is no longer only about cost; it is about preserving access to real, trustworthy observation.

Other platform build guides: BBC micro:bit · ESP8266 · ESP32 · Arduino Uno · Casio calculator Hasbro Smart R2D2 DoidX app

Back to Projects/Research

Back to Projects