giovedì 16 novembre 2017

Remote Control a 2 Channel Relay board with RemoteXY











A recurring question on some Arduino and ESP groups on Facebook goes like: "how to remotely control a relay?"

In this post I show a simple and quick way to remotely control a 2 Relay module through a mobile app using the RemoteXY service.

Pre-requisite to this post is a previous I have written : "Remote Control NodeMCU with RemoteXY" in which I introduce the development of mobile apps to control nodeMCU projects.


The Circuit





As shown in the above figure, the 2 Channel Relay module has 4 pins:

  • GND
  • IN1
  • IN2
  • Vcc

Those pins need to be wired in the following way:

  • Module: GND --> nodeMCU:GND
  • Module: IN1 --> nodeMCU:D4
  • Module: IN2 --> nodeMCU:D5
  • Module: Vcc --> nodeMCU:Vin

Note:

Those wire connections assume that the nodeMCU is powered with 5V.
In such situation on the module Vin pin there will be 5V which is the right voltage to provide to the Relay module.

If you power you nodeMCU with a different voltage, please make sure you adapt the voltage available on Vin to be exactly 5V.



Graphic Interface






Build this simple graphic interface by using 3 labels and 2 switch in the RemoteXY editor.

The switch si should be named:
  • switch_1
  • switch_2

Now in the configuration panel, bottom right, let's configure each switch in a way that they connect to pin D4 and D5 on the nodeMCU














Configuration 

Let's configure RemoteXy in this way





Don't forget to specify your WiFi name and password






Source Code


Here the link  of the shared RemoteXY project. Once on RemoteXY you can download the source code to upload on your nodeMCU


Testing


Below a short video showing the behavior of the application












Controllo Remoto di un modulo Relay a 2 canali con RemoteXY











Una domanda ricorrente sui gruppi Arduino e ESP di Facebook e': "come controllo un rele' da remoto?"

In questo post faccio vedere un modo semplice e veloce per controllare un modulo a 2 Rele' tramite un applicazione mobile sfruttando un servizio chiamato RemoteXY.

Questo post si basa sui concetti descritti in un mio post precedente: "Controllo Remoto di NodeMCU con RemoteXY - Accensione Led" in cui ho introdotto lo sviluppo di una semplice app per controllo remoto di un nodeMCU.


Circuito Elettrico





Come si vede in figura il modulo Relay a 2 canali espone 4 pin


  • GND
  • IN1
  • IN2
  • Vcc

Questi pin vanno collegati nel seguente modo:

  • Modulo: GND --> nodeMCU:GND
  • Modulo: IN1 --> nodeMCU:D4
  • Modulo: IN2 --> nodeMCU:D5
  • Modulo: Vcc --> nodeMCU:Vin

Nota:

Questi collegamenti assumono che il nodeMCU sia alimentato a 5 V.
Cio' significa che sul pin Vin ci saranno 5V adatti ad alimentare il modulo Releay.

Se alimentate il vostro nodeMCU con una tensione differente assicuratevi di adattare la tensione in modo che sul pin Vcc del modulo Releay ci siano 5 V








Interfaccia Grafica





Realizzate questa semplice interfaccia grafica dall'editor di RemoteXY usando 3 label e 2 switch.

Gli switch si devono chiamare:
  • switch_1
  • switch_2

Ora nel pannello di configurazione in basso a destra, configurate ognuno degli switch in modo da collegarli ai pin D4 e D5 di nodeMCU














Configurazione

Configurate RemoteXY in questo modo




Non dimenticatevi di impostare il nome della vostra rete WiFi e la password di accesso.





Codice


Qui il link del progetto condiviso su RemoteXY da cui potete scaricare il codice da caricare sul vostro nodeMCU


Funzionamento


Qui un video che dimostra il funzionamento dell'applicazione











lunedì 30 ottobre 2017

The EggPainter


In this post I describe how I have realized the EggPainter and I show all the steps in a video
Then I show how to test the EggPainter and how to print on some eggs and some table tennis ball







Building Steps

In the below video all the necessary steps to build the EggPainter from scratch. In the remaining part of the post some additional details and useful information










Egg Painter

The EggPainter is a full project available on githiub. Its creator has shared all the necessary elements to build the EggPainter project







In order to realize the EggPainter project the following components are mandatory:
  • Arduino Uno
  • Stepper motors
  • Case
  • Supporting components


A key characteristic of this project is that all the STL file for 3d printing have been provided by the author. In other words a user can print with a normal 3d printer all the necessary elements to build the project. Obviously the Arudino and other electronic or mechanical components should be procured elsewhere.


Kit

The Kit I have used (I didn’t print it myself) is coming from Russia and when I have open it looked like that:












As it is possible to see all the necessary components to build the EggPainter are available in this kit








Disclaimer:

During the building of the EggPainter I have faced a major problem with this kit. Once I have closed the case with the bolt and nuts the remaining space for wiring it was absolutely not enough. In other words I was not able to properly close the case with the original kit.








For this reason I have thrown away all the provide cabling and rebuild it from scratch. In any case for a maker with some basic capabilities it should not be a complex task.
Below the EggPainter fully assembled after my modifications 















Firmware

The EggBot firmware is available here
Let’s now follow the below steps:
  1. Download the .zip file and unzip it in a preferred directory 
  2. Open the EggDuino.ino file in the Arduino IDE
  3. Compile the code and upload it to your Arduino Uno
  4. Quit from the Arduino IDE

At this stage the controlling software of the EggPainter is fully loaded on Arduino control board.








Printing Software

In order to print some vector art drawing it is necessary to instruct the Arduino board with the proper commands. This can be achieved through the use of a software called InkSpace.
Perform the following steps:
  1. Download Inkspace from here (Note:windows user should download 32 bit version)
  2. Install Inkspace and run it
  3. Download the EggBot extension from here 
  4. Unzip the file and copy its content in the directory shown here Edit > Preferences > System: User
  5. Restart InkSpace

If the above steps have been successfully completed you should see EggBot in the Extension menu







Testing

Now we can move into testing phase as we have all the necessary elements to operate the EggPainter
In the below video I show how to test the EggPainter and check that all the motors are properly working.
The test is executing from the Manual tab in the EggBot menu







If everything works fine and the pen is goin up and down, the horizontal and pen motors spin in two directions then the EggPainter is ready for printing

Stampa

In order to print let’s import a SVG file in Inkspace (File menu -> Import) and let’s adapt the drawing area to:
  • 3200 x 800 px for eggs
  • 4150 x 600 for table tennis balls

I really suggest you to experiment with those values and to find the right one for your print.
Below some pictures and video of printing done by me
















Happy Egg Printing everyone!!! :)