Introduction: Smart Selfie With Arduino Esplora

This instructable is created by Rami Baddour, as a small prototype on how to setup the Arduino Esplora with couple of servo motors to remotely take pictures using your mobile's camera.

The name "Smart Selfie" was mentioned as a joke by an anonymous student participating in 10 year anniversary of the Universita della Svizzera italiana, where the prototype was first used, i liked it and adopted it.

-------

Originally, I was checking how to use the Arduino Esplora I/O Tinkerkit connectors to read/write from/to external sensors/actuators. Here we make use only of the two Esplora digital outputs together with some of the LCD socket pins. As both the Esplora outputs supports PWM signals, it is quite straight-forward to be used to control a low-power servo motor. Later, we needed to connect a third servo for the picture shot mechanism, and we did that with a nice trick.

We can control the speed of movement (with the Potentiometer), move up-down and left-right (using the joystick), fix position (Switch 2), take picture (Switch 1) and reset to initial position (Swtich 3).

Step 1: Prepare Hardware

For the project we need the following hardware:

  1. Arduino Esplora board
  2. Arduino Tinkerkit Servo Motor
  3. SparkFun Pan/Tilt Bracket including 2 Servos (or similar)
  4. Touch stylus tip
  5. Connection wires

For powering up the project, I used USB power to the Esplora, no need to external batteries (unless you wanted to).

Step 2: Fixing Parts:

Picture of Fixing Parts:

No special requirements here, just mount the bracelet to any stand which can handle the weight of your phone (I had to ask my minion for help ;) ) , and have it's front side free so the phone can move freely.

for the touch tip, tack all you need is only the rubber head (possibly with the metal ring around), and attach that to the head of your Tinkerkit servo's arm.

If you want, you can have extension cable (not necessary).. Thus, I fixed the servos' connectors aside on the mounting base for easiness of connection later.

Step 3: Connecting With Esplora

Picture of Connecting With Esplora

Basically, Arduino Esplora board has two Tinkerkit digital PWM outputs, connected to D3 and D11, each has three pin connector with (+5V, Data, GND) pins (in order from left to right). These two connectors will be used to control the two servos of the tilt/pan bracelet.

Note: take care of the pin order of your servos. usually, Tinker kit connectors has the data pin in the middle of Vcc and GND pins, while non-Tinkerkit servos has the order as (GND - Vcc - Data), so you may need to invert the Vcc and Data pins on your servo's connector.

Now, for the image shooting mechanism, we need additional servo, which basically will do only a 90 degree move back and forth to simulate a finger click on the. To do this, we need to exploit the Esplora LCD extension socket pins.

Here we will connect the third servo to GND, 5V and pin D1 (the first three bottom pins on the right socket).

Step 4: Code

In the code section, we programmed the following settings:

  • the initial angles on the X,Y servos are set to 90, 45 degrees in order.
  • to control the servos, you can use the Esplora joystick, the more you drag the joystick to the side the faster the servos will respond.
  • you can control the overall speed of the servos using the Esplora slider.
  • to tack a picture, click the joystick button
  • to return to default position, click Button1 (Switch 1) on the Esplora.
  • to reset to new default position, press Button1 for one second, you will hear a beep and the current position will be stored as the default position.
  • shutter mechanism (controlling the third servo over the pin D1) is done by simulating a PWM signal using counters and sending different trains of 0s and 1s of 20ms length to the output pin

Comments

Stephen LEE (author)2016-10-30

Wow! I made a similar minion called 'A smart JPEG Camera for home security'.

https://www.instructables.com/id/Smart-JPEG-Camera-for-Home-Security/

Hi Stephen, sorry for the late reply,

An excellent and interesting project of yours, your Raspberry PI minion will absolutely beat to death my photogenic minion ;)

studio1 (author)2015-02-25

Yes thank you it helped a lot I really liked this instructable keep up the good work

eng_r_baddour (author)studio12015-02-25

you are welcome :)

MsSweetSatisfaction (author)2014-12-13

So smart, and cute with the minion! Welcome to instructables, I would love to see more from you!

thanx for your comment, I am planning for more contribution to the amazing instructables society.

studio1 (author)eng_r_baddour2015-02-24

I used servos from radio shack uploaded code and nothing happened. am I doing something wrong help please

eng_r_baddour (author)studio12015-02-25

Hi,

most probably it is due to the servo's connections order, Esplora order (from left to right) is VCC-Data-GND, while most of the servos has the order GND-VCC-Data.

usually, the GND wire is black, the VCC is red (or orange) and the Data is yellow (or something else)

i hope this was useful

About This Instructable

4,738views

15favorites

Add instructable to: