Monday, July 29, 2013

Arizer V-tower rebuild



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!



Code:

        INCLUDE 'derivative.inc'
        XDEF _Startup, main
        XREF __SEG_END_SSTACK
MY_ZEROPAGE: SECTION  SHORT
MyCode: SECTION
_Startup:
main:   LDHX  #__SEG_END_SSTACK
        TXS
        CLI                    
        LDA   #%01110011
        STA   SOPT1
        MOV   #%01000100,ICSC1
        MOV   #000000,ICSC2
        MOV   #$FF,PTBDD
        MOV   #$F9,PTADD
        MOV   #$06,PTAD
        MOV   #001000,MTIMCLK  ; prescaler= 64
        MOV   #16,MTIMMOD      ; 15625/256=61  61/MTIMMOD=Hz
        MOV   #000000,MTIMSC   ; TOIE=0, TRST=0     
      LDHX   #312        ;10Hz
      STHX  TPMMODH
      LDHX  #220         ;300d=10.7V=70.6%  #220
      ;STHX  $0064        ;SAVE DUTY
      STHX  TPMC0VH      ;PIN 16
      MOV   #$28,TPMC0SC  
      MOV   #$08,TPMSC
      LDHX  #0
      STHX  $0062
      LDA   #49
      STA   $0060
      STA   PTBD        
LOOP  BRCLR 1,PTAD,III
      BRCLR 2,PTAD,DDD
      BRA   SK
III   JSR   III2    
      BRA   LOOP
DDD   JSR   DDD2
      BRA   LOOP
SK    JSR   TIMER
      LDHX  $0062
      AIX   #1
      STHX  $0062
      CPHX  #$5460
      BHI   P_OFF
      BRA   LOOP
P_OFF LDHX  #0   ;TURN OFF THE ELEMENT
      STHX  TPMC0VH
      MOV   #$00,PTBD
HERE  BRA   HERE              
      SWI
;*****************************************************
;      ROUTINES
;*****************************************************
III2    LDHX  TPMC0VH
        AIX   #1  ;INCREASE TEMP AND DISPLAY
        CPHX  #266   ;HIGH LIMIT=85%
        BHI   H_LIMIT
        STHX  TPMC0VH
        ;STHX  $0064
        LDA   $0060
        ADD   #1
        STA   $0060
        STA   PTBD
        JSR   TIMER  ;DEBOUNCE
H_LIMIT RTS          
DDD2    LDHX  TPMC0VH
        AIX   #-1  ;DECREASE TEMP AND DISPLAY
        CPHX  #172     ;LOW LIMIT=55%
        BLO   L_LIMIT
        STHX  TPMC0VH
        ;STHX  $0064
        LDA   $0060
        ADD   #-1
        STA   $0060
        STA   PTBD
        JSR   TIMER  ;DEBOUNCE
L_LIMIT RTS                  
TIMER   BRCLR 7,MTIMSC,TIMER      ;WAIT FOR TOF
        BCLR  7,MTIMSC            ;CLEAR TOF
        RTS

3 comments:

  1. I have been working on a custom vaporizer for around four years. I make my elements out of ceramic epoxy and nichrome. Temperature is controlled using a k type thermocouple, arduino, relay, and pid. I am about to change methods again though. I recently found a castable ceramic for small parts. I'm going to 3d print them, then make a silicone mold of the print and cast the ceramic within. I went from using any laptop power supply with village from 12-19 and at least 1 amp, to being able to use any electronic cigarette battery. Not quite there yet, but the original that looks like a travel coffee mug plugs into the car DC jack or at home the power supplies are used. I think that I can create a hand held version with a momentary switchfor almost instant heat using around 6 volts at 2 amps. I'm still working on that and waiting for the ceramic. On the other hand, your comment on cheap , available elements made me think. I have the materials, perhaps if you have a design in mind, I could create it. The trial size of the ceramic is $148 per quart. I also use borosilicate glass with the elements to keep it clean. I'm only one person and it's hard to do every design and produce it quickly. I have a custom arduino design that I've had the boards produced and I have all the components as well. It has an LCD that anything can be displayed on and the relay is on the board as well as the max6675 converter for the k type thermocouple.

    ReplyDelete
  2. It seems to me that you have darn near nailed the efficiency part. Way to go! I never though of using a car as a source but that is an awesome idea. If you are propositioning me with a business partnership I am flattered, but unfortunately I will not be able to afford such a large venture at this time. I am really more into the idea from a hobbyist perspective for fun. I think there is a lot of competition out there for vaporizers right now, but I always encourage entrepreneurship. I am very poor right now, but I'll give you free design advice if you want. It seems to me that you have that part down already. Good luck!

    ReplyDelete
  3. Did you ever figure out your feedback sensor? In your HaD comment you mentioned a very low resistance across the two terminals: in my experience this indicates a thermocouple sensor which is composed of two wires of dis-similar metals. The junction of the wires creates a VERY small voltage, which requires a very sensitive ADC to measure. Oh, and the value isn't linear, it requires some interesting math to correlate to temperature.

    A good cheap way to test this theory would be to find someone with a nice Fluke multimeter: the nicer models have a mode for reading the common types of TCs, J and K type.

    ReplyDelete