Electrical – JL1N PLC re-purposing for home automation

plcstm32

I own a JL1N-20MR (supposedly FX1N-20MR clone) based on STM32F103RCT6 CPU.

I figured that I might be able to re purpose this PLC for home automation by altering it's firmware to use something more IOT oriented. Do this instead of creating my own hardware design since this board has everything I need.

I don't have experience in hardware reverse engineering, nor in programming STM32. However I am experienced programmer with reasonable understanding of electronics. I did a number of successful embedded hardware/software projects in the past.

I am searching for hardware documentation or anything that could help me start working with this board.

Best Answer

Thees are my findings:

CPU STM32F103RCT6

Input voltage seems to work without problems from 12v-24v. Has onboard 5v and 3.2v regulators.

BOOT0 default LOW, set jumper for HIGH
BOOT1 (PA2) is set to LOW

RS232 PA9 PA10 (USART1) for programming when BOOT0=HIGH
Onboar serial port TX PC10 and RX PC11 (USART3)

RESET is the common point between R24 and C14 active on LOW

Run LED PB6

Switch RUN when PC1 to GND ?

AIN PA4
AOUT ?

Outputs (8 rellays active on HIGH):
Y0 PD2
Y1 PA12
Y2 PB10
Y3 PB11
Y4 PB12
Y5 PB13
Y6 PB14
Y7 PB15

Inputs (12 active when pulled to ground):
X0 PA0
X1 PA1
X2 PC5
X3 PC6
X4 PC7
X5 PC4
X6 PA6
X7 PA7
X8 PB0
X9 PB1
X10 PA3
X11 PC12

I was able to program the board with stm32loader. I was able to build working firmware using STM32Cube but sadly had 0 success with PlatformIO.

Related Topic