BaKx (heating principle) inspired desktop vape

highvaper

Well-Known Member
No deliveries of yet so cant finish off the final bit however have been sorting out code to make it a bit more maintainable and even added the start of some kind of ability to get to a menu/settings screen but mostly just making the code easier to maintain and read.

i have had a test with different metal heating elements though


With the wire wrap - power draw with one coil on is close to 150W - also there is minimal heat retention so thats a no no.

The non shiny element with just one heater pulls about 65W with decent heat retention (not timed it properly but its hot for a while)

The shiny one pulls about 125W - not sure i think stainless compared to just plain steel of the other - stay hot for ages as well.

I did a test with the top of a clipper lighter - very good as well - heated up very quickly but dont think as good at retaining the heat as its a bit thin but i like it as no jaggered edges and easy to get hold of - have cut and burnt myself a good few times now.


@CaleidosCope looks like your idea has legs; https://fuckcombustion.com/threads/glass-vapes-from-the-rogue-wax-works.52119/page-23


Yay - just had delivery of some MAX6675 Thermocouple controllers - hopefully should finish the build later - only need some decent glass straws now - i have ordered some but am not sure if they are going to have a big enough inner diameter.

How big is the BAKx straw inner size?
 
Last edited:

highvaper

Well-Known Member
Looking good on initial testing - only one coil and need to mess with power and heater element size as i think the big one is too much



Getting some odd readings from the thermocoule - its weird all ok and then a sudden drop by up to 20C which is messing with the PID big time:

time, filtered_temp, raw_temp,setpoint,power,heater_on,PID
1709857559, 160.0, 160.0, 160, 0.45, False, (0.0, 0.0, 0.45)
1709857559, 159.5, 159.5, 160, 0.45, False, (0.0, 0.0, 0.45)
1709857559, 159.0, 159.0, 160, 0.45, False, (0.0, 0.0, 0.45)
1709857560, 159.0, 159.0, 160, 10, True, (18.0, 3.6, 1.8)
1709857560, 153.375, 147.75, 160, 10, True, (18.0, 3.6, 1.8)
1709857560, 148.5, 148.5, 160, 10, True, (18.0, 3.6, 1.8)
1709857561, 149.5, 149.5, 160, 10, True, (189.0, 10, 17.1)


U can see for the second time stamp 1709857560 after the heater gets switched off the temp drops in no time - i have the probe touching the metal pretty much so its weird - i have applied a filter to try and blend it out but that messes with the pid - im thinking perhaps some cross talk on the cuicuit so when the heater pin is pulling power it messes with the max6675 voltages and get odd readings - im going to try with a different max6675 chip and see if its just that one.
 
Last edited:

highvaper

Well-Known Member
After sleeping on it i think there is a more fundamental issue at play the and after a test with just the thermocouple messing turning the coils on and off and moving it about in the tube i pretty sure im getting an induced current in its wires. Im not sure i can compensate as in when the heater is on to subtract x degrees as moving the probe about changes induces more current as it cuts through magnetic fields.

I think there are 2 possible solutions:

Firstly change the change how we are taking measurements - ie use infra red/non contact (thats an issue with the glass outer layer) or perhaps use a platinum thermocouple but again not sure how that will be affected.

Second way is to maybe take a measurement in between when the heater is on but not sure about timing and how long it takes for induction effect to subside. Or some how combine the off reading with the on one as it does jump down pretty consistently when in the tube and not moving so maybe use the on temp readings differences and add to the most recent off heater temp to work out what the current temp is without the interference.

I have tried wrapping some foil around the wire and made no difference.


Well this seems to help

Code:
class Thermocouple:
    def __init__(self, sck, cs, so):
        self.sck = sck
        self.cs = cs
        self.so = so
        self.thermocouple_sensor = MAX6675(self.sck, self.cs, self.so)
        self.last_known_safe_temp = self.read_raw_temp()
        self.raw_temp = 0
   
    def read_raw_temp(self):
        raw_temp = self.thermocouple_sensor.read()
        self.raw_temp = raw_temp
        return raw_temp

   
    def update_filtered_temp(self, heater_on):
        raw_temp = self.read_raw_temp()
        if heater_on:
            # If the heater is on, we need to adjust the temperature reading based on the last known safe temperature.
            # We calculate the difference between the current reading and the last known safe temperature.
            temp_difference = raw_temp - self.last_known_safe_temp
            if temp_difference < 0: # Adjust only if the induced temperature is lower
                # If the induced temperature is lower, we adjust the reading upwards.
                adjusted_temp = self.last_known_safe_temp + temp_difference
                return adjusted_temp
            else:
                # If the induced temperature is not lower, use the raw temperature directly.
                return raw_temp
        else:
            # If the heater is off, update the last known safe temperature and use the raw temperature directly.
            self.last_known_safe_temp = raw_temp
            return raw_temp

    def get_filtered_temp(self, heater_on):
        return self.update_filtered_temp(heater_on)

It does flop about a little but once it gets closer to the setpoint it sort of stabilises even though the temps still look like they are fluctuating need to perhaps add a catch in th class to maybe if too many adjusted values in a row to switch off the heater and take a new safe measurement.

Also there is a massive thermal delay with the glass like it takes ages for the inner straw to get to a decent temperature but thats the compromise i suppose from blasting it with a butane torch vs getting it up to temp slowly - maybe i need get the outer tube closer to 300C? - it has sped up with 2 heaters on but the glass does dissipate the heat well and a few mm from the metal elements its much cooler so need to wait for it to get up to temperature - have had my first proper vape with it though with some qwiso dabbed in the center of the staw and alls good :clap:
 
Last edited:

TigoleBitties

Big and Bouncy
Really enjoying the way your project is coming along 👍. I have been drawn to the BakX previously because I've always felt that a temp-controlled glass tube would be tasty and clean. That was my motivation for getting a vaponic and fiddling with it with a metal sleeve and manual Wand control. I almost pulled the trigger on a BakX but thought it was a bit too fragile/expensive/config intensive.

I hope your end product is great because I'd like to buy one or build it myself if it's not too involved.
 

highvaper

Well-Known Member
@TigoleBitties theres no plan to make a product from this and just enjoying some tinkering - if some one want to run with this and make a device that would be pretty cool (pop one in the post for me to test if you do please)

Hopefully once i have a bit more done ill get all the code and a parts list together and other people can have a go and build their own.

Some more work done to the temperature reading when effected by induction.


Code:
    def update_filtered_temp(self, heater_on):
        raw_temp = self.read_raw_temp()
        if heater_on:
            temp_difference = raw_temp - self.last_known_safe_temp
            if temp_difference < 0:
                self.filtered_temp_counter += 1
                # Check if the difference is over 20 degrees
                if abs(temp_difference) > 20:
                    return (self.last_known_safe_temp, self.filtered_temp_counter > 3)
                else:
                    return (self.last_known_safe_temp + abs(temp_difference), self.filtered_temp_counter > 3)
            else:
                self.last_known_safe_temp = raw_temp
                self.filtered_temp_counter = 0
                return (raw_temp, False)
        else:
            self.last_known_safe_temp = raw_temp
            self.filtered_temp_counter = 0
            return (raw_temp, False)

Called with
Code:
    ih_temperature, need_ih_off_temperature  = thermocouple.get_filtered_temp(ih.is_on())
 
    if need_ih_off_temperature:
        ih.off()
        print("Getting safe off ih temperature")
        utime.sleep_ms(300) # lets give everything a moment to calm down
        ih_temperature, _ = thermocouple.get_filtered_temp(False)


Seems to have stabilised the temperature readings really well, this only really happens when the heat is ramping up.

Code:
1709919051,134.0,68.0,200,10,True,(1320.0, 10, -3.0)
1709919051,134.0,80.75,200,10,True,(1320.0, 10, -3.0)
1709919052,136.0,136.0,200,10,True,(1280.0, 10, -4.0)
1709919052,135.5,135.5,200,10,True,(1280.0, 10, -4.0)
1709919053,136.0,75.0,200,10,True,(1280.0, 10, -0.0)
1709919053,136.0,81.5,200,10,True,(1280.0, 10, -0.0)
Getting safe off ih temperature
1709919054,138.25,138.25,200,10,True,(1235.0, 10, -4.5)
1709919054,138.25,138.25,200,10,True,(1235.0, 10, -4.5)
1709919054,138.25,86.0,200,10,True,(1235.0, 10, -4.5)
1709919054,138.25,91.5,200,10,True,(1235.0, 10, -4.5)
1709919055,139.0,139.0,200,10,True,(1220.0, 10, -1.5)
1709919055,138.25,138.25,200,10,True,(1220.0, 10, -1.5)
1709919055,139.0,81.5,200,10,True,(1220.0, 10, -1.5)
1709919056,139.0,90.5,200,10,True,(1220.0, 10, -0.0)
1709919056,141.0,141.0,200,10,True,(1220.0, 10, -0.0)
1709919056,140.75,140.75,200,10,True,(1220.0, 10, -0.0)
1709919057,141.0,94.0,200,10,True,(1180.0, 10, -4.0)
1709919057,141.0,94.25,200,10,True,(1180.0, 10, -4.0)
Getting safe off ih temperature
1709919058,143.0,143.0,200,10,True,(1140.0, 10, -4.0)
1709919058,143.0,143.0,200,10,True,(1140.0, 10, -4.0)
1709919058,143.0,96.0,200,10,True,(1140.0, 10, -4.0)
1709919058,143.0,97.5,200,10,True,(1140.0, 10, -4.0)
1709919059,143.75,143.75,200,10,True,(1125.0, 10, -1.5)
1709919059,144.0,144.0,200,10,True,(1125.0, 10, -1.5)

Heres the graph of the most recent test - pulling about 100w on initial heat up.


A quick video of it keeping the temperature stable from the above test - sorry not sure why it got rotated - wait to the end to see power draw


Pretty chuffed with that.


Just clarifying stuff for myself and realised this may be useful to post so its clearer on how things are connected up

Code:
[Raspberry Pi Pico]
    |
    |---[GPIO 6] ----> [MAX6675 SCK]
    |---[GPIO 7] ----> [MAX6675 CS]
    |---[GPIO 8] ----> [MAX6675 SO]
    |
    |---[GPIO 17] ---> [DS18X20 OneWire] //not really needed may use to check on coil curcuit temps
    |
    |---[GPIO 1] ----> [SSD1306 SDA]
    |---[GPIO 0] ----> [SSD1306 SCL]
    |
    |---[GPIO 12] ----> [Induction Heater Coil]
    |---[GPIO 13] ----> [Induction Heater Coil]
    |
    |---[GPIO 5] ----> [Rotary Encoder CLK]
    |---[GPIO 4] ----> [Rotary Encoder DT]
    |---[GPIO 14] ---> [Button]
 
Last edited:

highvaper

Well-Known Member
Well the weekend was mostly just working on the code as im still waiting for some glass straws with (I hope) a wide enough internal diameter so no experimenting on the induction heater / glass side of things.

So pretty much dealing with user input and made a decent start at decoupling the various classes - if anyone else is going to work on the code this should make it far simpler to understand whats happening.

I did go down a bit of a rabbit hole playing with the display to get long error messages to scroll nicely (not totally happy but its good enough for now) and adding some protecting so timers dont get started when already running and finished off some decent error catching for the thermocouple and display initialising (should help figure out any loose/mis-wirings/hardware errors).

This is how the input stuff is working:


Turning the rotary dial it will increase / decrease the setpoint, if you press the dial while turning it increases/decreases by 10 instead of 1.
I have wired up a push button so you can either push that or press in the dial - it does the same thing.

When you press the button/dial a timer is started and you have 750ms to then click more (if your not in the menu).

Single click then nothing happens - when menu sorted it will activate what option you have clicked.

Double click you enter the menu - not much happens here other than a dial scroll able list being shown and it exits back to normal after a timeout - clicking on the option selected doesnt do anything yet ...

Triple click enters/exits session mode which turns on/off the PID & Heater controller part ie actually starts to heat stuff up - there is a timeout so switches back to Off mode once after a set time. While in Session mode you can still adjust the setpoint, enter menu etc.

Holding the button for more than the 750ms then the PID & Heater controller will fire up in Manual mode if not in Session mode and no other click or dial turn detected.


Stuff like the button click and session timers will all be made adjustable as im sure some people will prefer a slower click time.
 

highvaper

Well-Known Member
Graphs, graphs!

Im keeping track of the last 128 temperature readings as there are 128 pixels horizontally, they are roughly the same timeperiod apart but there may be a tiny difference depending on timers but when the display is so small i dont think it matters.

Bar chart which resizes the y axis according to the largest/smallest value in the range:



Line graph - y axis fixed to 10C per pixel so shows up to about 300C - dotted line is the setpoint - not yet tested with PID to see how it goes but may scale the y axis within 10-20 of max value to get nice graph of how PID is keeping to the setpoint (you can see it moves up and down on the graph as i turn the dial)



Pretty cool what you can do interface wise with just a rotary dial and click button.

Code a lot neater an anonymous github account setup need so almost happy with it to put it out for public viewing
 
Last edited:

highvaper

Well-Known Member
So the glass straws arrived and they are purple - i misread the description but guess what they work great.

First proper go was better than i expected with minimal amount producing a really nice buzz - i had been hitting the TM2 most of the day and this was so nice in comparison i really was surprised at te difference the heat soak makes.

there are a few images uploaded on the above post

you can see that as the heating element is quite long you can actually pack quite a lot in the straw. the draw isnt too bad if you pack it lightly - i do want to get a larger diameter inner straw to see how that performs too.

Also finished off the PID setpoint graph which shows temps about 15C either side of it - its not historical so if you move the setpoint then its global - maybe ill add a history of the setpoint but at the moment the running setpoint graph is quite cool and i was really happy when it automatically moved the line around the setpoint when i changed it.



Just did a straw loaded with about 2 inches worth - wow - really wow - as much as i was impressed with the screwball for being able to blow through almost 1/2g in a few lung fulls this is the opposite in that a small amount goes a very long way.

So in principle it works pretty well - there is a bit of faffing required with the thermocouple and getting it to stay pressed against the glass and not shorting out on the metal elements - one possible solution i may try is to drill a little hole in the most outer tube and thread the thermocouple through it - added bonus is it reduces the amount of wire in the coils so maybe induction effects on temp reading will be reduced - i think with jewellery drill bits and a dremel it may be doable without being a glass expert.

Im trying to keep this as cheap and no skill required as possible so drilling a hole in the glass may be too hard plus more expense on equipment - from a quick search the high speed mini dremel thing arent too pricey (well its about as much as the rest of the stuff in total so ... to drill a tiny hole may be overkill).

The other option perhaps is to get a glass cutter and try out cutting the tube so there are two parts and then put the probe in between - looks a lot simpler to do than drill and doesnt need expensive tools:


Also then you can cut the bottom off and use the smaller test tubes as a wider stem (they are the same diameter as a tiny mighty one but the walls are thinner so have a larger internal diameter) - ok they may be a bit sharp and well ... not the best idea.

Im going to get some 20mm diameter tubes - they wont fit in the current outer tube i have but will fit into the 30mm ones and then i can have a really chunky stem size and use the j-hook stem - i will need to make some new coils which will be a turn fewer than the current ones - also maybe try cutting down the outer tube and have just one heater to see how that goes (think more portable type thing perhaps).


Basic housing made after dropping it all earlier today


Again a few pics in that post

Yes cardboard may not be the most suitable material for something getting hot. Wood would be better.
 
Last edited:

highvaper

Well-Known Member
Well development has slowed other than adding an LED to indicate when its in session mode or manual (so i could get back some screen space on the graphs and remove the "Session: xx" timer display) also it will flash 3 times with a gap and repeat if when it boots up cannot initialise the display as it has no other way to let the user know of the error otherwise - an led is one of the most basic thing to get wired so hopefully from there it will help anyone with miswired screens etc.

But user testing has sped up - i have put the tm2 aside and only been using it today - the smaller 16mm tube is ok but overheats and doesnt hold temps that well - it could also be the lack of metal - i had to whack the setpoint up to 300C just to keep the inside of the tube above 200C.

The 18mm test tube with more metal on it so far i prefer. It takes longer to get up to temperature like a few minutes from cold but holds on to the heat really well, transfers it better to the glass straw and also to the air when inhaling. Also the tube temp is much closer to the heater reading and the glass acts as a really good buffer so when the heater gets hotter than the setpoint for a few secs it makes no difference to the glass temp.

The straw you can pack differenlty for a varied result - a small 1cm tightly packed one is ok for a quick hit but i have found putting a bit of gause about 1-2 inches in and then literally sucking a ground bit of bud and then another tiny bit of gause to hold it in place works a treat - depending on how you do it you can vary the draw from a loose joint to a cigartette or even tighter. Once its up to temperature you can take the straw out and "smoke" it like a joint for a few "puffs" and then put it back in the tube to keep warm. I got 4 of the stems for about $10 so can have one ready to go once one is hot and finished.

Also my cardboard arrangement is working pretty well - been keeping a very close eye on it perhaps i should get the 1-wire thermometer inside it to make sure it doesnt get too hot in there.


More user testing over lunch - its getting hot - i think 10-15 min session the heat from glass has transferred to the copper coil and into the box so its hot - need to thing about some kind of heat sync perhaps even a little fan if it gets too hot and wood is going to be a better idea for the main housing. I think this is getting better extraction than the TM2 and really like the dip the straw in get it hot and take it out for for a pull or 2.


Just added a little 12v pc type fan and it makes a big difference temp wise inside the box - ok possible future stuff to now do code with - add back the 1-wire temp sensor and tie that into a little mosfet switch for the fan when temp goes past a certain level - all pretty easy to do but tbh im trying to finish off tidying stuff up and getting it on to github but keep finding little bits which are distracting me.
 
Last edited:

Hippie Dickie

The Herbal Cube
Manufacturer
@highvaper - wow, that's a blast from the past - 14 years ago. just a step on the path to where i am today. definitely moved way beyond that iteration. larger heating element is not necessary with a responsive enough nichrome80 heater. my batteries can pump out 70A.

drilling glass: i use a .75mm diamond drill bit in a dremel in a drillpress stand, 20k rpm (i think - without digging out the notes), and always with the hole under water. i thought this was for heat dissipation, but saw a YT video of drilling a hole in the bottom of a ceramic mug - the water changes the drilling characteristics so the ceramic (more or less the same as borosilicate glass) doesn't crack. Rehbinder Effect

i ended up needing a 38mm long x 15mm diameter oven tube (that vial sits in) and went to India to have them custom cut. my goal was to leave the waste glass at the factory so they can recycle it versus me cutting down 100mm long tubes and just throwing the waste away. i probably have a bit about that in my thread.

i have never explored induction heating - seems to me like it adds a lot of complexity. big coils. (inductors?)
 

highvaper

Well-Known Member
@Hippie Dickie your thread of the Bud Toaster has so much useful information in it.

I kind of went down the induction route as a way to avoid having a hot coil type thing - i have a screwball vape and its really nice but wanted an all glass arrangement like the Vaponic but without butane and better temp control and without a really hot coil just sitting there - my initial idea was some kind of portable induction thing like for the Dynavap but for all glass air path.

I realise the setup i have done could quite easily replace the induction heater with something else - i did have a quick play with the stainless steel ribbon and a normal mod box with surprisingly good results within about 30 mins.

Once i get a bit more done i may re-look at that and have a mess about with some batteries and just a wrap of the ribbon around the tube or some nichrome which is basically the same to how your heating the outer tube - the show stopper i hit with a mod was resistance cant be more than about 3 ohms so anything more than about 10cm of ribbon and its a no no but with custom hardware powering it then i suppose you can set the limit to what ever you want (within limits of battery obvs).

Also the induction heaters are pretty simple to get hold of and mess with - i havent fully dived into to the power side of the nichrome type heater but may be more work than just buying off the shelf zvs inductor and rewinding the coil.

Rite have added a heater object and can switch it between the induction or element type with an option - basic element heater class:

Python:
class ElementHeater(BaseHeater):
    def __init__(self, element_pin):
        super().__init__() # Initialise the BaseHeater attributes
        print("ElementHeater Initialising ...")
        self.element = Pin(element_pin, Pin.OUT)
        self.element.off()
        print("ElementHeater initialised.")

    def on(self):
        self.element.on()
        self.is_on = True

    def off(self):
        self.element.off()
        self.is_on = False


class HeaterFactory:
    def create_heater(heater_type, *args, **kwargs):
        if heater_type == 'induction':
            return InductionHeater(*args, **kwargs)
        elif heater_type == 'element':
            return ElementHeater(*args, **kwargs)
        else:
            raise ValueError(f"Invalid heater type: {heater_type}"

Need to just double check the other bits to make sure they just use those 3 methods and the induction part could be switch out with whatever heater type can be turned on off from a simple pin switching to on/off - need to perhaps add something which can deal with a variable power level but for the time being this should be good enough.
 
Last edited:

Hippie Dickie

The Herbal Cube
Manufacturer
but with custom hardware powering it then i suppose you can set the limit to what ever you want (within limits of battery obvs).
exactly. very powerful. wide open options. like controlling fire.

i use a 1.25" diameter stainless steel (28 ga) cylinder surrounding the 15mm heater coil, with a 1/8" air gap to the inside wall of the wood cube. 420°F coil and the cube barely gets warm after 7 minutes.
 

highvaper

Well-Known Member
@Hippie Dickie just re-reading your build thread backwards to see how to actually deal with powering the heating element and saw the line "i have labored over the probe positioning since the beginning" - this is something im obviously dealing with as well and had this idea and was wondering if you ever tried it:


Well back to my reading as i have batteries, ribbon wire and was wondering what else i needed as i am now curious to see how that would work and if the setup is able to just plug and play with a different heater type. The glass tube and straw with a couple of bits of gauze is working better than i expected and think with a similar stem diameter to a TM2 would really pack a punch.

Im preferring the "smoke" over the TM2 but its not as convenient - but a LOT cheaper - like what under $10 on glass bits (well i had to buy 5 of each tube but if you break it down in individual bits) - electronics and induction heater stuff under $50. I would suspect someone with basic skills (like me hardware wise) could wire one together from a diagram and have it up and running within maybe 2 hrs with faffing about trying to get the pi pico loaded up etc.


I have just realised this could easily be modified to deal with dab press plates as well - most of the dab presses i have seen have 2 pids and are quite overkill for just a 2 x heater rods, 2 x metal plates with a hole in and a simple press. I did look at one a while ago but frankly was so over priced i didnt bother but this has got me thinking about that again now too. All the current setup needs is an extra thermocouple to deal with 2 plates and a bit more code its pretty much done.
 
Last edited:

Hippie Dickie

The Herbal Cube
Manufacturer
part of my problem with mounting the k-type was the type - bare vs insulated. the insulation made the k-type a lot thicker and harder to mount. the same for the BBQ thermometer. eventually i got a thermometer with a much smaller sensor (RT). and switching to ribbon allowed parking both sensors under a loop of the coil inside a polyimide tube. the k-type is also in its own tube. if the bare k-type touches the heater coil it creates an entertaining spark.

my goal is to have a simple, repeatable technique for placing the sensors for manufacturing ease and long-term reliability. based on daily testing with the same cube for several years, i think my current tech is sufficient.
 

highvaper

Well-Known Member
@Hippie Dickie - your way ahead of me on all of this (like decades) and your input is really appreciated - was just reading up on your use of the bbq thermistor and was just looking at the HT-NTC100K as they are quite cheap and seem to be able to handle up to about 300 - i saw your post on them being a bit too slow response wise but for checking on slow changes to the glass/tube temp is useful and am now curious to see how they would be affected by the induction effect.

Also for other applications eg a dab press a few secs really dont matter so may be a simpler solution than the k-type. Im seem to have built a general purpose heater control which you can plug in different configs as needed - i'm thinking of doing some kind of basic hardware config file so the user can simply enter the list of components and what gpio pins they are connected to. So it can sort of configure itself and load up what heater type or temp sensor automatically.

I know i could have used a controlled heat source over the years eg for purging bho/qwiso and with a bit of pipe in an induction heater with a metal flat top would work as a nice little hot plate too - you could use the 1-wire thermometer/k-type/non contact/thermistor
 

highvaper

Well-Known Member
I like the jubilee clip idea - could be useful for controlling the stainless steel ribbon - thanks for the link and idea.


I have got side tracked now looking at element heaters - but have finished separating the menu from the display classes as they had become very intertwined and now have a working menu which you can select the graphs, pi temp and other variables with the idea that editable ones will be editable eventually.

This is my plan at the moment - i think this is sort of how a 510 mod must work:

Measure the current & voltage across the element = power being dissipated as heat P = IV

Calculate the expected temperature increase - need to investigate a table of data for this - 1mm x 0.1mm steel ribbon im sure this must exist also this is very useful: https://vapinghardware.com/calculators/coil-wrap-calculator/

MOSFET to control the current (maybe also look at adjusting voltage but think thats going to be harder than just on/off with the MOSFET)

Pi Pico will then switch the MOSFET based on the current & voltage.


So I have just ordered a few ACS712 30A Range Current Sensors and made the below:



The above voltage divider circuit - this will get connected to a gpio pin to measure Vout (bit of the element closet to negative battery terminal)

I had a play with a usb type rechargeable battery (measured 2.9v under load compared to 5v when not) - the resistance of the ribbon=1.15 ohms, the resitor=10 ohms, Vs=2.9 and Vout=2.6 so safe enough for plugging into the pico plus the ribbon wire got to hot to handle and that was only about 1 amp pushing through it.

I will then add in the thermocouple to get a proper temperature reading and see how off real temperatures my home made TCR setup is but think may be a nice way to slowly bring the glass up to temperate without hitting battery too hard - i do have a few holes like how do i read the source voltage perhaps another gpio pin but need to step it down to the a safe level for the pico to handle - i do have one of those 3 batter BMS systems so need to see if it can work with just one battery perhaps.
 

highvaper

Well-Known Member
very good point - im looking at doing a heating element with the ribbon wire but of course i dont need the source voltage do i ? only to keep eye on battery and how its performing.

Ah it could be useful to work out the resistance of the element on the fly - if i have input V output V and known resistor i can calculate the elements resistance.

My non digital circuit knowledge is from high school so im digging about online and learning this on the fly so please point out anything dumb
 

Hippie Dickie

The Herbal Cube
Manufacturer
well, i've just tried to keep things simple in my design. i use a voltage regulator chip (low drop out, 100 mA) so i can handle any battery voltage up to 18v (dewalt power pack or car battery). the output of the Vreg is 4.5v which suits the MAX and PIC. the heater coil feeds right off the battery. the Vreg turns off before the two 26650s in series drop too low to cause discharge damage. blue LED goes out - time to recharge.

the PIC has a PWM function to control the MOSFET gate. make sure the on resistance is as low as possible. 4.5v was adequate gate drive voltage to get a milliohm resistance. someone schooled me on this - my first MOSFET choice got hot enough to fry an egg - i had the red LED attached to the gate which kept the voltage locked at around 2v - mucho resistance. i moved the red LED to the switched ground of the coil and the MOSFET runs at ambient temperature.

i use an 8-pin PIC. i like to think this is the simplest design possible for a temperature controlled vape.
 

highvaper

Well-Known Member
I thought the voltage regulation would be more involved compared to just flipping the current on/off with the mosfet - i will have more of a read on the vregs and perhaps try out both methods - im enjoying learning all of this very much.

Who would have thought that there were so many different methods to heat up a wire.

I went for the pico as the prototyping speed with micropython is amazing as you have a high level language and plenty of libraries to lean on for almost anything sensor wise you can think of so no dealing with bit bashing and timings of i2c/spi/1-wire buses etc - its not as neat as a pic but i suppose the goal has never been a finished consumer device.

Tbh i have amazed myself at how much i have managed to do software wise with it in such a short time - stupidly i decided to mess with the menu and try to get the contrast editable but some how have messed the rotary dial logic now so am just wasting time doing stuff i dont need to.
 

Hippie Dickie

The Herbal Cube
Manufacturer
note: the Vreg is just to provide power to the MAX and PIC. the MOSFET is controlling current to the coil with a direct battery connection. heater coil doesn't care what voltage it sees. my coil is 0.3 ohms, so pulling 18A from a fresh charge. just trying to be clear.
 

highvaper

Well-Known Member
Ah thanks for clearing that up was doing some reading on buck convertors for that but looks like i can power the pi directly from one of the many molical p28a i have - i realise not as decent as the batteries your using but i have a load of them for my mod and tm2
 

highvaper

Well-Known Member
Finally fixed the menu issue and a lot happier doing a code dump to github now.


the main program is a bit dirty still and need a clear up but think should be in a lot better state for people to look at and even give it a go
 
Top Bottom