So my vaporizer broke and I thought I might try to fix it. At first I thought the heating element was the cause because there was some brown discoloration on the wire side of it, but then upon inspection of the external power supply and components I discovered that almost everything was destroyed, probably from a transient. This quickly turned into a complete rebuild. All temperature mentioned in this article is in Fahrenheit.
So all I have to start with is a heating element. I am surprised to see that heating elements like these are hard to find, expensive, and only come from china. If anyone knows where I can buy small cheap ceramic elements please tell me.
My instant thought about heat control was pulse width modulation, common to most micro-controllers. A digital to analog module would probably work better. This pwm signal would control a beefy transistor to control the amount of current to the element. I am aware that the two small conductors protruding from the element are some sort of sensor. They provided garbage when I measured them and I didn’t know if they provided a voltage or a resistance so I did not use them. This means that there is no feedback in this project! Gasp! If anyone can explain how those are used for temperature measurement please tell me.
I tried to do this project as cheap as possible. I would have liked to use an old computer PSU, but I need at least 15V at 3A. Even after bridging the +12V and -12V lines, the PSU would give out because the -12V line can only handle 800mA. I tried the reference adjustment trick but it didn’t help that much. So I had to buy a Mean Well rs-100-24 power supply. If any of you are lucky enough to find old high output power supplies keep them, they are valuable and expensive, and could go in your next project. I used the case of a computer PSU because it had the fan, AC receptacles and a switch I needed.
With the power supply solved I moved to power transistors. I broke open a few computer PSU to find that many have power transistors inside, but some do not. After experimenting with a few I decided to use a pair of 13009 NPN transistors. Amazingly they were already screwed to the same heat sink. The benefit of using these over MOSFETS is that the output is linear and it makes controlling the heat much easier. I took other heat sinks and screwed them all above and underneath the pair until I had a heat sink that weighed about a pound. Even with a fan on it, it reaches 140 degree F. The main challenge in this project it seems is heat management. The factory circuit of the vape used a pair of F7416 P-channel mosfets which have a very low effective resistance. As you can see from the only factory circuit board: there are no heat sinks. It appears that buying very efficient transistors is worth the money.
Note that I use a weird Darlington-like circuit for my microprocessor interface. These 13009 transistors needed about 30mA each through their base to fully turn on. I was worried that PWM would harm the power supply so the 100uF capacitor smoothes the waveform to be more like DC. I did not have an oscilloscope but that would definitely help.
I chose the 9s08 because it is cheap, the programmer is cheap, and it has an internal oscillator. But with only 14 I/O I could not make an extravagant display, even with external ICs. Since the selectable heat range is 250-375 I decided to make a binary display with 1 representing 250 degrees F and so on. This way, everything can be displayed accurately.
Math time! There is no relation between power dissipation and thermal energy. I believe this is because power is linear but heat is volumetric. So I had to find a relation experimentally. I made the voltage across the heating element 10V. From now on I will call the heating element the coil. The coil has a DC resistance of 6.6 ohms. So the coil current is 1.515A. The coil was contained in its original housing with the top closed off so no air could escape. After allowing the coil to heat for a generous 30 minutes, I took the measurement with an Extech 42505 infrared thermometer (the kind you point and shoot). The temperature read 280 degree F. Take 1.515A/280 and we get 5.41mA per degree F. With this relation I can now accurately predict the temperature.
Because of my slow bus clock, and the need for high precision PWM, I struck a balance. So each time a button is pressed the temperature will change by +/- 1.4 degrees, and the display will verify this.
With all these new electronics, I needed a new case to hold it all and be sturdy. It’s not technical so I’m not going to talk about construction, just get ‘r done. I made it in three pieces so it could be taken apart without tools for cleaning or repair (and you better believe it will need cleaning). A bit bulky but solid. I got the small amount of scrap plexiglass I needed for free from my local Lowe's! I used that piece of pottery on top of the bowl to contain heat so I could measure it. Enjoy!
XDEF _Startup, main
MY_ZEROPAGE: SECTION SHORT
main: LDHX #__SEG_END_SSTACK
MOV #001000,MTIMCLK ; prescaler= 64
MOV #16,MTIMMOD ; 15625/256=61 61/MTIMMOD=Hz
MOV #000000,MTIMSC ; TOIE=0, TRST=0
LDHX #312 ;10Hz
LDHX #220 ;300d=10.7V=70.6% #220
;STHX $0064 ;SAVE DUTY
STHX TPMC0VH ;PIN 16
LOOP BRCLR 1,PTAD,III
III JSR III2
DDD JSR DDD2
SK JSR TIMER
P_OFF LDHX #0 ;TURN OFF THE ELEMENT
HERE BRA HERE
III2 LDHX TPMC0VH
AIX #1 ;INCREASE TEMP AND DISPLAY
CPHX #266 ;HIGH LIMIT=85%
JSR TIMER ;DEBOUNCE
DDD2 LDHX TPMC0VH
AIX #-1 ;DECREASE TEMP AND DISPLAY
CPHX #172 ;LOW LIMIT=55%
JSR TIMER ;DEBOUNCE
TIMER BRCLR 7,MTIMSC,TIMER ;WAIT FOR TOF
BCLR 7,MTIMSC ;CLEAR TOF