26 - 09 - 2022

Simple control of a 12V lamp

The first two experiments with an electric lamp 12V are very simple. Both experiments uses the same AltonaLab diagram: KIT_SimpleLamp.nsm. Before to run the diagram, please connect the Numato board to the computer using USB cable and set the comport to the diagram. Then save the diagram:

 

 

Experiment: Control of 12V lamp with relay.

AltonaLab diagram: KIT_SimpleLamp.nsm

Used hardware:

  • Numato 8 channel USB GPIO Module;
  • 2 relay controller;
  • Lamp 12V;
  • 220V to 12V, 2A power supply;

The hardware diagram is shown below. We will use the IO0 of Numato board as Digital output. The digital output has two states - High which is +5V and Low: 0V. The relay controller has two relays but at this experiment we will use one of them. When we press the button at running AltonaLab diagram, the digital output IO0 will become to a high level, then the relay 1 of the relay controller will Turn ON, the Lamp will light.

Warning!!! Please note of the some parameters of Numato functional block:

  • CommunicatePerSec - the time between commands send to Numato board is set to zero. This means, every next command to the board will send immediately one after another. This is the fastest communicational way with the device. If we increase this value to 1sec or more, when we press the button, the lam will Tunrs ON with delay.
  • FastMode - when this parameter is checked, the block is optimized and all the internal delays are minimized.
     
    For experimental purpose, can increase the value of the parameter CommunicatePerSec and to see the behavior of the diagram.

 

  

 

Experiment: Control of 12V lamp with PWM Regulator.

AltonaLab diagram: KIT_SimpleLamp.nsm

Used hardware:

  • Numato 8 channel USB GPIO Module;
  • PWM Regulator with digital input starter;
  • Lamp 12V;
  • 220V to 12V, 2A power supply;

The second experiment uses a PWM (Pulse Wide Modulation) regulator. The regulator board has an Enable input. When the Enable input is in a High level, the board starts to work.

More about PWM can be read at Wikipedia:

https://en.wikipedia.org/wiki/Pulse-width_modulation

The idea of the Pulse wide modulation is - when we control the wide of the pulse powered the load, we can control the quantity of the supplied to the load energy. With our board, we can control the wide of the pulse using the PWM Screw. The board has a jumper, which purpose is:

  • When the jumper is removed, the pulse can be controlled in range 0..100%;
  • When the jumper is placed, the pulse can be controlled in range 0..50%. We will use this mode in the next experiments using a water pump - when the board is supplied with 12V, the pump will be supplied with a half power: 0..6V;

For this experiment, run the AltonaLab diagram and press the diagram's button. The lamp will start to light. Then try to rotate the screw of the PWM regulator board and watch how the light of the lamp is changing.

PWM regulators are wide spare in many hardware projects. With this experiment you will learn a lot of behavior of this kind of regulators.

 

 

 

 

Experiment: Blinking lamp.

AltonaLab diagram: KIT_LampGen.nsm

Used hardware:

  • Numato 8 channel USB GPIO Module;
  • 2 relay controller or PWM Regulator with digital input starter;
  • Lamp 12V;
  • 220V to 12V, 2A power supply;

The diagram below has two ways to truns ON the Lamp - with a button and with a Pulse Generator. The outputs of them are inputs of a logical OR block, so if the button is pressed the Lamp will Turn ON, if the PulseGenerator is enabled, the lamp will start blinking. The PulseGenerator can be enabled with a checkbox located on the diagram.

With some patemeters of the PulseGenerator, the blinking of the lamp can be affected:

  • Value - a whole time period of the generator;
  • PulseTimeSec - a time period in seconds, during which the pulse is in high value;