Detecting smartphone proximity

Go To Last Post
37 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

i am developing application in which i have to detect if smarphone is inserted into narrow(1cm/0.4inch) slot. So far i was using a switch whit long lever, that was pushed if the phone was inserted. But now i want to make the thing more "high end" and avoid scratching the phone whit switch, so i am thinking of adding an capacitance or inductive sensing idea, to detect phone or its battery field. I was thinking that if i would design a pcb whit a coil printed on it, whit a small ferro element in the middle of coil, could that detect phone? In theory the coil should detect the battery`s field, right? 

I cant use any optical transmitter and detector since i have room only on one side of the slot to install electronics.

 

In the attached picture is a drawing of the slot where smartphone is inserted. There is no metal or anything beetwen sensing pcb and the phone, only thin plastic layer.

Thanks in advance for any help.

Slot diagram

Last Edited: Wed. Sep 13, 2017 - 12:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:
I cant use any optical transmitter and detector since i have room only on one side of the slot to install electronics.

Put both transmitter and receiver on same side then, with a mirroring strip of metal tape on the opposite side.

 

If you want "high-tech" then NFC might cater for a cool application.

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:

I cant use any optical transmitter and detector since i have room only on one side of the slot to install electronics.

 

You can. You use the reflection off the phone so that the emitter and detector are the same side of the case.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
Put both transmitter and receiver on same side then, with a mirroring strip of metal tape on the opposite side.

 

+1

 

Jim

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh yea, i was thinking of distance sensing sensors which dont work on such short distances, but if i use other side of slot as reflective surface(inner slot is made of high polished metal) and put receiver and transmiter on side that might just work. But the light could also reflect from phone when inserted. The thing is that slot is specifically 18mm wide and most new smartphones are around 8-10mm, so the phone could still reflect signal in that 10mm space to receiver from transmitter. Especially if it would be facing whit screen towards the receiver/transmitter side. I have to know if the light is reflected from otehr side of slot or from phone and i think that is hard to do in such small gap.

I kinda wish to detect battery field to assure that the item inserted into slot really is really a phone and not jsut some stuff taht would activate the sensor.

Last Edited: Wed. Sep 13, 2017 - 01:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Please explain what you mean by "battery field". 

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:

...(inner slot is made of high polished metal...

 

Does it have to be? Can you not print a matt black area opposite the emitter/detector.

'This forum helps those who help themselves.'

 

pragmatic  adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical consideration.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:
 But the light could also reflect from phone when inserted

So put your emitter & detector at  suitable distance & angle so that only the reflection from the far wall will be detected.

 

battery field

Eh??

 

As already noted, NFC could be used - but not all phones have NFC; also, I think it would need an app on the phone to enable it and/or have it respond appropriately.

Could you stick a tag on the phones that are required to work with this?

 

How about Bluetooth Low Energy (aka BT LE; BLE; Bluetooth smart)? I think BLE is pretty much ubiquitous these days.

Again, an App would be required.

And BLE is far less precise in "proximity" - so you'd probably also want the optical or mechanical detection ...

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A microswitch could still be used, without scratching the phone. Just arrange it so that it is in the bottom of this "cradle" being pressed down [1] by the lower edge of the phone. Also, there are microswitches that have a small rolling wheel for the physical connection with the "outer world", the rolling wheel will likely not scratch the phone.

 

Could we get some kind of hint as to what the whole contraption is to be used for?

Just "controlled storage"? (If so, what stops someone from just inserting a thick piece of cardboard or something similar?)

Charging? (Why would sensing the phone be necessary?)

Is this a "lock" off some kind? (Again, wouldn't something more sophisticated than "sensing some undetermined object" be needed?)

 


 

[1] assuming the whole thing is arranged so that the phone is inserted "standing up" / vertically, from the top of the cradle.

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The project is kind of a hush down low, so i cant give any specific informations. The thing you pointed out is excatly why i try to detect battery field, instead of putting in microswitch, cuz it is harder to fool(cardboard for microswitch). The point of the device is to detect when a smartphone is in the slot, and it most be very hard to fool. The device is gonna be setup in public areas. 

So far i made some progress by banging together simple circuit that detects the EMF generated by the smarphone as static on an analog input of adc converter. I instaled a simple coper layer on the side of slot, and another one that is grounded so it receives EEMF only from the side where smartphone is, added R to the ground and i detect EMF on sense copper layer, load that into capacitor to provide some more constant input and measure it.

So far i managed to distinguis beetwen EMF of human body and the one of several different smartphones. Also the point of the whole device is that the phone has to be in the slot for like 30 to 50 min, so in any case, if you tried to fool the sensor part whit body EMF, nobody is going to stick its finger into a 18mm hole for 30min. 

Only problem is that when you put the phone into slot the EMF change is high, and after some time it settles down to minimal difference. I fixed that by sending 3.3V pulses on the sense copper layer that kinda "reinitializes" EMF so the reading is high again. Whole thing is also battery powered, so this EMF sensing is so far the best solution, bcs in addition to only sensing EMF of phones, it also drawes much less current then an optical sensor or someting similar. 

Now im waiting for whole device case to arrive to insert all the electronics, batterys and everything into it (8x8x8cm space) and to test if this EMF measuring is even viable whit all that electronic stuff and batterys in such small compartment. If this proves not to be reliable enough, i will jsut go whit a roller micro switch.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:
The project is kind of a hush down low, so i cant give any specific informations.

So why are you posting in a public forum at all?!

 

cheeky

 

Seriously, though, you must understand how difficult that makes it: how can we possibly give appropriate & relevant suggestions when we don't know what you're trying to achieve?!

 

You still haven't said what you mean by "battery field" - it makes no sense!

 

The point of the device is to detect when a smartphone is in the slot, and it most be very hard to fool.

Why would anyone want to fool it? What would they gain by that?

 

The device is gonna be setup in public areas. 

Then you really want something that will work by design - not just by luck.

 

detects the EMF generated by the smarphone as static on an analog input

That really sounds like you are relying on luck.

 

How can you possibly guarantee that all possible smartphones will generate the same "static" to trigger this detector?

 

This sounds like a classic example of something that will "work" (sic) on the bench with a couple of specific handsets, but will fail miserably in Real Life because of the vast variations in real phones - even phones of the same make & model.

 

 

nobody is going to stick its finger into a 18mm hole for 30min. 

Simple use of multiple switches should be able to distinguish fingers quite easily?

 

drawes much less current then an optical sensor or someting similar. 

You just need to think more carefully about your design - it should be possible to design a low-power optical sensor.

 

What about all the other suggestions that have been made:

 

  • BLE
  • NFC

 

If the phones in question have wireless charging, you could detect that?

 

If you can require the users to install an App, you could have the phone identify itself by beeping, vibrating, flashing something on the screen, etc, etc, ...

 

Last Edited: Thu. Sep 14, 2017 - 08:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In #1, Klemko wrote:
narrow(1cm/0.4inch) slot
 

In #10 Klemko wrote:
18mm hole

 

So the slot is getting wider?

 

Note that many people have their phone in some sort of sleeve or case - are you sure that 10mm (or even 18mm) is going to allow for that ... ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, designers widend it due to many cases that users use. We did some testing and 18mm gap is wide enought for 23 out of 25 cases we tried. The other two were like 25mm wide and are very rarely sold.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, if you're not interested in "rare" phones why not go for NFC?

 

Try fooling your system by inserting a powebank into it.

 

You say it must be very hard to fool but end up admitting you can accept to fall back to the microswitch. Makes no sense.. 

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well i am trying to detect smarphone elctromagnetic field, isntead of microswitch.

 

Well if the users manage to fool the system, they would be able to obtain some items, which are actualy free and worthless, both it defies the point of puting the phone into the slot, in order to obtain those items.

 

Yes thats why we i am gonan test this EM field sensor in same areas and unless it proves out to be 100% reliable, i am gonan stick whit simple roller microswitch. We are gonan produce 20 of TEST device and put them in public for users to use for couple of days. Each slot will be equped whit microswitch and also a EM sensing part. The prototypes will be strategcly placed, for example: on sunny spot, near a power outlet, close ot each other and so on, and after couple of days i am gonan retrieve data from them and see how relaible the EM sensing is.

 

It doesnt have to be same, jsut above minimum range and not crazy high. The thing is that i do not 100% understand the phenomena, but i tested this first version of PCB whit tens of smartphones and all emmited an arbitrary value of 120 to 200, while every other piece of elcetornics, wiring, instalations, screens, audio speakers, inlucind human body, emitted valuse of a 700+. 

 

 

The thing is that in each device there will be up to 4 or 2 phones, like 2 cm apart to each other, so BLE or NFC falls right out. 

 

Thank you a looot for this idea, an App could really be a great idea. So now i have EM sensing option to be tested, and then a microswitch and a App as a 10=% working plan B.

 

 

Thanks again to all for your help and thoughts about it :D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Immunity to fooling is only a perk that is not requier as a must have. For the customers the microswitch idea is perfectly fine, i am just thinking about possible improvements that could be done to make whole product better.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't see that relying upon a totally unspecified and unquantifiable thing like EM noise from the phone can in any way be an "improvement" on something as definite & reliable as a microswitch!

 

IF you're worrying about NFC interaction between phones, I can't see how the EM noise approach can possibly be any better?!

 

Why is there a need for the punters to leave their phones at all? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Problem whit NFC is that not every phone has it.

That is why i will be testing different approaches simultaneous, too see how reliably each idea is. In 7 days span, i shoudl get around 500 to 700 uses of devices, taking outputs of microswithcces as control groupd and comparing optical sensors and EM ouputs to them, to see accuracy. :D

 

 

Last Edited: Thu. Sep 14, 2017 - 11:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:
Problem whit NFC is that not every phone has it.

Yes, that has already been noted - you hadn't previously objected.

 

You didn't answer:

Why is there a need for the punters to leave their phones at all? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You didn't answer:

Why is there a need for the punters to leave their phones at all? 

Could be the phone is a deposit or used to switch something on like electricity in a hotel room.  However everything you think of will have a way round (like using tea/coffee spoons in the room card slot).  If you use NFC or similar to make the detection more difficult to spoof then if the reward is worth it someone will hack it.

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DAFlippers wrote:

You didn't answer:

Why is there a need for the punters to leave their phones at all? 

Could be the phone is a deposit or used to switch something on like electricity in a hotel room.

 

But, in #15, Klemko wrote:
obtain some items, which are actualy free and worthless 

Why would you leave a high-value item like a smartphone just to get something worthless?!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In #10, Klemko wrote:
it most be very hard to fool
 

But in #16, Klemko wrote:
Immunity to fooling is only a perk that is not requier as a must have
 

 

Confused!

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Only fools would leave their smartphones in some contraption in return for free, worthless items. is this product being funded by your royal Nigerian friend?

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"A fool and his smartphone are easily parted" ... ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

Based on a search I did,  I sent a PM to the OP.  If this is what I think it's for I kind of get the secrecy, but it's overkill for sure.  Nothing sinister going on.

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The customer would not leave the phone there and then left. Customers are there whit the phone, the phone is just used similar like a switch or an indicator of the human presence.

Why do they have to use the phone as an siwtch/indicator, instead of a hundered of other ways, is beyond me, but it is what the person who ordered the device wants.

Last Edited: Fri. Sep 15, 2017 - 07:40 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:
it is what the person who ordered the device wants.

Ah - OK.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While I have no experience of designing consumer-level products, a couple of thoughts spring to mind.

 

  • Ultrasonic distance sensors - is anything available that could tell the difference between 18mm and 0mm?
  • Can you put electronics in to the base of the unit? Use a standard emitter / detector but have them mounted at 45 degrees with an emitter in the base of the unit and the detector in the side?

 

Cheers,

Adam

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pope_Gregory_IX wrote:
Ultrasonic distance sensors - is anything available that could tell the difference between 18mm and 0mm?

Wouldn't solve the problem of distinguishing a real phone from a "slug"

 

  • Can you put electronics in to the base of the unit? Use a standard emitter / detector but have them mounted at 45 degrees with an emitter in the base of the unit and the detector in the side?

That's similar to my suggestion in #8 (which doesn't require electronics on 2 sides) - which also won't distinguish a real phone from a "slug"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are the slots vertical or horizontal?

 

If vertical - so the phone is "dropped" in, and stands up on end, you could use the weight of the phone as an extra bit of "confirmation" that it isn't just a piece of cardboard.

 

Still far from foolproof, of course.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

They are in 70° angle.  I have been testing the EMF detecting idea for last 4 days and so far, after 140 repetitions of usage, the data from EMF sensing input and microswitch inout are 99,3% accurate (switch detected 143 suages, EMF detector did 142). Althought this was in a laboratory enviroment and i am developing a more sophisticated emf detector whit some hiselding and amps to enhance recived data and some smart logic behind that filters out random noises, i am still waiting for monday, when we start real life testing of 15 prototypes and to see data from that. Now i came out whit idea of combining 2 microswithces per each slot in adition of 2 LDR based ambient light detecting resistors at the base of the slot, which will hopefully detect difference beetwen ambient light and being covered by smartphone.

I also presented the idea of app that would blink the  screen of smartphoen for a specific frequency evry couple of seconds, and a optical receiver that would interprete that as a inout data, but they are reluctent. So now i have many of ideas and ways to go, i jsut need to test them all out and to see how they function in real world application.

 

Thanks again for all the help and ideas :D I will share the rsults whit you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Klemko wrote:
also presented the idea of app that would blink the  screen of smartphoen for a specific frequency evry couple of seconds, and a optical receiver that would interprete that as a inout data, but they are reluctent

Just forget about that, then the app would kill battery of the device, which is something none wants ever, period. It would need NFC or BLE to confirm its near of the mount before starting to blink the screen to not kill battery, and then one would ask why not use either of those in first place for the detection.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
 It would need NFC or BLE to confirm its near of the mount before starting to blink the screen to not kill battery

Nope.

 

The user just activates the app immediately before putting the phone in the slot. The app only does the screen thing for a limited time.

 

Simples.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

JoniS wrote:
 It would need NFC or BLE to confirm its near of the mount before starting to blink the screen to not kill battery

Nope.

 

The user just activates the app immediately before putting the phone in the slot. The app only does the screen thing for a limited time.

 

Simples.

But from user perspective is that good? He/she allready inserts the phone in the gadget with limited size hole, then before that one would need to open screen lock and start the app, from user perspective that is quite alot of things to do for "something", without knowing what the gadget is it's hard to say if it's going to be worth it for the user to do this all just for "that".

Anyway just wanted to share my opinion from possible user perspective.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JoniS wrote:
 without knowing what the gadget is it's hard to say if it's going to be worth it for the user to do this all just for "that".

Indeed 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use the rfid reader in the phone?

 

Maybe use 2 switches to the side of the phone and one at the bottom.

The bottom can then also have some protrusion which fits in the USB or headphone connector of your particular model phone.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:
Use the rfid reader in the phone?

That would be the NFC - which has already been discussed.

 

your particular model phone

AIUI, this is going in a public place for the General Public to use with whatever phone they happen to have - it's not just for one specific phone model.