.. _electronics: ********************** The Electronic Control ********************** Introduction ============ The electronic module regroups all the classes and functions which are related to the reading of electronics components. The electronic components used here are: * the :ref:`DAQ`, which is connected to * the :ref:`limit-switches` * the :ref:`relays` * the :ref:`RHsensors` * the :ref:`power_supplies` * the :ref:`PDUs` (Power Distribution Unit) * the :ref:`encoder` used to monitor the rotation of the motors .. _DAQ: The Data Acquisition Board ========================== MASCARA uses the USB 1208FS mccdaq series. The datasheet relative to this device can be found on the website of mmcdaq. Below a quick diagram of the different types of outputs of the DAQ: .. _DAQ-diagram: .. figure:: DAQ-diagram.png :alt: diagram of the output of the data acquisition board. :scale: 75% :align: center Diagram of the various outputs of the DAQ. The DAQ has its own class to acces the functions embedded in the cbw32 dll. See :meth:`DAQ.DAQ` for a description of the APIs. .. _limit-switches: The limit switches ------------------ The limit switches provide an analog way to verify the position of the roof of the MASCARA station. Until the switch is pushed, no current goes through the switch. We use the analog input and digital output of the DAQ to verify at any time the status of the limit switches. The limit-switches have their own class :meth:`mascara_electronics.LimitSwitch`. .. _relays: The On-Off Objects ------------------ Several electronic components fall under the On-Off appelation: * the relays * the heaters * the LEDs While each component has its specifics class, they are all subclasses from the :meth:`mascara_electronics.OnOffObject` class. .. _encoder: The encoder ----------- The encoder serves to verify the dome's position during the open-close phases. Since the motors themselves do not provide a reading on their rotation, the encoder fulfills this role. The encoder is directly connected to the rotation axis of the dome. Thus the reading of the encoder provides a direct measurement of the position of the dome. The details on how to communicate with the encoder are in the :class:`mascara_electronics.Encoder`. Referece APIs ============= The DAQ class ------------- .. autoclass:: DAQ.DAQ :members: __init__, getBoardName, configPorts, dBitOut, dOut, dAllOut, dBitIn, vIn, vOut, flashLED The OnOff class and its dependencies ------------------------------------ .. autoclass:: mascara_electronics.OnOffObject :members: __init__, turnOn, turnOff, isOn, isOff .. autoclass:: mascara_electronics.Relay :members: __init__ .. autoclass:: mascara_electronics.CameraRelay :members: __init__ .. autoclass:: mascara_electronics.Heater :members: __init__ The Limit Switch class: ----------------------- .. autoclass:: mascara_electronics.LimitSwitch :members: __init__, isPushed The Power Supply ---------------- .. autoclass:: mascara_electronics.PowerSupply :members: __init__, getVoltage, getCurrent, setVoltage, setCurrent, turnOn, turnOff The PDUs -------- .. autoclass:: mascara_electronics.PDU :members: __init__, connect, close, turn_on, turn_off, reboot, turn_all_on, turn_all_off, reboot_all, get_status, get_current, get_power, trysend, send The Encoder ----------- .. autoclass:: mascara_electronics.Encoder :members: __init__, setBitMode, setTimeout, openEncoder, purge, setBaudrate, WritetoEncoder, ReadEncoder, ConverseWithEncoder, closeEncoder The Temperature and Humidity sensors ------------------------------------ .. autoclass:: mascara_electronics.RHSensor :members: __init__, findCOMPort, isOpen, open, close, getHumidity, getTemperature, getAll, getCHumidity, getCTemperature, getCAll, getStatus, getInfo