Introduction to UpsideDownLabs
UpsideDownLabs is an innovative company specializing in advanced bio-sensing technologies, wearable devices, and neuroscience-based solutions. The company focuses on creating high-quality sensors and tools for developers, researchers, and hobbyists interested in bio-signal processing. With a strong commitment to making neuroscience and biomedical engineering accessible, UpsideDownLabs has developed various products that simplify complex signal acquisition and processing for projects related to EMG (electromyography), EEG (electroencephalography), and ECG (electrocardiography).
Their product line includes both hardware and software solutions, empowering users to explore applications in robotics, prosthetics, human-computer interaction, and health monitoring.
Muscle BioAmp Candy Sensor
The Muscle BioAmp Candy Sensor is a high-precision analog front-end designed for capturing bio-signals such as EMG, ECG, and EEG. It offers an excellent balance of signal clarity and ease of integration, making it ideal for beginners as well as professionals working on bio-sensing applications. Key features of this sensor include:
High Signal-to-Noise Ratio (SNR): Ensures minimal interference and maximum signal clarity.
Plug-and-Play Design: Comes with pre-soldered connectors for quick and hassle-free setup.
Compatibility: Works seamlessly with microcontrollers like Arduino, Raspberry Pi, and ESP32.
Low Power Consumption: Ideal for portable and wearable applications.
Applications: Suitable for EMG-controlled robotic arms, muscle-signal-based games, and wearable health monitoring devices.
Heart BioAmp Candy Sensor
The Heart BioAmp Candy Sensor is designed for users who require robust signal acquisition in demanding environments. It offers enhanced signal filtering, making it ideal for applications where noise and interference are significant concerns. Key properties of this sensor include:
Advanced Filtering: Built-in filters to remove noise and artifacts for accurate signal detection.
Durability: Designed with a sturdy enclosure for long-term use in lab and field conditions.
High Sampling Rate: Allows detailed signal processing for advanced applications in neuroscience and robotics.
Wide Use Cases: Perfect for professional-grade prosthetic control, rehabilitation robotics, and real-time biofeedback systems.
EMG measures electrical signals produced by muscle cells when they contract. These signals can be captured using electrodes placed on the skin surface. By processing these signals, we can detect muscle activity and use it to control devices like robotic arms, prosthetics, or even video games.
Components Required
- Arduino Uno or Nano – Acts as the microcontroller to process the EMG signals and control the servos.
- EMG Sensor (like MyoWare or Muscle BioAmp Candy Sensor) – Detects muscle activity and outputs an analog signal proportional to the muscle’s electrical activity.
- Servo Motors (x2) – Used to simulate hand movement by rotating in response to muscle activity.
- Electrodes – To be attached to the skin for capturing muscle signals.
- LED – Indicates when muscle activity crosses a threshold.
- Resistors – For current limiting purposes.
- Connecting wires – To connect components.
- Breadboard – For easy circuit assembly.
- Power supply – Either through USB or a 9V battery.
To ensure accurate signal measurement, follow these steps to prepare the skin:
Clean the Skin – Use alcohol wipes to clean the area where the electrodes will be placed. This removes oils and dirt, improving conductivity.
Attach Electrodes –
- Electrode Placement:
- Place one electrode on the muscle (e.g., biceps) whose activity you want to monitor.
- Place the second electrode on a nearby part of the same muscle group.
- Place the third electrode (ground) on a bony or less active part of the body, such as the elbow or wrist.
- Electrode Placement:
Connect the EMG Sensor – Attach the electrode cables to the EMG sensor according to the manufacturer’s instructions.
Step 2: Circuit Connections
Connect the EMG Sensor to the Arduino:
- Connect the sensor’s signal output to A0 (analog input pin) on the Arduino.
- Connect the sensor’s VCC to the 5V pin and GND to the ground pin on the Arduino.
Connect the Servo Motors:
- Attach the first servo motor’s signal wire to pin 2 and the second servo motor’s signal wire to pin 12 on the Arduino.
- Connect the servo motors’ power (VCC) to the 5V pin and ground (GND) to the GND pin on the Arduino.
Connect the LED:
- Connect a resistor in series with the LED’s positive (anode) leg.
- Connect the other end of the resistor to pin 13 on the Arduino.
- Connect the LED’s negative leg (cathode) to GND.
Step 3: Code for Arduino
Here’s the code that processes the EMG signals and controls the servos:
Connection Diagram for Muscle BioAmp Candy Sensor and ESP32
1. Power Supply Connection ( Muscle BioAmp Candy Sensor to ESP32)
VCC (Power Pin):
Connect the VCC pin of the Muscle BioAmp Candy sensor to the 5V pin of the ESP32.(Important: Since the sensor operates at 5V, it should be powered by the 5V pin of the ESP32.)
GND (Ground Pin):
Connect the GND pin of the Muscle BioAmp Candy sensor to the GND pin of the ESP32.
2. Signal Output Connection ( Muscle BioAmp Candy Sensor to ESP32)
- The Muscle BioAmp Candy sensor outputs an analog signal that represents muscle activity.
Connect the OUT pin of the BioAmp Candy sensor to GPIO 34 (an analog-capable input pin on the ESP32).
3. Electrode Placement for Muscle BioAmp Candy Sensor
Proper electrode placement is crucial for accurate muscle signal detection:
Vin+ (Positive Electrode):
Attach this electrode directly on the muscle where you want to measure activity.Vin− (Negative/Reference Electrode):
Attach this electrode near a bony area close to the muscle (but outside the active muscle region).GND (Ground Electrode):
Attach the ground electrode to a neutral, non-muscular part of the body (e.g., a bony surface like the elbow or wrist).
4. Servo Motor Connections
You are using two servo motors for hand movement control:
Right Servo:
- Signal wire to GPIO 25.
- VCC wire to the 5V pin.
- GND wire to the GND pin.
Left Servo:
- Signal wire to GPIO 13.
- VCC wire to the 5V pin.
- GND wire to the GND pin.
5. LED Connection
- Anode (long pin) of the LED should connect to GPIO 2 via a 220-ohm resistor.
- Cathode (short pin) should connect directly to GND.
: Code for ESP32
#include <Servo.h> // Include the standard Servo library
#define SAMPLE_RATE 500
Step 4: Running the Project
How It Works
Displaying Dynamic Animations on an OLED Screen for a Robot Face
In this project, I created a robot face using an Adafruit SH1106 OLED display and programmed it to show both animations and static text based on an input signal. The OLED screen, mounted on the front of the robot, gives it a lively and interactive personality. Below, I’ll explain how the system works and the basic connections used.
How It Works
The setup involves displaying two different states on the OLED screen:
- Static Text Display – When a signal is detected on a specific input pin, the screen displays a message, “upsidedownlabs” and “Techno SAP”.
- Animation Mode – In the absence of the signal, the screen plays a simple walking animation, switching frames continuously to simulate motion. The animation toggles on and off automatically after each loop.
Connections
Here’s a quick overview of how everything is connected:
- OLED Display:
- The SDA and SCL pins of the display are connected to the corresponding SDA and SCL pins of the microcontroller.
- The display is powered using the 3.3V and GND pins.
- Input Signal:
- A digital input is connected to pin 2, which is used to detect high or low signals.
- When the pin reads HIGH, the display switches to text mode. Otherwise, the walking animation is shown.
Code Overview
The code is written using the Adafruit GFX and Adafruit SH110X libraries, which simplify drawing graphics on the OLED. The walkFrames
array holds the frame data for the walking animation, and the display toggles between frames with a small delay to simulate movement.
This project not only adds an expressive element to the robot but also provides a simple example of combining input detection with dynamic screen output. By adding animations and messages, the robot becomes more engaging and interactive.
Feel free to experiment with different animations or messages to give your robot its unique personality!
Applications in Neuroscience
This project showcases how EMG signals can be used in assistive devices, prosthetics, and rehabilitation technologies. By combining neuroscience with electronics, we can create life-changing solutions for people with motor impairments.
This project showcases how EMG signals can be used in assistive devices, prosthetics, and rehabilitation technologies. By combining neuroscience with electronics, we can create life-changing solutions for people with motor impairments.
Conclusion: Bringing It All Together
This project demonstrates how accessible bio-sensing technology, like the Muscle BioAmp Candy and Heart BioAmp Candy sensors from UpsideDownLabs, can open doors to exciting innovations in neuroscience, robotics, and wearable devices. By using simple components and an Arduino, we've shown how muscle signals can be processed to control a robotic hand in real-time a concept that holds vast potential in prosthetics, rehabilitation, and interactive applications.
For those interested in diving deeper into the project, I have created a detailed video tutorial that walks through the entire process from unboxing the sensors to building and coding the robotic hand. You can watch it on my YouTube channel, Techno Sap, where I regularly share tech-related projects and innovations.
For those interested in diving deeper into the project, I have created a detailed video tutorial that walks through the entire process from unboxing the sensors to building and coding the robotic hand. You can watch it on my YouTube channel, Techno Sap, where I regularly share tech-related projects and innovations.
About the Author
My name is Aryan Pandey, and I’m passionate about exploring cutting-edge technologies in robotics, neuroscience, and bio-sensing. Through my platform, Techno Sap, I aim to inspire and guide others in building practical, hands-on projects using emerging technologies. If you're excited about similar projects, don't forget to check out my YouTube channel for more exciting content.
Call to Action
If you enjoyed this project or found it helpful, feel free to leave a comment below, share it with others, and subscribe to my YouTube channel Techno Sap for more such detailed tutorials. Whether you’re a beginner or a seasoned developer, I hope this project has inspired you to explore the fascinating world of bio-sensing and robotics. 🙏