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
  • dubbie
    dubbie over 6 years ago

    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 lighting, it looks good. I once made a plaster-of-paris object once that had LEDs hidden inside. It worked surprisingly well considering the material is mostly plaster. I think I was trying to get my electrical/electronic students to think about 3D design and materials. In the end the University decided the plaster was a toxic substance and I couldn't use it.

     

    Are the eyes going to move? Because if they do it is really creepy. I have previously worked with Robothespian robots ( https://www.youtube.com/watch?v=CycD3e7UaDM  ) and if you don't interact with them for a while they go into a watching stage, where they watch you and follow your movements around the room with their eyes and head movements. It is very disconcerting if you are not familiar with it.

     

    Dubbie

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

    Hello Dubbie,

     

    Thank you for the question. The left eye (you now see empty) is an implant below there is the sketch I am 3D printing. It will contain the PI Camera and around another emotional expression (no rainbow) with a NeoPixel ring.

    image

    To make some intervention to the right eye there are two possibilities. The first is a small LCD that is the most realistic but considering the entire design of the system I will leave for last, at the moment I have no idea of what can be used to reach this scope. But - I repeat - it has a certain sense. More realistic will be a white ball but in this case, I should make the intervention with a lot of care as if I use a typical ping-pong ball and a rotation serve the result is just a scary machine like a Halloween project. And this is not what I want to achieve. It is a previous (and unique) vintage object where interventions should improve and in some way change the eve of this mannequin without compromising its own Original fascination.

    The eye is fixed but created with a lot of artistic effort, it seems really live and any change removing it with this natural translucent effect (it is not a design, it's a sort of acrylic covering over a hand made paint) is a pity in my opinion. At least I do not find a way to replace it with something very similar and moving. The try I will do instead is creating a shades/light effect with light from inside. I think this is more interesting.

     

    What do you think?

     

    I am also doubtful if the back head will be closed with the original piece or if it is better painting it with metallic paint. Probably I will leave it as-is.

     

    Enrico

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

    Enrico,

     

    I understand now why the eye was missing. I am sure you will come up with something good.

     

    One animatronic head that I was associated with (regretfully none of it was my design or construction) used prosthetic glass eyes, which look just like the real thing. Below is a link to actual glass eyes

     

    https://www.bbc.co.uk/news/magazine-17126713

     

    but these would very likely be very expensive. I am sure that there must be cheaper alternatives. It was some years ago now but I was shown a catalogue of several pages of different types of artificial eyeball, all different colours. When two eyes were installed in the head, which was just a wire frame outline and connected to move up/down and left/right using servos, it was freakily realistic. As people we are obviously attuned to look for the eyes in a face and can blank out the rest of the face or non-face as in my experience.

     

    Dubbie

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

    Dubbie,

     

    it is what I thought but I have not tried to find it... A realistic eye is the worth, totally different than the classic Halloween ball.

     

    So, to make the story short, you have convinced me and I decided to give a try.

     

    image

     

    Includes the support on the back, not stupid red veins and very nice.

     

    Enrico

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

    Dubbie,

     

    it is what I thought but I have not tried to find it... A realistic eye is the worth, totally different than the classic Halloween ball.

     

    So, to make the story short, you have convinced me and I decided to give a try.

     

    image

     

    Includes the support on the back, not stupid red veins and very nice.

     

    Enrico

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

    Enrico,

     

    I look forward to seeing these eyes installed and being realistic.

     

    Dubbie

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
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