Fab challenge 3

The third Fab Academy challenge focussed on the interaction and communication with (e.g. human-pc) and within (e.g. sensor-pc) electronics.

Output Devices

Oscar started off with a recap on microcontrollers for the purpose of giving more information to assemble a PCB. Examples of microcontroller assembled on a PCB (=microcontroller board) are Arduino Uno and Adafruit Feather. A stacked assembly of PCB's are called shields. Depending on the desired functionality each shield can perform distinct roles/actions. Raspberry Pi uses HAT's (Hardware Attached on Top) as terminology for shields.

Power supply

In expansion to the microcontroller Oscar explained on the different types of power suppliers. Options include items and topics to chooce include batteries, battery-packs, ethernet, 230AC, 5/12V DC adapters.

Example

For the second generation of the Oracle hybrid media monitor the custom PCB was equiped with an green SMD (=Service Mounted Device) LED. On the digital dashboard this LED could be switched on and off by a button. For details on the development of the Oracle monitor series, please check here.

figure 1: Surface mounted LED lighting up via button on NodeRed dashboard.

Input Devices

The core purpose of sensors is to capture and monitor data. The aggregation of this data can be collected into powerful indices. For example, with locational wifi tracking one can track the location of people within a room or house without needing to see them physically.

figure 2: Types of sensors.

Capacitive sensing utilizes the electrical conductivity of any material as a sensoric functioning. This means that virtually any object can be turned into a sensor. With just one send pin and one receive pin the variation in conductivity can be measured and with a defined treshold turned into a interval (yes/no). The defining of this threshold is the tricky part in creating this setup since all other elements influence it (material density, material size, cable length, cable tangling, cable width).

In Arduino the digital signalling works by a 5V signal as input (HIGH) and 0V as ground (LOW). So without values inbetween (binary).

In the case of analogue signalling, all input values between 0V and 5V are possible. For example a sensoric input value of 1,8V (defined in Arduino as 1V8).

figure 3: Datatransfer on a moving robot.

Networking and communication

Wired

We use wired networks and communication protocols to distribute and connect systems. Viktor defined as "Sending bits from one place to another." The shape of networks define their topology, communication and functionality. Networks are not perfect and there will always be (minor) errors. The effect of these errors depend on their range, distance and speed. Protocols usually include error correction with algoritmic validation checks.

figure 4: Types of networks.

Network interfaces can be divided into parallel and serial structures. Pro's of parallel communication are the ability for high-speed communication and individual module control. Con's are that they require more wiring and are therefore often more expensive. Serial interfaces stream their data with a reference signal, one single bit at a time. These interfaces can operate on as little as one wire.

figure 5: Asynchronous versus synchronous.

ASCI is a standard index for encoding all Latin numbers and characters into a 8-bit numeric format. On PC's this index can be accessed via alt + numberic combination (alt-codes)on a PC's keyboard.

Wireless

Wireless connectivity is all around us. Our phones use GSM 3G, 4G or H+ connectivity continuously. Low-frequency have a large amount of penetration power. While on the other hand high-frequency can be isolated easily. With SDR (software-defined radios) one can listen/read WiFi signals. Channels are subdivisions of frequencies. Antennas work with donut-shaped signalling from the sides, which is the reason that modern Wifi-routers have 3 antennas on X, Y, Z-axis to create a 'signal sphere'.

MQTT is an messaging protocol for the Internet of Things (IoT). It divides publishers and subscribers into a system in which a central MQTT broker interventarizes, compares and displays data. Node-RED is a software on top of a MQTT protocol which allows storage and interpretation of this data.

Example

As use-case for communication between boards I connected two Adafruit Huzzah ESP32 feather microcontrollers. One board served as server (hosting a Wifi network) while the other was it's client. The server ESP32 measured and publishes humidity and temperature by a DHT11 sensor to a IP-address through HTTP. The client ESP32 subscribes to this HTTP per a HTTP request and interprets this data by lighting up an LED when exceeding a certain threshold; in this case 30° celcius.

figure 6: Communication between two ESP32 microcontrollers.
figure 7: Client retrieving DHT11 sensor data from server to light up an led.

Interface and application programming

Viktor and Josep explained the usage of data application tools. There are plenty of tools for interpreting and managing data, some of which include: Blender, P5js, Processing and IBM's NodeRED written in languages like C++, Java and Python among others. Storing data and running a interactive dashboard on a external cloud offers a lot of opportunities but - as anything - needs to be considered and placed in context. Carefulness is required since running a interactive interface can have significant security risks or result in indirect/inefficient solutions.

The most basic way to digitally structure data is through CSV (=Comma Seperated Value). A different approach can be .JSON (Java-Script Object Notation) which can be regarded as a multi hierarchial storing and transporting index for data. Josep continued with a hands-on P5.js workshop.

Blender allows python-based object oriented coding (bpy). Starting off with a default cube.

          
cube = bpy.data.objects['Cube']
cube.location.x
cube.location = (2,3,4.5)
          
        

Viktor showed his project 'Suzan'; a modelled sculpted head which corelates via a phyton script the gyroscope data of his smartphone and mimics the movements digitally in Blender. It shows the interaction between code and interface of Blender. Sending code to a processor clean signalling is crucial. With the while-function below it's sure that the serial port sends only the necessary information.

          

            void loop() {

              if (Serial.available()) state = Serial.parseInt(); // Get the value
              while (Serial.available()) Serial.read();  // Clean the Serial port
              
              if (state > 0) digitalWrite(LED_BUILTIN, HIGH);  // Turn on the led 
              else digitalWrite(LED_BUILTIN, LOW);    // or off
            
              delay(200);
            }
          
        

Robotics

Robotic arms are distinct machinery in multiple aspects, one of which is that instead of a single g-code, a robotic arm constantly uses different, responsive g-codes. For example the Kuka-arm at IAAC can have a 150 kg payload moving up to 2 m/s, offering loads of opportunities in different fields of use. Some use cases include, 3D printing (plastic, metal, clay), welding, sawing and photography. Due to educational and commerical interest and technological advancements, the average hourly price of industrial robotic applications for the first time undercut human labour. At KIA (car manufacturer) in Žilina, Slovakia, there's a 7,5 km production line, fully robotized with human interference only focussed on supervizion.

Robots are made to move. More specifically they are designed to do a physical task repetively resulting in a repeatability (=difference in endresult after x amount of executions) and designated wire-routing. Singularity occurs when two axis are alligned (co-linear). Because its dangerous moving elements a robotic kill switch usually has to be consciously half-centered so that non-controlled muscle movements will automatically turn off the machine. The wattage of a robotic arm is similar to medium-sized CNC milling machine being around 3,8 kW. With PLC's (=Programmable Logic Controllers) output feedback loops can be created to - for example - generate self-calibration functionality.

Programming robotic control is tricky in terms of plane-definition and orienting inbetween those planes.

figure 8: Different robotics.