Translate

Sunday, December 16, 2018

Timer for UV box - final build - Hardware

Time to close also this project.
With the help of Roberto we did end up with a PCB, let's put it together.
This article describes some work on the hardware side.

When I started this project, quite time ago, the first schematic was drawn using Fidocad.
Then I moved it on Eagle (where the PCB described here was generated with the help of Roberto).
And now I'm moving everything under EasyEDA where I will have the final PCB design after testing the circuit.

Schematics


This is the Eagle schematic used to generate the PCB (see below).
Is little bit more complete than the one in Fidocad (see Timer for UV box).



Note that the circuit contains also the connections to program the MSP430, i.e. no need to program the MSP430 on a Launchpad, it can be programmed directly on site.
It has few external components/boards :

  1. Encoder
  2. LCD display
  3. I/O relay
  4. Pushbutton

Building

LCD


Nothing fancy, but it works well and is cheap.
The connector has 4 pins :

  1. Gnd
  2. Vcc (+5V)
  3. SDA
  4. SCL


Encoder

As many other projects, I'm using a digital encoder to handle the input.

Usually I do prepare a small prototype board with the encoder manually wired.
This time instead I decided to design a breakout board in order to standardize the use of the encoder on my projects and have  a more robust and better board to use.
See the article about the  Digital encoder breakout for more details.
The pinout is :
  1. Gnd
  2. B
  3. A
  4. Switch

I/O Relay




Also for the relay I decided to use a separate module because is opto-isolated.

I bought time ago some modules and thus I developed the code to use them.
It is anyway easy to change the code in order to use other modules.
Only 3 wires are needed to drive the I/O, power supply, GND and the signal.

This module is activated with the signal low.
The pinout is :
  1. Input
  2. Gnd
  3. Vcc (+5V)

Pushbutton and LED



The Start/Stop pushbutton has a LED embedded.
I found this on Adafruit but also this one is quite good, from Amazon.

It has 4 terminals, two for the switch and two for the LED.



Power supply


Instead to use a wall wart 5V power supply I found a nice 5V power supply module on Amazon.
Since the final building is on a piece of wood is much easier to use a small power supply rather than a wall wart power supply.







Main board 

With the help of Roberto we end up with this PCB for the main circuit.


Unfortunately the power connector is wired wrong, so some cut was necessary in order to connect it properly ... not mentioning the fact the power connectors I had around were different !
So little bit work to adapt the power connector.

Here the PCB starting to be populated.

PCB populated with the power supply (tested and working)
And here the PCB almost completed.


Problems

I did found some problems when I  did restart to work on this project.

As mentioned before, the power connector PCB is wired wrong and some manual cut and rewiring is necessary.
Also the headers are wired without considering the final connections needed.
For example the encoder.
The PCB uses a 5 pins header while I decided to standardize the connection to the encoder to 4 wires.

Also the schematic is different from the one in Fidocad, so the assignment of the I/O pins is different.
The initial plan was to connect the various part with a pin-to-pin cable but because the un-planned headers I had to use multicolored wires to connect parts, checking each pin.
So the final version of the PCB will be better wired considering all the external components pinouts.

For THIS PCB however here some info about the connections to be used.


Optorelay module Pin
Main timer base Pin
J1
Cable color
In
2
Purple
Gnd
3
Gray
Vcc
1
Blue


LCD module Pin
Main timer base Pin
J2
Cable Color
Gnd
4
Red
Vcc
1
Green
SDA
2
Yellow
SCL
3
Orange


Encoder module Pin
Main timer base Pin
J3
Cable Color
GND (1)
2
Green
B (2)
3
Yellow
A (3)
1
Orange
Switch (4)
4
Red
Not used !
5



Pushbutton/LED module Pin
Main timer base Pin
J4
Cable color
Switch
1
Blue
Not used !
2

LED
3
Violet
Gnd
4
Brown

Programmer connection


The PCB allows to be connected to a launchpad directly in order to program the chip without removing it.
The J6 connector on the timer PCB has 4 pins :

  1. Vcc
  2. Test/SBWTCK
  3. RST
  4. Gnd
If the board is NOT powered by the external power supply, is possible to connect the Vcc pin to the +3V from the Launchpad.

Take a Launchpad and remove the jumpers from J3, then connect the wires between the Launchpad jumpers (USB side) to the J6 connector of the timer PCB.

UV Box board - header - pin
Launchpad - header - pin
Notes - Cable Color
J6 - pin 1
J3 - pin 5
Vcc
J6 - pin 2
J3 - pin 1
Test
J6 - pin 3
J3 - pin 2
RST
J6 - pin 4
J6 - pin 3
Gnd

Final Building


In order to put all together in an usable way I decided to assemble all the modules on a wood platform and a piece of plexiglass hosting the LCD display, the encoder and the pushbutton.



A European style wire connector is used to bring in the main power (110V) and distribute it to the lamps and fan. On the picture above is possible to see the 5V power supply and the rest of the circuit as well.
The plexiglass is hosted in a cut of the wood since the idea is to have the plexiglass mounted in the box.
To bring in the main power I used a power socket inlet module, that already has a on/off switch and a fuse. In this way is possible to use a standard power cable to power up all the system.
The lamps and fan are connected to the main wire connector on the left :


EasyEDA Version


Since the PCB has some errors and the connectors doesn't reflect the connected modules, I decided to redo the schematic and PCB in case to duplicate the project and I did that with EasyEDA.
The project is hosted on EasyEDA and is public.

Note that as on December 2018 the new PCB is not yet produced.
For the time I'm still using the old PCB for my prototypes.  If somebody wants to use the new PCB it is on your risk, I'm not guarantee something not yet tested.



The new PCB designed with EasyEDA



No comments:

Post a Comment