NANO HOURS

hours when 1 according to 199 ore

PREMISE:

They are always looking for new devices to try and experiment in order to increase my knowledge and experiences. So ravanare in WEB discover a tempting offer 5 board ARDUINO NANO per 15 € shipping included. After a quick search to deepen what consistenva the offer, I start the order and after 24 I found myself hours with these board ready for use.

What are these board ?: simply clones of ARDUINO UNO SMD technology encased in a Memory Card 15×42 mm. I think an excellent resource for those, come me, He has completed several projects with the ATMEGA 328 but forced each time to prepare the circuit around the micro: Quartz and preparation for loading the sketch. With this board instead, in addition to the advantage of having everything already prepared, is that of space. If we want to be free simply mount it on two connectors 15 pin to be able to extract when it is necessary. And if the project does not require power to exercise a 9V battery is sufficient.

These are caretteristiche:

  • ATMGA Processor 328 SMD preloaded with bootloader
  • USB / RS232 converter CH340G
  • Led power, led TX/RX, led pin 13
  • All digital and PWM pins as Arduino UNO
  • 8 analog pin (A0 / A7) two more than Arduino
  • USB power supply or from VIN 12V DC max
  • Reset button
  • Output Pin 5V and 3.3V

Here's an overview:

Compatibility is complete and with the Arduino IDE 1.8 It is sufficient to indicate what type of board is used. When you first turn the LED flash 13 thanks to the simple sketch preloaded test. The USB connection requires the drive for the chip CH340G: if the WEB research is bad you can always download the package and make the setup.

PLANNING NANO_TIMER:

E’ thanks to this board that I managed to contain the hardware (stack including) in a box like this:

In the second photo’ inside of the box: for the nano board I preferred to produce a pcb for its housing so as to pull it in case of need.

It can be seen on the right side of a board connector (during assembly) with a specific species of screen printing to connect the’ pcb other and with the rest of the system components.

CHARACTERISTICS OF THE PROJECT:

This project aims to produce timers independently but using recycled components among many that still lie in my drawers, but with these characteristics:

  • Setting of time with a ENCODER digital
  • Time display with display 7 segments
  • specific LEDs to indicate which timer time is underway.
  • Stop Led the end of time
  • Autonomous power supply via stack

COMPONENTS:

IL DISPLAY:

E’ a particular model: it is a remnant from very old PC when they had a display to display frequency: some of these are composed of 3 display in single package in common with the seven segments 3 pin for driving the anodes (They are common anode). Others like the one used, have 2 and a third display only useful for powering on the number “1”. And indeed the two segments that make up the number are driven by the segment “DP” the second display. And these are also common anode. The advantage of these displays is to have only seven pins for segments and two / three anodes: then from the design point of view excellent compared to having three separate display that force to complex connections.

The management of these displays is devolved usual chips MAX7219 (pluriadoperato in my projects). The only problem is that this chip only handles display COMMON CATHODE while that is used to COMMON ANODE. It can be a complication but two caveats are sufficient to overcome the problem:

  1. Invert the drive signals with a hex inverter (74LS04) between the outputs of the chip and the inputs of the display, and then via hardware.
  2. Reverse the values ​​to be sent to the display via software: to this we think the library used that manages two types of displays.

The ENCODE Digital:

The choice of this type of device arises from having a simple system to set the time in the display: you could, of course, resorting to a system of buttons ( the pins are used in the same number) ma, as I said at the beginning, I like to experiment with more new things.

I will not dwell on the features of this device: the web is all you need to know (better than I can do it myself) together with related software. The device is composed of a rotating pin which also acts as a two-pin and button which we can call “A” e “B” in addition to a pin “P” that identifies the button and a center pin connected to ground. The direction of rotation is detected by software based on the train of pulses emitted during the rotation. Some software acting through interrupt routines while others with special release the type of rotation “+” if positive (clockwise) “-” A negative (Counterclockwise) have pressed in addition to the signal on the pin. In the sketch the pin (button) It is connected in pull_up and when pressed releases a signal to “0” logical.

This is the model used encoder:

WIRING:

I divided the scheme into two parts for better vision: the first part otherwise makes reference to a classical scheme with ATMEGA328: there are no differences with ARDUINO NANO because the pins are the same.

Reset button, quartz and USB connections for RTX / TX (and power eventale) They are already present on ARDUINO NANO. The other connections are related to 4 LEDs for respectively “seconds”, and to “minutes” and for the “ore”: the fourth LED is illuminated when the predetermined time has been reached. During operation, the selected LED flashes at intervals of a second. The last three connections (upwards to the right) They are relative to the MAX7219 chip as in the following diagram:

In this scheme seconds you can see the connections of the MAX7219 chip where DG0 / DG1 signals are inverted to be connected to the anodes of the display, while the signals A / G + DP ranging the respective A/G+DP del display. The display shown is the standard type.

PCB AND FINAL RESULT:

In the following figures you can be seen: the full board and its back:

Below the pcb single-sided and produced entirely by hand with PCBEXPRESS.

SPECIFIC PERFORMANCE:

The sketch is relatively simple,, I believe, sufficiently commented. The operation of the device can be summarized as follows:

All’ act of’ ignition is off and the display lights up (after a few seconds) lED (verde) seconds: pressing the encoder spigot will switch to minutes or hours by turning on the respective LED. The movement is cyclic so from hours to minutes to seconds passes etc.. After selecting the type of timer by simply turning the pin (in the picture is provided with knob) in one direction or another you set the time more or less, until 199 (seconds, minutes, ore). To start simply press the pin. The count starts doing lameggiare the LED set. At the end of the set time will light the red LED and the system waits for a’ other setting by pressing the pin.

As for the sketch: the display of the management and of the consequent MAX7219 management is carried out by a species of “library” developed by the undersigned able to treat both the display (7 himself) common cathode that those common anode and the matrices 8×8 e 7×5. The timer is instead handled by a special library: swRTC (solo file .h) author Leonardo Miliani and downloaded from its website.

CONCLUSIONS:

I've always said in all my articles that each project is an end in himself and to those who designed and built: therefore it is susceptible of modifications and improvements always according to their needs and viewpoints. However, those interested in the project (amche for educational purposes only) You can always require me everything to me: gvsoft75@hotmail.com.

Thank you for’ caution.

gvsoft75 September 2017