Monday, August 17, 2020

Touchless Phone

 


Prompt: Modify a phone to play back a message when you get close to it. Incorporate some lights that make people want to get closer to look at it.

Step 1: Define the Logic


Step 2: Identify the parts

- Enclosure (Phone)
- LED
- Power Supply
- Speaker
- Sensor
- Microcontroller





Step 4: Create the Wiring Diagram


Step 5: Make the prototype






Step 6: Program the Microcontroller & Test




Next Steps: Create a production quality prototype for play testing


Back to the Macro: Design Topology for my project

 


This is a diagram that allows you to visualize the overall network of components, computers, Microcontrollers, and software in the project. This will be expanded on later, but illustrates the current state of the network design, which in turn informs decisions about construction, material choice, and programming. It's worth noting that the Arduino Nano was not used... Instead, I opted for the ESP32 and RPi Microcontrollers due to familiarity and potential for future projects.

Starting with the ESP32: like learning to drive a truck after driving a car.


OLIMEX ESP32-POE-ISO

It's Alive!!! As explained in my last post, I had to go back to the beginning with this board in order to understand it and development more complex projects. I'm using the Arduino IDE on my MacBook Pro to create a Python3 sketch and flash it (via serial connection over usb) to the ESP32, which has been wired up with an LED on a development board. 


The next step was to integrate a switch that would be read by a GPIO, triggering another GPIO to turn on / off an LED. This is what the development board looks like:

You may notice that the red and white wires are attached to a 1/4" instrument jack & cable. This is sent to the physical foot switch plate that I've been working on.



The right Microcontroller for the Job

 Raspberry Pi VS Olimex ESP32-POE-ISO


Size DOES matter... But it's not the only consideration. My foot sensor design required a small Microcontroller with power over ethernet and a few GPIO pins for the sensor and possibly an LED or two. In reality, both of these boards are overkill, but work well due to availability, cost, build time, and current knowledge of components and programming. In the future, I'd like to design a small board with only the essential components for the foot sensor. 

Living in the moment... Time is a factor, and I don't have all the time in the world to learn new Microcontrollers, coding languages, etc. I need to create stuff now! While Raspberry Pi (RPi)is already becoming a tool in my tool belt, I recognize the benefits of learning the ESP32, as it is becoming more popular and at a fraction of the cost of the RPi. Of course, that meant starting fresh with projects like lighting up an LED. In a nutshell though, syntax is the real difference. The board has GPIO pins, and makes a serial connection to my laptop via USB cable. The big difference to me was that it doesn't have removable storage like the RPi. This required me to learn the Arduino IDE, which had to be updated with a driver for the ESP32 (available from the Climax website) in order to flash the memory.

Another challenge was understanding what all the pins were for on the ESP32... The internet has been the most useful asset for learning how to use ESP32, as it isn't mentioned in any of the book I already had. The pinout chart is probably the most important single piece of information that I needed.



Olimex ESP32-POE-ISO

https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware


RaspberryPi

https://www.raspberrypi.org







Designing for Handsfree Interaction

 

COVID-19 Image
https://www.brookings.edu/research/the-military-policing-and-covid-19/

COVID-19 has changed the way we interact in society. We all have to do our part to reduce the spread of this disease. The impact has been felt world wide, and changes are being made in the way we live, work, and play. As a designer, methods of interaction are an important consideration. Especially when it comes to public spaces... Fortunately, "hands-free" is good for accessibility as well. 

As a creative technologist intern, I was tasked with designing and prototyping a sensor that would be hands free and accessible. There were also a few other requirements regarding network topology and interaction/ communication across a LAN (Local Area Network). From a form factor perspective, I gravitated towards developing a pressure sensitive plate or foot-switch that could be stepped on or rolled across with a wheel chair. This meant that the sensor would have to have a low profile, sensitive enough for a small child to activate, and rugged enough to withstand up to 350 lbs. Capacitive touch seemed like a possible solution at first, but ultimately a simple switch plate ended up working best. 

The sensor itself is quite simple and rugged, but the Microcontroller is less so. Initially, I wanted to integrate the Microcontroller into the body of the sensor. With nearly a 1" height requirement, I chose to separate the Microcontroller from the sensor. I decided on using 1/4" audio jacks and cables to connect between them. An advantage to this method is the low cost readily available parts, and the ease and expediency of replacing a damaged foot-switch sensor over the 5 year expected life span of the installation. As with all good ideas, it needed to hold up to prototyping and testing. This meant researching conductive materials, non-conductive materials, and acquiring them. Cost is always a factor, so I chose inexpensive materials whenever possible. Most of the materials came from either Adafruit.com or amazon.com. The materials that worked best and are most crucial to my design are the wet suit like neoprene, and the self adhesive conductive foil (copper).

Copper Foil Tape with Conductive Adhesive - 6mm x 5 meters long

PRODUCT ID: 3483
https://www.adafruit.com/product/3483


Lazy Dog Warehouse Neoprene Sponge Foam Rubber Sheet Rolls 15in x 60in (1/8in Thick) 
$14.80



Arduino IDE: Writing python sketches for Microcontrollers

 


ARDUINO 1.8.13
"The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software. "

Go to the Getting Started page for Installation instructions.

The Arduino IDE has been an excellent solution for creating python sketches on my MacBook Pro and testing them with the Raspberry Pi & ESP32-POE-ISO Microcontrollers. Python was an obvious choice since it is native to all of the Microcontrollers used and can be used in TouchDesigner, MSP/MAX, and Processing, and there are a ton of open source libraries and resources available. The main reasons I went with the Arduino IDE is because it was familiar to the other programmers that I've been interacting with as an intern at a startup company. The other reason was because it's open source, easy to use, and is cross platform (meaning it works with OSX, Windows, and Linux). As a creative technologist intern, I have to create prototypes and code them in a way that allows smooth integration into a larger network of devices throughout a 12,000 sq ft space.

When prototyping & debugging, I've been able to quickly alter code and write to the board, which has allowed me to see results almost immediately. A lot of things look great on paper, but until you actually try it/ do it, you don't really know. 


Changing focus: micro to macro / macro to micro

 FOCUS

Where do I need to concentrate and invest my efforts? With such a broad area of possibilities in this independent study, asking this question is crucial to maximizing time and resources. This early discovery is informed by the numerous possible solutions to any given problem. Outliers: The Story of Success by Malcom Gladwell suggests that it takes 10,000 hours to become a master in a given field. At 42 years old, I'm not sure I have another 10,000 hours left to master something new. Since we can't take back time, and we don't know how long we'll live, it's rather impractical to worry about getting in my 10,000 hours anyway. The important part is establishing a direction and moving forward, since there can be no progress without movement. 


I still think the 10,000 hour concept is useful if looked at another way. I see it as having a limited amount of hours to invest and understanding that I can't be a master of all things. As a student of New Media, I recognize that I've chosen a broad field. This is exactly the reason that I can't afford to deep dive for very long in any one area. On the other hand, I can't afford not to take the necessary deep dive now and again in order to make progress. Without the occasional concentrated investment in a specific area, it becomes nearly impossible to progress in the larger scope. This is exactly why it's so important to self evaluate and adjust focus. It's all about knowing yourself and seeking self improvement, which also happens to be the first of eleven leadership principles taught to U.S. Marines (11 Marine Corps Leadership Principles (MCTP 6-10B, Appendix B)

My initial focus was on learning TouchDesigner (TD) and using it to do everything on the software end. Of course, that was before I started learning more about Microcontrollers, sensors, actuators, and how to get everything to interact. Sure TD can do pretty much anything, but it's not always the easiest or most efficient way to do something. On the practical side of things, it was necessary to learn more about python anyways, since it was one of the languages that played nicely with Raspberry Pi, Arduino, and the ESP32-POE-ISO boards I've been using. So I looked at the bigger picture and my larger goals with installation art, creative technology, and performance, in order to inform my future trajectory.

Some of the areas that warranted further exploration include: Programming micro controllers with an IDE, using Terminal, using Github, Compiling code, using libraries, debugging, modifying code examples and combining them into larger programs. Most of the solutions I found along the way have come from Tom Igoe's "Making Things Talk" (3rd edition), O'Sullivan & Igoe's "Physical Computing: Sensing and Conrolling the Physical World with Computers", Monk O'Reilly's "Raspberry Pi Cookbook" (3rd edition), and the "Freenove Ultimate Starter Kit for Raspberry Pi Tutorial" that came with the kit.