Skip to content
Experiments with custom firmware for e.ziclean cube robot vacuum cleaner
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo
dumps
examples/ral
pics
src/bin
.gdbinit
.gitignore
Cargo.lock
Cargo.toml
README.md
memory.x
openocd.cfg
tmux-debug

README.md

e.ziclean cube

Experiments with custom firmware for E.ZICLEAN CUBE robot vacuum cleaner.

Hardware notes

Board

alt text

Components

  • Microcontroller STM32f101VBT6
  • Accelerometer KXCJ9
  • Operational amplifier (3 pcs) LM324
  • Quad buffer/line driver 74HC125D
  • Display driver TM1668

Connector pinout

VDD (75) TMS/SWD (72) GND TDI (77) NTRST (90)
TX (68) RX (69) TDO/TRACESWO (89) TCK/SWCLK (76) NRST (14)

Runtime pin configuration

GPIOA

Pin Configuration Mapping Function
PA0 analog input ADC_IN0 NC ???
PA1 analog input ADC_IN1 battery voltage control
PA2 analog input ADC_IN2 battery charging current control
PA3 analog input ADC_IN3 NC ???
PA4 analog input ADC_IN4 IR diode of the left-center front sensor
PA5 analog input ADC_IN5 Connected to op-amp U5 (LM324): seems to be a current control circuitry of left wheel motor
PA6 analog input ADC_IN6 IR diode of the center-center front sensor
PA7 analog input ADC_IN7 IR diode of the central floor sensor
PA8 .. PA10 floating input
PA11 general purpose output (50MHz) push-pull
PA12 floating input TM1667 STB
PA13 input with pull-up/pull-down J31 (SWDIO)
PA14 input with pull-up/pull-down J31 (SWCLK)
PA15 general purpose output (50MHz) push-pull

GPIOB

Pin Configuration Mapping Function
PB0 analog input ADC_IN8 IR diode of the right-right front sensor
PB1 analog input ADC_IN9 IR diode of the right floor sensor
PB2 general purpose output (50MHz) push-pull KXCJ9 SDA
PB3 floating input TDO/TRACESWO pin on J31
PB4 alternate function output (50MHz) push-pull TIM3_CH1 RAA (???) mark on PCB (non-populated)
PB5 alternate function output (50MHz) push-pull TIM3_CH2 all brushes
PB6 alternate function output (50MHz) push-pull TIM4_CH1 left wheel reverse speed (TIM4/PWM via 74HC125D 2A)
PB7 alternate function output (50MHz) push-pull TIM4_CH2 left wheel forward speed (TIM4/PWM via 74HC125D 1A)
PB8 alternate function output (50MHz) push-pull TIM4_CH3 right wheel forward speed (TIM4/PWM via 74HC125D 4A)
PB9 alternate function output (50MHz) push-pull TIM4_CH4 right wheel reverse speed (TIM4/PWM via 74HC125D 3A)
PB10 alternate function output (50MHz) push-pull TIM2_CH3 PWM for battery charging
PB11 general purpose output (50MHz) open-drain right wheel reverse control
PB12 general purpose output (50MHz) push-pull SPI2_NSS for U12 (non-populated)
PB13 general purpose output (50MHz) push-pull SPI2_SCK for U12 (non-populated)
PB14 general purpose output (50MHz) push-pull SPI2_MISO for U12 (non-populated)
PB15 floating input SPI2_MOSI for U12 (non-populated)

GPIOC

Pin Configuration Mapping Function
PC0 analog input ADC_IN10 IR diode of the left-left front sensor
PC1 analog input ADC_IN11 IR diode of the left floor sensor
PC2 analog input ADC_IN12 Current control for brush motors
PC3 analog input ADC_IN13 Current control for air pump motor
PC4 analog input ADC_IN14 Connected to op-amp U6 (LM324): seems to be a current control circuitry of right wheel motor
PC5 analog input ADC_IN15 IR diode of the right-center front sensor
PC6 floating input
PC7 general purpose output (50MHz) push-pull IR LEDs of all 5 front IR obstacle sensors
PC8 general purpose output (50MHz) push-pull TM1667 CLK
PC9 .. PC10 floating input
PC11 floating input
PC12 floating input IR diode in left motor optical incremental encoder
PC13 .. PC15 floating input

GPIOD

Pin Configuration Mapping Function
PD0 floating input source input for EXTI0 some pin on J33 (LED) connector (???)
PD1 floating input source input for EXIT1 trough R9 to some pin on J28 (???)
PD2 general purpose output (50MHz) open-drain left wheel forward control
PD3 floating input
PD4 general purpose output (50MHz) push-pull
PD5 general purpose output (50MHz) open-drain left wheel reverse control
PD6 .. PD8 floating input
PD9 general purpose output (50MHz) push-pull IR LEDs of all 3 bottom IR floor sensors
PD10 .. PD12 floating input
PD13 general purpose output (50MHz) open-drain IR LEDs in optical incremental encoders for both main motors, active low
PD14 general purpose output (50MHz) push-pull TM1667 DIO
PD15 floating input IR diode of the top sensor (?)

GPIOE

Pin Configuration Mapping Function
PE0 general purpose output (50MHz) push-pull Beeper
PE1 .. PE3 floating input NC ???
PE4 floating input charge connector detection
PE5 floating input charge dock station detection
PE6 floating input battery presence detection
PE7 general purpose output (50MHz) push-pull KXCJ9 SCL
PE8 floating input IR diode in right motor optical incremental encoder
PE9 floating input KXCJ9 INT
PE10 floating input
PE11 floating input NC ???
PE12 general purpose output (50MHz) open-drain
PE13 floating input NC ???
PE14 general purpose output (50MHz) open-drain right wheel forward control
PE15 general purpose output (50MHz) push-pull NC ???

Wheel motors control

From PCB investigation, it looks like SR-latch circuitry is used for direction control to protect H-bridges for main motors.

Right motor direction is controlled by PE14 and PB11:

PE14 PB11 Direction
0 0 stop
1 0 reverse
0 1 forward
1 1 stop

Left motor direction is controlled by PD2 and PD5:

PD2 PD5 Direction
0 0 stop
1 0 reverse
0 1 forward
1 1 stop

Current control for DC motors

From PCB investigation, schematics looks as follows: alt text

Battery voltage control

From PCB investigation, schematics looks as follows: alt text

Charger control

From PCB investigation, schematics looks as follows: alt text

Current control for wheel motors

Schematics: TODO

You can’t perform that action at this time.