Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
FSMC
Apr 27, 2003
I love to live this lie
I'm kind of new to all this. I want to know how you can get 30V+ from a 9V battery. My very limited knowledge suggests I would have to go DC->AC->Tranformer. Is there an easier way.

For reference I'm looking at how the "tens" machines work.

Adbot
ADBOT LOVES YOU

FSMC
Apr 27, 2003
I love to live this lie
I want to make an advanced tens machine. (http://www.amazon.com/LGMedSupply-Platinum-Electronic-Stimulator-Physical/dp/B001PT9QW8).

For now, just assume I want to make a basic tens machine. From what I've read would the best option be to get a PIC or AVR kind of microcontroller and program the functionality into that. I've never worked with microcontrollers or any serious electronics before, but the space limits of the microcontrollers apear very small.

Basically I will have inputs:
1. Pre-set Programs.


Outputs:
1. 4 outputs, with variable intensities and durations.

So my thoughts are based on.

Program knob setting--->PIC--->electronics to amplify singal to (tens strength).

So mainly I want advise on what kind of microcontroller to start learning, also ones where the complexity of what it can handle can be increased. For example if I want 16 output signals, and want 20 complex "settings", will there be a more advanced version which can handle that so any code and work done can easily be transfered. Also considering I'm a newbie something with decent tutorials and tools is kind of required.

Most of what I've seen, is people recomending PIC or AVR. I'm quite familiar with c, c++.

FSMC
Apr 27, 2003
I love to live this lie
I've just got a pickit 3 with with a PIC18F45K20 demo board. After some hassle I've managed to get MPLab IDE working and am able to program to it. I'm programing in C. I've just got a few questions/concerns

1. Are there any good tutorials or guides for programing C on a PIC.
2. Do the rules change due to the very limited capabilities of a PIC compared to computer. e.g. should I start using global variables? How much should I sacrifice usual readability and convenience for performance. (I found an article which mentioned how using, static and const are very useful for programing microcrontrolers which was useful, so more stuff like that I guess).
3. Can I avoid assembly?

Most of the tutorials I've found are quite old. I can't find any real decent resources.

Any other advice?

FSMC
Apr 27, 2003
I love to live this lie
I brought a AM1P-0524SZ. This will convert 5V to 24V DC. If I connect a 9V battery I get ~40V, will this damage it or is it ok to do this?

FSMC
Apr 27, 2003
I love to live this lie

Hillridge posted:

http://www.aimtec.com/site/Aimtec/files/Datasheet/HighResolution/AM1P-Z.PDF

That part is designed to work on a supply between 4.5 and 5.5V. A little over won't hurt, but 9V is probably too much.

That would explain why it doesn't work any more :(.

FSMC
Apr 27, 2003
I love to live this lie
I'm trying to work out how a circuit works. It looks like most of the work is done b an ic. I just can't seem to work out what the chip is, I've tried googling but can't find anything. It's a Samsung chip. There is also another component which I'm not too sure about it's marked as DDC 109, I think it's some kind of DC-DC converter but can't find anything.

Only registered members can see post attachments!

FSMC
Apr 27, 2003
I love to live this lie

Hillridge posted:

That's a microcontroller:

http://www.samsung.com/global/business/semiconductor/productInfo.do?fmly_id=803&partnum=S3F828B&xFmly_id=

I'm not sure what that other part is, but it looks like an inductor. What is the reference designator next to it?

The reference is T1, does that make it as transformer.

FSMC
Apr 27, 2003
I love to live this lie
I'm trying to create a type of VR machine. I'm trying to plan out what I'll be using. I don't want to start only to realise I've completely gone down the wrong path.

There are two parts, physics and visual. I can do most of the physical stuff based on a PIC. The visual stuff is simply playing a video, well there will be about 5 videos that loop. Syncing the video to the physical effect is quite important.

So my problem is I can't seem to find anything to tell me how to make something that will play a video from say a memory source(say a SD card for example). I've found a few projects that use a PIC to make a pictures frame. But I don't think the chip will be able to handle video(either uncompressed will be too much info or it will be too hard to uncompress info).

Pretty much the visual part is going to be like this http://www.zetronix.com/product_info.php?products_id=125.

So say I wanted to make a very simplified version of the above device how would I do it. It just needs to play video from an "on board" memory source.

FSMC
Apr 27, 2003
I love to live this lie

Unparagoned posted:

I'm trying to create a type of VR machine. I'm trying to plan out what I'll be using. I don't want to start only to realise I've completely gone down the wrong path.

There are two parts, physics and visual. I can do most of the physical stuff based on a PIC. The visual stuff is simply playing a video, well there will be about 5 videos that loop. Syncing the video to the physical effect is quite important.

So my problem is I can't seem to find anything to tell me how to make something that will play a video from say a memory source(say a SD card for example). I've found a few projects that use a PIC to make a pictures frame. But I don't think the chip will be able to handle video(either uncompressed will be too much info or it will be too hard to uncompress info).

Pretty much the visual part is going to be like this http://www.zetronix.com/product_info.php?products_id=125.

So say I wanted to make a very simplified version of the above device how would I do it. It just needs to play video from an "on board" memory source.

I found this, http://www.sparkfun.com/commerce/product_info.php?products_id=10089 .

It's based on PICASO-GFX2 which is a 4DGL chip. I couldn't find much about this chip which may make using it a bit harder to use. But I couldn't find any alternatives. If I get the above module it seems like it should be easy to get used to and get working quickly.

Any advise?

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

I'd probably go with something like a BeagleBoard if you want to do audio/video type of stuff. It should have more than enough processing power to decompress most videos, and it already has dvi, svideo, and audio outputs.
You can also run linux on it.

Interesting, but it seems a bit like overkill. I can make a 3D computer gaming system with that BeagleBoard. I just need something to play video and do some other basic stuff.

FSMC
Apr 27, 2003
I love to live this lie
I brought a picoscope. It seems to work great. Just one question, I have a circuit which beeps when I was using it. I did some testing and the circuit would beep even if I use a single wire by it's self to touch the circuit.
1. Whats the reason the circuit beeps like this?
2. How does it work? How does it know a wire is touching it?
3. The beeping scares me, am I breaking stuff.

Also it's limited to 20V I want to measure stuff up to 100V what's the best way to do that? (It's a pic 2104)

FSMC fucked around with this message at 22:36 on Sep 27, 2010

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

I've never used a picoscope, but maybe I can offer some suggestions.
What is the circuit you're measuring? Does it have the beeper? Or is the scope beeping?

You're probably able to get a measurement without a real ground because whatever you're measuring isn't isolated from earth ground so you're forming a large ground loop through the AC plug. Don't actually take any measurements like this because you'll measure all sorts of noise that isn't really present.
If you need to make measurements of a higher voltage, just use a resistor divider to scale the voltage down.
As far as the beeping, you should read the manual if it's from the scope. It could be over voltage or something bad like that.

The beeping is definitely the circuit not the scope. The circuit is a tens machine, It basically outputs a frequency through a transformer to ramp up the voltage up to 60V.

Regarding the beeping I wanted to know about is how if instead of using the oscilloscope I use a piece of wire the circuit knows and beeps if I touch parts of it.

I tried out using a simple resistor divider and it works great. Just one question it's easier and seems to work by having the resister divider on the ground side rather than probe part, is there anything wrong with that? Most things I've read seem to imply that the ground part should be the actual ground and not something else otherwise bad things might happen.

Another question. From what I've worked out the transformer takes 6V-60V or something like that, so is that a 1:10 winding? I went online to buy a transformer and got completely lost, I ended up going through all the different types. I ended up getting something in the pulse transformer section, FLYBACK TRANSFORMER, 10UH. I only got that one since it was pretty much the only one I could find with a 1:10 winding.
Can anyone give me advise on how to find transformers and what the different types are. In this case I would have pulses with a max width of 500usec & max freq of 40Hz. It would want to take with input voltage spike from 0-6V and output a voltage difference of 60V.

FSMC fucked around with this message at 08:47 on Sep 28, 2010

FSMC
Apr 27, 2003
I love to live this lie

TacoHavoc posted:

If you're the guy trying to manipulate his car's electrical system, get a relay and be done with it.



Sorry the schematic is so awful, I don't have schematic software or visio on this computer.

Won't you want a diode across the relay?

FSMC
Apr 27, 2003
I love to live this lie
How do you tell which component is burning up? I have been touching various components. But today I've come to the realisation that some component can get very hot and touching them isn't the best idea.

FSMC
Apr 27, 2003
I love to live this lie

Zo posted:

Don't be a pussy and just touch it. Most you'll lose is some fingerprints anyways.

Generally if it's hot enough to lose fingerprints over the board itself will get fairly warm as well. FR-4 still conducts heat.
It's a breadbord. I currently have a nice resistor burn mark on my finger. I've had it on ice for the last few hours. I just thought there might be a better way.

FSMC
Apr 27, 2003
I love to live this lie
I've got this circuit but it has some strange behaviour and not too sure on why.
It's a standard 555 astable circuit connected to a npn transistor connected to an audio transformer. The problem I'm having is I get really weird behaviour when I vary R3. It changes the frequency output of the 555, as R3->0 the frequency gets faster. I don't really understand why.

Only registered members can see post attachments!

FSMC
Apr 27, 2003
I love to live this lie

TacoHavoc posted:

Just a guess, but what happens to your 9V supply as R3 -> 0? Is it sagging?

It become a square wave with say a magnitude less than 0.5V. It seems like a small change that I cant't see why it would effect the 555 frequency by the massive magnitude it does. But I'm fairly clueless about electronics in general.

Edit: Oops, I was going by memory, check it out and there is a massive change on the 9V supply, it's a square wave going between 9V to 4V or so. So I guess that is going to have a major impact. Now I need to now how to stop it.

FSMC fucked around with this message at 20:51 on Oct 22, 2010

FSMC
Apr 27, 2003
I love to live this lie

TacoHavoc posted:

What's happening is that you're sucking current equal to (9V/(resistance of transformer coil+potentiometer resistance)) to ground. The transformer is probably a low resistance, making your current draw really high as your potentiometer resistance approaches zero. Your power source (I'm guessing a battery) can't deliver that much current, so the output voltage is sagging.

To solve this problem, you could try putting a current-limiting resistor between your power supply and the node that the diode cathode and the transformer are connected to. What are you trying to accomplish with this circuit? It seems like if you were trying to vary the output, you'd be manipulating the voltage divider on the other side of the 555.

That sounds like what's happening and makes sense, I'm drawing too much current.

The circuit isn't actually the circuit I'm using it's a slightly modified version to illustrate my problem. Basically I want a circuit which will input a fixed frequency square wave at different voltages to the transformer.

The transformer has a very low resistance, but I want most of the voltage across the transformer. So the resistors on the transformer side had to have a low value but then then the resistors were heating up. So I was thinking I don't want any energy to be wasted heating up these resistors, so removed them. Wouldn't your current limiting resistor have most of the voltage across it rather than the transformer?

Wouldn't manipulating the voltage divider the other side of the 555 just change the frequency rather than magnitude?

Is there a way to limit the current but also keep most of the voltage across the transformer?

FSMC fucked around with this message at 15:35 on Oct 23, 2010

FSMC
Apr 27, 2003
I love to live this lie

catbread.jpg posted:

You need to find out what the magnetising inductance of your transformer is. That determines the effective 'resistance' of your transformer at a given frequency. Also you are magnetising the transformer in one direction only. When you turn the BJT off, the magnetising current circulates through that anti-parallel diode, and the voltage drop across it is the only thing which is returning (relatively slowly, compared to the 9 volts that was being applied to it before) the core flux of the transformer to zero. I don't know where you got this circuit from but it doesn't look like it's good for much.

Look up forward converters. What is it that you are trying to do exactly?

All I know about the transformer is that it's a 1.2k ohm to 3.2 ohm transformer. The 1.2k ohm is suppose to be the primarily, but I'm using it in reverse. There is no spec sheet or anything else.
http://www.maplin.co.uk/Module.aspx?ModuleNo=3709&C=49287

The circuit is basically a tens machine. I've looked at some other tens machines, it seems they deal with the supply oscillating by using a zenner diode, resister and transistor to limit the voltage to the circuit to 5V. This allow a full 5V drop across the transformer, which I guess is enough. Also there is a capacitor used to help supply the current for the spikes, which helps smooth out the battery issue.

Could you explain a bit more about the magnetising in one direction only, I'm not sure what you mean.
My limited understanding is: The standard state would have the BJT off, then on for a short period. The voltage drop when it's turned on would allow current to flow. Then when the BJT is tuned back off, the transformer would induce a high voltage and then current would flow through the diode. Ahh, so do you mean the up and down would be asymmetrical. From the output I'm getting I don't think it's an issue.

I did some calculations, hopefully they are right. BTJ on, I=V/R*(1-e^(-Rt/L)). BJT off, I=V/R*e^(-Rt/L). So that makes it seem symmetrical. I'm not too sure about how I dealt with it when BTJ when off. I assumed that the fact it was connected to the 9V didn't matter(reasoning was everything is kind of relative).

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

If you need to make measurements of a higher voltage, just use a resistor divider to scale the voltage down.

I tried this but I get significant noise when the voltage changes. Since my circuit deals with square waves and short pulses it kind of is completely useless. I saw somewhere that if I added capacitors that it would help reduce the noise, but then I get distortions as these capacitors are charging(the capacitors are small plasic blocks which say 10nJ100, I've tried every type I have and those seem the best). Can anyone offer any advise. I've attached a picture of what I tried, the important bit is the bit at the bottom.

Currently I'm testing the output by connecting it to myself and seeing how much it contracts my muscles. I don't think this is the best way to test my circuit, especially with my limited electronics knowledge.

My oscilloscope is a picoscope 2104, the max voltage it can measure is 20V, I want to measure up to 100V.

Only registered members can see post attachments!

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

I'm having a hard time understanding what you drew.

When you say short pulses, how short are you talking about?
What is the rise time?
How much noise is "significant"?

Just for reference, your probe should be hooked up like this:

Input Signal------\/\/R1\/\-----Probe Here-----\/\/R2/\/\-----Ground

I think I had it like
Input Signal-----Probe Here----\/\/R1\/\-----Ground

So I need a resistor connected to both the input and ground, rather than just at either the input or ground?

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

Yes, that way the power is actually divided. Your resistor values should also be sized such that they don't affect your circuit (if you pick something like 100/500 ohms you might have too much loading, which would affect the circuit).

You also want to make the resistor-probe-ground junction as small as possible, to avoid ground loops and parasitic effects.

Doh, so literally I just use a voltage divider. It seems weird connecting various parts of the circuit to the ground through resistors. I'm using 2MOhm resistors, so I assume they should be high enough so it doesn't effect the circuit much. One question is there any reason to use lower resistors?

Thanks all for the help, I was considering buying a new oscilloscope. I guess I can put that off for a bit now.

For reference I had it connected like this before. It worked but was noisy.
Input signal----probe. Probe ground connection----R1---Ground.

FSMC
Apr 27, 2003
I love to live this lie
Are there any tips on reverse engineering a circuit? Say a simple PCB with both tracks visible.

FSMC
Apr 27, 2003
I love to live this lie

TacoHavoc posted:

When you say both tracks...you're talking literally two traces? Or that you can see both top and bottom traces?

The biggest thing is that if you are trying to read component values (especially resistors that you can't read the print on or capacitors) you'll probably need to remove them from the circuit to get accurate measurements of their values. Do you have a picture of what you're trying to break down?

Both tracks as in both top and bottom traces. I'm not actually too concerned about the values of parts. I'm mainly concerned on seeing how they the circuit works in general. So the main bit would be to draw a circuit diagram.

I have a few circuits that kind of do the same thing but in different ways. Here is one.

edit: The chip doesn't do any complicated fancy stuff.

Only registered members can see post attachments!

FSMC
Apr 27, 2003
I love to live this lie

Hillridge posted:

I feel like I know what that goes to, but just can't quite place it.

As for reverse engineering, I've done this before and it can be a pain in the balls. A 2 layer PCB isn't too bad to get the interconnections from since you can see where they all go. A multimeter will help double check that. Some of those 3 terminal devices may be difficult to figure out though. They usually aren't marked well and could be single diodes, double diodes in a variety of configurations, transistors, etc. There are a few places that list the codes found on these packages, but some are shared and they aren't easy to match up.

Since that big chip is the central point on the board, the datasheet for the chip may give you insight as to what the rest of the parts are doing.

The circuit takes 3V, then charges two capacitors up to 50V, the outputs are high voltage pulses. The chip in the middle is basically a timer chip, which does varies the output frequency and width, the chip also uses very high frequencies with either an inductor or transformer to up the voltage to 50V.

So I kind of generally know what the circuit does. I wanted mainly tips on the techniques on how to put the circuit into a circuit diagram. The only thing I've found online is to overlap photos of the back and front. I'm surprised there isn't anything else on the net.

FSMC
Apr 27, 2003
I love to live this lie

riichiee posted:

I'm a 2nd - 3rd year Mechatronics student looking to do a variety of projects over the summer to help increase my understanding of electronics and my practical knowledge.

I'm already pretty familar with programming (spent a couple of years coding in C before going to uni as a mature age student) so I'm looking for more hands on stuff. Ie, projects that involve AC circuits, Op-Amps, BJT's, motors etc..

To get myself started, I figure I'm going to need some gear. I would like some feedback on whether these are worth getting or if there's something I'm missing. So far on the list I've got:

- 12V Lab Power Supply.
- Oscilloscope (anyone recommend a good cheap one? Thinking about getting the Picoscope))
- Probably some sort of invertor.
- Various IC's.

Also, anyone got any interesting projects? I'm thinking of maybe making some sort of basic audio synthethiser. Would maybe take in 12V DC and output sine waves at different frequencies with different filters?

EDIT: Is there also a decent (free) SPICE software package that I could use?

I got a picoscope 2104. When you ask about oscilloscopes everyone says get one with at least two inputs. I just went for the cheapest I could get and regret it. I would say picoscope is fine as a make but get a model with at least two inputs.

FSMC
Apr 27, 2003
I love to live this lie

ValhallaSmith posted:


People are going to suggest bitscope, picoscope, etc for oscilloscopes. Ignore them. Either troll craiglist/ebay for something useful or just buy a normal one. Rigol and the chinese makers have low end scopes at around the 300-400$ mark. That gets you 1 gig/sample which is probably 5X the sample rate of the headless scopes.


What's wrong with picoscope?

FSMC
Apr 27, 2003
I love to live this lie
I'm trying to analyse a LCR circuit, where the resistor is in parallel with the capacitor. I've solved it for the initial conditions(non trivial). I'm trying to simplify it but not really getting anywhere. There are probably 3 conditions, damped, under and critically damped regions, that I'm going to have to simplify for.

I've looked online but can't really find anything that's much help. It seems like if I was working with AC it would be fine and I could just use impedances but I'm kind of stuck using DC. I have herd that I could just assume it was for AC and then use an infinite sum of sins to get DC. Is that a reasonable method?
I'm just looking at the transient response, the time period would be on the order of the frequency.

FSMC
Apr 27, 2003
I love to live this lie
crabrock. What you want to do sounds fairly similar to a 555 circuit.

Software questions: What's the best software to use. I like Falstad Circuit Simulator but it's slow and and very limited. From what I can gather is I want is some kind of spice but with a decent interface. I think I want spices power with a Falstad circuit simulator interface. Any advice

FSMC
Apr 27, 2003
I love to live this lie

ANIME AKBAR posted:

Also what the hell is a DOCTOR OF PHILOSOPHY in ELECTRICAL ENGINEERING?
A Phd in electrical engineering.

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

If you want the DC operating point, just treat capacitors as opens and inductors as shorts.

If you're trying to get the step response, I'd figure out the frequency response (laplace) of the system and multiply that by the frequency response of a step function and then inverse it.

Wow thank's, using the lapace is kind of like magic.

Well anyway I've found out that the circuit I had made up was simply a boost converter. Now I've found out about the boost converter the results I've got so far don't seem to match up with what I've seen on the internet. I think it might have something to do with the the diode but can't really place it. Everything I've seem online analyses it from an energy or steady state kind of way which I'm not really convinced with. Is there an analysis of the boost circuit using standard KVL and the like?

What I got was
Vo=Vi(1-cos(wD'T)+wDTsin(wD'T))+Vpcos(wD'T).(plus some current term i'll ignore for now)
Where DT is the time the switch is closed and D'T is the time the switch is open. Vp is the voltage on the capacitor from the previous cycle. I was simply going to treat the diode as preventing the current from going negative, or stopping Vo from decreasing.
Circuit diagram can be found here.
http://en.wikipedia.org/wiki/Boost_converter

Edit: In the continuous mode the current doesn't drop to zero and is quite important, so ignoring that term like I did is why things were not matching up.. So Vo=Vi(1-cos(wD'T)+wDTsin(wD'T))+Vpcos(wD'T)+IpLwsin(wD'T). Assuming CdVo/dt=Ip, Vo=Vp, I get the same 1/(1-D) relation shown pretty much everywhere.

FSMC fucked around with this message at 18:26 on Dec 19, 2010

FSMC
Apr 27, 2003
I love to live this lie

ANIME AKBAR posted:

Boost converters don't really operate based on resonance, don't let the fact that there's an LC in there fool you. The inductor is purely for energy storage. You generally assume that the switching period is much shorter than the resonance period. However, for the purpose of controlling it, it can be modeled as an LCR circuit (though the model is only valid at frequencies lower than the switching frequencies). In that regime, it will have resonant behavior.

I split it into two main circuits the L and LC circuits. The way I considered it was to model the LC circuit and then find the conditions such that current doesn't become negative, for now I'm ignoring the diode voltage drop. So I'm finding the point such that the current becomes negative and making sure the time constants are chosen such that current doesn't become negative. So I have Vo=Vi(1-cos(wD'T)+wDTsin(wD'T))+Vpcos(wD'T), which has resonant behaviour but I'm finding out what the conditions are and the limits so there is no resonant behavior. I would have thought that would work? I was also looking at was what's the optimum switching time constants, and what's the long term behavior. When t goes to infinity I got the voltage going to V=Vi(1+DT/(tan(wD'T/2)).

Surely there must be a decent analysis of the boost converter online somewhere?

FSMC fucked around with this message at 13:21 on Dec 12, 2010

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

The problem is that analytically solving a buck or boost converter would require iterating over several differential equations with discontinuous input functions. And that's hard.
So that means you have to analytically solve the system when the switch is closed and then solve the system when the switch is open. If we assume that your switch follows a square wave, next you have to compute the each part of the square wave (i.e. the "on" or "off") using the results of the previous part as your initial values. And you would have to do this for each cycle until you get bored and decide you're at steady state.

That is exactly what I did and was able to generalise for pretty much any n(Ignoring 1 term). I found that the system tends towards a steady state, is this correct? I'm going to read up on LTspice I couldn't get it do anything when I last tried it.

ANIME AKBAR posted:

Here, I made a series of posts on how boost converters operate way back in this thread. Starts around here:
http://forums.somethingawful.com/showthread.php?threadid=2734977&userid=109669&perpage=40&pagenumber=2#post342675135

That's pretty interesting. Seems like I would need to have a feedback system.

BattleMaster posted:

This document from Microchip goes into various switched-mode power supply topologies (including boost and buck) with large numbers of equations, graphs, schematics, and current flow diagrams. It isn't PIC-centric until a bit at the end where they talk about using dsPICs as power supply controllers.
Thanks, that looks interesting.
edit: It seems to do stuff I just don't get. For example on page 14, equation 47 is the simple L equation for an inductor charging up. (I=Vt/L). But when the capacitor is then connected in equation 49 they use pretty much the same kind of equation. Is that correct or are there some unsaid assumptions such that the capacitors voltage doesn't change after being charged, etc.... The current I derived does simplify to that equation if I assume wt is small and use first Taylor expansion, and assume T^2 is small enough to ignore.

Thanks everyone for the help. Next week I'm going to take a couple of weeks off work to spend more time on this. One of the reasons I'm kind of laboring on about this is that it's going to be one of the more simpler circuits I can think of and wanted to see if I can analyse and work out what it does using usual methods. (I didn't even know it was a common boost circuit until recently). My reasoning is that if I can't work out what this does then I don't have any chance figuring out what more complicated circuits I design would do.

FSMC fucked around with this message at 03:06 on Dec 13, 2010

FSMC
Apr 27, 2003
I love to live this lie
I'm having problems with LTSpice. I want to make an idealised boost converted, with a 555 as the timer. No feedback or anything fancy. I want the diode to have 0 voltage drop, infinite breakdown. I want the transistor to switch instantly, etc.

FSMC
Apr 27, 2003
I love to live this lie

Delta-Wye posted:

Unparagoned posted:

I'm having problems with LTSpice. I want to make an idealised boost converted, with a 555 as the timer. No feedback or anything fancy. I want the diode to have 0 voltage drop, infinite breakdown. I want the transistor to switch instantly, etc.
That doesn't sound like a problem, that sounds like a plan! :v:
Well I assume idealised components would be available but can't seem to find them. Will I have to make my own? Surely someone must have already made them for me to use.

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

LTSpice tends to not like ideal components, such as infintely fast switches with 0 resistance. It makes numerical integration impossible to do correctly. There are components for voltage controlled switches and you can change the model file for the diode to make it "more ideal" if you want.

To enter a .model command, just press "t" to drop down text and type in your command. Don't forget to specify that you want a spice directive instead of a comment.
Then you can Ctrl right click on the device you want to change (the diode or switch or whatever) and change the "Value" field to match your model.

Here are some example .models for a switch (2.5 volt threshold) and diode:
.model IdealSwitch SW(Ron=1m Roff=1G Vt=2.5 Vh=0)
.model IdealDiode D(Ron=1m Roff=1G Vfwd=0)

Since you're going with ideal models, I'd also suggest using a square wave voltage source in place of the 555. Just think of it as an ideal 555 circuit :)

Make sure to read the manual (http://ltspice.linear.com/software/scad3.pdf) and look through the examples that are installed. They cover most of what you might want to do.

edit:
If you really want to use a 555, they have an ideal model in their library. Just hit F2, go to "Misc" and select the NE555.

Square wave voltage instead of a 555 is the way to go, I only really mentioned the 555 so no one mentioned a special boost chip. Although LT spice can't create a square wave voltage source. Anything close to a square wave makes it feel like I'm running a 486.

I'll play about with less square waves, square waves. Should be good enough to use to check if my program models it correctly and then use my program.

Edit: Can't seem to get it to do anything useful :/

FSMC fucked around with this message at 20:16 on Dec 20, 2010

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

How are you creating a square wave? You should just drop down a voltage source, go to Advanced, select PULSE for the function, and then set the parameters you want. It work perfectly fine for me with 0ns rise/fall times.

For a 1 MHz 50% duty cycle square wave, I can finish a 1 ms long transient simulation in a second or less for the simple circuit you're describing (single inductor, single diode, single switch, single output cap).

Is this similar to what you have?


Here is what I have
http://rapidshare.com/files/438445513/boost.asc

Things to note. For the square voltage if you put 0 as the rise and fall times, it defaults it to 10%. I wanted the inductor to charge first rather than trying to charge the capacitor with 0 current through the conductor. Depending on whether I put the square wave as on or off first gives completely different results, one has current as 9kA at t=0 the other the capacitor has 9V at t=0. Both behaviors seem wrong.

Any chance you could stick your circuit up on rapidshare or whatever so I can see what I'm going wrong.

Edit: I think I got it working. I needed to skip the initial operating point. Nope results still confusing.

FSMC fucked around with this message at 00:57 on Dec 21, 2010

FSMC
Apr 27, 2003
I love to live this lie

SnoPuppy posted:

Well for one, you're trying to do a 2 second long transient simulation, so that will take a long rear end time on any machine, under most conditions.

The reason you see different values for different initial conditions is because the simulator first attempts to work out the initial DC operating point. It solves the system by treating capacitors as opens and inductors as shorts.

So when you start with 5v, the tool realizes that the transistor is turned on, so you are shorting the inductor to ground. Since you didn't specify any series resistance with the inductor, it defaults to 1 mOhm, resulting in the 9kA you see (it assumes a diode drop across the transistor).
A similar thing happens with the capacitor when you start at 0v.

Additionally, you have no load resistance - an ideal capacitor will continue to store all the charge you give it and will just keep increasing in voltage. Add a load resistor to bleed off some of this charge and let you get to steady state.

Take the inductor again - remember that the voltage across it is equal to L*dI/dt. That means that if you have a 1 uH inductor and try to switch 1 amp in 2ns, you would get a voltage of 500V!

This is why doing "ideal" simulations leads to very strange results that obviously don't match reality. I'd just pick some reasonable components and go from there.
Thanks for the help. The option "skip the initial operating point" seemed to fix the weird initial conditions problem.

I've tried a few variations and the results match up fairly well to my excel based model.

I realise there is no load, I never intended to analyse a boost converter it just turned out the circuit I was looking at was really close to one. I do intend adding a load but wanted to get my head round this simpler circuit first.

If you let me know how I can buy you a plat for your help.

FSMC
Apr 27, 2003
I love to live this lie

Fat Turkey posted:

Quick question, on my learning curve. Almost done with analogue before entering the world of digital.

I want a circuit where an LED will be off for around 58 seconds, and then turn on for 2 seconds, before restarting the cycle.

I thought about using a 555 timer chip to get an LED on for 58 seconds and then off for two on a standard astable circuit. If I could get that to work, then I think I can use a PNP transistor to 'reverse' this and have the LED off for the majority and on the minority. I have having real difficulty testing either of these because the software I'm using from the OP wasn't built to deal with such long periods of time. Does it sound OK?

If it does, I'm having a hard time coming up with the appropriate R1, R2 and C1 values. Any help with those?
http://www.kpsec.freeuk.com/555timer.htm
Spent 30 mins scratching my head over this site, I'm trying a 47uF C1, but my maths doesn't seem to add up for the resistors.

Out of interest, what's the need for the capacitor on the Control? I can't quite get that either.

Finally, I know this isn't the ideal way of doing it. What would be the better way of doing it? At the moment it's just an exercise in the theory, but I wouldn't mind knowing how I should actually do it.

Instead of messing about with different transistors, use the astable version with a diode across r2. On your link http://www.kpsec.freeuk.com/555timer.htm about half way down, at the bottom of the astable section in red letters is "To achieve a duty cycle of less than 50%". That is the circuit you want to use and the formulas for the resistors are there as well. They are also simpler.
Tm = 0.7 × R1 × C1 (ignoring 0.7V across diode)
Ts = 0.7 × R2 × C1

The capacitor for the control is there to stop the value from floating.

The 555 timer circuit was the first thing that came to my mind for what you want to do.

I found that going through how the 555 timer circuit worked and deriving the formulas myself was useful. It's basically a couple of RC circuits with initial and final conditions. The the log 2 constant goes from being magic to making sense.

Adbot
ADBOT LOVES YOU

FSMC
Apr 27, 2003
I love to live this lie

Fat Turkey posted:

Thanks for the advice, I think you're right about that being the easier method, especially since it lets me customise the Tm and Ts. So with C1 at 47uF

So, Tm = 58 sec = 0.7 x 0.000047F x R1. R1 = 1.726 Mohms. Hmmmm
So, Tm = 2 secs = 0.7 x 0.000047F x R2. Rs = 60790 ohms.

I have a 1MOhm variable resistor, but I'm not sure I can get one that high. I guess I could use a number of resistors in series to get such a high resistance, but I also can't help but feel there is a 'better' way.

Is there a reason you can't use a bigger capacitor?

FSMC fucked around with this message at 13:41 on Feb 5, 2011

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply