stm32 blue pill wires with 1.8 tft lcd display supplier
We will organize the kinds of display interfaces we offer, and how they differ. You will get to know what kind of external and internal interfaces we have and what are their main applications.
First, let us start with dividing internal and external interfaces in LCD modules. Internal interface of display means it used inside the device. Those are usually the embedded interfaces that are not visible, and we do not have access to them as the users of the device. External interfaces, on the other hand, are connected to the device using a cable. Once we have defined internal and external interfaces, both of these categories come as universal or image transfer interfaces.
A protocol defines the rules of information exchange, where the interface is the medium. The example here could be the language. When I use my voice to communicate with other people, my voice is an interface. Over this interface my voice is being sent to other people’s ears, and the protocol is the language used. Right now, I am using the English protocol. If you understand the protocol, you understand what I am saying. If I switch to a different language, Polish or some other language that you do not understand, you have the same interface, you will still hear me, but because of a different protocol, you do not understand me anymore. In this article we will talk only about interfaces, how to connect devices to each other. We will not focus on protocols.
Let’s try to get the interfaces right. For internal interfaces, interfaces embedded into the device, we have universal interfaces and image transfer interfaces. Universal display interface can send other data, not only an image. Being universal, they are not perfect for image transfer, because in most of the displays used nowadays, the image transfer is one of the most demanding. The bit rate, the data transfer needed for the image transfer is rather high. Higher that many universal interfaces can offer. If we need to send an image every once in a while, then we don’t need very high bandwidth. If we do not need live video stream, then we can use some of the internal universal interfaces such as SPI, I2C or even slow interfaces as RS232 or UART.
The first universal interface will be SPI (Serial Peripheral Interface). This interface is serial, used for communication between a host, in SPI called a Master, and devices called Slaves. One host can communicate with many slaves. To select the Slave, we use the Chip select or SS line and then we use two data lines, Master output or Master input. And of course we have to define the clock, to synchronize the data, because this is a clock synchronized interface.
It can be fast but is not fast enough for live video. The baud rate can be 1 MBd, but it can also be 10 MBd or even 50 MBd on the SPI or QSPI. QSPI is a Quad SPI, a kind of modification of SPI that is faster. But still this interface is very universal, we can use it to connect memory or some input and outputs internally in our device. In the display universe the SPI is used for simple displays, for small size displays, where we can transfer the image relatively fast, because the resolution is low. The maximum size for SPI display interface would be 3.5 inch, 320 by 240 pixel TFT displays. If we have higher resolution, image transfer will be too slow to use SPI even with a high-speed SPI.
If, for example, the Master is sending some data, the only thing Slaves can do is to receive it. And then we need to wait a little bit for the Master to finish. We can then respond as Slave to Master. In I2C Slave selection works a little bit different than in SPI, where we had a Chip Select line (CS line) or SS line to select from. In I2C we first need to send the logical address to the interface that is being written by Slaves. In general, this procedure is slow and universal interface used also to connect the simple memory and some other I2S that we have around our microcontroller on the PCB. It is very useful, but usually not used for image transfer. This interface is very popular in the display world for touchscreens. Most of the embedded touch screens that we use have I2C interface because the touchscreen does not generate many data. We only have coordinates of the finger or few fingers at most, that need to be sent back to the microcontroller, to the device processor. The slow baud rate is good enough for the touchscreen, but not enough for the image.
That is not a case for SPI or I2C, because we have a clock there that gives the speed to every device. Then each device works according to the clock. In UART we do not have a clock. It is rather not used for image transfer. The UART, or SPI, or I2C can be used for low resolution displays. For high resolution displays we need an Intelligent Display, a display that will generate the image internally and through these slow universal interfaces we only send commands, or we send the image once, the image is being stored into the internal memory of the intelligent display, that we will use later sending the commands. You can find Riverdi’s intelligent display line on our website: https://riverdi.com/product-category/intelligent-displays/.
These Riverdi products are very advanced Intelligent Displays, made with Bridgetek controllers. The controllers use SPI and QSPI for communication. That means your software, your system, your microcontroller can be simple. You can use SPI interface to drive them, and you can still have high resolution image, even as high as 1280 by 800 pixels in 10.1-inch LCD displays. So, please remember that if you want to use a slow universal interface and have a high-resolution image, you need to use an Intelligent Display.
There are also the internal image transfer interfaces. The image transfer interface allows continuous high speed image transfer. Internal transfer is high enough to refresh the display many times per second. This is called the refresh rate of a display. When you go to a display, monitor, or TV set specification, you will see refresh rate or maximum refresh rate parameter. If it’s 60 Hertz, that means the display image is refreshed 60 times per second. More advanced displays would have higher values, like 100 Hertz. The refresh rate means we need to send full image 60 times or 100 times in each second. To visualize this amount of data, we need to multiply refresh rate by the resolution of the screen. For example, for a 7-inch Riverdi LVDS display with resolution 1024 by 600 it is roughly 600 thousand pixels.
The most common internal image transfer interface in industrial LCD displays nowadays is LVDS – Low Voltage Differential Signal. A crucial feature of this interface is that it is differential. It means that the signal is immune to interference and we can use a twisted pair of wires to transfer the data. We can send data fast and it will not be corrupt by any noise, interference. This kind of data corruption is quite common in other interfaces.Key Takeaway: In LVDS display interface the differential signal allows you to send the signal at a very high speed and keep it safe from noise.
The next, older image transfer interface is called RGB. Name comes from the colors sent parallelly to the display: red, green and blue. LVDS is a serial interface and the RGB is a parallel interface. The main difference is that RGB is not differential, so it is easier to disturb signal with noise and you configure the speed of this interface too high. Parallel interface means that we send every bit in a separate line. In theory this interface could be fast, but because it is not differential, the transfer speed is limited. Moreover, the RGB display interface will work with rather small screen sizes – usually up to 7-inch or 10-inch.
12 inch screen size is the total maximum for a LCD display with RGB interface, but the resolution will be lower, like 800 by 600. For this display size it is very low resolution. This is the reason why the 7-inch is size above which the LCD displays are being switched from RGB to LVDS interface. Among Riverdi products (if you go to the Riverdi website and to the IPS display tab), there are displays without the controller, and the small displays like 3.5-inch, 4.3-inch and 5-inch are equipped with RGB interface. But when you go to the 7-inch LCD displays tab on Riverdi website, you will find RGB, LVDS and MIPI displays. But when you go to the 10-inch or bigger displays, you will only find the LVDS displays because our 10-inch LCD displays are high resolution 1280 by 800, and it is impossible to build it with the RGB interface.Key Takeaway: RGB is low speed and not immune to noise. Use it for the smaller size displays or with lower resolution.
MIPI – Mobile Industry Processor Interface – is an internally embedded image transfer interface, getting popular these days. This kind of interface is used in mobile applications, tablets or mobile phones, but it is entering as an option in industrial applications. In Riverdi we offer 7-inch MIPI displays, but please be careful with other MIPI displays on the market. Many come from mobile phones or tablet market. Also, the TFT glass availability may not be stable as the mobile market changes really fast, every six months or every year. When you buy a 7-inch Riverdi MIPI interface display you are safe, because it is an industrial display.
This is why we have a limited number of displays with MIPI interface – we want to be sure that what we sale will be available for a long time. Longevity is one of Riverdi’s core values and we do not want to deliver anything that will not be supported for a minimum 3 to 5 years. It is because many of our customers are making industrial, medical or military devices and they need displays to be available long-term.Key Takeaway: MIPI is an important and growing interface in the display market.
Next interface is the Vx1. It is similar to LVDS and MIPI, so it’s low voltage differential signal. Vx1 is a very high-speed interface, usually used in large high-resolution screens, like 55-inch 4K TVs or even larger ones. If you buy this kind of a TV set right now, probably the embedded interface inside will be the Vx1.Key takeaway: Vx1 is a super-fast interface used for high bandwidth image transfer, with high refresh rate and high-resolution displays, used in 4K screens and above.
The last internal image transfer interface is Embedded DisplayPort (eDP). We call it the new LVDS, because many new industrial displays are equipped with the eDP. If you go through industrial manufacturers of TFT LCD displays, you will notice increasing number of models available with the eDP. eDP is also a native interface in new Intel or AMD based processors.Key Takeaway: With the embedded DisplayPort as a native display interface you can cut down costs, because you do not need anything extra to connect a display to the processor.
Now, with the processors on the market, we need displays with embedded DisplayPort. Many laptops or monitors already use embedded DisplayPort as an internal interface instead of LVDS. LVDS still is the most popular industrial LCD display interface. All the internal image transfer interfaces like MIPI, Vx1 and eDP are variations of LVDS, where the protocols and the signals are a little bit different. For example, for eDP we can have lower noise and reduced power consumption. All of them have advantages over regular LVDS, but they are all LVDS type.
Now, let’s take a closer look at external interfaces. Those are the ones that we usually have direct access to. It can be TV or monitor connected to your computer with the HDMI . It can be a DVI usually used for monitors. Or VGA which is an outdated image interface for monitors. The DisplayPort that is a HDMI successor. Finally, an universal USB-C, the most common interface nowadays used to connect devices.
Let us start with USB-C, the most universal interface . It is one of the best interfaces that we have ever designed, because it is really fast and also very universal. It not only transfers data, not only it is fast enough to transfer image, but it can also transmit a lot of power.
USB-C transmits up to 100 watt of power, because you can increase voltage and current. In a regular USB it is usually 5 volt and 0.5 or 1.0 amp, so only a couple watts. In USB-C you increase the voltage up to 20 volt and with the 5 amp current, so in total it’s even 100 watt of power. This interface is made not only for data, but for real power transfer. Through USB-C you can charge your phone and your laptop. If you buy a new laptop right now, you may even not get a regular power connector, but only an USB-C. The USB-C is a very smart interface. If you connect the devices, they can negotiate with each other which one has more power. For example, if we connect a charger to a laptop, the charger has more power and will charge the laptop, but if you connect the laptop with the same interface to your mobile phone, then they will discuss the power levels, and of course the laptop will be charging the phone. You can already find monitors on the market that have USB-C instead of HDMI. Those monitors can be powered from your computer and need only one USB cable, both for image transfer and power. For sure the future belongs to USB-C implementations.Key Takeaway: USB-C is a really smart, universal and fast interface for displays. It comes with power transmission option.
Let’s move on to image transfer interfaces. The most common one is HDMI – High-Definition Multimedia Interface. M stands for Multimedia, because it transfers image with sound. If you connect your computer to your TV set with HDMI, you will need one cable for both the video and the audio. There are variations of HDMI connectors:standard HDMI,
The next one is DVI – Digital Visual Interface. The first DVI was not a multimedia interface, because it did not have audio data transfer. Nowadays, there are some variations that can transfer audio, but it is non-standard. We can assume DVI is rather for image transfer. It is a digital interface, similar in signals to HDMI. The latest variation is DVI-I, where I stands for integrated interface. It can have a digital and analog part for VGA compatibility. In the picture above there is a DVI-D, digital only, where we do not have the pins for analog VGA interface. Analog VGA is sometimes available in your desktop computer, but not in laptops anymore.Key Takeaway: DVI is digital visual interface with multiple variations and updates, similar in signal to HDMI
The oldest video interface still in use is the VGA – Video Graphic Array interface. It becomes less and less popular. This is an analog interface, not a digital one like all the other abovementioned interfaces. Analog interface means that we do not transmit the bits, but we send the voltages values. The analog signals are not stable, they are quite easy to disturb, so the transfer cannot be very high in speed and volumeKey takeaway: VGA’s popularity is declining, and it is not the best solution if you have a high-resolution display or noisy environment.
The last external interface that we can find in our devices nowadays is a DisplayPort. DisplayPort is similar to HDMI or DVI. It can also transfer image and sound. It is even faster than the HDMI. Usually, the DisplayPort is used for high resolution displays, for new monitors and TVs with 4K or 8K resolution where it is really hard, or nearly impossible, to achieve such resolution using HDMI interface.Key Takeaway: DisplayPort is super-fast image and sound transmitting interface, used in highest resolution displays.
Since it’s inception the Arduino IDE has demonstrated the desire to support all kind of platforms, from Arduino clones and variations of different manufacturers to third party boards like the ESP32 and ESp8266. As more people get familiar with the IDE, they are beginning to support more boards that are not based on ATMEL chips and for today’s tutorial we will look on one of such boards. We will examine how to program the STM32 based, STM32F103C8T6 development board with the Arduino IDE.
The STM32 board to be used for this tutorial is none other than the STM32F103C8T6 chip based STM32F1 development board commonly referred to as “Blue Pill” in line with the blue color of its PCB. Blue Pill is powered by the powerful 32-bit STM32F103C8T6 ARM processor, clocked at 72MHz. The board operates on 3.3v logic levels but its GPIO pins have been tested to be 5v tolerant. While it does not come with WiFi or Bluetooth like the ESP32 and Arduino variants, it offers 20KB of RAM and 64KB of flash memory which makes it adequate for large projects. It also possesses 37 GPIO pins, 10 of which can be used for Analog sensors since they have ADC enabled, along with others which are enabled for SPI, I2C, CAN, UART, and DMA. For a board which costs around $3, you will agree with me that these are impressive specs. A summarized version of these specifications compared with that of an Arduino Uno is shown in the image below.
Based on the specs above, the frequency at which Blue pill operates is about 4.5 times higher than an Arduino UNO, for today’s tutorial, as an example on how to use the STM32F1 board, we will connect it to a 1.44″ TFT display and program it to calculate the “Pi” constant. We will note how long it took the board to obtain the value an compare it with the time it takes an Arduino Uno to perform the same task.
As mentioned earlier, we will connect the STM32F1 board to the1.8″ ST7735 based colored TFT Display along with a push button. The push button will be used to instruct the board to start the calculation.
Go over the connections once again to be sure everything is as it should be as it tends to get a little bit tricky. With this done, we proceed to set up the STM32 board to be programmed with the Arduino IDE.
As with most boards not made by Arduino, a bit of setup needs to be done before the board can be used with the Arduino IDE. This involves installing the board file either via the Arduino Board manager or downloading from the internet and copy the files into the hardware folder. The Board Manager route is the less tedious one and since the STM32F1 is among the listed boards, we will go that route.
Start by adding the link for the STM32 board to the Arduino preference lists. Go to File -> Preferences, then enter this URL ( http://dan.drown.org/stm32duino/package_STM32duino_index.json ) in the box as indicated below and click ok.
The code will be written the same way we’d write any other sketch for an Arduino project, with the only difference being the way the pins are referenced.
To be able to easily develop the code for this project, we will use two libraries which are both modifications of standard Arduino Libraries to make them compatible for the STM32. We will use the modified version of the Adafruit GFX and the Adafruit ST7735 libraries. Both libraries can be downloaded via the links attached to them.
With this done, we create an object of the ST7735 library which will be used to reference the display all through the entire project. We also indicate the pin of the STM32 to which the pushbutton is connected and create a variable to hold its state.
Next, we initialize serial communication and the screen, setting the background of the display to black and calling the printUI() function to display the interface.
We start by reading the state of the push button. If the button has been pressed, we remove the current message on the screen using the removePressKeyText() and draw the changing progress bar using the drawBar() function. We then call the start calculation function to obtain and display the value of Pi along with the time it took to calculate it.
The remaining part of the code are the functions called to achieve the tasks from drawing the bar to calculating the Pi. Most of these functions have been covered in several other tutorials that involve the use of the ST7735 display.
Uploading sketches to the STM32f1 is a little bit complex compared to standard Arduino compatible boards. To upload code to the board, we need an FTDI based, USB to Serial converter.
With this done, we then change the position of the board’s state jumper to position one (as shown in the gif below), so as to put the board in programming mode. Press the reset button on the board once after this and we are ready to upload the code.
With the code complete, follow the upload process described above to upload the code to your setup. You should see the display come up as shown in the Image below.
Press the pushbutton to start the calculation. You should see the progress bar slide gradually until the end. At the end of the process, the value of Pi is displayed along with the time which the calculation took.
Comparing these two values, we see that “Blue Pill” is over 7 times faster than the Arduino Uno. This makes it ideal for projects which involves heavy processing and time constraints. The small size of the Blue pill also serves as an advantage here as it is only a bit bigger than the Arduino nano and it can be used in place where the Nano won’t be fast enough.
That’s it for today’s tutorial guys. What will you be building with the Blue Pill? feel free to share along with any questions you might have, under the comment section.
For any microcontroller project, interfacing a display unit with it would make the project a lot easier and appealing for the user to interact with. The most commonly used display unit for microcontrollers is the 16×2 Alpha numeric displays. These types of displays are not only useful to display vital information to the user but can also act as a debugging tool during the initial developmental stage of the project. So, in this tutorial we will learn how we can interface a 16×2 LCD display with the STM32F103C8T6 STM32 Development board and program it using the Arduino IDE. For people who are familiar with Arduino this tutorial will just be a cake walk since they both are very similar. Also to learn more about STM32 Blue Pill Board follow our getting started tutorial.
As told earlier the Energia IDE provides a beautiful library which makes the interfacing a piece of cake and hence it’s not mandatory to know anything about the display module. But, would didn’t it be interesting to show what we are using!!
The name 16×2 implies that the display has 16 Columns and 2 Rows, which together (16*2) forms 32 boxes. One single box would look something like this in the picture below
A single box has 40 pixels (dots) with a matrix order of 5 Rows and 8 columns, these 40 pixels together forms one character. Similarly, 32 characters can be displayed using all the boxes. Now lets take a look at the pinouts.
Out of all these 16 pins, only 10 pins are to be used mandatory for the proper working of the LCD if you want to know more about these LCD display jump to this 16x2 LCD article.
As you can see the complete connection is made over a breadboard. We need a FTDI board to program the STM32 Microcontroller. So similar to our previous tutorial, we have wired the FTDI board to STM32, the Vcc and ground pin of the FDTI programmer is connected to the 5V pin and ground pin of the STM32 respectively. This is used to power the STM32 board and the LCD since both can accept can +5V. The Rx and Tx pin of the FTDI board is connected to the A9 and A10 pin of the STM32 so that we can program the board directly without the boot loader.
Next the LCD has to be connected to the STM32 board. We are going to use the LCD in 4-bit mode, so we have to connect the 4 data bit pins (DB4 to DB7) and the two control pin (RS and EN) to the STM32 board as shown in the STM32F103C8T6 LCD interfacing circuit diagram above. Further the table below will help you in making the connection.
As told in this tutorial we will be using the Arduino IDE to program our STM32 Microcontroller. But, the Arduino IDE by default will not have the STM32 board installed, hence we have to download a package and prepare the Arduino IDE for the same. This is exactly what we did in our previous tutorial getting started with STM32F103C8T6 using Arduino IDE. So if you have not installed the required packages fall back to this tutorial and follow it before you continue here.
Once the STM32 Board is installed in the Arduino IDE, we can start programming. The program is very similar to that of an Arduino board, the only thing that will change are the pin names since the notations are different for STM32 and Arduino. The complete program is given at the end of this page, but to explain the program I have split it into small meaningful snippets as shown below.
One noticeable advantage of using Arduino for programming our microcontrollers is that Arduino has readymade libraries for almost every famous sensors and actuators. So here we start our program by including the LCD library which makes the programming a lot easier.
In the next line we have to specify to which GPIO pins of the STM32 we have connected the LCD display control and data lines. To do this we have to check our hardware, for ease you can also refer to the table given at the top which lists the pin names of LCD against the GPIO pin of STM32. After mentioning the pins we can initialise the LCD using the LiquidCrystal function. We also name our LCD as “lcd” as shown below.
Next we step inside the setup function. Here first we have mention what type of LCD we are using. Since it is a 16*2 LCD we use the line lcd.begin(16,2). The code inside the void setup function gets executed only once. So we use it to display an intro text which comes on the screen for 2 seconds and then gets cleared. To mention the position where the text has to appear we use the function lcd.setcursor and to print the text we use the lcd.print function. For instance lcd.setCursor(0,0) will set the cursor at first row and first column where we print “Interfacing LCD” and the function lcd.setCursor (0,1) moves the cursor to second row first column where we print the line “CircuitDigest”.
After displaying the intro text we hold the program for 2 seconds by creating a delay so that the user the can read the intro message. This delay is created by the line delay(2000) where 2000 is the delay value in mill seconds. After the delay we clear the LCD using the lcd.clear() function which clears the LCD by removing all the text on LCD.
Finally inside the void loop, we display “STM32 –Blue Pill” on the first line and the value of seconds on the second line. The value of second can be obtained from the millis() function. The millis() is a timer which gets incrementing right from the time the MCU is powered. The value is in form of milli seconds so we divide it by 1000 before displaying it on our LCD.
Make the connections as show in the circuit diagram and use the code given below on Arduino IDE. Go to tools and make sure the right board is selected as done in getting started tutorial. Also, before uploading the program make sure the boot 0 jumper is set to 1as shown in the image below and press the reset button. When the upload button is pressed is code should get uploaded and the message will be shown on LCD as show in the image below.
As discussed in the above paragraph you should be able to notice the output as soon as the code is uploaded. But this program will not work the next time when you power up the board, since the board is still in programming mode. So once the program is uploaded the jumper on boot 0 should be changed back to 0 positions as show below. Also now since the program is uploaded to the STM32 board already we do not need the FTDI board and the whole set-up can be powered by the micro-USB port of the STM32 board as well as shown below.
This is just a simple interfacing project to help use the LCD display with STM32 board, but further you can use this to build cool projects. Hope you understood the tutorial and learnt something useful from it. If you had faced any problem in getting it to work, please use the comment section to post the problem or use the forums for other technical questions. The complete working of LCD display with STM32 can also be found as a video given below.
3. Actually il9163 and st7735 is the same controller, s_oled128x160_initData structure, which was modified, is used to initialize st7735 in 128x160 mode. When someone sales such display, you can see often both controllers mentioned "1.8 Inch 128X160 ILI9163/ST7735 TFT LCD Module With PCB Baseboard SPI Serial Port".
This is a third release of combined soldering iron controller for Hakko T12 tips and 858D rework station based on STM32 micro controller. This time the oled display was replaced by ili9341 TFT one with SPI interface. There are several display variants (2.2", 2.4", 2.8" or 3.2") in the market, so you can chose the one that satisfies your requirements, I used 2.2" display. The touch screen feature is not used in this project, but you can use display with touch screen panel.
The soldering controller supports using soldering iron and Hot Air Gun at the same time. In the main mode, you can activate any device or activate both devices simultaneously or turn them off. As soosn as the display resolution is higher than oled display, the information of both devices can be displayed on the main screen.
Before updating the firmware, save the PID parameters if you have modified them. The landscape orientation is still the default. Some issues can be faced in the portrait display mode. Report them to be fixed.
To decrease the controller price and increase its reusability, the complete schematics was split in 3 separate PCBs. The main PCB conntains the main low-voltage components: stm32 blackpill board, op-amps, voltage dc-dc converter and regulator, mosfets that manage the soldering iron and Hot Air Gun fan. The AC power PCB contains the high-voltage part of the project: the triac, optional high-voltage relay and opto-couplers that creates galvanic isolation from the main board. These boards connected via 5-wire interface cable. The display PCB contains the TFT display and two rotary encoders.
JP11 is a optional DIP-type connector for SD-card reader on the TFT display. This connector is used to load external files to the SPI flash memory IC. Just solder the pin-header here.
The debug switch is optional one. You can solder the wire instead. It is used to disconnect 24v power from the bluepill board when the firmware is loading from your PC or while debug the firmware. As soon as 24v AC-DC power supply is not isolated one and the PC has non-isolated power supply also, it is possible to destroy blackpill board when it receives the power from different sources.
The high-voltage board implements wide lines and should be ordered with2ozdepth to allow high current to the Hot Air Gun heater. It would be very expensive to order the complete board with 2 oz depth, so the high-voltage part was split to a separate PCB. Yet, the interface connector is completely isolated from AC power via two opto-couplers OK1 and OK2. The EasyEda page contains two versions of the pcb, both are correct. You can select the one you like.
The interface connector has 5 wires that manages the AC power board:"+24" is +24 volt from AC-DC power supply to activate K1 relay. You can remove this wire if you do not install the relay
The schematics of the board is very simple. It contains two rotary encoders and TFT display. Also, you can see the mosfet that manages the TFT display brightness.
The controller requires big size PCB to fit all the components so it is convenient to create the display separate board. Also, It is convenient to solder rotary encoders to the display board and use encoder neck to fix this board on the acrylic front panel.
This controller is working with ili9341 based TFT displays only. You can select the display size (2.2", 2.4", 2.8" or 3.2"). The display has sufficient resolution 320x240 to show required information. I used the 2.2" one to fit the case.
The Hakko T12 soldering tips are very convenient tools: they are heating extremely fast and have a sensor inside that allows to keep the temperature very accurate. The tips require just three wires: plus, minus (ground) and earth ground. The heating element inside the tip is connected consequently with the thermo couple allowing to decrease the required wires. It makes the cable very flexible and light weight.
When connecting the Hot Air Gun handle to the controller via GX16-8 plug you can use the following reference of the plug pin-out. Unfortunately, I do not know the color of the wires because my handle was assembled. I have been told that there is a different kind of hakko 858D handles in the market and your handle can have different pinout. To check your handle pinout you can keep in mind the following criteria:The plug should have two wires for the heating element, two wires for the temperature sensor and two wires for the fan. The reed switch shares gnd with a temperature sensor.
This feature increases the safety of soldering iron. There are two automatic power-off features are implemented inside the controller, software driven and hardware driven. The hardware driven one requires optional TILT or REED switch installed in the iron handle. In the software mode, the controller turns on the Idle mode if the supplied power to the iron is stable for a while. In this case, the controller will power off the iron in specified timeout. When the time to automatic shutdown near, it will be displayed as a seconds remaining. When you use the iron, the supplied power changes and the controller resets the automatic power off timeout.
To use the hardware TILT switch, you must setup automatic power off timeout and standby temperature. If the standby temperature is "OFF" the hardware tilt switch will not be used and software solution described previously will be activated. Also, you can setup standby time (timeout to switch to low power mode). When the tilt switch enabled, the main working mode changes the following way. The iron is starting heating. When it reaches the preset temperature the "Ready" message will be displayed and the controller will keep the preset temperature. If the soldering IRON is not used (laying on the table) the controller will switch low power mode. If the iron keep laying for automatic off timeout, the controller will switch off the power completely. As soon as you start using the iron, the controller restores the preset temperature.
The main component is the BlackPill board. You can use the pure STM32F401CCU6 micro controller if you wish to create compact variant of the soldering station.
Connect this DC-DC converter consequently with b0505 isolated cobverter: 24v -> MP1584 DC-DC converter -> b0505 -> ams1117 gnd you get isolated power supply for your stm32 micro controller. This king of power supply is isolated and low-noise power that ensure accurate ADC temperature readings.
This project is based on the BlackPill board with STM32F401CCU6 micro controller. To flash prebuilt firmware to the controller the st link v2 programmer and ST link utility are required.
Download the STM32 ST-LINK utility fromstsite. Install the utility in your system. Launch the ST-LINK utility, connect the programmer to the 4pins SWD interface of BlackPill board, press "connect" button. The main window should display the memory content of the BlackPill board. Press flash button to write the firmaware to the BlackPill board.
As you can see, the main AC power after fuse that can be installed on the pannel of the case, goes into JP3 socket on the high voltage board. You can connect main power switch to the JP6 socket or short it oins and completely remove main switch if do not like to use it. JP4 and JP2 sockets are used to connect to the GX16-8 connector of the Hot Air Gun. The power to the heater goes from JP4 socket and all other wires connected to the JP2. Earth ground should be connected to the Earth ground of AC power (not shown here). JP8 and JP9 connectors should be connected together. Soldering Iron GX12-5 connector should be connected to JP1 and JP5 sockets. JP10 used to connect optional automatic mode switch. Using this switch you can disconnect the Hot Air Gun completely from the controller when it is not needed. JP3 should be connected to the J1 connector on the TFT board. This is 14-wires connector to attach the display and rotary encoders.
Using JP11 you can connect the SD-CARD installed on TFT display to the controller when going to upload some files from SD-CARD to SPI FLASH. For instance, it can be used whel upload localization data files.
In the controller schematics you can see two 500k potentiometers R5 and R19 that tunes the operation amplifier U4.1 and U4.2 to get the expected temperature readings at controller pins PA4 and PA5 of BlackPill board. You can use different operating amplifier, so these potentiometers are increasing the controller flexibility.
To simplify controller tuning procedure, the tune modes are implemented in the controller. This modes can be activated from the system menu item "tune iron" or "gun menu->tune gun". When the tune mode is activated, the controller powers on the iron or Hot Air Gun and displays on the screen applied power (in percents) and the gauge of the current temperature readings. The gauge has a label "450" or "500" depending on what hardware you are tuning. When the gauge reaches this label, the temperature should be 450 or 500 degrees of Celsius.
As soon as you have stabilized the iron temperature near 450 degrees, rotate the 500k potentiometer trim to shift gauge bar on the display left or right. Adjust the potentiometer so the bar would be as near to the reference temperature as possible. Then long press the encoder handle (for about 2 seconds) to turn the iron off and finish the procedure. It is recommended to use the thick tip that produce the highest voltage when performing the tune procedure. For example, T12-K, T12-D52 or similar.
As you can see from the picture above, the debug screen shows the following information:iron status (off or on). You can manage the power supplied to the soldering iron by rotating the upper encoder. As the encoder rotated, you adjust the power supplied to the iron (in internal units). The more power supplied to the iron the faster it heats. Supplied power value displayied in the right column ("irnP") in the internal units.
If the SPI FLASH is formatted and working correctly, you should see the screen above. As you can see, it is the root directory list of SPI FLASH. In case of FLASH error, the error message would be displayed indicating the FLASH is not readable. If your SPI FLASH is unformatted, the corresponding message would be displayed and the controller asks you to confirm the FLASH should be formatted. When the FLASH will be formatted, you should see the empty file list.
The current tip can be calibrated using "calibrate tip" menu item. If the tip is not calibrated yet, the "[!]" sign would be displayed near the tip name on the main screen. There are two calibration modes in the current version of the controller firmware: automatic and manual.
First, turn the power on by pressing the encoder lightly to start calibration process from the first referense point. The iron start heating. When the reference temperature reached, the controller beeps and get ready to read the real temperature value. Check the iron temperature by the external thermo-couple and enter this temperature to the controller: rotate the encoder handle to select the real temperature then press the encoder lightly. Then the controller continues with the next reference point. This procedure finishes when you enter temperature of all 8 reference points or when the real temperature will be greater than 430 Celsius. During this procedure controller updates the tip calibration data.
In manual tip calibration you must "guess" the internal temperature readings that matches the calibration temperature. First, you should select one of the 4 calibration temperature and press the encoder lightly to start calibration process. This procedure is iterative: you start with the some preset temperature value in internal units (for example, calibrated by automatic procedure) the controller heats the tip to this preset temperature and gets ready. Then you measure the real temperature by the external thermo-couple. If the real temperature is not equal to the preset one, you should increase or decrease the internal preset temperature by rotating the encoder handle.
The progress bar in the lower part of the display shows the difference between preset and current temperature (in internal units) of the tip. The controller keeps the tip temperature near the preset value (vertical line on the progress bar) all the time. To increment the preset temperature, turn the encoder right, to decrease - turn it left.
When the low power (standby) mode activated, the controller shows the "standby" icon in the upper-right corner of the display lie shown on the picture below.
The "tune iron PID" and "gun setup->tune gun PID" menu items in the main menu allowing tuning PID parameters of soldering iron and Hot Air Gun. When tune PID mode activated, you can see three values of PID parameters on the display, Kp - proportional, Ki - integral, Kd - differential. First, choose the parameter you are going to change and press the encoder button. You turn into tuning test mode. There are two graphs: the temperature difference and power math dispersion. Both graphs are auto magnifying ones and its maximum value is shown on the Y-axis by the corresponding color.
Prebuilt version of the controller software can be downloaded from the github repository. To upload this hex file into controller, you can use stm32 st-linkutility.
In order to use your native language, the NLS data should be uploaded into SPI FLASH. To do so, you have to:Connect your SD-CARD reader (the TFT display board has one) to the JP11 connector via 4 wires: SD_CS (Chip Select), MOSI, MISO, SCK. If you have not implemet the JP11 socket, remember following: SD_CS (Chip Select) - PB12, MOSI - PB15, MISO - PB14, SCK - PB10.
When the controller copies files from SD-CARD to SPI FLASH, it reads thecfg.jsonfile and loads the language data accordingly with this file. For each language in the list, it checks the language consistency and copies data files when the language is consistent (have both message and font file). Yet, the controller copies only files that is newer that existed on SPI FLASH one. Font data file can be used for several languages. For instance, you can use ubuntu_we.font for several Wester Europe languages.