Ball and beam circuit connection using 2 conductors

I'm trying to construct the ball and beam system demonstrated in the video: Ball & Beam - PID Controller - Arduino and Matlab.

I'm using an Arduino servo motor and two sets of potentiometers. I have a linear potentiometer and a second potentiometer which determines the position of the ball on the beam This second potentiometer consists of two conductors in parallel; an aluminium rod (10mm x 1000mm) that is connected to the 5V DC supply, and a nichrome ribbon of 5mm x 1000mm glued to a wooden dowel for support. The circuit construction is based on this picture:


The goal is to change the resistance on the linear potentiometer and have the system actuate to match the position of the metal ball to the output of the linear potentiometer as demonstrated in the video. My attempts to construct the circuit so far have failed. The output voltage from the system is the same even when the ball is at opposite ends of the beam. I've come to suspect that there is something missing in my apparatus.
I'd like some assistance with the circuit configuration and any additional apparatus that might help me to recreate the system in the video, be it some kind of opamp or the nature of the circuit itself, I think I can figure out the code after that.

What is the total resistance of the resistive wire in the sensor? Make sure that you do not draw more than 20 mA from an output pin.

The Arduino is not a power supply, and the 5V output cannot be used for motors or servos. You will eventually damage the Arduino if you try, so use a separate power supply for the servo.

1 Like

I am using a completely different 5V power supply for the servo and the resistive beam. I just uploaded the picture to illustrate the circuit I'm using to set up my system. I am not sure if it is the correct circuit connection which is why I am asking. I want help with the proper circuit configuration and the apparatus involved.

Please do not waste your own and forum members' time by posting incorrect circuit details. In your next post, post a wiring diagram (hand drawn is preferred) of the actual circuit you have constructed.

Please answer the question in post #2.

Does the nichrome wire turn red since you have it connected between 5 volts and ground?

3 Likes

Thank you for the feedback I'll keep it in mind for future posts.

To answer the previous question, the total resistance of the aluminium rod (resistive wire) is quite low: 38 ohms.

I've tried to draw a rough sketch of the circuit I constructed.

The nichrome is not connected to 5V and ground, the aluminium rod is.

The nichrome wire then is just for an electrical contact and the aluminum rod plus steel ball is a resistive voltage divider. Doesn’t the aluminum wire get pretty warm?

1 Like

In the sketch in post #6, you must also connect the (-) of the 5V supply to the GND of the Arduino.

With no current flowing in the nichrome wire, there is no voltage drop to measure.

With 1V across a 38 Ohm resistor, the current is 26 mA, which is quite reasonable. Use an ADC with a 1.1V voltage reference to obtain about 900 steps of position resolution.

Nice, better. But have you inadvertently drawn the aluminum rod where the nichrome encrusted rod should go, and vice versa?

That would be consistent with your first diagram, and actually make sense.

Except a 38 ohm wire on a microprocessor output is a no- go.

Where did you get the idea for this circuit? Perhaps you left some details intended to that would make the arrangement practical.
a7

I obtained the circuit from a Google search. I'll try to interchange the nichrome and aluminium as per your comment and observe any changes.

It does get pretty warm when connected directly to the power supply. Is the circuit configuration correct? I'm starting to doubt it.

See post #10 for a better approach. Unless, of course, you want the nichrome wire to also heat water for tea, or something.

1 Like

I am trying to make sense of post #10. I don't fully understand what it means, could you please break it down for me so I don't make tea with my stuff?

Connect one end of the nichrome to 5V, other end to GND, one end of alu to A1, other end to nothing. The Alu bar & ball is the wiper.

Must be quite long then.
0.75 mm^2 thin aluminium rod/wire is 35.3 ohms per 1000m.
Aliminium oxide is also a good insulator, so aluminium seems to be a poor choice for your project.
Leo..

I exchanged the nichrome and aluminium and I'm finally having a voltage difference. The resistance of the aluminium rod was too small for the task I was using it for and was connected where the nichrome should have been. When I connect everything to a 5V supply, the output on one end is 4.5 and 0.6V at the opposite end. Since it's nichrome it does get quite warm but it's manageable. Thank you, I can't believe the solution was something so simple. Thanks

That's how you had it in post # 1.

You could address the manageable warmth problem by using a smaller voltage across the nichrome wire as pointed out by @jremington in post # 10.

There are a few ways to use that general idea, if you find the warmth problem to be a problem. I know it would annoy me it sooner later.

a7

1 Like

Good work, keep it up. :sunglasses: