Difference between revisions of "Precision Pendulum Assembly: Electrical interfaces"

From wwwelab
Jump to navigation Jump to search
Line 3: Line 3:
 
* a Raspberry Pi (or computer running Linux): makes the interface between the micro-controller and the human (e.g., direct connection to a console) or e-lab server via Internet.
 
* a Raspberry Pi (or computer running Linux): makes the interface between the micro-controller and the human (e.g., direct connection to a console) or e-lab server via Internet.
 
* a micro-controller (dsPic): makes the interface between the electrical components (including the step-motor) and the computer.
 
* a micro-controller (dsPic): makes the interface between the electrical components (including the step-motor) and the computer.
* electrical components: laser, micro-switch, photo-gate (or photo-diode), light bulb, temperature sensor, etc... see [[#Parts|Parts]] for detailed description. These components make the interface between the experimental apparatus and the micro-controller while providing ways of controlling the pendulum as well as measurement capabilities.
+
* complementary electrical components: laser, micro-switch, photo-gate (aka photo-diode), light bulb, temperature sensor and 7-digits display.
 +
see [[#Parts|Parts]] for detailed description. These components are the interface between the experimental apparatus and the micro-controller while providing ways of controlling the pendulum as well as measurement capabilities.
  
 
See the [[#Connections|Connections]] subsection for details on how to connect the electrical components.
 
See the [[#Connections|Connections]] subsection for details on how to connect the electrical components.
Line 11: Line 12:
 
===Parts===
 
===Parts===
 
This subsection presents a description of the different electrical parts of the experiment.
 
This subsection presents a description of the different electrical parts of the experiment.
* '''Raspberry Pi (RPi)''': Device running Linux to allow remote connection to the experiment as well as an easy way to interface with the micro-controller. The present micro-controller and corresponding flat cable connections are designed for the Raspberry Pi 3 model B, which has the following pin-out connections as described in https://www.raspberrypi.org/documentation/usage/gpio. If the Raspberry Pi is used to also power the micro-controller, a +5 V power supply with at least 2.5 A should be used.
+
* '''Raspberry Pi (RPi)''': Device running Linux to allow remote connection to the experiment as well as an easy way to interface with the micro-controller. The present micro-controller and corresponding flat cable connections are designed for the Raspberry Pi 3 model B, which has the following pin-out connections as described in https://www.raspberrypi.org/documentation/usage/gpio. The Raspberry Pi is used as well to power the micro-controller, as such a +5 V power supply with at least 2.5 A should be used.
 
{|
 
{|
 
|[[File:rpi.png|x100px]]
 
|[[File:rpi.png|x100px]]
Line 17: Line 18:
 
|[[File:rpi_ps_2.png|x100px]]
 
|[[File:rpi_ps_2.png|x100px]]
 
|}
 
|}
* '''SD card''': The SD card comes with Linux operating system and all necessary additional programs.
+
* '''SD card''': The SD card comes with Linux operating system and all necessary additional programs. This should be an Industrial card with robust specs.
* '''micro-controller board''': This board contains a micro-controller (dsPic33F) as well as all peripheral components needed for the control of the experiment. The board can be powered using the flat cable connected to the Raspberry Pi or by an USB connection (an onboard jumper is used to select the power source, the default position corresponds to the one from the flat cable).
+
* '''Micro-controller board''': This board contains a micro-controller (dsPic33F) as well as all peripheral components needed for the control of the experiment. The board can be powered using the flat cable connected to the Raspberry Pi or by an USB connection (an onboard jumper is used to select the power source, the default position corresponds to the one from the flat cable/Raspberry source).
 
{|
 
{|
 
|[[File:dspic_board_closed.png|x100px]]
 
|[[File:dspic_board_closed.png|x100px]]
 
|[[File:dspic_board_open.png|x100px]]
 
|[[File:dspic_board_open.png|x100px]]
 
|}
 
|}
* '''webcam''': The webcam is used to provide live video streaming during the execution of the experiment. It is connected to the Raspberry Pi via an USB cable. The RPi performs the encoding and then sends it through Internet.
+
* '''Webcam''': The webcam is used to provide live video streaming during the execution of the experiment. It is connected to the Raspberry Pi via an USB cable. The RPi performs the encoding and then sends it through Internet.
 
{|
 
{|
 
|[[File:webcam.png|x150px]]
 
|[[File:webcam.png|x150px]]
 
|}
 
|}
* '''light bulb''': The light bulb consists of a 12 V LED bulb located above the launcher. This bulb turns on during the execution of the experiment to illuminate the pendulum and launcher (specially useful if the experiment is performed during night).
+
* '''Light bulb''': The light bulb consists of a 12 V LED bulb located above the launcher. This bulb turns on during the execution of the experiment to illuminate the pendulum and launcher (specially useful if the experiment is performed during night).
 
{|
 
{|
 
|[[File:light_bulb.png|x125px]]
 
|[[File:light_bulb.png|x125px]]
 
|}
 
|}
* '''step-motor''': The step-motor is part of the launcher and it is controlled by the micro-controller via a quad 1/2 H bridge driver. The step-motor is responsible by the displacement of the shovel.
+
* '''Step-motor''': The step-motor is part of the launcher and it is controlled by the micro-controller via a quad 1/2 H bridge driver. The step-motor is responsible for the displacement of the shovel.
 
{|
 
{|
 
|[[File:step_motor_1.png|x100px]]
 
|[[File:step_motor_1.png|x100px]]
 
|[[File:step_motor_2.png|x100px]]
 
|[[File:step_motor_2.png|x100px]]
 
|}
 
|}
* '''micro-switch''': The micro-switch is located at the origin, close to the 0 cm of the metric scale on the launcher. It is used to indicate the micro-controller that the shovel reached the origin and cannot go further in the backward direction (end of course).
+
* '''Micro-switch''': The micro-switch is located at the origin, close to the 0 cm of the metric scale on the launcher. It is used to indicate the micro-controller that the shovel reached the origin and cannot go further in the backward direction (end of course).
 
{|
 
{|
 
|[[File:ms_1.png|x100px]]
 
|[[File:ms_1.png|x100px]]
 
|[[File:ms_2.png|x100px]]
 
|[[File:ms_2.png|x100px]]
 
|}
 
|}
* '''laser''': The laser is located approximately at the center of the launcher. In conjunction with the photo-gate/photo-diode, the laser is used to measure the oscillation period as well as the location of the shovel.
+
* '''Laser''': The laser is located approximately at the center of the launcher. In conjunction with the photo-gate/photo-diode, the laser is used to measure the oscillation period as well as the location of the shovel. This laser have a regulation for the focus.
 
{|
 
{|
 
|[[File:laser_1_crop.jpg|x100px]]
 
|[[File:laser_1_crop.jpg|x100px]]
Line 47: Line 48:
 
|[[File:Laser_3_crop.jpeg|x100px]]
 
|[[File:Laser_3_crop.jpeg|x100px]]
 
|}
 
|}
* '''photo-gate (or photo-diode)''': The photo-gate is located in front of the laser. The ball travels in-between interrupting the light from the laser periodically resulting in a change of state at the input pin of the micro-controller. It is then possible to measure the period of the pendulum.
+
* '''Photo-gate (aka photo-diode)''': The photo-gate is located in front of the laser. The bob travels in-between them interrupting the laser light periodically resulting in a change of state at the input pin of the micro-controller. It is then possible to measure the period of the pendulum and the bob velocity by knowing in advance it's diameter.
 
{|
 
{|
 
|[[File:ph_gate_1.jpg|x100px]]
 
|[[File:ph_gate_1.jpg|x100px]]
 
|[[File:ph_gate_2_crop.jpg|x100px]]
 
|[[File:ph_gate_2_crop.jpg|x100px]]
 
|}
 
|}
* '''temperature sensor''': A temperature sensor is located in the DB25 box to measure the ambient temperature. The ambient temperature influences the length of the pendulum. It is therefore important to monitor this quantity.
+
* '''Temperature sensor''': A temperature sensor is located in the DB25 box to measure the ambient temperature. The ambient temperature influences the length of the pendulum. It is therefore important to monitor this quantity for high precision measurements.
 
{|
 
{|
 
|[[File:temp_sensor_1.jpg|x100px]]
 
|[[File:temp_sensor_1.jpg|x100px]]
 
|[[File:temp_sensor_2_crop.jpg|x100px]]
 
|[[File:temp_sensor_2_crop.jpg|x100px]]
 
|}
 
|}
* '''display''': The display shows the total accumulated number of oscillations. It consists of 8 digits, each one a 7 segments display. Some of the micro-controller board versions allow the connection of the display directly on the board from outside of the box.
+
* '''Display''': The 7-digits display shows the total accumulated number of oscillations. It consists of 8 digits, each one a 7 segments display. Some of the micro-controller board versions allow the connection of the display directly on the board from outside of the box.
 
{|
 
{|
 
|[[File:display_loose_crop.jpg|x100px]]
 
|[[File:display_loose_crop.jpg|x100px]]
 
|[[File:display_fixed_crop.jpg|x100px]]
 
|[[File:display_fixed_crop.jpg|x100px]]
 
|}
 
|}
* '''power supply''': The step-motor requires a +12 V power supply capable of providing 2 A.
+
* '''Power supply''': The step-motor requires an external +12 V power supply capable of providing 2 A.
 
{|
 
{|
 
|[[File:ps_1_crop.jpg|x100px]]
 
|[[File:ps_1_crop.jpg|x100px]]
Line 68: Line 69:
 
|[[File:ps_3_crop.jpg|x100px]]
 
|[[File:ps_3_crop.jpg|x100px]]
 
|}
 
|}
* '''start button''': The start button allows to locally start an experiment with a predefined configuration (initial displacement of 10 cm during 20 oscillations).
+
* '''Start button''': The start button allows to locally start an experiment with a predefined configuration (initial displacement of 10 cm, 20 oscillations). An external stopwatch as to be use in complement to provide time.
 
{|
 
{|
 
|[[File:push_button_crop.jpg|x100px]]
 
|[[File:push_button_crop.jpg|x100px]]
Line 83: Line 84:
 
|[[File:rpi_connections.jpg|x200px]]
 
|[[File:rpi_connections.jpg|x200px]]
 
|}
 
|}
* '''Dedicated flat-cable''': This cable makes the connection between the micro-controller (dsPic) board and the RPi and display. At the micro-controller side, the cable has a DB25 connector.
+
* '''Dedicated flat-cable''': This cable lays down the connection between the micro-controller (dsPic) board, the RPi and the display. At the micro-controller side, the cable has a DB25 connector.
 
{|
 
{|
 
|[[File:flat_cable_DB25_crop.jpg|x150px]]
 
|[[File:flat_cable_DB25_crop.jpg|x150px]]
Line 93: Line 94:
 
|[[File:flat_cable_rpi_3_crop.jpg|x150px]]
 
|[[File:flat_cable_rpi_3_crop.jpg|x150px]]
 
|}
 
|}
At the display end, the connector consist of a 1x5 connector. Please, ensure that the connector side is correct before connecting to the display: the VCC pin of the display connects to the wire that is highlighted, in this case, with a blue trace. See figure below for illustration. Some versions allow the display to be connected directly on the micro-controller box. In such cases, the display should be connected as shown on the right hand side figure below.
+
At the display end, the connector consist of a 1x5 connector. Please ensure that the connector side is correct before connecting to the display: the VCC pin of the display connects to the wire that is highlighted in this case with a blue trace. See figure below for illustration. Some versions allow the display to be connected directly on the micro-controller box. In such cases, the display should be connected as shown on the right hand side, see figure below.
 
{|
 
{|
 
|[[File:flat_cable_display_crop.jpg|x150px]]
 
|[[File:flat_cable_display_crop.jpg|x150px]]
Line 132: Line 133:
 
The procedure for the alignment consists of the following:
 
The procedure for the alignment consists of the following:
 
# Turn on the laser using the "laser on" command
 
# Turn on the laser using the "laser on" command
 +
# Verify with the help of a white sheet  if the Laser focus dimension is below 1mm by the photo-diode; if not, it as to be adjusted by screwing the laser.
 
# If necessary, adjust the laser orientation so that its light goes into the photo-gate structure hole (figure on the left). An example of misalignment is shown in the figure on the right.
 
# If necessary, adjust the laser orientation so that its light goes into the photo-gate structure hole (figure on the left). An example of misalignment is shown in the figure on the right.
 
# Perform the [[#Laser and photo-gate test|Laser and photo-gate test]]
 
# Perform the [[#Laser and photo-gate test|Laser and photo-gate test]]

Revision as of 11:27, 31 December 2019

Electrical interfaces

This section describes the electrical components used to operate the experimental apparatus. As an overview, each launcher consists of:

  • a Raspberry Pi (or computer running Linux): makes the interface between the micro-controller and the human (e.g., direct connection to a console) or e-lab server via Internet.
  • a micro-controller (dsPic): makes the interface between the electrical components (including the step-motor) and the computer.
  • complementary electrical components: laser, micro-switch, photo-gate (aka photo-diode), light bulb, temperature sensor and 7-digits display.

see Parts for detailed description. These components are the interface between the experimental apparatus and the micro-controller while providing ways of controlling the pendulum as well as measurement capabilities.

See the Connections subsection for details on how to connect the electrical components.

The photo-gate/photo-diode and laser alignment is described in subsection Photo-gate and laser alignment. This is to be performed only after the micro-controller has been powered up, read section Interface console to micro-controller first.

Parts

This subsection presents a description of the different electrical parts of the experiment.

  • Raspberry Pi (RPi): Device running Linux to allow remote connection to the experiment as well as an easy way to interface with the micro-controller. The present micro-controller and corresponding flat cable connections are designed for the Raspberry Pi 3 model B, which has the following pin-out connections as described in https://www.raspberrypi.org/documentation/usage/gpio. The Raspberry Pi is used as well to power the micro-controller, as such a +5 V power supply with at least 2.5 A should be used.
Rpi.png Rpi ps 1.png Rpi ps 2.png
  • SD card: The SD card comes with Linux operating system and all necessary additional programs. This should be an Industrial card with robust specs.
  • Micro-controller board: This board contains a micro-controller (dsPic33F) as well as all peripheral components needed for the control of the experiment. The board can be powered using the flat cable connected to the Raspberry Pi or by an USB connection (an onboard jumper is used to select the power source, the default position corresponds to the one from the flat cable/Raspberry source).
Dspic board closed.png Dspic board open.png
  • Webcam: The webcam is used to provide live video streaming during the execution of the experiment. It is connected to the Raspberry Pi via an USB cable. The RPi performs the encoding and then sends it through Internet.
Webcam.png
  • Light bulb: The light bulb consists of a 12 V LED bulb located above the launcher. This bulb turns on during the execution of the experiment to illuminate the pendulum and launcher (specially useful if the experiment is performed during night).
Light bulb.png
  • Step-motor: The step-motor is part of the launcher and it is controlled by the micro-controller via a quad 1/2 H bridge driver. The step-motor is responsible for the displacement of the shovel.
Step motor 1.png Step motor 2.png
  • Micro-switch: The micro-switch is located at the origin, close to the 0 cm of the metric scale on the launcher. It is used to indicate the micro-controller that the shovel reached the origin and cannot go further in the backward direction (end of course).
Ms 1.png Ms 2.png
  • Laser: The laser is located approximately at the center of the launcher. In conjunction with the photo-gate/photo-diode, the laser is used to measure the oscillation period as well as the location of the shovel. This laser have a regulation for the focus.
Laser 1 crop.jpg Laser 2 crop.jpeg Laser 3 crop.jpeg
  • Photo-gate (aka photo-diode): The photo-gate is located in front of the laser. The bob travels in-between them interrupting the laser light periodically resulting in a change of state at the input pin of the micro-controller. It is then possible to measure the period of the pendulum and the bob velocity by knowing in advance it's diameter.
Ph gate 1.jpg Ph gate 2 crop.jpg
  • Temperature sensor: A temperature sensor is located in the DB25 box to measure the ambient temperature. The ambient temperature influences the length of the pendulum. It is therefore important to monitor this quantity for high precision measurements.
Temp sensor 1.jpg Temp sensor 2 crop.jpg
  • Display: The 7-digits display shows the total accumulated number of oscillations. It consists of 8 digits, each one a 7 segments display. Some of the micro-controller board versions allow the connection of the display directly on the board from outside of the box.
Display loose crop.jpg Display fixed crop.jpg
  • Power supply: The step-motor requires an external +12 V power supply capable of providing 2 A.
Ps 1 crop.jpg Ps 2 crop.jpg Ps 3 crop.jpg
  • Start button: The start button allows to locally start an experiment with a predefined configuration (initial displacement of 10 cm, 20 oscillations). An external stopwatch as to be use in complement to provide time.
Push button crop.jpg

Connections

This subsection shows how the components and cables are connected between each other.

  • RPi: The Raspberry Pi connects to the following:
    • Power supply (via micro USB connector)
    • Internet (via Ethernet cable)
    • Webcam (via USB cable)
    • Micro-controller board (via dedicated flat-cable)
Rpi connections.jpg
  • Dedicated flat-cable: This cable lays down the connection between the micro-controller (dsPic) board, the RPi and the display. At the micro-controller side, the cable has a DB25 connector.
Flat cable DB25 crop.jpg

At the RPi side, the cable as a 2x20 pin connector to ensure a correct connection, see figures below.

Flat cable rpi 1 crop.jpg Flat cable rpi 2 crop.jpg Flat cable rpi 3 crop.jpg

At the display end, the connector consist of a 1x5 connector. Please ensure that the connector side is correct before connecting to the display: the VCC pin of the display connects to the wire that is highlighted in this case with a blue trace. See figure below for illustration. Some versions allow the display to be connected directly on the micro-controller box. In such cases, the display should be connected as shown on the right hand side, see figure below.

Flat cable display crop.jpg Display fixed crop.jpg
  • Micro-controller: The dsPic board connects to the following:
    • +12 V power supply to feed the step motor
    • RPi (via the flat-cable)
    • Electrical components (via dedicated multi-cable)
Dspic board closed crop connections.jpg
  • Dedicated multi-cable: The multi-cable connects the dsPic board with electrical components used to perform the experiment. At the dsPic board end, the cable has a DB25 connector as shown in the figure below.
Multi cable DB25 crop.jpg

At the light bulb, micro-switch, laser and photo-gate end, the multi-cable has a 2 pin connector as shown in the following figures:

Multi cable light bulb crop.jpg Multi cable ms crop.jpg Multi cable laser crop.jpg Multi cable photogate crop.jpg

At the step-motor end, the multi-cable has 4 pin connector. This is the only 4 pin connector and therefore it is not identified as the remaining ones. See figure below for illustration.

Multi cable step motor crop.jpg

The start button and temperature sensor are directly connected to the DB25 connector, so no need for intermediate connectors.

Push button crop.jpg Temp sensor 2 crop.jpg

Photo-gate and laser alignment

The photo-gate and laser alignment can only be performed once the micro-controller has been turned on and it is communicating with a console. See subsection Interface console to micro-controller on how to power on the micro-controller and how to control the laser. The alignment consists of pointing the laser into the hole of the photo-gate structure, as shown below in the figure on the left. The laser orientation can be adjusted using the 3 screws from its holding support structure, figure on the middle.

The procedure for the alignment consists of the following:

  1. Turn on the laser using the "laser on" command
  2. Verify with the help of a white sheet if the Laser focus dimension is below 1mm by the photo-diode; if not, it as to be adjusted by screwing the laser.
  3. If necessary, adjust the laser orientation so that its light goes into the photo-gate structure hole (figure on the left). An example of misalignment is shown in the figure on the right.
  4. Perform the Laser and photo-gate test
Laser in photogate crop.jpg Laser structure 3 screws crop.jpg Laser out photogate crop.jpg

Electric tests

  • Test the micro-switch with the help of a multi-meter (ohmmeter). When released it should present a very high impedance (order of MOhm) and when pressed it should present a very low impedance (like a shunt, ~0 Ohm). Perform the measurement at the micro-switch and at the DB25 pins: between pins no. 3 and 4.
  • Check voltage of step-motor power supply to ensure that it is not higher than +12 V.