Skip to content

Instantly share code, notes, and snippets.

@looxonline
Last active March 27, 2023 14:05
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save looxonline/89e79b2554771eee8aa8b6492f30400d to your computer and use it in GitHub Desktop.
Save looxonline/89e79b2554771eee8aa8b6492f30400d to your computer and use it in GitHub Desktop.

BIQU BX RASPBERRY PI TIDY INTEGRATION MOD

The BIQU BX is advertised as "RPi integrated". This statement can understandably cause a lot of confusion as to what it actually means. Some people have an expectation that it means that the pi will not need to connect to the front USB port of the machine. Others may have a different expectation.

The reality is that the integration comes in the form of a very clean mounting solution for the Pi combined with the ability to power and interface with the pi using the machine (touch interface). The USB port on the back of the TFT that connects to the pi does not offer a serial link back to the motherboard. It simply interfaces with a little MCU (CH554G) that translates the I2C signals from the touch controller on the TFT into signals that the pi can understand over USB. If you want the raspberry pi to communicate with the motherboard in order to send and receive commands (hint: you do) then you are still going to need a USB cable running from the pi to the micro USB port on the front of the machine....or are you...???

IMG_2037

WHAT YOU WILL NEED

In order to have an installation free from a front USB cable (as you see in the above image) you'll need nothing more than three dupont jumper wires with a male pin on one end and a female receptacle on the other (although I recommend making/buying at least 4 for reasons that will be explained later). The image below shows an example of the type of wires. They should be about 15cm long but you can use longer ones and tidy them up or shorter ones and join them together.

cable_m_f

HOW TO DO IT - HARDWARE

This is a very simple mod so you should be able to get it done in just a few minutes. It involves hardware and firmware. First, let's handle the hardware. The steps are provided below and then pictures illustrating those steps follow.

  1. Turn the BX off.
  2. Lift it up and feed the male ends of your dupont wires into the opening that the LCD cable feeds through. Route them over the top of the motor drivers.
  3. Plug the ends of the dupont cables into GND, RX and TX on the WiFi connector. Note that GND is not essential but I recommend using it since it will likely offer a cleaner ground to the pi and reduce bit errors. Take note of what colour connects to what pin.
  4. With the wires plugged in, run them neatly around the motor driver heatsinks and then use the existing loop on the underside of the case to secure them alongside the LCD cable.
  5. Connect GND to GND on the pi. TX on the BX (I'm about to start beatboxing) to RX on the pi and finally RX on the BX to TX on the pi. Don't connect RX to RX and TX to TX. Resist the urge.
  6. You're done for the hardware part.

IMG_2034

IMG_2035

IMG_2033

IMG_2036

GPIO-Pinout-Diagram-2

HOW TO DO IT - FIRMWARE

You'll need to use one of my custom firmware branches to get this to work. You can find them here: https://github.com/looxonline/Marlin

HOW TO DO IT - PI FIRMWARE

Finally you'll need to make some minor mods to the raspberry pi.

  1. Either place the raspberry pi SD card into your laptop and edit the config.txt file on the boot partition or ssh into your pi and edit the same file in /boot/config.txt. Choose an option that is easiest for you.
  2. Simply place the following two lines at the bottom of your config.txt file:
  3. enable_uart=1
  4. dtoverlay=disable-bt
  5. Now you have no choice but to ssh into your pi because the next step needs it. If you are on mac or linux you can ssh into the pi by opening a terminal window and typing ssh pi@octopi.local and then using "raspberry" as the password. If you are on windows you can use putty to ssh into the pi. You'll need to know the ip address of the pi on your local network and you can use the same credentials (UN: pi PWD: raspberry) to get in over ssh.
  6. Once the ssh terminal is open type "sudo raspi-config" into the command line and hit enter. Enter the same password you used to log in when prompted to do so.
  7. Within the config menu navigate to "Interface Options" --> Serial port
  8. When it asks whether you would like the shell to be accessible over serial say NO.
  9. When it asks if you would like the serial port hardware to be enabled say YES.
  10. Reboot the pi once you are done.
  11. After the reboot access the octoprint web interface.
  12. Click on the little spanner at the top of the web interface.
  13. On the "Serial Connection" menu item enter /dev/ttyAMA0 into the box labeled "Additional serial ports".
  14. Reboot the pi once more.

Screenshot 2021-02-21 at 13 50 51

Screenshot 2021-02-21 at 13 51 22

WRAP UP

That's it! You should be able to simply tap the TFT when running in pi mode, wait a few seconds and hear the two beeps as it connects to the motherboard. I've tested this mod on highly detailed prints that span more than 24 hours and I've not had an issue so the communications are stable and reliable.

Oh...and about that fourth wire that I said would be useful. Keep it handy because the next little tweak I am working on is a way to safely and automatically cause the pi to shut down as soon as you flick off the power switch. Coming soon...

@acinsa
Copy link

acinsa commented Aug 31, 2021

Thanks for some brilliant gists. I have installed the custom firmware and the Pi serial modification. All working seamlessly and now the BX is useable. Excellent work.......keep it up!!!

@looxonline
Copy link
Author

Thanks for some brilliant gists. I have installed the custom firmware and the Pi serial modification. All working seamlessly and now the BX is useable. Excellent work.......keep it up!!!

Good to hear that it helped you :)

@Maximummach
Copy link

Just purchased the Biqu BX. Everything functions properly in Marlin and Bigtreetech touch mode. Touch screen works fine in BTT touch mode. Put a fresh octopi install on Raspberry pi 4 and installed on the back of the screen. Octopi works and will start prints and allow me to send gcode as needed. I've installed OCTOdash and this is the problem... It boots to the initial screen in octodash and waits for me to press next on the welcome screen. Except the screen doesn't respond to a touch. The only add on I installed to octoprint is touch ui.

@looxonline
Copy link
Author

@Maximummach Ensure that you have the USB cable for the touch screen plugged between the Rpi and the side of the TFT. For queries like this that are unrelated to the gist, please use the FB group as there are a lot more people there and you will get better support.

@Cracoukas
Copy link

Cracoukas commented Jan 21, 2022

Hi,
Thank you very much for the Tuto which I followed almost to the end but... how do you connect the Dupond jumpers to the PI since it is piggyback pluged to the TFT board ? with some king of spacer ?

Too bad for me, I was not looking right !

@acinsa
Copy link

acinsa commented Jan 21, 2022 via email

@looxonline
Copy link
Author

Hi,
Thank you very much for the Tuto which I followed almost to the end but... how do you connect the Dupond jumpers to the PI since it is piggyback pluged to the TFT board ? with some king of spacer ?

The pins on the pi are not blocked by anything.

@Cracoukas
Copy link

Yes I realized a bit late that I was not looking right, but thank you for taking the time to answer my stupid question !

@superdumnezeu
Copy link

@looxonline
Is this also compatible with Klipper firmware for BX?

@looxonline
Copy link
Author

looxonline commented Feb 17, 2022 via email

@Nozzleboy
Copy link

I do not have a config.txt. file on rpi sd card i only have a config file And am not able to get anything to work

@ccgmtl
Copy link

ccgmtl commented Dec 27, 2022

Any idea if the connection to the serial port would work under klipper ?

edit: and I googled it. It'll work under klipper...

@janstanka
Copy link

@varazir
Copy link

varazir commented Mar 27, 2023

Looks like they fixed this with the new V3 display, I have connected my PI to the UART port on the back of the screen. No need to add new cables. I can control and print from octoprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment