Tag: Project

  • ESP-Now Remote Control Test

    ESP-Now Remote Control Test

    To control a robot, I wanted to see if ESP-NOW, a communication method developed explicitly for the ESP family, would work. This project aims to determine whether ESP-NOW provides a reliable connection over a reasonable distance and whether ESP-NOW can send sufficient data back and forth.
    ESP-NOW makes it possible to set up different types of communication:

    • One-way communication
    • One master and multiple slaves
    • One slave and multiple masters
    • Two-way communication
    • Multiple-way communication (a network of ESP boards)

    In my example, I use the two-way communication protocol to build a remote control that can operate a robot. The robot must also send data back. If you want to read more about the possibilities and background of ESP-NOW, check out this excellent source of information:
    https://randomnerdtutorials.com/esp-now-esp32-arduino-ide/

    Setup

    My first test setup consists of the following components:

    Board 1

    • Joystick (Sends signal)
    • Prints the distance from the distance sensor via Serial

    Board 2

    • Servo (Uses X position from the joystick)
    • HC-SR04 distance sensor mounted on the servo
    • Prints the distance from the distance sensor via Serial

    The joystick on the master board controls the servo on the slave board. The distance sensor rotates along with the servo, and the measured distance is sent back to the master board. The setup is simple, and it gives a first impression of the speed and reliability of the ESP-NOW connection.

    BOM (Bill of Materials)

    In this project, I used:

    • DOIT ESP32 DEVKIT V1
    • ESP32S 38P/V4/Goouuu Expansion board
    • ESP32/V4/Goouuu Terminal Adapter Expansion board
    • Dual-axis XY Joystick Module
    • Tower Pro Micro Servo SG90
    • HC-SR04 Distance sensor
    • Level Converter board
    • Jumpwires
    • 3D printed parts (Optional)

    Of course, you can use different components if you want — no problem at all.

    Preparation

    To use ESP-NOW, you need to know the MAC addresses of the ESP boards. It is essential to send data to the correct board. You can find this easily by uploading the following code and reading the MAC address via the Serial Monitor in the Arduino IDE:

    #include "WiFi.h"
    
    void setup(){
      Serial.begin(115200);
      WiFi.mode(WIFI_MODE_STA);
      Serial.println(WiFi.macAddress());
    }
    
    void loop(){
    }

    Once uploaded, open the Serial Monitor and press the reset button on the DOIT board, and the MAC address will appear.

    Build

    Once we know the MAC addresses, we can start building the setup. I’m using parts from Evenblox to keep everything neatly together and make it easier to transport. You can find these parts and more information on https://www.evenblox.com. Also, check out this great 3D model for mounting your sensor: HCSR04 mount for SG90 servo by rjlew – Thingiverse

    Below you’ll find the schematic of board one (Master) and a photo of the breadboard setup:

    Next is the schematic of board 2 (Slave) and a photo of its setup:

    I’m using the HC-SR04 sensor to measure distance. I’ve written an article about this before — check it out here: HC-SR04 Project – SwanRobotics.

    The servo and the HC-SR04 both run on 5V. The ESP32 operates at 3.3V, so a level converter is needed. There are HC-SR04 versions that support both 3.3V and 5V, but the one used in this project does not. For more information about level converters, check out Level Converter – SwanRobotics.

    Alternatively, you could use the HC-SR04P sensor, which supports both 3.3V and 5V directly.

    Code

    The code is available on GitHub. Remote_control_test_ESP-NOW

    You’ll need to update the MAC addresses in the code to make it work for your setup. The code handles several tasks:

    The remote sends a heartbeat every 200 ms. A heartbeat is essential when the system controls an actual robot. The robot checks for incoming data. If no data comes in, the servo returns to its middle position.
    The joystick value is sent to the robot, which reads it and converts it to a servo position.
    The sensor measures the distance and sends it back to the remote.
    The data from both ESP boards can be monitored via the Serial Monitor in the Arduino IDE, making it easy to test the connection in different locations.

    Once the code is uploaded, it should be possible to view the correct data.

    What’s Next

    This setup works well, and the ESP boards pass data smoothly. I want to test how far the boards can communicate in different environments (home, street, forest), so I’ll add a display to the remote control to show the connection status. That way, I can see when the signal is lost. The joystick is sensitive near the center position, so I plan to smooth that out in software.

  • Starting over

    Starting over

    My A1 robot is a robot based on a wheelchair. The robot’s purpose was to do telepresence. I built this thing 12 years ago and is collecting dust since then. I could not make it work at that time because of the lack of affordable technology, software possibilities, and my skillset.

    A lot has changed now. The widely available electronics and the amount of cheap computer power give much more functionality out of the box. I want the robot to be a platform capable of driving around autonomy and doing image-recognizing tasks like detecting garbage and faces.

    The old electronics on this robot, like an Intel Mini ITX D945GSEJT and a servo driver, had to go. I ripped the electronics to make room for new components. I have already replaced the pulverized old tyers. The plan is to reuse the wheelchair base, motors, and motor drivers (MD03 from Devantech). The 24 Volt power supply is also staying for testing now. A Teensy 4.1 will do the low-level control, like handling the motor drivers and reading sensor data. This controller has many inputs and outputs and serial, SPI, CAN, and I2C ports.

    I haven’t decided what single-board computer I will use to do higher-level control. A prominent candidate is the NVIDIA Jetson Nano or better. It’s hard to get one because of a chip shortage. Another option is to use one or more Raspberry Pi boards and connect them with ethernet. The Teensy will use a serial connection to transfer data between a Raspberry Pi or the Jetson. This configuration makes it possible to build a modular system and allows swapping components when better components are available.

    The first task is to make the robot drive remote-controlled. I build a remote control for this with a Bluetooth module. There will also be a Bluetooth module connected to the Teensy on the robot. The motor drivers will be connected through I2C, making it possible to read data from the driver like current use and temperature.

  • InMoov Support Block

    InMoov Support Block

    After the crash of my inMoov robot it took a lot of work to put it back together. To prevent a crash again I decided buy a stable speaker stand for big speakers. To make it fit it was necessary to design a special block to connect the upper body of the inMoov robot to the 35 mm pipe of the speaker stand.

    My speaker stand is from the brand Innox, but there are several brands offering the same product. For example: Speaker stand on Amazon.

    You can find the STL file of this support on Thingiverse.com.

    Make sure you take a look at the website from the designer of the inMoov robot at www.inmoov.fr.

  • Warning. Not nice to watch!

    Warning. Not nice to watch!

    A few weeks ago I was printing some new parts for my inMoov robot. It was time to make some progress again. But… i was doing some vacuum cleaning and the power cord was wrapped around my inMoov robot. I am still wondering how this happened, but it few down hard. The pieces were al over the place.

    img_7691

    img_7696 img_7695 img_7694 img_7690

    As you can see on the pictures a lot of parts a really broken. PLA is a nice material to print and very hard when it’s printed. I still have to figure out what part have to be reprinted, but I already started with the parts on the lower torso, because al these parts are broken.

    I think inMoov was a little top heavy and the stand was not stable enough. The side to side stability was OK, but front to back bot. At first it was no problem I guess, but when adding the arms a lot off weight was added. I have to find another solution for this before I build it again.

    mount3

     

  • PIR module on the inMoov Robot

    PIR module on the inMoov Robot

    The inMoov will be fitted with a PIR module. This Passive Infrared Sensor measures the infrared light radiates from object it’s pointed at. A PIR module can be used to detect if somebody is in front of the inMoov robot. I am thinking of using the sensor to power up the inmoov robot so it can reduce power when nobody is in front of it.

    I used a simple module what can be purchased on several web shops around the world.

    IMG_3465

    This module has a footprint of 32,5 mm x 24,5 mm x 25 mm and has three pins. One pin is for 5V power and one ground pin. The third pin is the data pin and is High when motion is detected. The modules as two potentiometers. The left potentiometer is for the sensitivity and the right is for the duration the pin should be high after motion is detected. The sensitivity is depending on your situation. For the duration I used the shortest setting because I don’t expect I to miss this trigger.

    The picture below shows how the PIR module is connected with an Arduino. I used this to test the module.

    IMG_3498

    The PIR module has it’s own connection on the Nervo Board. It’s located next to pin A15, D44 and D46. I made a ribbon cable to connect the sensor to the board. The pins on the PIR module and the Nervo Board are not in the same order. I needed to swap the vcc pin and the signal pin on one end as you can see in the picture below.

    IMG_6018

    To test the PIR module and it connections I used a little piece of Arduino code.  The signal pin of the PIR module is connected to pin 23 on the Nervo Board. The code is checking every second if motion is detected and prints the results in the Serial Monitor.

    [code lang=”cpp”]
    /*
    * This is an example of how to use a PIR sensor with an Arduino.
    * www.swanrobotics.com
    */

    // Define pin 23 as input for the sensor
    #define MOTION_PIN 23

    int reading;

    void setup()
    {
    // Setup Motion pin
    pinMode(MOTION_PIN, INPUT);

    // Initilize serial link for debugging
    Serial.begin(9600);
    delay(1000); // 1 second delay to open the serial monitor after uploading
    Serial.println (“Start”);
    }

    void loop()
    {

    reading = digitalRead(MOTION_PIN);
    if (reading == HIGH) {
    Serial.println (“Motion Detected”);
    } else {
    Serial.println (“No Motion Detected”);
    }

    // Wait a second
    delay(1000);
    }

    [/code]

    I have printed the MiddleChest+PIRV1 part which has a space for the PIR sensor. This part is already mounted on my inMoov so I only had to hotglue the PIR module in place.

    IMG_6025 IMG_6024

    This picture below shows the final result in the chest of the inMoov robot

    IMG_6034

    To show you how the PIR is mounted in the inMoov robot I made a small video.

    All this was not possible by the creator of the inMoov robot. Please visit his website www.inmoov.fr

  • Nervo Boards

    Nervo Boards

    The summertime was not the best time to work on my inMoov robot, because of outdoor activities. But now it is getting cold and the Dutch weather is keeping me inside. It is time to moving forward again.

    I ordered the Nervo Boards from the www.inMoov.fr website. I first ordered one set, because I wanted to see what the quality was. This was what I received.

    01inmoovprints

    I was happy with the quality so I ordered the second set also. First I had to figure out how the all boards supposed to fit together. For now I don’t want to use the finger sensors, but they are on the left side on the picture below.

    02Printssorted

    At first I took an Arduino Mega compatible board (Funduino) and inserted the pins needed for the Nervo Board. This is done to be sure that the pins are straight and on the right position. Beware: not all the pins on the Arduino Mega board are used, so leave those position empty.

    03Pins

    Next I fitted the main Nervo Board over the pins on the Arduino Mega. The pins 8 till 13 didn’t fit perfectly. I don’t know of this was caused by the Nervo board or the Funduino. I had to lift one side up to bring the pin closer to the hole.

    04Pins with board

    I soldered all together.

    05pinssolder

    06solderbottom

    My inMoov will use the same Voltage for all the servos, so I soldered the 3 connections on the top side of the board. The solder did stick very well on the pads at bottom right on the picture. A little piece of wire was needed to make a solid connection.

    07bridge

    I removed the head and neck pins from the main board, because I was afraid to burn the headers on the top board. I was easier to solder the pins on the top breakout board first and then solder the 12 pin connectors. Now it was easy to solder the breakout board on the Nervo main board.

    08pinsupper 09upperboards
    After an evening of soldering the result is very nice. The right board doesn’t have the neck and Stomach breakout board on it. You can use an Arduino Uno instead of an Arduino Mega. You never can have enough io. šŸ˜‰

    10allboard

    To mount the Nervo Board assemblies on my inMoov robot I printed a Mount from Thingiverse. [http://www.thingiverse.com/thing:30270]. It didn’t fit. I remove the rim around the board because I didn’t want to print another one.

    11megamount

    I used two 3 x 16 mm screws to mount the assemblies on the back of the inMoov. There is not a dedicated spot for it, so I looked at a spot where the two screws would fit.

    12oninmoov13With board

     

     

     

  • inMoov has a Chest

    inMoov has a Chest

    The world is unfair. My Ultimaker printer had to do more then 70 hours of printing and it took me only 1 hour to put the parts on the inMoov robot. šŸ˜‰ Below you can see all the parts from the Chest.

    Chestparts

    From left to right and from top to bottom you can see the following parts:

    • ChestTopAttachV1 (right and left part)
    • ChestTopV1 (right and left part)
    • SideRibsCoverV1 (right and left part)
    • ChestRightV1
    • InMrightV1HollowV1 (orange)
    • InMleftV1HollowV1 (orange)
    • ChestLeftV1
    • BottomChestV1(right and left part)
    • MiddleChest+PIRV1
    • UnderKinectV1 (right and left part in black)

    I am very happy with the results of these prints and they fit really well. The easiest way to mount the chestparts is starting with the ChestRight and ChestLeft together with the InMrightV1Hollow and InMleftHollow. After this you can mount the MiddleChest+PIR and the Kinect. The Kinect is mounted with the UnderKinect parts. I had to push it in with a little bit force to fit it together. I think this was caused by some warping of the prints.

    The inMoov robot gets a PIR sensor to react on people moving by. This is not done yet so you can see a nice hole where the PIR sensor should.

    inMoovChest1 inMoovChest2 inMoovChest3

    Make sure you check the website fromĀ Gael Langevin at www.inmoov.fr.

  • Schoulder Inmoov

    Schoulder Inmoov

    The shoulder of the inMoov robot exists of several parts. In this post I describe the build of the parts responsible for the up and down motion of the arm en the back and forward rotation.

    My Ultimaker original with a heated bed prints clean partsĀ most of the time. Only the first layer leaves some burr so I use a file and a knife to remove it.

    The PivWorm part need a lot more work to make it ready to use.Ā First you have to remove the support needed for the worm shape. I used pliers to remove the big parts by breaking it with a little bit of force.

    schoulder1

    After this I needed a knive to remove the supports sticking to the worm part itself. Also the bottom side of the worm needed a file to remove the irregularities.

    schoulder2

    After mounting the PivWorm in it’s casing and adding the PivGear part it did fit as I expected. The strange thing was that the Tooth of the gear where hitting the end of the worm at end closest to the servo. On the InMoov forum this was discussed a few time but it seems not a lot of people experience this problem. I fixed it by using the file again. On the picture below you can see clearly the work I have to make it fit.

    schoulder3

    After this was done it was time to wear it in a little bit. I connected the servo and make it run for 30 minutes and cleaned it afterwards.

    schoulder4

    The gear and worm received a big amount of grease and the housing was closed. The potentiometer was mounted in the square PivPotentio part which is Ā available on Thingiverse at http://www.thingiverse.com/hairygael/collections/inmoov-parts-and-derivatives. I used a servo motor driver and current meter to see if it worked. At first it did work at it supposed to be and almost break the potentiometer on the right side. The two outside wires on potentiometer should be switched because the angle was measured the wrong way around.

    schoulder5

    A bit of hot glue to secure the wires and prevent the bare wires to touch each other.

    schoulder6

    Next the servo was put in the ServoHolster and the PistionClavi was mounted on the Servo.

    schoulder7

    Then the two parts where connected to each other with the two servoholder parts.

    schoulder8

    On the pictures below you can see the mounted parts on the torso. I also used the square version from potentiometer holder from Thingiverse.

    schoulder9

    schoulder10

    schoulder11

    schoulder9b

    The final result is with the two shoulders attached to the InMoov torso. This is nice progress.

    schoulder12

    Make sure you check the website fromĀ Gael Langevin at www.inmoov.fr.

  • 2 weekend print result

    2 weekend print result

    Because of a holiday Ā in Turkey I could not print for one week and wasn’t able to share the results with you.

    Printresults

    The picture shows a lot of parts.Ā From left to right and from top to bottom:

    • robpart3V3
    • robpart4V3
    • lowarmsideV1_square
    • rotawrist3V2
    • rotawrist2 (black part)
    • PivPotholderV21b (two black parts)
    • rotawrist1V3
    • cableholderwristV4
    • WristGearsV4 (3Ā gears)
    • PivPotentioV3 (4 black parts)
    • servo-pulleyX5

    I did redo the lowarmsideV1, PivPotentioV3 and the PivPotholderV21 because I used the original one at frist and used a Dremel to make it fit. The potentiometers fit great is this new design so I made four of them.

    Be sure you check the website fromĀ Gael Langevin at www.inmoov.fr.

  • More prints

    More prints

    This weekend my Ultimaker delivered 4 parts. The first part was the LowarmsideV1. I also did this part last weekend, but now I printed it with a square potentiometer mount. The designer of the inMoov, Gael Langevin pointed me to this pieceĀ on www.wevolver.comĀ last week. You can find this design on Thingiverse at www.thingiverse.com/hairygael/collections/inmoov-parts-and-derivatives.Ā I like it, because with the left arm I had to modifyĀ the hole with my Dremel.

    MorePrints

     

    In the picture above you can see from left to right and from top to bottom the following pieces.

    • elbowshaftgearV1
    • robpart5V3
    • LowarmsideV1
    • pistonbaseantiV1

    The robpart5V3 is a part for the lower arm and took me over 11 hours to print. I want a nice result so it takes a while. The result is nice. I only removed the print support from the robpart5V3. The parts came out the printer as shown on the picture.

    Be sure you check the website fromĀ Gael Langevin at www.inmoov.fr.