Shop OBEX P1 Docs P2 Docs Learn Events
PWM, resistance detection, and variable watt calculation — Parallax Forums

PWM, resistance detection, and variable watt calculation

OrladinOrladin Posts: 17
edited 2013-11-06 15:23 in Propeller 1
I've been an electronics hobbyist for several years and have quite a bit of experience in the area, and successfully made several successful projects using the Propeller chip. I also am (was?) a smoker, but have made the switch to the electronic cigarettes, or vaporizers. A bit off topic but I've been successful in my transition away from analog cigarettes, but I've spent a ridiculous amount of money trying to find one that consistently worked correctly and that I liked and have yet to find anything I've been completely satisfied with, so I've decided I want to design and make my own. From my experiences I've found the variable wattage ones to be better (for me) than the variable voltage ones, with variable wattage you get more consistent vapor off them than with variable voltage. I'm trying to figure out how to be able to read the resistance of the coil attached to the circuit (could vary between 0.8 ohms and 5 ohms) so I can calculate the voltage needed for my desired wattage, and then be able to apply power to the coil without frying my resistance detection circuit. I think I've come up with two options. Option 1 - when pressing the 'fire' button, read the resistance of the coil, calculate the voltage needed for my desired wattage, and use a variable voltage regulator to deliver a constant voltage to the coil, or Option 2 - read the resistance of the coil and the voltage of the battery and caclculate and use PWM to deliver full battery voltage to the coil in pulses to attain the desired wattage output. If using option two would it be worthwhile or even possible to read coil resistance between PWM pulses to achieve more accuracy on the output of the system?

There are companies that sell boards that do this such as the DNA20 by Evolv, but I really don't want to throw another $50-$75 at one not knowing whether its going to be worthwhile or not so I've decided to just make my own. I've been trying to research how they achieve what they do but haven't had much luck with it. Being a commercial product they're pretty secretive about their schematics and how they work, and I haven't been able to find any open-source-ish material or designs in this area either. I'd like to get something like this put together so I can put it out there so other people can make their own and change or improve the design as they wish, but am having trouble finding my starting point.

Anyone have any ideas or can point me in the right direction?

Thanks!

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-11-03 22:25
    I'd think you could do this with a motor control driver that has a current sensing ability. If you can measure the current through the coil and measure the voltage drop across the coil you can compute the resistance.

    You gave the resistance range, what's the voltage range? Or what is the power range you're looking for?
  • OrladinOrladin Posts: 17
    edited 2013-11-03 22:37
    The vaporizer I currently have can use a single 18650 battery which is 3.7 volts @ 2000mAh, a single 18350 battery which is 3.7 volts @ 900mAh, or two stacked 18350 batteries which would be 7.4 volts. They are Lithium batteries. I've noticed when fully charged these batteries are actually around 4.2-4.4 volts when fully charged, and my current vaporizer stops functioning and indicates a low battery when they are around 3.2 - 3.3 volts. I would like to use a different style of battery, I was planning on using these batteries http://www.all-battery.com/37volt-2100mah15cli-polycell.aspx they are LiPo 3.7 volt 2100mAh, they are capable of a high discharge rate (31.5 amps), so the current drain on them when this is in use shouldn't be anything near its maximum. I'd like to just use a single battery pack instead of two in series, I think it would make the charging circuit easier to design. The datasheet for this battery indicates the charge cutoff voltage is 4.2 volts and the discharge cutoff voltage is 2.75 volts.
  • OrladinOrladin Posts: 17
    edited 2013-11-04 07:06
    I'd prefer to design my own output circuit instead of using a prefabbed module i.e. Motor controller with current sensing because I want to keep it as compact as possible. I plan on laying it all out on a single board. My biggest problem is trying to read the coil resistance without frying anything when I apply power to the coil.
  • jmgjmg Posts: 15,173
    edited 2013-11-04 11:01
    Look for the PAC1720 / PAC1710 from Microchip (ex SMSC)
    These nifty parts are small and have current/voltage/power built in - I'd suggest the Dual 1720, as that can read I,V at the same time.

    You just need a single shunt, for the current gains of 10/20/40/80mV, and they can read down to 2.5ms if needed.
  • Mark_TMark_T Posts: 1,981
    edited 2013-11-06 15:23
    You could arrange a smallish constant current source to go through the heating coil all the time and merely measure the voltage
    across the coil during PWM off-time. An opamp to boost the voltage would be needed, and this would merely saturate during the
    PWM on time - make sure the PWM is slow enough and read the voltage from it at the right place in the cycle. This limits your
    duty cycle a little.

    However you really want to measure the power in the first place, so why not just measure the current with a permanent shunt
    in the first place - supply voltage x current x duty cycle will give you the power.

    Oh hang on, I'm being thick, the resistance measures the temperature... Still so long as you measure current and voltage
    you're in business.
Sign In or Register to comment.