element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
PiCasso Design Challenge
  • Challenges & Projects
  • Design Challenges
  • PiCasso Design Challenge
  • More
  • Cancel
PiCasso Design Challenge
Blog Art-a-Tronic Episode 5
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: balearicdynamics
  • Date Created: 27 Mar 2019 10:46 PM Date Created
  • Views 2195 views
  • Likes 14 likes
  • Comments 9 comments
  • exhibition
  • picasso
  • mannequin
  • light
  • stepper motor
  • fire
  • motion control
  • challenge
  • raspberry pi 3 a+
  • arduino
  • art-a-tronic
Related
Recommended

Art-a-Tronic Episode 5

balearicdynamics
balearicdynamics
27 Mar 2019

  • Introduction
    • In the Meantime, at Depot09...
  • Components Roles
    • Arduino Role
    • Raspberry Pi 3B+ Role
  • Auduino Motor Control
    • Arduino Software
  • Bonus: The Emotions Light Inside
  • Previous Episodes
  • Next Episode

Introduction

image

In this fifth episode of the Art-a-Tronic Picasso challenge, I have finished the torso motion with Auduino. At this point, before going in depth in the details, it is important to see the global design of this antenna. I apologize to not reveal the global idea but when I started there was a member of incognita I were not sure how to solve. Until I have not opened (surgically, obviously) the mannequin it was not clear of the internal space, structure robustness and thickness, and other variables.

Now the roles between the Raspberry Pi3 B+ and the Andrino board are almost clear. to be fixed in an approximate scheme. If these posts will surprise you, consider that many steps involve a level of uncertainness and some choices need improvisation.

image

As shown in the scheme above I have decided to split the control of the automa (or droid? Or Borg? or simply mannequin? No idea) in two parts because of some tasks are better if delivered to a microcontroller instead of the Raspberry Pi itself and because I need to manage also some analog signals.

In the Meantime, at Depot09...

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Components Roles

image

 

Arduino Role

  • Control the lights of the NeoPixel ring
  • Control the torso rotation
  • Control the environment light intensity
  • Control the environment audio level and direction

The Arduino functions are called by the Raspberry Pi 3B+ through a USB-serial connection and a set of single-character commands. In the first experiments, I used an Arduino UNO R3 but I will definitely use an Arduino MKR 1010 so some behaviors of the mannequin can be controlled remotely through the Arduino IoT cloud.

image

 

Raspberry Pi 3B+ Role

image

The Pi act in this context as the brain of the system. It receives information from Arduino controlling the responses depending on the visitors and environment changes and interactions. For example, when a higher loud level is "heard" by one side, the torso will rotate to this direction until the audio level is balanced between left and right, as much as possible.

In the meantime, the Raspberry Pi will stream online the live camera replicated locally on a 5 inches HDMI display, part of the equipment of the Borg. To be honest, the mannequin is not a Borg but it will have a number of Borg-like technological implants.

The other way the Raspberry Pi 3B+ can interact is speaking sentences through the audio output and an amplified speaker. Moreover, when some condition occurs, the robot can express increasing her emotions.

The effect is created by a flame-simulating lamp inside of the torso controlled by one of the two relays of the Piface Digital 2 The system also detect when a user or an object is too near to the body thanks to a PIR sensor connected to one of the I/O pins of the Piface Digital 2.

 

Auduino Motor Control

The mannequin, when the transformation is complete should operate alone at the Art-a-Tronic exhibition. This means that I should take care that the system can run autonomously many hours. To be sure that rotation will start well after its daily power-on I have added another couple of 3D printed components to support an end-stop switch to reset the motor position. Accordingly, to the design, the torso will rotate 60 DEG with the mid-point at 30 DEG

imageimage

Arduino Software

The part of the software described here refers to the stepper motor control. As the movements will be controlled by a command set I have developed a series of functions to execute all the movements, including an initialization function. The initialization function search for the 0 DEG position corresponding to the end-stop switch, then execute a complete left-to-right rotation test and complete the cycle positioning the torso to the mid position.

The Arduino sources are available on GitHub at the following link: https://github.com/alicemirror/mannequin

typedef struct StepProfile {
  int torsoSpeed;
  int rotAngle;
  int lastAnglePos;
 };

 

The structure StepProfile contains the motion information updated by the Raspberry PI (via the serial commands) or remotely by the IoT cloud. By the way, this part will be discussed in detail in the Project14 post IoT in the cloud.

 

/**
 * Search the endstop switch moving to left then 
 * move to the middle and start accepting commands.
 * This function is used once on startup
 */
void setTorsoZero() {
  // Initialize the parameters for zero search
  torsoControl.rotAngle = 0;
  torsoControl.lastAnglePos = 0;
  torsoControl.torsoSpeed = SPEED_ZERO;

  // Search loop
  while(checkEndStop() == false) {
    torsoControl.rotAngle += SEARCH_ZERO_STEPS;
    moveTorso();
  } // Search loop
  torsoControl.lastAnglePos = MIN_ANGLE;
  torsoControl.torsoSpeed = SPEED_HIGH;
  torsoControl.rotAngle = MAX_ANGLE;
  moveTorso();
  torsoControl.torsoSpeed = SPEED_MED;
  torsoControl.rotAngle = MIN_ANGLE;
  moveTorso();
  torsoControl.torsoSpeed = SPEED_LOW;
  torsoControl.rotAngle = MAX_ANGLE / 2;
  moveTorso();
}

 

The initialization function SetTorsoZero() is emblematic as it includes the structure settings, as well as moving the motor for the testing cycle. You can see that the approach is to set or change one or more parameters then call the moverTorso() function.

 

/**
 * Move the motor to the new angle, if differs from the last.
 * The new position is the difference between the last angle and
 * the new rotation angle. The angle value is converted to motor
 * steps.
 */
void moveTorso() {
  if(torsoControl.rotAngle != torsoControl.lastAnglePos) {
    // Set the motion speed
    torsoStepper.setSpeed(torsoControl.torsoSpeed);
    //! Calculate the number of steps corresponding to the algebraic difference
    //! between the new angle and the current position
    int newAngle = torsoControl.rotAngle - torsoControl.lastAnglePos;
    
    //! Number of steps based on the new position    
    double moveSteps = 360 / STEPS_PER_REVOLUTION * ANGLE_DEMULTIPLIER * newAngle;
    
    // Move the motor testing the entire rotation range.
    torsoStepper.step(moveSteps);
    torsoControl.lastAnglePos = torsoControl.rotAngle;
  }
}

 

The moveTorso() function moves the torso accordingly with the parameters set, then update the structure based on the new parameters state.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Following this strategy, the move function can be called at any moment without risks. The next step in the Arduino software is creating the command parser and managing the other components.

 

Bonus: The Emotions Light Inside

The fire-simulating internal light, expressing emotions, has not been yet connected to the Piface Digital 2 relay but is fixed installed in place, inside the torso.

imageimage

imageimage

image

The video below shows the effect of testing the lamp inside the body.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Previous Episodes

  • Art-a-Tronic Episode 1
  • Art-a-Tronic Episode 2
  • Art-a-Tronic Episode 3
  • Art-a-Tronic Episode 4

Next Episode

  • Art-a-Tronic Episode 6
  • Art-a-Tronic Episode 7
  • Art-a-Tronic Episode 8
  • Art-a-Tronic Episode 9
  • Art-a-Tronic Episode 10
  • Art-a-Tronic Episode 11
  • Art-a-Tronic Episode 12
  • Art-a-Tronic Episode 13
  • Art-a-Tronic Episode 14
  • Art-a-Tronic Episode 15
  • Art-a-Tronic Episode 16
  • Sign in to reply

Top Comments

  • genebren
    genebren over 6 years ago +5
    Looking good (except for the picture with the missing eye, that was kind of creepy). The stepper motor seems to hum throughout the mannequin, have you thought of some sound deadening material? Keep up…
  • balearicdynamics
    balearicdynamics over 6 years ago in reply to genebren +5
    Hello Gene, about the loud, considering that the body does not move compulsively but has a certain logic, can be reduced but I have kept it just because it is part of the scenery. To be honest, I have…
  • dubbie
    dubbie over 6 years ago +2
    Enrico, I was watching the first of your videos and thinking 'are her *** lighting up?' and then thought surely not, must be some external lighting effect. Then it turns out you had installed internal…
Parents
  • DAB
    DAB over 6 years ago

    You are making good progress.

     

    You might want to add some insulation to damping the motor noise.

     

    DAB

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 6 years ago in reply to DAB

    Hello DAB,

     

    as I have already told to genebren I am not sure if I want. The camera grabbing images very near to the movement and the body full open makes a louder effect than normal. Then, in a normal context, this is the sound of the robot, and it is not moving continuously. This is a potential issue that I will eventually solve at the end of the project. For now I leave it then I will see if the loud is too high.

     

    One of the next videos I will try to make a test from a reasonable distance and see what is the result. Sure rotating the base vibrations are transmitted and amplified to the bottom.

     

    Enrico

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • balearicdynamics
    balearicdynamics over 6 years ago in reply to DAB

    Hello DAB,

     

    as I have already told to genebren I am not sure if I want. The camera grabbing images very near to the movement and the body full open makes a louder effect than normal. Then, in a normal context, this is the sound of the robot, and it is not moving continuously. This is a potential issue that I will eventually solve at the end of the project. For now I leave it then I will see if the loud is too high.

     

    One of the next videos I will try to make a test from a reasonable distance and see what is the result. Sure rotating the base vibrations are transmitted and amplified to the bottom.

     

    Enrico

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube