Project #1 – Part II

I finally got around to drawing the circuit board.  To do this, I decided to use the gEDA project, put the project into gschem, then use geda’s pcb software to draw the circuit board.

This was an unusually frustrating thing to do.  I selected gEDA, as I love open source, but like many open source projects it simply is not up to scratch.  Many problems occured, like not finding a few very basic parts in the footprint library (TO-5 and 10mm header), struggling to get the netlist working from gschem to gEDA-pcb, and also general frustration like the gEDA-pcb not working correctly in Ubuntu.  I guess they use a direct framebuffer to draw the PCB window over the screen, as I could not view anything beneath the PCB.  Also not being able to simply “ctrl-c, ctrl-v” to copy-paste is not very nice.

As frustrating as it may have been, I finished the circuit board.  I would not recommend using gEDA-pcb.  For other projects, I will use other free options, and having had good experiences with Designspark Mechanical, I’ll next try Designspark PCB.  gschem does seem to work nicely enough, though.

Here’s a screenshot of the final schematic I used:

The circuit board is shown here:

There are lots of problems with this PCB layout.  The biggest problem I can easily identify is that there is no ground plane.  I could not get the PCB software to draw a nice ground plane which was connected to the ground of the circuit, it insisted on having clearance to ground, and after some fiddling I simply gave up.  The gEDA-pcb project, while very ambitious and laudable, is just not ready for use yet.

I will share the schematics and PCB files on request.  Just pop me an email at !

Next step is to get the blank circuit board into a final circuit board.  I am going to CNC this board in a few days time and post the results!

All of the best and enjoy the day!

-Peter Peiser

Project #1 – PID Temperature controlled oven, start of project

I’m building a PID temperature controlled oven.  I’m going to use a triac (BT138), thermistor and microcontroller to control the oven.  I speculate that the oven does not have lots of electronics between the power plug and the element, therefore I’m going to try to control the element’s heat via the power supply directly.

(Note: I’m not an expert in power electronics.  I studied mostly small-signal electronics and software development.)

This is how I designed the temperature sensor circuit that connects to the microcontroller:

A0 connects to the analogue input for the Atmel chip (ATMega328P), and I use the op-amp to buffer the input as the datasheet states that the ADC input should not have more than 10k impedance.  I use the Arduino circuit board.

The switching circuit I designed as follows:

The forward voltage of Vce has worst case maximum of 0.4V at 100mA, and the gate voltage trigger of the BT138 is approximately 2V with a minimum of 0.7V.  Therefore the current through the resistor will be approximately (5 – (0.4 + 2)) / 10 = 240mA as a minimum worst case, and at most (5 – (0.3 + 0.7)) / 10 = 400mA as the maximum worst case.  This gives an (0.4)^2 * 10 = 0.2W power dissipation for the 10 ohm resistor.  A 1/2 Watt resistor should suffice.

There should be better opto-isolators for triac circuits, but this one I already have on hand.  D0 connects to a digital output on the ATMega chip.  I use the BT138 600E as the voltage in South Africa is 230V and the oven is 1500W (the oven part of it).

The oven should not draw much more than (1500/230)= 6.52A, but I’m using an oversized triac (should be able to handle 12A) to make sure that it doesn’t overheat or otherwise break with an overcurrent fault.

Care should be taken to isolate the high-voltage parts from any people or animals that might not enjoy frying.  To do that, I’m going to put the high-voltage parts (the half of the circuit with the optocoupler, triac and power supply) in a separate enclosure.

I’m going to source the parts I don’t already have and post again to indicate progress soon.

Keep well!

-Peter Peiser