Robotic eyes

Hi Everyone!!

Just like to say it's my first thread on hear but I have enjoyed reading through some that others have put on.

I am what they say a bit of a newbi in both Electronics and Picaxe and I'm looking for advice and guidance for a project I have in mind-

I am looking at making a set of robot eyes that will be fitted into a framed portrait.These eyes will be required to move from side to side with a steady motion.The idea is that when a sensor picks up the presence of a person the eyes follow them as they walk by.

My initial idea was to use IR. sensors and limit the angle of view on them and I thought if I had enough of the side by side I just might be able to get the steady movement I am looking for.

Someone suggested to me that I use 1 Laser IR. fitted to a stepper motor that scans the area.Once the sensor picks up a person it send a signal to a microchip.The chip calculates at what degree the sensor picked up the person and then moves the eyes that are fitted to another stepper.The laser would scan quick enough to update the signal to the chip and hopefully the eyes would move with a steady motion.

A picaxe chip was suggested for the programme but like I said I am very new to this and wouldn't know where to start on this.

I do see this as a very good project to start from and who knows where it will lead to!!

If anyone would be kind enough to guide and advise me I would be very grateful for any help.

Cheers wombweller
 
Last edited:

BeanieBots

Moderator
Welcome to the forum.

IMHO, you have picked a tricky project for your first bearing in mind your experience.
Linear, object detection and tracking is NOT a simple task.

One option for you might be to get a CmuCAM.
Essentially it's a camera with all the required software on-board for tracking. Its output drives servos directly.

A PICAXE solution should be possible using just two range finders.
I'd suggest the Sharp range of analogue IR sensors.
Fit one sensor each side of the 'frame'.
By measuring the difference between the two sensors, it should be possible to estimate the distnace from each one and hence where the 'person' is relative to center. Then use a servo to drive the eye's position.

It's a bit like the reverse operation of an object avoiding robot.
For some insights, have a look at my Hexapod thread in the robotics section.

Start simple.
First get your PICAXE to move the eyes in a contolled but fixed manner.
Then try out different sensors.
Then hook it all up together.

And don't forget, we're here to help along the way.
 
Welcome to the forum...
Cheers!! good to be here.


IMHO, you have picked a tricky project for your first bearing in mind your experience.
Linear, object detection and tracking is NOT a simple task.

One option for you might be to get a CmuCAM.
Essentially it's a camera with all the required software on-board for tracking. Its output drives servos directly..
yea I think your right id have picked a difficult one!! it did start off pretty simple as I was going to use a line of IR. sensors but it became apparent that this would not give me the steady motion I wanted.

The CmuCAM looks pretty good but it is quite expensive!!!



A PICAXE solution should be possible using just two range finders.
I'd suggest the Sharp range of analogue IR sensors.
Fit one sensor each side of the 'frame'.
By measuring the difference between the two sensors, it should be possible to estimate the distnace from each one and hence where the 'person' is relative to center. Then use a servo to drive the eye's position.

It's a bit like the reverse operation of an object avoiding robot.
For some insights, have a look at my Hexapod thread in the robotics section..

I did look at those sharp sensors and they do seem to be very popular!! Once again it's not the hardware but the software that's the problem.

I have searched the net high and low for guidance on writing a programme that will do what you suggest or similar, unfortunately this did not go as I hopped it wood and I found nothing.
It's very difficult when you first begin as knowing what you should be doing is even difficult.


Start simple.
First get your PICAXE to move the eyes in a contolled but fixed manner.
Then try out different sensors.
Then hook it all up together..
I think your right!! I have downloaded the Picaxe programming software so will read through that first off.
I do have to make the parts to make the eyes move but did want to wait until I had a method in my mind.
Do I use servo's,stepper motors or just a small motor??? I don't really know just yet as some methods are better than others.There will also be a noise issue and I think I make get some noise from the servo's

Once a motor is decided I have to start looking at a programme!! where do I start with this?


And don't forget, we're here to help along the way.
That's most kind!! thanks!!

Off now to look at you Hexapod thread.

Cheers wombweller
 
Hopefully better than this ! http://superpunch.blogspot.com/2008/11/homemade-portrait-with-moving-eyes.html

Sort of thing you'd get in a Carry on film (Carry on screaming??) !

I think it's likely to be very difficult to get the eyes to follow someone. Perhaps just make the eyes move in a 'random' sequence when there is noise, or if someone is just in the room ??

Hi Jeremy

One would like to hope that the final version will be better!!!

What you sugest is good for version 2 for added effect. I do like the simplicity of what I'm looking to do, just wished the build was easy!

It all started as a bit of fun, like they do trouble is is these things don't always turn out as simple as one first expected.

My electronics experiance at the moment is- I've built about three projects- a 6 digit clock with temp a 30 sec pulse circuit for slave clocks and a callender circuit for analouge display, Basic but yet fun!! the simple one "this project" turns out to be the most complecated of all.The best thing is this project cabn have multiple uses, if I can get me head around it!!

Cheers wombweller!!
 

BeanieBots

Moderator
By far the simplest to control would be hobby servos.
For the mechanics (inc. very realistic eyes) consider gutting a "furbie" or a "gigabot".

As for the code, before writing anything down as lines of software, you need to "solve the problem".
Once you know what the software needs to do, there will be plenty of advice available on how to make it do what you want.

If you have a look at my Hexapod code, you will see that it is not particularly complex in terms of function.
If an object is detected on the left, the left legs are made to pace a little longer and the right legs a little shorter. The result is biased walk to the right thus avoiding the object. The closer the oject gets, the larger the adjustment made. Pretty much the same issue you have.

The CmuCAM is expensive because of the software that comes with it.
It's quite a sophisticated piece of kit. In real terms, it's actually quite cheap when you consider what you are getting for your money.
 
have a look at my Hexapod code, you will see that it is not particularly complex in terms of function.
If an object is detected on the left, the left legs are made to pace a little longer and the right legs a little shorter. The result is biased walk to the right thus avoiding the object. The closer the oject gets, the larger the adjustment made. Pretty much the same issue you have.

Please point me to the code.I looked at your thread and I don't think I see the whole code.
 
Hopefully better than this ! http://superpunch.blogspot.com/2008/11/homemade-portrait-with-moving-eyes.html

Sort of thing you'd get in a Carry on film (Carry on screaming??) !

I think it's likely to be very difficult to get the eyes to follow someone. Perhaps just make the eyes move in a 'random' sequence when there is noise, or if someone is just in the room ??

Hi Jeremy

Actually on second inspection I do like the look of this!! the 'kiss' method sometimes is best but not always.

Cheers!!
 
By far the simplest to control would be hobby servos.
For the mechanics (inc. very realistic eyes) consider gutting a "furbie" or a "gigabot".

As for the code, before writing anything down as lines of software, you need to "solve the problem".
Once you know what the software needs to do, there will be plenty of advice available on how to make it do what you want.

If you have a look at my Hexapod code, you will see that it is not particularly complex in terms of function.
If an object is detected on the left, the left legs are made to pace a little longer and the right legs a little shorter. The result is biased walk to the right thus avoiding the object. The closer the oject gets, the larger the adjustment made. Pretty much the same issue you have.

The CmuCAM is expensive because of the software that comes with it.
It's quite a sophisticated piece of kit. In real terms, it's actually quite cheap when you consider what you are getting for your money.
Hi again!

Ok now it's time to start looking at some parts to purchase but before I do I will need some advice!

Those Sharp range finders!! would I be able to mount these behind the picture and still achieve the field of view I want? must keep these discrete.

Also I need a parts list if anyone can help-

1) Sharp range finder (need to be able to sense around 60" ish)

2) servo (Will any other methods of moving the eyes work ie. small motor or solenoid)??

3) bits and bobs for construction ie. wire glue and maybe a couple of ping-pong balls to represent the eyes) just for test purposes I might add!!

4) Anything you can suggest???

Where in the UK. is a good palce to get myself a picaxe starter kit and what version do I need?

I didn't think when I started this I would be getting in to Picaxe and robotics!! getting exciting though.

Cheers!!
 
Last edited:

eclectic

Moderator
Actually, with a few modifications, you could source the lot from Rev-Ed

Main change would be using the SFF05 ultrasonic rangefinder.

All the other bits are in the rev-Ed store.

e
 

Rickharris

Senior Member
IF you can get a SFF05 to track an object by mounting it on a servo then making the mechanical link to the eyeballs is relativly simple.

I have tracked objects before by simply jumping left and seeing if the object is still detecte if not jump back and then jump right. It works although makes for a jerky movement and the beam width of the SFF05 is perhaps a bit wide to give the smooth movement that may be required.
 

BeanieBots

Moderator
For the movement, nothing comes easier than a hobby servo.
It's all done for you. Just tell it where you want it to go. (servo command).

Stepper motors would arguably be the next best in terms of simplicity.
You would need 4 output pins driving a suitable driver chip (ULN2308 or similar which is fitted to many PICAXE dev boards). Your program would need to keep track of both the output pattern and how many steps had been made. You would also need a 'home' sensor so that you knew where you were when first powered up.

All other methods would require a drive circuit AND a position feedback circuit AND a knowledge of how to design a software 'servo' which is not simple with the limited maths and speed of a PICAXE.

The choice is yours but given your experince IMHO hobby servo is the ONLY option for you.

The sensor part is trick.
None of the "off the shelf" options will particulary descrete.
Hiding any sensor behind any sort of 'camoflage' will compromise its performance. The angle it 'looks' out at is also quite critical, so they can't be simply mounted flush with your frame.

The Sharp sensors are probably the smallest.
Ultrasosnic are significantly larger and require a MUCH larger area to 'view' the 'object' but they do offer far more range and flexibility.

Homebrew is not out of the question but you would need to spend a LOT of time experimenting with both setup and an assortment of different transmitter and receiver devices. It would take several weeks (totally dedicated) to produce anything even comparable to that already done by one of the Sharp modules. You would learn a lot about optics along the way though and in particular, what doesn't work and why.

Which PICAXE dev-board depends a lot on which way you decide to go.
I believe, it COULD be done with the humble 08M if you use hobby servos and only have left/right. If you want up/down as well, then you should be looking at a larger device. The 18X should be up to the task but would require a little extra ingenuity and circuitry to read in the data from (absolute minimum) of three sensors.

Personally, and particularly if you ever want to take things further, I'd go for the AXE020 and the servo upgrade option. You could get the servo upgrade parts cheaper if you shopped around but that would also require knowing what to look for and where to look. Once upgraded, the AXE020 can drive up to eight servos which you can get from any RC hobby store. There have a few posts recently with links to cheap sources. The RCgroups forum can also help in that area.

Remember, keep it simple to start with.
Getting the eyes to move where you want them to go should only take an hour or so of work if you opt for hobby servos.

Reading the sensors and determining how to convert that information into a position demand will be the next challenge.

The sensors themselves will be the biggest challenge.
You could spend a lot of time on these and then some more trying to 'hide' them.
 

QuIcK

Senior Member
IF you can get a SFF05 to track an object by mounting it on a servo then making the mechanical link to the eyeballs is relativly simple.

I have tracked objects before by simply jumping left and seeing if the object is still detecte if not jump back and then jump right. It works although makes for a jerky movement and the beam width of the SFF05 is perhaps a bit wide to give the smooth movement that may be required.
mayb use this and an elastic link between the eyes and the servo...
would stop the eyes from jerking, as the elastic link would act as a low-pass filter.
a rubber band or something?
 

Attachments

Rickharris

Senior Member
Of course the sensor system doesn't have to be mounted in the picture it could be anywhere e.g. disguised as a PIR burglar alarm sensor - you just need to correct the relative movement.
 
Hi all

thanks you lot your very helpful!! I will take the advice given and in the first instance get myself some Hobby servo's as I think they will prove to be very useful.I will also purchase myself a Picaxe development board, some chips and the sharp sensors,this will then at least get me going.

Beaniebots!! your advice on construction is well received and when I get the parts it will good to try these out.

Rickharris!! you might end up being right with that.I would like to keep it integral to the picture but it may prove to be easier to con-seal in something else!!!

I've just spent part of the afternoon reading through the Picaxe guide notes and there are many interesting opportunities for me once we get the hardware!!

Once I get some parts to play with I will give you a shout.!!!

Once again cheers!!

If you come up with anymore advice please let me know:)

Regards Mark
 
Last edited:

BCJKiwi

Senior Member
Perhaps if there were two heads in the picture, one sensor could be mounted in one eye of one head and the other sensor in an eye in the the other head thus getting adequate separation between the sensors (unless they are up to the task in the same head) - after all this is how we work!
 

krypton_john

Senior Member
I think this could be done quite simply and effectively by trying not to be too clever!

A couple of narrow focus PIR sensors and just move the the eyes to the side that triggers first and then move them to the other side when that triggers.

It doesn't have to be perfect or even good. It's all in the perception.
 

BeanieBots

Moderator
I think this could be done quite simply and effectively by trying not to be too clever!
It doesn't have to be perfect or even good. It's all in the perception.
Absolutely.
It needs to look clever, not BE clever.

Robotics which really are clever are seldom appreciated by a non-technical audience.

The most impressive robotic demo I ever gave was a complete con.
It was a Dalek which had voice recognition. Sure, that bit was clever, but many people who have no idea of the technology involved actually think that bit is easy. Same with face recognition. They can do it so easily themselves, they don't understand why a robot can't do it.

Anyway, cut a long story short. The Dalek was in front of an audience.
During the event, various members of the audience were asked to participate in parts of the demo. This included asking their names and making a mental note of where they were sitting.

Later on, I asked the Dalek "where is Jane" and he pointed right at her.
I then said, "point to Peter" and he obediently pointed straight to him. He even got it right when I said "locate the headmaster".

How was that done. Simple.
The Dalek understood a total of 15 pre-programmed words.
Three of those words were where, point and locate

I knew where those people were. The Dalek simply identified a fixed location determined by those trigger words.
 
Absolutely.
It needs to look clever, not BE clever.

Robotics which really are clever are seldom appreciated by a non-technical audience.

The most impressive robotic demo I ever gave was a complete con.
It was a Dalek which had voice recognition. Sure, that bit was clever, but many people who have no idea of the technology involved actually think that bit is easy. Same with face recognition. They can do it so easily themselves, they don't understand why a robot can't do it.

Anyway, cut a long story short. The Dalek was in front of an audience.
During the event, various members of the audience were asked to participate in parts of the demo. This included asking their names and making a mental note of where they were sitting.

Later on, I asked the Dalek "where is Jane" and he pointed right at her.
I then said, "point to Peter" and he obediently pointed straight to him. He even got it right when I said "locate the headmaster".

How was that done. Simple.
The Dalek understood a total of 15 pre-programmed words.
Three of those words were where, point and locate

I knew where those people were. The Dalek simply identified a fixed location determined by those trigger words.

H ha!!! you should be a Magician!!

Think your Dalek sounds better than the real ones and lets face it they were very simple but yet very effective!!

I've seen this type of effect with coloured light or pegs looks amazing from the outside but the trick is the predetermined routine.

Ok I will try and keep it simple but to be honest I don't think I can do much more than that at this stage!!

Question is what is simple? simple for someone without any picaxe knowledge would be much simpler than for someone who was quite knowledgeable.

I was in the first instance going to just use say two PIR. sensors but I was a bit worried about the steady movement of the eyes.But when Jeremy showed me this one-
http://superpunch.blogspot.com/2008/11/homemade-portrait-with-moving-eyes.html

http://www.flickr.com/photos/lorier/sets/72157607333844674/

This one is actually simple and the flow of the eyes steady,not sure what type of sencing they do??? but it does look ok.

I was and am looking for a more advanced version ,one that may take time to do (for me that is) but will be worth the effort.I'm not looking for Military tracking but something that works well.


Cheers to all.:)
 
Last edited:

BeanieBots

Moderator
What I mean by simple is don't try to make a set of eyes which track a person as your first project.
First, make a set of eyes that you can make go to a chosen position.
Once you are totally happy that you have no issues with that, move on but not before.
Then make a project which can detect distance from object.
Then double it and try to determine postion. (just as a number).
Then you can add in the eye movement with 100% confidence that if something is not working quite as you like, it's got nothing to do with driving the eyes because you already had that bit fully tried and tested earlier.
 

hippy

Ex-Staff (retired)
Also don't forget to try randomly sweeping the eyes, no PIR / IR needed. It's amazing what correlations people will make even when there really is none.
 
What I mean by simple is don't try to make a set of eyes which track a person as your first project.
First, make a set of eyes that you can make go to a chosen position.
Once you are totally happy that you have no issues with that, move on but not before.
Then make a project which can detect distance from object.
Then double it and try to determine postion. (just as a number).
Then you can add in the eye movement with 100% confidence that if something is not working quite as you like, it's got nothing to do with driving the eyes because you already had that bit fully tried and tested earlier.

Hi Beanibots

I 100% agree with your advice on this.It is good advice and will be good for me to follow.With that I have a few goals than can be individually completed and overcome.It's good to have a path to follow rather than jump in feet first.

Cheers!!
 

eclectic

Moderator
Following Hippy's post #25.

One motion detector.
Eyes flicker for 5-10 seconds,
then back to centre, all innocent.

The Punter gets the creeps. :)

"Were those eyes following me, or not?"

e
 
Following Hippy's post #25.

One motion detector.
Eyes flicker for 5-10 seconds,
then back to centre, all innocent.

The Punter gets the creeps. :)

"Were those eyes following me, or not?"

e
Ha ha!! perhaps I should do this as a self portrait or one of my kids and give it to my Mum.The kick would be worth it but I'm not sure if it would send her over the edge.
Think Nick Cotton (enders) should do one for Dott!!

Cheers!!
 

Jeremy Leach

Senior Member
Or perhaps, you could do the random thing but maximise the chance of it looking real by picking a few prime positions and randomly focussing the eyes on those for a few seconds each? For instance if there's a doorway then focus on the doorway. If there's a TV focus on that etc. Gives me the creeps just thinking about it ! I can imagine people looking at what 'the eyes' are looking at, just to check what's going on !
 
Last edited:
Or perhaps, you could do the random thing but maximise the chance of it looking real by picking a few prime positions and randomly focussing the eyes on those for a few seconds each? For instance if there's a doorway then focus on the doorway. If there's a TV focus on that etc. Gives me the creeps just thinking about it ! I can imagine people looking at what 'the eyes' are looking at, just to check what's going on !
Hi jeremy

For those of us that can remember Hammer house of Horror that's the sort of thing that would get us on the edge of our seat!! believe me I was too, simple but effective!!

The best spooky films are the ones with a good story, the ones that play on our internal fears and emotions. 'The Blair witch Project' is a good example in one instance a crappy film but in another it plays on the fears most of us have.

I do agree that the effect may be more important than the technology.
I will start off simple as advised and see what comes of it.

Cheers!!
 

eclectic

Moderator
Introduce some delays.

Second scenario.

1. Punter enters. Eyes flicker for ~10 sec, then go all innocent.

2.Punter moves. Eyes move slowly for ~ 5 sec.

3.Punter clocks it. Moves carefully. Nothing happens, for about 5 seconds.

4.Then, the eyes gently move once, from left to right, then back.
(Cue creepy music).

IF the Punter's still in the room,

5.Then the eyes move slowly from side to side, occasionally stopping.

Punter gets screamin' Ab-Dabs!

e


Edit. Finale.
OR, how about moving just one eye?
 
Last edited:

hippy

Ex-Staff (retired)
The best spooky films are the ones with a good story, the ones that play on our internal fears and emotions.
Then there's the ones where something jumps out the box / cupboard / John Hurt :)

Alien actually uses some very clever subconscious trickery. If you turn the sound up, in the build up to the jump out your seat moment there is a slow steady heart beat in the background. The rate starts off slow then builds up in speed to the moment of impact, and of course you synchronise to it. Watch with the sound turned off and you notice how much tension comes through that effect.

Ever wondered why ER seemed so realistic compared to other TV drama ?

It's all about people walking between camera and the actors, just like happens in real life but rarely in the studio. You can count them off and you'll be surprised how high a count can go in an episode. Don't count those crossing in the background that's almost continuous in each shot. A pure choreographic art form.
 
Picaxe m's and x's and chip codes

Hi

I've been looking at ordering some bits and bobs from techsupplies

http://194.201.138.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies

and was looking at what was suggested-

AXE020 28 pin project board £ 9.99
AXE030 servo upgrade pack £13.00
GBX010 servo £12.00
AXE005U-20M Starter Pack (USB) £16.49
Also some chips!! (I was looking at the 18x but wanted some different ones)

When looking through the Picaxe chips I came across all sorts of coding like

20m and 18x this just confused me in to not knowing what I need again.

The project board, servo upgrade and servo are self explanatory!!

Can you please explain a good starter pack one preferably than can use most pin no's and also the chip's m's,x's??

Should I get a starter pack or make my own development board.As I said before I am used to electronics and working from bread boards and with all my IC. projects I start from the bread board.

Cheers!!
 

Andrew Cowan

Senior Member
If you want to start from scratch and do lots of experimenting, I would get the axe090 experimenteters kit (with USB download lead), along with:
one 08M
one 18X
one 28X2

I've also PMed you.

I'd start with that, and buy more stuff once you are awesome with all aspects of what you want to do.

A
 
Last edited:

BeanieBots

Moderator
As you say, the AXE020 and servo upgrade are a must for your project.
You will also need an AXE027 programming lead (assuming you have USB on your PC).

Anything else really depends on how far you want to go and what else you want to do.
I find the AXE033 2X16 char LCD display an absolute god-send for many projects. If you wire it up with a servo lead and use it in serial mode, it will plug straight onto the AXE020 once it's been "servo upgraded".

This starter pack includes the AXE020 and AXE027 cable.
http://194.201.138.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies/Products/AXE001U

A 28X2 is probably over-kill. I'd suggest sticking with the 28X1 for now.

Whilst I'd normally promote Rev-Ed's products, I have to say that their servo are rather expensive. You might like to have a browse around for a better deal. A servo like that should around £5.
Try here for starters:-
http://www.rcmdirect.co.uk/store/index.php?main_page=index&cPath=71&sort=20a&page=1

You might also want to consider micro-servos if you are working in a confined space.
 
Last edited:
If you want to start from scratch and do lots of experimenting, I would get the axe090 experimenteters kit (with USB download lead), along with:
one 08M
one 18X
one 28X2

I've also PMed you.

I'd start with that, and buy more stuff once you are awesome with all aspects of what you want to do.

A

Cheers for the info!!

The board looks ok!! but why do they list the chips as M,X and X2 and so on?

I will wait for more advice to come in before I start purchasing.

Cheers
 
As you say, the AXE020 and servo upgrade are a must for your project.
You will also need an AXE027 programming lead (assuming you have USB on your PC)..
Yes I do!!

Anything else really depends on how far you want to go and what else you want to do.
I find the AXE033 2X16 char LCD display an absolute god-send for many projects. If you wire it up with a servo lead and use it in serial mode, it will plug straight onto the AXE020 once it's been "servo upgraded". .
Sounds like fun but wouldn't know what to do with it at this stage!!

Typical example with this one Beanie!! I would have never known that this was a AXE020, obviusly they changed the codes for the extra's within the pack.


Whilst I'd normally promote Rev-Ed's products, I have to say that their servo are rather expensive. You might like to have a browse around for a better deal. A servo like that should around £5.
Try here for starters:-
http://www.rcmdirect.co.uk/store/index.php?main_page=index&cPath=71&sort=20a&page=1
Always good to know where we can get alternatives.

Cheers for the info!!
 
Top