Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sensor for Magnetic Levitation

Not open for further replies.


Newbie level 2
Feb 17, 2013
Reaction score
Trophy points
Activity points
We are doing a project on magnetic levitation of a small steel ball. We were thinking of using an LDR as part of a simple voltage divider circuit and a light source. But the problem is if the ball is equally above or below the centre of the LDR within its cross section, the resistance of the LDR would be the same, and it would not be possible to control the current to the electromagnetic coil as desired. Is there any other way of using the LDR to overcome this problem or is there any other sensor which can be used?


Where is the problem ?

Can you show us your project drawing ?

the LDR can be masked continuesly, direct light , minimum value of LDR,
completly masked , LDR > 1Mohm ,
or we can suppose than the ball diameter is less than the LDR diameter ?


  • Image1.jpg
    17.2 KB · Views: 39

Very roughly our project is like: Sensor(resistance) --- Corresponding voltage through voltage divider network---- Controller--- Required current to the coil to either pull the ball up or down.

My question is: I your drawing, there will be a certain resistance of the LDR and finallly the ball has to be pulled up. However if the ball is above the centre(in your drawing), the resistance of the LDR will be the same, but the ball has to be pulled down...


it is only a point of control adjustment,
LDR value represents the feedback of the ball positionning
if the coil is upper the ball
example : 100% light on LDR => maximum of curent in the coil
the ball will go up.....
around 50% of the light on LDR =>the ball stay in equilibre
LDR value <10% => curent becomes nul the ball fall.

so no blocking situation,but control loop
to adjust with a PID controler
Proportional (gain),Integral (integration),Derivee(like anticipation)

the mechanic part is very important,because included in the
closed loop of control
Last edited:

Not open for further replies.

Part and Inventory Search

Welcome to