Jump to content

Unimportant

Member
  • Content count

    897
  • Joined

  • Last visited

Awards


This user doesn't have any awards

2 Followers

About Unimportant

  • Title
    Member
  1. cheap 3 pin fan control

    A 10nC MOSFET should be no problem at all. You can do something like this: Although only once (you only need a single mosfet). You can play with the resistor values to strike a balance between MOSFET switching speed and the power dissipated in the resistors. (But for a 10nC MOSFET you can use higher resistor values with no problems). Just FYI, it's not a darlington pair in the datasheet but a Sziklai pair. A slightly diffirent setup that has some pretty neat properties, such as only a single base junction forward drop. EDIT: We're overlooking the obvious: The plain old 555 can be configured to generate PWM aswell. Just google "555 PWM". Since the 555 has a push-pull output it would be even better suited to drive a mosfet gate as it would not need pull-up resistors that waste power. Probably even cheaper aswell.
  2. cheap 3 pin fan control

    That's hard to attain even with a multilayer PCB and lots of copper, you can forget about that with some perfboard. Differences in gain do not affect the output voltage of a emitter follower. All you need is to make sure there's enough base current. As a rule of thumb, thermal drift causes Vbe forward voltage to drop by 2.1mV/°C. So even if temperature rises by 100°C that only causes the output voltage to rise 200mV - Safe to say no-one will even notice. Not that it matters, linear control is off the table for his requirements.
  3. cheap 3 pin fan control

    If you need 1A and a 4V out that's indeed 8 Watts. 8 Watts is a lot and would require a large heatsink, so linear is off the table. You might want to take a look at the TL494. EDIT: Have you tried applying the PWM straight to the fan, without filtering? Should work. If it does you can simply have the microcontroller PWM a transistor straight to the fan. A couple of hundred Hz should already be enough.
  4. cheap 3 pin fan control

    It depends on his fan tough. A typical 12cm fan can draw around 300mA (example, not even with fancy LEDS: http://www.coolermaster.com/cooling/case-fan/blade-master-120/ ). If you only drop 3V over that LDO @ 300mA you're already pushing close to 1 Watt of power dissipation. According to the datasheet that PPAK does 100°C/Watt, with a max die temp of 125°C. It only gets worse if you drop even more voltage and such datasheet figures are often based on a decent PCB design that can sink some heat rather then a prototyping board. Why not use something like a plain BD139, configured as emitter follower with a pot setting the base voltage ? Cheap, simple, and you can slap a proper heatsink to the BD139.
  5. 1 Function or multiple

    It's a good methodology and I encourage you to try and train yourself to use it consistently for a while. YMMV, of course, but you'll find it tends to grow on you and eventually you'll want to program like that, rather then ask yourself if you really have to. The main purpose is to make self-documenting code that is "human-readable" without extra comments. This helps with maintainability, correctness and debugging. Getting rid of as much comments as possible is important because comments do not tend to age well (that does not mean you should never use comments, but you should not comment what your code can explain for itself). Whenever a program is modified, comments tend to be overlooked and not updated to reflect the new code. How often did you have to work on a program where the comments were outdated and sent you on a wild goose chase ? I've had my fair share. The second purpose is to prevent having to do it anyway in the future. It might be a small project, but most large projects started out small. Let's rewrite your acceptButton_Click function in this way: private void acceptButton_Click(object sender, EventArgs e) { if (IsCorrectGuess()) { PlayerWins(); } else { if (IsFirstGuess()) { WrongFirstGuess(); } else { PlayerLoses(); } } } We no longer need any comments and the code now reads like plain English. The GuessedCorrect variable became a function that returns true or false. The function IsFirstGuess stores it's own state inside a class member variable so when you call it the first time it returns true and returns false on subsequent calls automatically. This of course implies this member variable has to be reset by the code that starts a new game. Having separate functions for PlayerWins, WrongFirstGuess and PlayerLoses groups the actions that should happen to enter this new state together (such as printing the message and disabling the button) in a single place and instills confidence in anyone having to modify the code that those functions are the only path to the new state. It also makes the higher level logic in the acceptButton_click function more readable - "PlayerWins" pretty much sums up what's happening in a single word versus versus code that modifies the text in some status bar and disables a button. Compare both versions and imagine yourself having to work with this code 3 months down the road - which version would you rather work on ?
  6. How Does PWM Work?

    Fair enough, but I'm sure you realize exploiting the diode's avalanche breakdown requires careful engineering to make sure the diode can handle the avalanche energy, etc... That's possibly an ever trickier rabbit hole
  7. How Does PWM Work?

    No, you can't. Placing the diode over the transistor does not do anything at all, the diode is always reverse biased. When the transistor is turned on, current flows from the power supply "+V" trough the motor, trough the transistor to ground. The diode is reverse biased as per the following image. The motor's inductance is storing energy in it's magnetic field. When the transistor is turned off, the motor's inductance wants current to continue flowing in the same direction. It wants to resist changes in the amount of current flow like any other inductor. To do this it uses the energy it had stored in it's magnetic field and becomes a current source itself, theoretically generating whatever voltage required to overcome any resistance in it's path. But the current does not change direction, so the diode is still reverse biased and does nothing! The diode needs to be placed reversed biased parallel to the motor, then when the transistor is turned off and the inductor becomes a current source the current can recirculate or freewheel trough the diode: You're talking about a H-bridge for bi-directional motor control. There the diodes are indeed across the transistors, but that is because the diodes across the opposite transistor pair are used as freewheel path when a transistor pair is turned off. There's more to it then that. Freewheeling is part of the low pass filter action of the inductor. Done right, you can obtain a relatively smooth (triangle) current waveform. Compare it to the diode in a asynchronous buck regulator. The diode is not just there to protect the circuit from the inductive kick. It's an integral part of the circuit and allows the inductor itself to power the load during the rectification phase of the cycle.
  8. How Does PWM Work?

    The diode needs to be placed in parallel with the motor itself so that the inductor current can freewheel.
  9. [Help] Audio amplifier from old CRT

    That's the wire carrying the 25000V EHT for the CRT anode. The blue glow is corona discharge. After a while you might start to smell Ozone as well. With the CRT disconnected and thus no load, voltages inside the flyback transformer will greatly exceed their nominal working voltages, possibly causing such arcovers. This seems to be a very dodgy television set as I'd expect any decent set to prevent the flyback transformer running at all with the CRT completely disconnected. A common technique used back in the day was to to include a jumper wire into the connector for the deflection coils on the CRT so that unplugging the deflection coils automatically turned off the entire EHT/flyback section. Your TV does not seem to have any of that - what a deathtrap! It's hard to tell why it does not work - it could be many reasons - From the audio amplifier being powered by the flyback section (which is obviously not working right without the CRT, as the sparks imply) to the TV having auto-mute if there is no video signal. It does not make sense to run a whole television set, now turned death-trap, just to have a audio amplifier. If you want to play around with the electronics it would make more sense to find the audio amplifier section on the board, if the TV is not ancient it should be a single chip amplifier, extract the relevant parts and use them to construct your own amplifier on a piece of perfboard. If you have no clue how to do any of the above I'd suggest you stop playing around with lethal electronic equipment until you're much more knowledgeable and just buy a cheap amplifier for now.
  10. How Does PWM Work?

    That depends on your chosen PWM frequency. It should be fairly obvious that if you have a PWM signal with 50% duty cycle at 1Mhz your transistor is going to have to be a lot faster then if you had a PWM signal with 50% duty cycle at 1Khz. Your switch (transistor) is only efficient when it is either fully off (nearly no current flowing trough it) or fully on (nearly no voltage dropping across it). During the transitions from on to off (falling edge) or off to on (rising edge) there is both a voltage drop and current flowing, thus power dissipation. For this reason one wants the rise and fall times to be limited to only a few percent of the period time. The higher the PWM frequency, the shorter each period, the lower the desired rise and fall times, the faster the transistor needs to be. Large power transistors are typically slower then smaller lower power transistors (Typically, more power means physically larger which means more parasitics such as capacitance which means slower). That said, power BJT's can be made to switch within microseconds and MOSFETS can be made to switch very large currents within a few tens of nanoseconds. Allowing PWM frequencies from a few Khz into the Megahertz range, respectively. The frequency to choose depends on the motor. It's inductance is employed to act as a low pass filter to smooth out the current. One typically chooses a frequency that minimizes current ripple while still being workable. As switching large currents with very short rise and fall times - high di/dt - opens up a whole new can of worms (Ringing, inductive spikes, EMI, freewheel diode recovery times, etc). Hard to say, it depends on your motor/setup. The relationship dutycycle - motor speed need not be linear.
  11. My 600w inverter tripping at 400w after 30 seconds

    Does the PC have a modern PSU with active PFC ? If so, try another load... Active PFC works by drawing short current pulses right when the voltage sine peaks in order to get good power factor. But those short pulses are then multiples of the average amount of current, those large spikes could cause the inverters safeties to kick in.
  12. why does this not exist?

    Some rather convoluted examples here trying to explain a simple concept. I'll give it a go: Imagine you have a 1000 numbers that each need to be multiplied by 2. You could easily split this task into a 1000 threads, each thread running on it's own CPU core, and have each thread perform the calculation on 1 number. Now imagine that each number has to be multiplied by 2, but then the result of this calculation has to be added to the next number before that is doubled and so on... Since each calculation first needs the result of the previous calculation, each thread has to wait for the thread before it to finish it's calculation and pass it's result before being able to continue. In this case there will be no performance benefit from the extra threads and a single threaded application will probably even be faster (because "juggling" the data around between threads takes time as well). Real life computer programs are full with these kinds of data dependencies - where one thing needs to be calculated first before the next calculation can begin. As a more relatable example, imagine a graphics thread in a game that is responsible for drawing everything on the screen. It often has to wait for the game logic thread to first calculate where and in what state objects will be before they can be drawn.
  13. program fault

    If you look at your own diagram you posted above you see that it's controlling four 7-segment displays with only 12 wires where one would normally expect 36 - that should give you a clue that there's some trick going on. The display is being multiplexed. There's lots of articles and explanations about display multiplexing online so I suggest you study that first. Once you understand multiplexing you'll know that: Only one display can be active at any one time, when you write a value to a display it turns the other 3 off. That means you can only update 1 display each iteration of the loop. You must update all 4 displays sequentially constantly to provide the illusion all displays are on at the same time.
  14. First Oscilloscope Recommendations

    Such kits are, off course, just toys. Whether or not it is useful to you depends on what you're going to use it for. If you're only dealing with extremely low frequency stuff and don't need any precision/resolution (basically just want to see if some wave shape is there) - and you don't have high single-shot requirements - then such a kit might work for you. The bandwidth is extremely low - only 200 Khz. So the input can only accurately handle sine waves of a frequency somewhere below 200 Khz (remember that there's already 3db attenuation at 200 Khz). Complex waveforms, such as square waves used in digital circuits, will be limited to a far lower frequency - due to harmonics - say 10 or 20Khz or so. If the things you're working on are below these frequencies then it might work for you. (Note that this is only about the input circuit's performance, the accuracy of the acquisition is a different matter, but there's no reason to expect high accuracy). These things have little memory, so don't expect high resolution. (especially single-shot).
  15. How To Relay

    What controller ? Your current drawing has no need for the battery at all, more information on how this "controller" comes into play might help towards a better solution.
×