Processor

Status
Not open for further replies.

jrm850

Senior Member
ECF Veteran
Jun 18, 2011
159
21
Southeastern US
For code development, some kind of in-circuit programming is ideal. I dedicate a couple IO pins to programming with the MCUs I've been using. I use a programming header on the board for code development then remove it when I'm done.

My latest mod uses a two digit segment LED. The downside with those is you need 15 pins to control them (14 segments and a period). You can either use a shift register or a high pin count MCU to drive the display. I thought an LED display would be cool, but I'm not happy with it. You can't see the digits in direct sunlight and with only 2 of them, there's not much information you can display. The mod I'm currently working on will use a serial text mode display which has 32 characters, two lines with 16 per line. I'll be able to display a lot more information and driving it only requires 4 pins instead of 16. You can also use a serial graphic display if you want, but somewhat more involved to program. Check out the COG displays, they're highly compact.

Multiplex the two segments and you only need 9 pins, 10 with a period. Wire each segment in series and alternate the source. As long as it's faster than persistent vision it looks like they are both on.
 

bstedh

Ultra Member
ECF Veteran
Verified Member
Apr 5, 2011
1,551
581
Northern Minnesota
www.clear.com
Ok, I have been reading through this thread and am intrigued and interested. My two big questions are
1) How much supporting hardware is needed for the chip after it is programed.
2) What kind of input power does it handle. i.e. will it run ok with 6~8+V from stacked batteries or do you need a separate power regulator to run the chip?
Ok, Make that 3) can it all be fit on a 1/2" X 3/4" board or even two separate boards of that size?
 

clutchjunkie

Senior Member
ECF Veteran
Jan 29, 2011
144
19
48
SoCal
Ok, I have been reading through this thread and am intrigued and interested. My two big questions are
1) How much supporting hardware is needed for the chip after it is programed.
2) What kind of input power does it handle. i.e. will it run ok with 6~8+V from stacked batteries or do you need a separate power regulator to run the chip?
Ok, Make that 3) can it all be fit on a 1/2" X 3/4" board or even two separate boards of that size?

1) & 2) At minimum, you will need a regulator to drop the voltage down to 5v (for ATmega/Arduino) or 3v (the TI stuff). You can use an SMD LDO in this instance because the chips themselves don't use that much power. Don't wire the atty conector + to this power supply though, go straight to the battery for that. Also, you will need pushbuttons for the options you want to include. You will not need the pot anymore, and you will only need resistors/caps if your LDO power supply needs them.

3) Two separate boards would be more realistic, you might be able to get away with one double sided board in that size but doubt it. Two boards would give you room for the up/down buttons and regulator on one board, and the actual chip and mosfet on the other.

You will have to have an on/off button though. The chip will run the program the entire time it is on, this will drain the batteries a little but it will be constant. You might be able to program up a sleep mode for the device but I haven't messed with that yet.
 
Last edited:

jrm850

Senior Member
ECF Veteran
Jun 18, 2011
159
21
Southeastern US
Ok, I have been reading through this thread and am intrigued and interested. My two big questions are
1) How much supporting hardware is needed for the chip after it is programed.
2) What kind of input power does it handle. i.e. will it run ok with 6~8+V from stacked batteries or do you need a separate power regulator to run the chip?
Ok, Make that 3) can it all be fit on a 1/2" X 3/4" board or even two separate boards of that size?

1. Depends on what you want to do, but at the minimum you need a voltage regulator and a switch with a <=threshold.
On the plus side, a couple of the issues brought up in other threads becomes a walk in the park. RMS voltage reporting becomes a simple task of batt voltage *duty cycle. Its easy to have the uC keep the watts stable Pot noise can be replaced with debounced buttons or a rotary encoder for ultimate reliability.displays are a playground of options.
2. Most common voltage regulators will easily handle a 3 x 3.7 stack. Generally the greater the difference in input v vs output v the lower the efficiency.
3. Definitely.
 

bstedh

Ultra Member
ECF Veteran
Verified Member
Apr 5, 2011
1,551
581
Northern Minnesota
www.clear.com

clutchjunkie

Senior Member
ECF Veteran
Jan 29, 2011
144
19
48
SoCal
Wow, have things changed since I posted that first program. I will post my new program up soon, I am at work right now so I don't have access to it. I also haven't finished a schematic yet, I don't have a lot of free time right now.

Here's what my "vape-uino" does as it sits on the breadboard right this moment:

-Automatic 5 minute full shutoff
-All buttons INCLUDING the on/off button are tactile
-20 levels of heat indicated by a 3 led's and a 7-segment
-User adjustable frequency option (it actually does affect some cartos)
-User can switch the 7-segment to show approximate battery charge on a scale of 1-8
-Automatic power down if the battery gets too low
-User adjustable settings are saved to EEPROM and recalled when the device is turned back on
-Compensates for the battery charge level to give a consistant vape through the whole battery
-Can handle dual coils at 6v easily

There a couple of things in the program I want to change, but overall I am pretty happy with it.

I am also breaking into SMD now finally, I built my own homemade adjustable soldering station and I have some super fine tips for my iron. Just waiting on a few more parts and I am gonna proto this thing up. Hope I don't go blind trying to see those little things, I accidently ordered some 402 capicitors I think, they are REALLY tiny.
 

jrm850

Senior Member
ECF Veteran
Jun 18, 2011
159
21
Southeastern US
Wow, have things changed since I posted that first program. I will post my new program up soon, I am at work right now so I don't have access to it. I also haven't finished a schematic yet, I don't have a lot of free time right now.

Here's what my "vape-uino" does as it sits on the breadboard right this moment:

-Automatic 5 minute full shutoff
-All buttons INCLUDING the on/off button are tactile
-20 levels of heat indicated by a 3 led's and a 7-segment
-User adjustable frequency option (it actually does affect some cartos)
-User can switch the 7-segment to show approximate battery charge on a scale of 1-8
-Automatic power down if the battery gets too low
-User adjustable settings are saved to EEPROM and recalled when the device is turned back on
-Compensates for the battery charge level to give a consistant vape through the whole battery
-Can handle dual coils at 6v easily

There a couple of things in the program I want to change, but overall I am pretty happy with it.

I am also breaking into SMD now finally, I built my own homemade adjustable soldering station and I have some super fine tips for my iron. Just waiting on a few more parts and I am gonna proto this thing up. Hope I don't go blind trying to see those little things, I accidently ordered some 402 capicitors I think, they are REALLY tiny.

Holy cow, you went from 0 to 60 in a week. Very impressive! Can't wait to see the code.
 

CraigHB

Ultra Member
ECF Veteran
Jul 31, 2010
1,249
314
Reno, Nevada
That's a lot of programming in such a short time. That would take me a month at least. Sounds like you found your calling, programming MCUs. Anyway, sounds really trick, excellent job on that. BTW, my limit is 0603 (1608 metric), smaller than that and I'm out of luck. I also try to avoid .5mm pin pitches, try to get ones that are .65mm but sometimes I don't have a choice, those fine ones are a bit rough. I'm still soldering by hand with a 015" tip and .015" 63/37 tin/lead solder, but I think most people do their own reflow. That can make the really small stuff much easier.
 

clutchjunkie

Senior Member
ECF Veteran
Jan 29, 2011
144
19
48
SoCal
That's a lot of programming in such a short time. That would take me a month at least. Sounds like you found your calling, programming MCUs. Anyway, sounds really trick, excellent job on that. BTW, my limit is 0603 (1608 metric), smaller than that and I'm out of luck. I also try to avoid .5mm pin pitches, try to get ones that are .65mm but sometimes I don't have a choice, those fine ones are a bit rough. I'm still soldering by hand with a 015" tip and .015" 63/37 tin/lead solder, but I think most people do their own reflow. That can make the really small stuff much easier.

Ouch. My first smd is going to be a TQFP-32, I believe those are .5mm but even if they are not, that's a lot of little pins. I am just waiting for them in the mail. Once they get here, I will be soldering up a prototype and building a new vaporizer for, uh, "testing purposes". Of course. Hopefully I will have some time to get some schematics together as well, I was going to post my program code last night but without them the code would not make a lot of sense. Also, I need to comment it better, it's pretty bare in that department right now.

And thank you, BTW. To be fair, I started programming basic and pascal when I was 12, and I got into c later in high school, but then I discovered females and kinda gave up on programming for the second half of my life. It all came back to me pretty quick though, just like falling off a bike.
 

executivul

Senior Member
ECF Veteran
Mar 5, 2011
76
55
46
Romania
Hello,
I've joined the MCU bus myself. Worked with PICs a few years back. Tampered with an AVRs, but not much. Now I'm going to use the MSP430 from TI. All my golden MCU age tools are now obsolete (COM and LPT high voltage programmers, no debugging, etc) and since I have to start all over again, buying a development board I couldn't resist the price tag of the LaunchPad :)
The ATtiny88 was tempting, Provari uses it, but the TI chips are cheaper, much cheaper, and maybe I'll start mass production and at 10k units/day the costs will matter (joking) :) Now, in my opinion there is no big difference between different brands of MCUs now, it's the same features, same capacitive touch libraries, just different naming, every platform has it's fan boys, Nikon vs Canon, etc

Now the question I have, and maybe I should start a new thread (but the most savvy guys are already here), what buck-boost converter should I use?
Provari uses the LTC3785, it's rated for 10A but they choose to limit it to 2A, another option would be the TPS43000 which I've seen also works as a buck-boost flyback, no amp rating since it depends on external mosfets, Maxim also has a few aternatives...
Craig you've said the comparator/biasing network was a PITA to design, can you ellaborate a little?

Thank you all.
 

jrm850

Senior Member
ECF Veteran
Jun 18, 2011
159
21
Southeastern US
Hello,
I've joined the MCU bus myself. Worked with PICs a few years back. Tampered with an AVRs, but not much. Now I'm going to use the MSP430 from TI. All my golden MCU age tools are now obsolete (COM and LPT high voltage programmers, no debugging, etc) and since I have to start all over again, buying a development board I couldn't resist the price tag of the LaunchPad :)
The ATtiny88 was tempting, Provari uses it, but the TI chips are cheaper, much cheaper, and maybe I'll start mass production and at 10k units/day the costs will matter (joking) :) Now, in my opinion there is no big difference between different brands of MCUs now, it's the same features, same capacitive touch libraries, just different naming, every platform has it's fan boys, Nikon vs Canon, etc

Now the question I have, and maybe I should start a new thread (but the most savvy guys are already here), what buck-boost converter should I use?
Provari uses the LTC3785, it's rated for 10A but they choose to limit it to 2A, another option would be the TPS43000 which I've seen also works as a buck-boost flyback, no amp rating since it depends on external mosfets, Maxim also has a few aternatives...
Craig you've said the comparator/biasing network was a PITA to design, can you ellaborate a little?

Thank you all.

I think I'm going to give the Launchpad a try also. I'm very frustrated with AVRs at the moment.

Got a question for those who have tried it- can the single USB port on the launchpad handle terminal debugging? My current programmer has a spare serial port that I can use, and I would be lost without it.
 

CraigHB

Ultra Member
ECF Veteran
Jul 31, 2010
1,249
314
Reno, Nevada
Craig you've said the comparator/biasing network was a PITA to design, can you ellaborate a little?

Just the usual instability issues you run into with the low pass filter formed by the inductor and output capacitor. If you're familiar with analog circuit design, it's nothing out of the ordinary, but you do need to use a type III compensation network which can be a pain to tune. It also depends on topology, for example, flyback and SEPIC are harder to tune than buck or boost, more poles and zeros.

Some of the PWM controllers simplify the tuning process by using various approaches. If you go with a current mode controller over voltage mode, it's much easier, however, voltage mode is a little bit more efficient because it eliminates the need to use a current sense resistor. Others controllers like the MAX1709 use a tight set of specs along with some trick internals to eliminate the need to tune feedback altogether.

In any case, there's tons of PWM chips out there and they all have their strengths and weaknesses. I've been using the TPS43000 because it's the most efficient and most flexible, but also harder to work with than other controllers. One controller I think is really interesting is the LTC3785. It uses on-the-fly reconfiguration.
 

executivul

Senior Member
ECF Veteran
Mar 5, 2011
76
55
46
Romania
Not quite an analog electronics expert here, I'm more of a digital programmer guy, I expect to follow the schematics in the datasheet and the thing to work, the rest is the fun programming part. I remember doing some pole equations at university, but that was a long time ago, maybe I shall start digging the net a little.
I'm also interested in the 3785, it reconfigures the mosfet network by it self, as I already stated Provari uses it, but not at it's full potential and that raises a question mark...
So, any help regarding where to start looking for that tuning is highly appreciated. I want to follow the design schematic in the datasheet, what else? Simulation in a program? Trial and error on the breadboard? what shall I expect?


Sent from my iPad using Tapatalk.
 

CraigHB

Ultra Member
ECF Veteran
Jul 31, 2010
1,249
314
Reno, Nevada
The LTC3785 does require a type III compensation network. For chips that require it, they provide formula in the data sheets to approximate values, but the formula are not highly accurate. They give you values plus or minus about a half decade of the frequency characteristics you will actually need. That's a pretty rough approximation. It's best to simulate the circuit as well and nail down final values that way.

You can simulate things using Linear's free LTSPICE if you don't have a SPICE program already. You'll want to look at the Bode plots of the LC circuit with the feedback in open loop mode.

There's lots of good app notes on compensating feedback from the various chip makers. You can Google "type III compensation" to find them. One essential tool I use for SPICE analysis is Dr. Vatché Vorpérian's PWM switching model. I also do a time domain analysis as well as a frequency domain analysis in SPICE. The time domain analysis is not easy to set up, but it's do-able and allows you to really nail down component values.

If you build your model right and lay things out well on the PCB, you should have good values on the first build. You'll have to do some stability testing. Ideally, if you have a function generator and scope, you can do a full run-down. It's possible to check it without a function generator just by running through various loading conditions. If you see anything that looks funky, you may have to play with values a bit.

When you start doing SPICE models, you'll quickly find why the Pro-Vari is limited to 12W. Component loading gets tricky when you start designing for higher outputs. I've successfully designed a 30W booster with the TPS 43000. It's what I've used in the last couple mods I've done. I'm doing a new design which compacts the booster circuit quite a bit using 1206 MLCCs instead of the much larger tantalum polymer caps. I have not progressed to bench testing yet so I'm anxious to see if it's going to work well. I'm attempting to build a compact 30W booster mod.
 
Status
Not open for further replies.

Users who are viewing this thread