Argon One v2 used pins

I’m looking for a table with all pins used by the Argon One v2.

https://www.waveshare.com/wiki/PI4-CASE-ARGON-ONE:

BMC pin  Function
=================
2        SDA.1 (I2C data)
3        SCL.1 (I2C clock)
4        GPIO.7 Shutdown button
14       TXD transmit UART <== Function?
22       GPIO.3 IR LED pin
23       GPIO.4 IR receiver pin

I2C bus 1 device address 0x1a is used to control the fan.

Q1) Is the table above complete?
Q2) Is the TXD pin only used to generate a shutdown?

An IR LED should be soldered manually and can be controlled via BMC pin 22 GPIO.3.

Update: The function of the TXD pin is: judge shutdown. Determine whether the Raspberry Pi is turned off. If it is turned off, the TX will be out of power and the CPU will be powered off.

1 Like

Hello! I am interested in information about TXD… Which of the options is correct:

  1. Argon One ONLY “listens” to the TXD state and does not transmit any data itself (either through a script or otherwise) via the TXD pin.
  2. Argon One transmits some data necessary for work (either through a script or somehow else) via the TXD pin, and then, accordingly, “listens” precisely for the presence of these necessary data?
    And do I understand correctly that all this is necessary in order to turn off the power supply to the Raspberry Pi board in the event that the shutdown is initiated through the operating system? And what CPU are you talking about in this case?

@il77781 Here is some more info based on reverse engineering (note: may not be 100% correct):

My Argon ONE case contains a PCB with a microcontroller type MT006C6PB (STM8S003F3) which handles the Raspberry Pi 4 power-on via the power button on the back of the case and I2C software shutdown. See commands below.

Unfortunately, I could not find the source of the microcontroller firmware. I hope someone will publish an open source custom firmware with more functionality. This is only possible when the microcontroller is not locked for flashing (not verified). I while ago I’ve reverse engineered all pins to connect an ST debug interface.

Argon One ONLY “listens” to the TXD state and does not transmit any data itself

Correct: The TXD pin is used by the microcontroller as input pin to determine the Raspberry power state by reading the pin voltage and is not used as UART pin. The shutdown behavior depends on the I2C command in commands described below.

Argon One transmits some data necessary for work

The only interface between the Argon One PCB microcontroller and Raspberry Pi is the I2C interface at address 0x1a:

# Optional install I2C tools
$ sudo apt install i2c-tools

# Detect Argon One microcontroller and other I2C devices
$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

# Note: Address 0x1a is write only for the Argon One microcontroller

# Set fan PWM value 0..100 (off.. full speed)
$ i2cset -y 1 0x01a <value>

# Mode 1 (default): Auto
# You need to PRESS button to Power ON from shutdown or power outage.
$ i2cset -y 1 0x01a 0xfd

# Mode 2: Always on
# Power current will flow directly to Raspberry Pi. NO need to PRESS button to power ON from shutdown or power outage.
$ i2cset -y 1 0x01a 0xfe

# Listens at Serial Port to cut power; Requires Serial Port to be ENABLED.
# When ARGON ONE receives 0xff,then ARGON ONE will check UART's voltage. Then, it will cut the power when UART's voltage is low.
$ i2cset -y 1 0x01a 0xff

Note: Related issue with Argon One fan speed not working.

And what CPU are you talking about in this case?

Only Raspberry Pi 4 fits in the Argon One case.

Success! :grinning:

1 Like

@pi-erwin, thank you very much for your answers!

  1. Do I understand correctly that in this case I can connect to GPIO other devices that use pin 8 (TXD), and the Argon One operation will not interfere with the operation of these other devices?
  2. Do I understand correctly that 0xfd and 0xfe are set using a jumper on the Argon One board?
  3. From “whom” Argon One receives 0xff?

@il77781 All valid questions from customer perspective. However, Argon did not publish any essential pin documentation and does not reply to any technical questions after sending multiple reminders.

The firmware revisions of the Argon One case changed in time silently and behavior changed as well. I could not find a way to retrieve the exact firmware version. For this reason difficult to tell which one you have and some experiments are needed.

  1. Do I understand correctly that in this case I can connect to GPIO other devices that use pin 8 (TXD), and the Argon One operation will not interfere with the operation of these other devices?

An experiment is required if the I2C shutdown command 0xff works when using this GPIO pin.

  1. Do I understand correctly that 0xfd and 0xfe are set using a jumper on the Argon One board?

No. I2C shutdown commands are write only and availability of these commands depends on the programmed firmware of the Argon One microcontroller. AFAIK, some cases can be programmed with the 0xfd and 0xfe I2C commands, others are using a jumper. In my case a jumper configures 2 modes and has no effect on 0xfd and 0xfe commands:

  • Jumper mode 1: Turn the Raspberry Pi immediately on after connecting power to the case, or:
  • Jumper mode 2: Do not turn Raspberry Pi power on when connecting power to the case, the power button should be used instead and is controlled by the microcontroller.
  1. From “whom” Argon One receives 0xff?

Argon created an installation script for Raspbian OS only. This script installs a service, checks the GPIO power button state and sends a shutdown command 0xff. 0xfd and 0xfe are not used. Fan speed control does not work with my version and Ubuntu 20.04 64-bit did not work as well. There are many forks of this script on Github, again zero support from Argon.

1 Like

@pi-erwin, yes, the lack of feedback from the manufacturer is very frustrating … (((

  1. Well, of course, we will try… But in the event that everything is exactly as you say, there should be no problems with using pin 8 by another device, right?
  2. Maybe the 0xff and 0xfe commands were relevant at the moment when there was no jumper on the board at all (as far as I understand, such boards were installed in the first versions of the Argon One case)?
    In the operating instructions on the Argon40 website, everything is described in reverse with respect to how you wrote:
    Mode 1 (Default Setting, pin 1-2) - You need to PRESS button to Power ON from shutdown or power outage
    Mode 2 (Always on, pin 2-3) - Power current will flow directly to Raspberry Pi. NO need to PRESS button to power ON from power outage
    Well, the numbering is not important here, it is important that the principle is the same…
    But then there is a question about this “Always on“ mode: in this case, what, there will be no reaction at all to the button on the Argon One case? If, for example, I need to shut down (or reboot) Raspberry Pi, will I be forced to turn off the power from the case, and the button will not work in any way??? Or is this mode needed only to restore power (and, accordingly, start Raspberry Pi) after the loss of electricity and its subsequent restoration, and the button will still work “as usual”?
  3. Does this script only check the status of the button (as far as I understand, GPIO.7)? But what about the IR signals from the remote control? And what about (which may be even more important) shutdown (or reboot) by means of the operating system (both from the graphical interface and using the terminal)?

Well, of course, we will try… But in the event that everything is exactly as you say, there should be no problems with using pin 8 by another device, right?

Probably works, cannot confirm this.

everything is described in reverse with respect to how you wrote:

It describes to possible modes, not the number in order.

But then there is a question about this “Always on“ mode: in this case, what, there will be no reaction at all to the button on the Argon One case?

The Pi is turned on after (re)connecting power (power button is ignored at boot) and keeps powered. Software should manually check the power button (GPIO pin) and generate a shutdown command. It is turned on again after disconnecting / connecting power to the case. I did not check the behavior when pressing the power button after generated shutdown.

Does this script only check the status of the button

Yes

But what about the IR signals from the remote control?

IR signals are different pins and not used.

I think it is better to use the shutdown / reboot commands from the GUI or sudo shutdown or sudo reboot commands. This results in a graceful system shutdown/restart.

1 Like

@pi-erwin, thank you for your answers!
I’m completely new to Raspberry Pi, so maybe I’m asking very stupid questions…
And maybe I don’t fully understand how Raspberry Pi turns on/off…
You said that only the script sends the 0xff command to the MT006C6PB microcontroller via I2C…
But if the script does not track the shutdown/reboot commands from the GUI and the sudo shutdown or sudo reboot commands (since, according to you, it only checks the state of the button), then it turns out that when shutting down/rebooting via the GUI or terminal, the 0xff command is not sent to the MT006C6PB microcontroller…Right?
Accordingly, the microcontroller does not disconnect power from the Raspberry Pi… Right?
How does it all work then?
Or is it the opposite in general: we press the button - the script determines this - depending on how long the button was pressed (in accordance with the instructions), the script initiates (most likely through the terminal) either shutdown or reboot, or even a “rough” shutdown (forced shutdown) - Raspberry Pi turns off/is rebooted by means of operating system commands - at this moment the script monitors the voltage on TXD - when the voltage on the TXD disappears (Raspberry Pi is turned off), the script sends the 0xff command to the MT006C6PB microcontroller, and the microcontroller, in turn, cuts off the power from the Raspberry Pi (although it is not very clear how the script can still work at this moment, because Raspberry Pi is already turned off at this moment - or not the script monitors the voltage on TXD, and the microcontroller itself, but only after the script sends it the 0xff command)
But still, this option does not clarify anything at all for the case when shutdown / reboot occurs not with the help of a button, but with the help of a GUI or terminal…

@il77781 Do you have an Argon One case with a Raspberry Pi 4 to test the jumper/button/Argon script yourself?

@pi-erwin, no, not yet… I ordered - everything is coming to me…) I ask questions in advance …)