Bug 10440

Summary: Create a reference HW design and a python controlling library for a single power control unit
Product: [QA/Testing] Runtime Testing Reporter: Plauchu Edwin <edwin.plauchu.camacho>
Component: generalAssignee: Plauchu Edwin <edwin.plauchu.camacho>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: benjamin.esquivel, bluelightning, daniela.plascencia, jair.de.jesus.gonzalez.plascencia, leonardo.sandoval.gonzalez, sjolley.yp.pm
Version: 2.2   
Target Milestone: 2.3 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Power cutter electric diagram none

Description Plauchu Edwin 2016-10-14 15:06:41 UTC
A library is required for controlling a relay that is able to turn on/off the devices that it powers in order to reboot the DUT. This is required because a clean power-off is not always reliable.
Comment 1 Plauchu Edwin 2016-10-17 04:00:33 UTC
I have written a C++ prototype
Such prototype is already working with the real home made relay of one module.
https://github.com/pianodaemon/relay_gen_101_ctrl/tree/real
Comment 2 Plauchu Edwin 2016-10-17 04:48:24 UTC
Here a short horrible video about the prototype.
https://youtu.be/Zq5e5VvCN-4

In this video we connected the homemade relay to our second Display
and We ran the following commands.

./relayctrl -p /dev/ttyACM0 -r 0
./relayctrl -p /dev/ttyACM0 -r 1

Denoting several details in this prototype video:

--> "ZERO has closed the relay whereas ONE has opened the relay".

--> The homemade relay was controlled by Arduino 101 board (https://www.arduino.cc/en/Main/ArduinoBoard101)

--> Configuration for relay cables utilized in this video
Green - 5V (from the board)
White/Green - GND (from the board)
Blue - Signal (min 3.3V max 5V, from the board)

--> Computer was establishing communication with Arduino 101 board by using FTDI USB cable for UART (http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf)
Comment 3 Daniela Plascencia 2016-10-17 16:17:55 UTC
Created attachment 3477 [details]
Power cutter electric diagram

In order to build a power cutter using a relay module, one must follow the circuit provided in the attachment.
Required hardware:
- 1 BJT transistor 2N2222A
- 1 3.3 kOhms resistor
- 1 1N4007 diode
- 1 relay module (RAS-0510)
- 1 Protoboard or perforated PCB (min 4.5x4.5 cm)
- 1 Two positions terminal block
- 1 male outlet connector and 1 female outlet plug
- 14AWG Wire (as needed)
Comment 4 Plauchu Edwin 2016-10-27 21:30:54 UTC
Created new branch with first module version of this cutter.

To ssh://git.yoctoproject.org/devauto
 * [new branch]      relay101 -> relay101

------------------------------------------------------------
New files can be found in devauto/devauto/rps
gen_ard_101.ino
simplepwsc.py
------------------------------------------------------------
Comment 5 Benjamin Esquivel 2016-11-17 18:14:17 UTC
Where is this reference design published? I suggest to do this on the wiki. Reopening.
Comment 6 Plauchu Edwin 2016-12-14 18:51:56 UTC
This is an initial approach for the documentation of this artifact
https://wiki.yoctoproject.org/wiki/Arduino_Single_power_control_unit
Comment 7 Leonardo Sandoval Gonzalez 2016-12-21 21:24:19 UTC
Moving to M2 because M1 is over.

Can we resolve this one? Seems to be complete it.