Implementation of fuzzy logic to applications is finding limitations with application boards in terms of memory space, processor, power, speed and size. On top of it, the embedded software employed to code the application has its own limitations pertaining to the drivers for external access of data, parameters and status of the process. Also, in some cases, application boards are specific to the application and lose their uniqueness, thus raising the cost of the end product. A single board computer (SBC) ported with Linux as its OS and the application coded on a simple coding language or scripting language could be a cost effective front and back end solution.

In significant number of applications, there has been a want for hardware with a processor, VGA display or HDMI, USB ports, keyboard, mouse, solid state memory interface, Ethernet – all in small physical dimensions and low power consumption. It was the launch of Raspberry Pi, a credit card sized SBC running on Linux Debian, that gave way to a solution for all the needs. This board interfaces with an SD card acting as a hard disk to carry the OS and running programs. This SBC consumes, at the most, 5 Watt of power on a micro USB socket. Having several I/O pins, it caters TTL UART pins on board. Several SBCs are available today but none are equal to Raspberry Pi with respect to the features, dimensions and price. Linux OS is virus free and boots up faster. Python being a scripting language can be used to develop code for addressing external devices to access data and actuate devices. A front end HMI interface can be developed on the same platform as well.

The basic idea
SBCs can be employed to perform intelligent part of the application where it is required to address a number of devices. Discrete MCUs (microcontrollers) can be used to perform the task of activating and responding to end devices be it a semiconductor device, a module or an electromechanical element. All such discrete MCUs can be embedded on a single board and all of them are interfaced via TTL UART to the SBC. Each dedicated MCU performs their assigned tasks and reports back to the SBC. All the decisions are centrally controlled by the SBC. This system mainly comprises of Raspberry Pi, application board and python software. A number of applications can be developed in the grand scheme of things. In the automobile industry, auto gearing system for four wheelers has long awaited for a breakthrough. With SBCs, it will be a unique approach of implementing it on the existing manual gearing system to preserve the efficiency and performance in the run of the vehicle.

Why Raspberry Pi is the perfect SBC for this application?
. Credit card sized in dimensions
. [email protected] maximum power from an adaptor
. ARM11 Processor
. 1GHz operating speed
. 2 USB ports for Key board mouse or accessing external memory
. Ethernet port for internet connectivity
. VGA connector and HDMI connector for faithful image on the LCD/LED screens
. 3.5mm stereo jack for audio out to amplifier
. SD card interface slot to carry the OS
. 256 MB of RAM
. 21 I/O pins of which 2 for TTL UART
Explore Circuits and Projects Explore Videos and Tutorials

One major feature of Pi is that the SD card being a solid state device can sustain vibrations. It stretches its prominence in defence requirements as it caters to mobile applications sustaining to vibrations and shocks. Its size and power consumption gives a scope for battery operated applications. As application programs written in Python are stored in the SD card, it further makes editing of programs, without any external programmers and code burners into the processor, a simple job just like any other program done on any computer. This facilitates a fatigue free code development environment for an engineer. Raspberry Pi’s large SD card capacity aids to fit lengthy fuzzy conditions like ‘IF THEN’ conditions and Loops with fast access and processing.

READ
"Indian Education needs to keep pace with industry requirement"

Application board and the working explained
The network of MCUs interacting with the SBC, taking logical decisions from SBC and acting to its commands is identified as the application board here.

figure_1

Figure 1 is an illustration of application board interfaced to the SBC. The application board basically consists of MCUs interacting with external devices with corresponding connectivity and signalling protocol. Each MCU is defined with a specific task and connected to the SBC through its TTL UART. SBC carrying application program running in Python takes the data from application board and processes the data with the fuzzy logical decisions. The SBC then sends the fuzzy commands to the application board. Application board primarily defuzzifies the received data and converts them to commands. Depending on the commands, corresponding actuation of the devices takes place. Though the SBC and application board interaction takes place in serial communication, it is observed that the data processing, command execution and actuation take place faster compared to conventional serial interfaces. This is achieved as principal and time consuming job is done by the SBC. Data access and device actuation is achieved by a set of dedicated MCUs in the application board.

Why Python for this application?
The present situation is an attempt to implement fuzzy Logic in SBC. Python is identified as a simple to learn and powerful language for embedded applications as it consumes less memory space with a vast vocabulary of commands having capability of reaching the processor I/O pins, UART lines, Ethernet port and USB. Most importantly, since Python is a scripting language, it can be programmed to operate as a front end as well. This gives a full solution on a single platform with editing at any stage and on the field without any external hardware required to port the new code.

Python has commands for ‘IF THEN’ conditions were fuzzy logic finds its way to take fast fuzzification and rapid logical decisions within. Logical loops execution is fast enough to cater complicated logics. Python has fast mathematical equation solving capabilities more concentrated on the accuracy of machine control.

Combination of Linux, Python and SBC gives a solution to develop the product fast as it sits on the SD card without any external hardware required to burn the program into it. The programs written in Python and verified on the application board can be saved into SD card. It is much simpler when compared to C language. A unique feature is identified here – running two or more applications on the same SBC. Python programs can be executed in ‘Terminate’ and ‘Stay Resident’ (TSR) operation. Two or more programs can be operated at the same time while using the SBC for general utility. C language also has TSR operation but it cannot address the microprocessor and its hardware because C programs are compiled to a target microcontroller code. Python programs on the SBC operate on the same platform, OS and on the same SBC hardware to address any nook and corner of the SBC hardware. This is one big advantage of Python on SBC to function for more number of application boards.

READ
“Hey Start-Ups, Stop And Take A Look!”

Automatic gearing system for four wheelers
The application is with respect to the automobile industry in view of providing the same efficiency and fuel burn but improving comfort level with respect to the strain associated with shifting gears frequently. An Automatic Gearing System is proposed with fuzzy logic implemented on Raspberry Pi as SBC.

Figure 2: Application board interfaced with ADC module
Figure 2: Application board interfaced with ADC module

Raspberry Pi available as a SBC is a cost effective solution used in this application. Figure 2 illustrates the scheme for Automatic Gearing System proposed for four wheelers.

The present auto gearing vehicles carry a specifically designed mechanical auto gearing gear box. The gear shifts take place linearly with a Vero drive which is a power lossy mechanism operating on centrifugal force to change the gearing. This has a big slip from the crank drive shaft and does not drive the wheels ultimately for every stroke of the piston. Thus fuel burnt is lost without putting energy on to the wheels. A manual synchromesh gear box is comparatively efficient in driving the wheels at every stroke of the piston. This article concentrates on this gear box and proposes to operate the gear shifts electromechanically. Once this is achieved, this system is interfaced with a Raspberry Pi and the application board.

Figure 2 indicates application board interfaced with ADC module having access to accelerator position, RPM of the engine, torque of the engine and the wheel speed of the vehicle. Actuator module addresses electromechanical gear levers in x axis, y axis, accelerator low to high and clutch low to high. Application board concentrates on taking the feedback from the status of operation by reading the parameters of the position of gear levers to identify the status of the gear level.

Raspberry Pi is interfaced with a keypad to have the option of selecting of manual or auto gearing mode while driving. An LCD is employed to monitor the parameters like gear level, speed, RPM and torque of the vehicle performance. Fuzzy logic calculates from the ADC read parameters like accelerator position, RPM, torque and wheel speed decides to shift the gear and put the vehicle to optimum performance. This relieves the driver from the strain associated to taking decisions related to shifting the gears.

READ
ARM and UMC Develop Physical IP Platforms Together

Shifting gears at conditions where the vehicle is running in terrine or at high torque and low RPM are instances that portray the complexity involved in making decisions. This requires running the vehicle at lower gears, therefore consuming more power. To take decisions in such conditions, implementation of fuzzy logic is required.

Apart from this, driving habits differ from person to person. It is identified that the SBC needs to get tuned to the driving habits with respect to shifting of gears and perform similarly. So there is a need for the system to be capable of learning the driving habits. Large SD card space and fast response of the python program and file handling capability to store the habits while in learn mode and execute the same in run mode is possible in the SBC ported with Linux and programs run on Python software. Also new algorithms can be developed according to the market demand, taste and utility of the upcoming trends. This is much similar to Android applications ported on the device for a certain utilities.

Performance Characteristics
This article is the result of the work done as a part of academic interest in 1996 as a project for post graduation in Pune University. It was built around a basic microprocessor and was successfully completed. Fuzzy logic was also implemented to cater all the decisions to shift the gears. The concept is once again taken up to bring in versatility and flexibility with respect to precise functioning in shifting gears and mainly to project learning capability.

With respect to the performance of the vehicle, it was found that comfort associated to the reliving the strain in shifting the gears was achieved. This feature has added life to the concept were the vehicle movements, take off, overtaking method, acceleration and responses at the terrine roads was mimicked to the driver habits.

Conclusion
This approach is most recommended in both diesel and the petrol engine vehicles as it continuously monitors and tracks the performance of the gear box to operate efficiently. The load regulation is tightened from no load condition to the full load condition. When it comes to the application of automobile, this system caters a smooth pull, fast take off and counters unnecessary burning of fuel preserving the comforts in the vehicle.


Dr. R. R. Mudholkar is an Associate Professor in Shivaji University Kolhapur Maharashtra. His expertise is in soft computing and heads the department. He has versatile experience in Fuzzy Logic implementation into machines. He has guided PhD students and research fellows in their academics and projects.

P. Chow Reddy is the Managing Director of Interleaved Technologies, Hyderabad and a PhD student working on Fuzzy Logic under the guidance of Dr. R. R. Mudholkar. He has worked in various fields of electronics and has expertise in providing design solutions in the fields of Power Electronics, Solar Power Plants, Industrial automation, Agriculture Electronics and Auto-electronics. He is also a regular contributor to EFY.

LEAVE A REPLY