source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Why does USB only use 2 lines for RX, TX instead of multiple data lines? Wouldn't it be faster if there were multiple data lines (say 8) to transmit/receive data (say sequential bytes) instead of using a single line to transmit sequential bits? <Q> It would be faster indeed if instead of one line you'd feed multiple lines at the same symbol clock. <S> But, USB's primary and foremost goal is to provide easy, serial (hence the S in USB) interfacing between low-cost devices (hence the U in USB) with low-cost, lightweight cabling. <S> So, that's why USB doesn't do parallel data lines <S> : It's simply not the niche it's supposed to fill. <S> Also, don't neglect that having multiple high-speed parallel lanes requires the transceiver system to introduce a relative high amount of effort to compensate different skews on different lines, which at high rates are inevitable. <S> It's often become cheaper to make something work twice as fast than building two of the slower variant, unless you're really directly talking to hardware that is in its raw principle bit-parallel (e.g. DDR memory chips). <A> One of the main hurdles with any type of parallel bus is skew . <S> If you have 8 separate wires all carrying data, it is important that all of the bits arrive at the approximately the same time. <S> Otherwise, the bits of Byte A could get mixed up with the bits of Byte B. <S> This means that the length of those parallel wires must be matched, within some percentage of the clock speed, so that the travel time of the signal down the wire is approximately the same. <S> The faster the clock speed, the tighter the tolerance on the length between parallel wires. <S> On a PCB design for something like a motherboard, very tight design constraints are commonplace. <S> PCB traces can achieve 1 mil or better length matching, which is good enough to implement high speed parallel interfaces. <S> One common example of this is the DDR memory interface . <S> This interface relies on parallel communication to move data at very high rates, but it's only possible to (affordably) implement these interfaces internally. <S> Imagine trying to build an external computer cable with 30+ wire connections, all length matched within a thousandth of an inch! <S> Those cables would be very expensive compared to USB cabling. <S> Older computers did use a Parallel Port , which had 8 data lines but could only achieve a data rate of around 2.5 MB/s. <S> Compare that to the 60 MB/s of USB 2.0, let alone the newer flavors of USB. <A> While the answer of Marcus is 100% correct, I want to add that USB 3.2 Gen 1x2 and Gen 2x2 are using two data lanes in each direction while the lanes still run at 5Gbit/s resp. <S> 10Gbit/s each. <A> USB doesn't have Rx & Tx lines. <S> It has one pair of differential lines, similar to RS485, with the data & clock signal encoded together. <S> The sender sends data one way using both wires, and the receiver sends data back the other way using both lines. <S> Otherwise, yes, a parallel bus of signals can be very fast. <S> Best for short distances for the reasons mentioned already. <S> Example of a USB data transfer: <A> As pointed out in other answers, You are right, If you use twice as many lanes, you get twice the speed. <S> Earlier, parallel busses (with many data lanes) were widespread. <S> Examples are the parallel printer interface, PATA, and PCI. <S> Parallel busses are still in widespread use on PCBs (DRAM, QSPI, GMII, ...) <S> and on chips (AXI, AHB, QPI, ...), but for longer distances, it is actually much cheaper to build a high-speed serial link than a lower-speed parallel link with the same data throughput. <S> Modern super-high-speed, longer-distance data links such as Gigabit Ethernet, PCIe and USB3 do have multiple data lanes, but each of those lanes is a completely independent high-speed serial link; the data streams from the individual links are combined back together at a later point. <S> This is why you can put a PCIe x16 graphics card into a PCIe x1 slot with a fitting adapter (or sufficient violence). <S> Parallel busses have more wires (duh), so cable will be thicker and heavier and more expensive, and the connector as well. <S> Historically, when USB was designed, high-speed data transfer was not its main focus. <S> The main focus was to create a universal and cheap bus system for connecting peripherals like keyboards, mouses and printers. <S> A parallel design would have been a bad choice; it would have ruined the revolutionary small connector size and probably increased the cost of USB enough to prevent its widespread adaption.
| But it is hard to build fast parallel busses because differences in the lengths of individual wires will cause timing differences.
|
Acceleration in the Z direction in Earth frame regardless of orientation I have acceleration readings on 3 axes from an accelerometer, I'm trying to find a way to get the acceleration in the vertical direction independent of the current orientation of the sensor. I have been trying to google and search on forums but having a hard time finding a coherent answer. Thank you <Q> To subtract the acceleration that counteracts gravity, you need to know your current orientation (i.e. you need a six axis accelerometer). <S> Then the problem reduces to subtracting a vector of length <S> \$9.81\frac{\textrm{m}}{\textrm{s}^2}\$ <S> in the appropriate direction (and realistically, you also need to determine the gain and offset errors for each axis sensor, but a highpass filter will probably do for most applications). <S> Without knowing your orientation, no solution is possible, because the problem is under-defined. <A> You can solve by the theorem of pythagoras and by projection of vectors a² + b² = <S> c² and proj u v = (< u.v >/ <S> < v.v <S> >) <S> * v use 9.81 m / s² as the acceleration vector vector (if you are working with vector projection you can use vector projection - https://en.wikipedia.org/wiki/Vector_projection ) <S> subtract the projection of the value of the angle, to the axis that you need this way you can know in the three axes <S> x, y and z the values for acceleration of gravity <A> Knowing the attitude, you can make a vector sum. <S> What you need is a 9DOF sensor (acc, gyro, mag) and a fusion algroithm - Sebastian Madgwick. <S> His algorith will output quaternions of attitude. <A> I found a solution that worked, to calculate the vertical component of the acceleration in Earth frame given the orientation angles: $$\beta, \gamma = pitch, roll \\z = -a_{x}sin(\beta) + a_{y}sin(\gamma)cos(\beta) + a_{z}cos(\gamma)cos(\beta)$$
| You will need to rotate the acceleration vector with attitude and then extract only the z-axis component.
|
Chimp climbing wires not electrocuted? Reference video: https://www.youtube.com/watch?v=U5-Fy4ULdPg The chimp is climbing both wires out of phase (i would have to assume, it is in Japan), do the power lines have to be closed for the chimp to do that? How is it possible that the chimp is not electrocuted? It was stated that power was out for 1000+ people so i would have to assume the lines had to be closed for the chimp to survive climbing this? <Q> Yes, the wires are insulated. <S> It might be due to the congested urbanization. <S> I have been seeing the same thing even here in India, over the last 10 years. <S> Earlier, they used to be bare wires and regularly caused injury to either people carrying long poles etc, or they got torn in cyclones and fell to the ground. <S> Sometimes the electric poles are very high (12 meters or more). <S> In those I have seen bare wires at the very top, insulated ones below that, then phone and TV lines just above the pedestrian's head. <S> The voltages of the bare wires and insulated ones are also different, but I don't remember what they are. <S> The bare wires usually have better safeguard to prevent sagging, than the insulated ones. <A> That's not common in my neck of the woods. <S> If the power was turned off, it was for additional safety. <A> Looks like there's a splice or something which is not covered in insulation where the chimp gets shocked.
| It looks to me like the power cables are insulated.
|
Can Altium Designer 17 Generate Missing Paste Mask Layers? I recently ordered three proto PCBs from a small PCB company. This board house produces Gerber files in-house from their proprietary PCB layout files, and provides this Gerber set to the user on delivery of the PCBs... or so I thought. In the Gerber file set I received the paste mask layers (.GTP and .GBP) are missing from the set. I now suspect that they do that on purpose as they also sell paste stencils. But that is another matter. Since I have access to Altium Designer 17 down the hall, I decided to rename the gerber file extensions to those used by Altium, and import these 8 files into CAMTASTIC. The import went fine with no problems, and viewing them looks as if these layers are just fine. Now my question... Can CAMTASTIC generate the missing paste masks (.GTP and .GBP) from the information contained in just these imported files? It seems like there may be enough information to do this, however I'm not that familiar with CAMTASTIC to figure out how to do this. (I'm borrowing evening time on this Altium machine.) The file sets are listed in the attachment. <Q> With the appropriate (eg soldermask file) go to the Tables/Apertures, where you should be able to change the aperture dimensions as necessary. <S> Do this on a copy of the original of course. <S> You can also do this in the final gerber file as well, the standard is available at the www.ucamco.com (the_gerber_file_format_specification.pdf) <S> The hitch is that if there are paste mask patterns that are not simply smaller versions of pads you may have to create some new ones and fit them in by hand (often these are thermal pads, etc.) <S> You should then double check the resulting gerber file either with camtastic or with GCPrevue or some other such program that can stack the soldermask and past mask layers in different colors so you can inspect visually. <A> The information that is embodied in a good paste mask layout is simply not present in the other board fabrication layers. <S> If your parts are all SMD, such that every mask opening is a pad that needs paste, then you can simply use the mask layers as your paste layers. <S> Ideally you would shrink the apertures a bit to avoid dispensing too much solder on each pad, but this method will get you fairly close with minimal effort. <S> If you have parts with large pads (DPAKs, or QFN/QFPs with thermal pads), using the mask openings directly as the paste openings will not work well. <S> You'll wind up with way too much solder and are liable to have poor leveling and even voids. <S> Large pads should be "window paned" with un-pasted areas to control the solder volume and allow for better outgassing of the joint. <S> From here : <S> Lastly, and most obviously, if you have an openings that are not meant to receive paste, such as through-holes or test pads or un-tented vias, then these openings will need to be cropped out. <S> Your best bet, if you have the original design files for the board, is to simply create the paste layout yourself using the appropriate settings. <S> The major benefit of doing it this way is that you only have to define all of the paste openings once in the footprint libraries, and you can easily generate paste layouts for any future boards in (depending on the CAD tool) just a few simple steps. <A> Not completely automatically. <S> What you probably want to do is take the solder mask layer and use that file to generate the stencil. <S> It may not be perfect and you'll have paste in places where you don't want it to be (e.g. fiducials, through-hole footprints, ..) <S> but you can either ignore that (wouldn't want to do that) or delete those from within CAMtastic. <S> Usually the paste mask pads are a little smaller than the soldermask but you might get away with it. <S> All in all I don't think it's worth the hassle <S> and you should order the files from the fabricator. <S> Yet, I need to say this: If you make a business do work for you, always make sure that you get all the source files - ALL of them. <S> Now they will be able to pull money from you with every little thing you want. <S> If the business doesn't provide that option, choose another one - there are plenty. <S> I find that approach very .. problematic. <A> Thanks all for the info. <S> In summary, the answer is: Yes you can generate a missing paste mask from a copy of the solder mask by slightly narrowing the apertures. <S> Some editing may be needed particularly if SMD and thru-holes are both used.
| You can generate paste masks from the solder masks quite easily, but it may be more challenging to create good paste masks without a good deal of manual effort.
|
Does a plugged in 12v usb-charger use energy when no device is connected? I hard-wired a 12v cigarette-plug into my a-pillar. The whole point is to have an additional phone charger on the leftside where my phone mostly sits. I connected it directly to the battery ( with a fuse ), so I can use it when the engine is off aswell. When I connected the usb-charger to the cigarette-12v-plug an indicator-light came on. ( nothing else is connected ). So obviously this is using power. Will this drain my battery? Do 12V usb-charger without an inidicator light use power when nothing else is connected? if #2 is negative, how can i solve this? <Q> 2) <S> yes, they use power, more or less depends on the design & quality 3) <S> Solve it by powering it from a fused accessory feed or ignition feed. <S> And, personally, I would do 3 whatever the power it draws... <A> A similar question would be: 'what's the mileage of my car?'. <S> Depends on your car, obviously. <S> So in this case: depends on the design. <S> It could draw several µA up to several 10's of mA. Pretty simple to measure actually, then you'll know the answer you're looking for immediately. <A> Will this drain my battery? <S> Do 12V usb-charger without an indicator light use power when nothing else is connected? <S> yes. <S> here there is an led for visual indication <S> (in regular variants there will be no led) <S> if #2 is negative, how can i solve this? <S> connect it after the Fuse Box
| 1) yes, how long that will take depends on how much it draws and how long between car uses. All Standard manufacturers use ultra-low power Standby controllers - which results in a very low power consumption.
|
Power NMOS used as voltage switch I've designed a PCB schematic that uses a MOS device to switch one of the higher power rails. I've looked through the datasheets many times, and believe it should work, according to the Current-Voltage characteristics of the device. However, I'm very apprehensive about this, as I am worried that I missed something, and the drain-source voltage drop will degrade the available power on the rail. I'm hoping someone could double check my design: Here is the schematic: The regulators shown here are fixed voltage, Medium current (<5A). The MOSFETS are planned to be IRLB8743PbF NMOS. Here's the datasheet . According to this graph in the datasheet, I believe this device should operate without a significant voltage drop on the output rail, at a Vg of ~3.3V. It is important that the drop be no more than half a volt to prevent sensor brownouts. Also, I anticipate the rails using very low current (mostly powering microcontrollers). I would really appreciate any personal experience tips, or any help finding stuff I may have missed in the datasheet. Thanks in advance! <Q> You have gotten great feedback already. <S> It's obvious that the best approach is to use a PMOS instead of the NMOS. <S> You could use something like this, with a PMOS (and NMOS) to get what you are looking for: simulate this circuit – Schematic created using CircuitLab <S> With this you can use a low voltage signal (e.g 3.3V, 5V) to turn on the PMOS. <S> With no signal at the NMOS gate, both the NMOS and the PMOS are OFF. <S> When you apply 3.3V at the gate of the NMOS, that will turn it ON, and will pull the gate of the PMOS down to 0V—this will turn ON the PMOS since now VG-VS (e.g -5V <S> , -12V) is enough. <S> Just need to pick the two the MOSFETs. <S> For the NMOS, something like the DMN3067LW works great (turns on with low voltage). <S> For the PMOS, you need to pick one with the 5A current capability you want. <S> One caveat though <S> , if you were to keep the same configuration as you have it, you need to pick a PMOS capable of turning on properly with 3.3V, and 5V. <S> The 8V regulator should work fine because you have the PMOS before the regulator. <S> So you have a high voltage signal (12V), and when you pull the gate down to 0V, VG-VS=-12, enough to turn on most high current transistors (and with lower RDS(on)). <S> In your 3.3V and 5V regulators, you have the PMOS, after regulation which puts the source either at 3.3V or 5V which means that pulling down the gate will have a VG-VS of either -3.3V or -5V, enough to turn on the PMOS but possibly with higher RDS(on) and at 5A that maybe a drop you would not want (plus heat). <S> For those, I'd place the PMOS/NMOS control circuit before the regulators (just like for the 8V regulator) so that there is enough drive (approx. <S> -12V). <S> You could find transistors that will turn on for 3.3V or 5V but at the expense of higher RDS(on). <S> Hope <S> this gives you more insight. <A> Given the circuit you presented I'd suggest you can make this configuration work for both the 3.3V and 5V supplies, but you need to change to a P-FET for the 8V regulator switch. <S> You circuit should be something like this: simulate this circuit – <S> Schematic created using CircuitLab Note that the logic for the 8V switched is opposite to the other two supplies. <S> There is plenty of drive for the 3.3 and 5 volt switches, only the 8 volt needs a P-Channel. <A> Rds(ON) of that FET is 3,2 mΩ <S> (or 4,2 mΩ <S> if you use 5 V Vgs instead of 10 V). <S> With 5 A you would lose 16 mV (21 mV with 5 V Vgs). <S> If you have any wiring, you will probably lose more voltage to those Power dissipation is 80 mW (105 mW with 5 V Vgs) <S> so you don't have to worry much about that. <S> What are you using for TEL_ON signal? <S> You have to pull that to over 17 V for your circuit to work. <A> The idea is fatally flawed. <S> You cannot simply “choose” what region to operate in, you have to design the circuitry so that the transistor operates in that region. <S> While you can use an NMOS as a high-side switch, you have to provide it with a high-enough gate-source voltage for it to enter the triode region, this means that your gate drive has to be several volts above the desired supply rail. <S> Your highest rail seems to be 8V plus drop-out, plus threshold voltage, indicates that you would need on the order of a 13V gate drive. <S> Then is the issue of power dissipation, <S> if it is not in the triode region there will be a voltage drop across the device. <S> To avoid this you would need an auxiliary DC-DC converter that provides you with a high-enough voltage to power level shifters to provide the necessary gate drive to enter the triode region. <S> For all of these reasons NMOS are rarely the first device to consider as a high-side switch. <S> The necessary level-shifting to turn off-the device can simply be done with one or two resistors and an open-drain driver.
| PMOS are much easier to design for in this particular application.
|
Need help with transformer I have one transformer. Primary 230V and two secondaries 14V/3A, 15V/3A and ground between them. I am curious can I use that transformer as center tap transformer. Here is the picture: I know I can use it as 29V/3A without problem and 15V, 14V alone. I would appreciate any help, thanks. :) <Q> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> The transformer is tapped but not in the centre. <S> You can generate a split rail power supply as shown. <S> SW1 represents your choice of connecting to the 14 V or 15 V tap. <A> Here's one idea for dealing with the asymmetry: Connect the center tap of the transformer to the circuit ground through a pair of back-to-back diodes. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The idea is that if the ±20V rails are equally loaded, the two diodes in the center (D3 and D4) will not conduct, and both windings will be working at full efficiency. <S> Only if the load is highly asymmetric will one diode or the other conduct, and then the 15V winding will be supplying the bulk of the power. <A> if you want to confirm do one thing. <S> ( actually you have to go with measuring impedance - usually most hobbyists dont have that... <S> so i am giving you a simple way of measurement with multi meter) <S> measure resistance between 0 and 14V measure resistance between 0 and 15V <S> measure resistance between 14V and 15V if [1 & 3 <S> ≈ half(3)]- <S> it is center tapped if not - tapped transformer.
| you cannot use that transformer as a center tapped transformer - these are called tapped transformers.
|
Soft start for fridge compresser I live in an off grid property running on 6 12v batteries. We have a 2000w inverter and are trying to get a fridge to run on our system. We have enough power to run it however the issue I am having is on the initial start up the compressor draws around 100amps for around a second. This draw drops the voltage of the batteries to the point that anything else we were using (TV, computer) turns off and has to be rebooted. I am looking into a soft start device to distribute that instant 100amp draw over a few seconds (such as this one https://www.jaycar.co.nz/240v-10a-motor-speed-controller-kit-with-soft-start/p/KC5526 I was wondering if anyone has any experience with this and if they believe that it will work or any other suggestions. My main concern is that the soft start will mess up the timing of the electric motor of the fridge and it will just stall out. Thanks in advance! <Q> The linked speed controller clearly states that it is for a universal motor and only a universal motor. <S> A universal motor is a series-field type DC motor with brushes, that has been designed to run on either AC or Dc power. <S> It is unlikely that a refrigerator will have a universal motor. <S> If you can not see brushes and a commutator inside, or two round insulated covers for changing brushes, it is not a universal motor. <S> There are variable-voltage AC speed controllers that are designed to power fans and centrifugal pumps. <S> The torque required to drive a fan or centrifugal pump increases in proportion to speed squared. <S> They require very little torque to start and reach their maximum torque requirement at full speed. <S> One of those might be able to to start a refrigerator, but it is rather unlikely. <S> Your best alternative is probably to buy an inverter that is designed to start an AC motor that has a hard-starting load. <S> The fridge may need its own inverter. <S> If the inverter you have can start the inverter, buy a second inverter for everything else. <A> If you mean 100 amps from the 12 volt batteries (in parallel, I assume), ~1,000 W out from the inverte, that is to be expected for a full-sized household refrigerator. <S> The initial current draw for a refrigerator is high because the motor must turn over the compressor against gas pressure. <S> There is no way to distribute that initial load over time, because enough force must be applied against the "springy" gas. <S> In addition, household refrigerators consume a lot of energy over time, perhaps 1 kWh/day for a small, highly-efficient ("Energy Star") appliance to 5kWh for older models. <S> How are you keeping those batteries charged? <A> The average household refrigerator uses a hermetically sealed single phase AC induction motor that uses a capacitor for starting. <S> It is the charging of that capacitor that you are seeing as that 10x spike in current and after that, the motor will pull approximately 6x current until it gets to around 80-90% speed. <S> That entire process usually takes a second or less, but if your system cannot supply it, you have the problem you are seeing. <S> An AC soft starter is not going to work for this, in fact there really isn't a solution because anything that interferes with that capacitor starting routine ultimately interferes with the motor starting at all. <S> Even VFDs designed for SOME types of single phase motors will not work for this type, the capacitor charging current looks and acts like a short circuit to the VFD transistors and the VFD harmonics gets trapped in the starting capacitor, so it is a race to see which one fails first. <S> The viable solution, as mentioned by DrMoishe Pippik at the end of his first response, is to attain a new refrigerator designed to operate off-grid. <A> A “soft start”, even if appropriate for the motor, will only lead to a stall of the compressor. <S> You will need an inverter (and batteries) capable of handling the start-up surge. <S> It’s possible that there are special fridges that have less start-up surge designed for your application and similar ones such as RVs. <A> Soft starter is the one which slowly changes the applied voltage to an induction motor which results in reduction of electrical surge current of motor during starting. <S> The product is an Universal motor speed controller. <S> soft starting is just an another method of starting an induction motor. <S> it will not change any of its operating parameters <A> Just a thought, you might try a UPC backup (for computers) inline for the fridge. <S> These units have batteries and power conditioners. <S> I believe that an APC1500 UPS can provide about 900 watts, which is about half of what a refrigerator requires to start. <S> Conversely, you could run your television and other sensitive equipment with the UPC inline.
| Most likely, you need a smaller, more efficient refrigerator, e.g. one designed for a recreational vehicle , or more batteries, or perhaps a separate inverter with its own batteries.
|
Can i get away with a pcb heatsink for a triac? so, i have a bunch of to-220 L4006L5TP triacs laying around and i have to design an AC phase control pcb, reading the datasheet i saw that the Rθ(J-A) is 50°C/W, the Rθ(J-C) is 3.3°C/W and the voltage drop is 1.6V, since the max current of the design is 1A i have to dissipate 1.6W to the pcb itself. according to this question i need a heatsink with thermal resistance less than 36.7°C/W to 16.7°C/W to keep the triac in the 80°C to 60°C range considering that the air inside the case is 45°C is it possible to achieve this with only using the pcb as heatsink with horizontal mounted triac and some CPU thermal paste? if yes, how? tl;dr: is it possible to use the pcb as a heatsink and achieve less than 36.7°C/W using some thermal paste?if yes, how? datasheet: https://www.littelfuse.com/~/media/electronics/datasheets/switching_thyristors/littelfuse_thyristor_lxx06xx_qxx06xx_qxx06xhx_datasheet.pdf.pdf <Q> According to Fig. <S> 5 & Fig. <S> 11 in the datasheet the power dissipation will be about 0.95 W. <S> You will need about 2 sq inch. <S> This means top and bottom. <S> I would use the TO-263AB because it will be easier to solder the thermal pad to the PCB. <S> If you use the TO-220 you still need a thermal pad on the PCB to solder it to. <S> Screw it down before soldering. <S> Use solder paste if you have some. <S> In the app note below, section 3.1.1 Example: <S> Calculating the Required Board Size to Hit a Target θ JA is very similar to your project. <S> This example is for a 0.94 W device with a θ JC of 7.3°C W. <S> It required 2.23 sq. <S> in. <S> for a target <S> θ JA of 40°c. <S> Using the same calculations with a θ JC of 1.9°C/W the area was reduced to 1.91 sq. <S> in. <S> So 2 sq. <S> in. <S> sounds like a safe bet with about 25°C margin. <S> APP NOTE: <S> Thermal Design <S> By Insight, Not Hindsight <A> At 1A you will be fine with a minimal amount of heatsink area- <S> perhaps 1 square inch should be more than enough. <S> The actual triac dissipation will be maybe 1W. <S> The forward voltage drops with current, see the curve in datasheet. <S> To confirm, check out the below curve for a TO-252 SMT package, happens to be for a voltage regulator, but applicable: <A> Standard thickness copper foil (1.4 mils, 35 microns) has 70 degree Centigrade per watt edge-edge of thermal resistance. <S> For any size square of foil. <S> This, with 8 squares around the Triac's mounting stud, will have 70/8 = 9 degree Centrigrade of heat rise. <S> If you surround that with 8 more squares (each being 3X larger than the mounting stud, you'll have another 9 degree C rise. <S> simulate this circuit – <S> Schematic created using CircuitLab
| There should be thermal vias where the device thermal pad is solder to the PCB pad.
|
Which is most used Barrel Connector ID? 2.1m or 2.5mm? I'm working on an project which will be given to some friends and will be open-source too.I need to choose the power supply connector (5V or 12V @ 3A) and I'm thinking to barrel connectors. I found there're 2 version of them, the 2.1mm and 2.5mm for the internal pin. I read also the 2.5mm male will fit the 2.1 female but connection is not stable, so it is not a reliable solution to choose the smaller one to accept both. So, which is the most used? The goal is to have the maximum compatibility with existing PSU around the house. <Q> Alas, this is difficult to pin down. <S> "Most used" depends on your industry, your region of the world and the year you ask the question. <S> So people learnt to limit the mixing and matching of supplies and devices, and manufacturers were motivated to pick uncommon sizes to prevent misconnection. <S> It's probably only since the Arduino that there's been much interest in supplying your own supply, and the question of compatibility became of general concern. <S> The Arduino happens to use the 2.1mm barrel jack, and the Beaglebone followed suit. <S> So 2.1mm has become a de-facto standard in the maker community, which has influenced a lot of electronics. <S> But this is neither official nor stable, so <S> I'm afraid your goal of "maximum compatibility with existing PSU around the house" is probably largely unachievable in April of 2019. <A> 2.1mm is the most common used barrel jack. <S> and even 2.5mm jack also has its market. <A> A potential alternative solution for a standardised power connection that slowly becomes more common, is USB-C. A standard USB-C cable and charger will be able to deliver your requested 3A.
| most open source boards usually comes with 2.1mm jack. For a long time every manufacturer would pick their own and supply the plug to suit. Consumers who tried to connect their own would quickly discover they'd fried the appliance by connecting the wrong voltage to it.
|
Reversing P-channel mosfet for polarity protection component selection Situation: I'm trying to implement a reverse polarity circuit using a p-channel mosfet and a voltage divider using a resistor + schottsky diode. More information here if you need a refresher. The key point here is that the MOSFET is reversed. The current flows from Drain to Source, first through the internal diode but after turning on through the normal MOSFET path. I've been reading various datasheets of various MOSFET's and they all seem to indicate that the maximum Vdrain-source voltage is negative. If I took this at face value it means that a MOSFET can't conduct in both directions, which I know to be false. Example . Can I ignore this negative number and assume it's a maximum rating both ways or is there more at play here? Edit: the actual circuit taken from Hackaday <Q> FETs ideally don't care about the direction of the current. <S> You simply have to invert your conventions and switch Source and Drain in your equations. <S> Everything works exactly the same way. <S> The only reason that power FETs do care is because there is a Source-Body connection put in place during device fabrication. <S> This creates a parasitic diode that conducts when the voltage is reversed. <S> However, if your drain-source voltage is below the diode voltage, the device will still behave as a FET. <S> If you have access to the fourth, body, terminal. <S> You can bias it externally so that the device always operates as a FET. <A> If you apply a positive drain-source voltage for P-channel FET the internal diode will start to conduct. <S> Thus the positive voltage rating is irrelevant. <S> The voltage over the diode depends on the current as it does for any diode. <S> The Vds voltage is as written, from drain to source. <S> Meaning that at -10V, the drain is at 10 V lower voltage than source. <A> Seems like you are on the right track. <S> Current can definitely flow both ways through the channel of a power MOSFET when it is on. <S> Not much voltage will be developed between drain and source this case (unless the current is very high). <S> It is just Id*Rds(on). <S> When the P-channel MOSFET is off, and current is flowing from drain to source, you just need to respect the ratings of the body diode (which should be listed in the datasheet). <S> You can't use the same MOSFET for reverse-polarity and over-voltage protection, generally. <S> Over-voltage current and reverse voltage current flow in opposite directions, so two MOSFET's will be needed.[edited to make the point more clearly, hopefully!]
| If the FET is oriented so that it can cut off over-voltage current, then it will be "pointing the wrong way" to cut off reverse current.
|
Does the switching frequency and ON/OFF time duration of LED affect the power consumption of LED? I want to drive the electronics consisting a controller with different peripherals on its I/O pins, one of which is LED, with 3V coin cell battery supply. I want to determine if its switching frequency and ON-OFF time of LED is varied, will that affect its power consumption. <Q> An LED circuit that draws 20 mA at steady DC voltage will draw 10 mA at 50% duty cycle. <S> The switching frequency would have no effect, looking at just the LED and ignoring the control circuit parameters. <A> If the speed of switching on and off (frequency) is high enough, the human eye won’t see the switching. <S> At 50% of light output, the LED is on half the time and off half the time. <S> To dim the light to any given level, you simply change the ratio of time on and time off. <S> PWM, the LEDs are constantly cycling between on and off states. <S> By sending a PWM signal to an LED, we can control how bright that LED appears to shine. <S> What’s actually going on is that the LED is turning on and off many, many times in a second. <S> For example, if we send a 50% duty cycle PWM signal at 50 Hz to an LED, it will be on for 10ms, then be off for 10ms, then be on for 10ms and so on. <S> You won’t actually see the LED turning on and off, instead, you’ll see that the LED looks much dimmer than when you set the duty cycle to 100%. <A> The power consumption's main factor is the LED on time. <S> But if still interested, for reverse recovery losses you can use the following equation: <S> \$P=Q_{rr}V_rf_{sw} \$
| The LED power consumption is based on duty cycle (percentage of time on.) If you are talking about reverse recovery loss of diodes, which are proportional to switching frequency, then I would say they are negligible.
|
Why are devices like the MCP23008 or PCF8574 still around when cheaper alternatives exist? INB4: if this question doesn't fit this board, please delete. But I don't know where else to ask. There're plenty of I/O port expanders available. Most of them add 8 I/O lines at the cost of two I2C lines (SDA, SCL). Here's the pinout for the MCP23008, taken as an example: And here we have a pinout of ATtiny404 MCU: The chip has 12 I/O lines, from which: Two lines are for I2C, connected to hardware I2C module; One line is reserved for RESET; One line can be used to generate interrupts for external MCU; 8 general purpose I/O lines. So such MCU can easily substitute dedicated expander like MCP23008 or any of a kind. It will of course require some programming to do so. I self-rank my own programming skills somewhere between 'awful' and 'very poor', and still I think it will take me maybe 4-5 work days to write such firmware. Experienced programmer, I guess, can make it in 1-2 days. I see no obstacles here. While for the Arduino guy (like me) simplicity is very important, in full scale production cost control comes to the first place. And what we have for the MCP23008? Here's offer from Digikey, roughly $8,000 per 10,000 pcs: https://www.digikey.com/product-detail/en/microchip-technology/MCP23008T-E-SO/MCP23008T-E-SOTR-ND/739286 And here's for ATtiny404, roughly $4,300 per 10,000 pcs: https://www.digikey.com/product-detail/en/microchip-technology/ATTINY404-SSNR/ATTINY404-SSNRTR-ND/8594960 That means that for 10,000 pcs price difference is about $3,700 . And 10k pcs isn't a breathtaking amount for a production device. So the question is: what is the reason that such devices are not completely phased out by MCUs? <Q> The main reason is cost. <S> You have forgot to take into account two very important factors: <S> The cost of writing the firmware for an MCU, and then maintaining it BUG free, throughout different silicon iterations. <S> (yes, MCU with same part number but different silicon version, might need an updated FW) <S> The cost/time of programming/testing the additional MCU, and finding the space on the PCB for the programming pins. <S> When it comes to writing a driver for these expanders, you will have to do it even if you used an external MCU, so no gain there. <A> One answer is industrial computers. <S> If you lack IOs on the MPU you use such an expander. <S> In such computers, which usually run Linux, it's important that the drivers are in the mainline kernel. <S> The cost of developing your own code for the ATtiny and the kernel driver for it and maintaining both is higher then those 3700 USD you mention in your question. <A> Little widely known fact, microchip dedicated ICs tend to be pre-programmed microchip general purpose PIC microcontrollers. <S> Specifically ones like the mcp you use as an example. <S> The reason they are still used, is that they have tested code, warranted and supported by the manufacturer, which means no paying an engineer to remake the wheel and extensive testing and bug fixing, programming costs, etc. <S> It just works. <S> It's an cost-benefit analysis, for a convenience part. <S> Just like most people can bake a loaf of bread easily and cheaply, but find it more convenient to buy one. <S> Or routine car work. <S> Or outsourcing a common IT task. <S> You are paying a premium for a turn key solution. <A> Functionally, the MCU you suggest isn't as versatile as the dedicated port expander as it lacks enough pins for the three address inputs - so you could only use one of them on your I2C bus. <S> You could, of course, program the address into the chip as part of its program but that would mean multiple different versions of MCU code being needed. <S> That tends to be a manual operation that will cost way more in labour than the few pennies you save on the prices of components. <A> some reason: using an ic over a standard port may help isolation . <S> We have I2C isolator for this task. <S> Todays, many microcontrollers work with 3.3volt, <S> Using such IC help the designers interact with 5V <S> A tiny microcontroller has many parts (Clock, General ALU, RAM, Flash controller, ...) <S> But I2C IC is a dedicated IO chip, So the reliability of a simple dedicated module is higher than a general controller. <S> many high-tech processor IO has many limitations, for example, 1.25volt output or input(because of other module installed on board) <S> and they can't use processor IO for a common task. <S> Usually these dedicated chip work over a higher temperature <S> range(-40 <S> °C to <S> +125°C)
| In essence, it is a lot easier, and cheaper to pay a little bit more for a product that is reliable and just drops into the system. But the main reason is that as well as developing, testing and maintaining the code you still have to physically program it into the MCUs themselves as part of your manufacturing process.
|
How to solder on a new USB plug/connector I bought a USB WiFi card, but then the metal part broke and I had to take it off. I only have the board now and it is too small to fit into a USB port. Where can I find a new USB head/plug (the silver part used to plug it into the USB ports, sorry I cannot find a name anywhere). And how would I go about soldering on this new head? Refer to the picture of the memory stick if you do not understand what I mean with the silver part Thanks in advance <Q> Get a short USB extender and plug the module into the end and cover with heatshrink tubing <A> The metal part of a USB plug is always the same size. <S> I found the exact part you want, but you need to buy 500 and they are sold out. <S> https://www.aliexpress.com/item/usb-shell/1526455799.html <S> next best is a stubby plug like https://www.aliexpress.com/item/10-Pcs-USB-A-Male/32945199926.html and remove the white part by force <A> You won't have to do any soldering most likely. <S> You'll need to find a suitable USB shell - say from an old thumb drive - as long as the main body is plastic. <S> Opene it up (it might only be snapped together if you are lucky) and remove the internals and replace with your board. <S> It's possible it'll just snap into place - again, if you're lucky.
| You can probably buy a plug that has the metal part the right length remove the contacts, and the plastic that carries the contacts and glue your circuit board inside you need to keep the metal away from the antenna at the back end of that circuit.
|
I've become an electrical conductor for my headphones... but how? So I have a pair of Bose noise-cancellation headphones that I plug into my keyboard every night to charge them (via my keyboard's USB port). My keyboard happens to be a metallic Apple keyboard. You will see why this may be important to note later. Over time, I noticed a certain dull, electrical buzzing sound in my right earbud which occurred when I turned the noise-cancellation on. This buzzing sound was not constantly there. It would randomly appear for arbitrary periods of time and then vanish. It wasn't loud either, but it was loud enough to be noticeable and annoying. For the longest time, I had no clue why this would happen. Sometimes the earbud would be perfectly silent (as it's supposed to be)... and then a buzzing noise would come out of nowhere. This was incredibly annoying and my only remedy was to listen to loud electronic music which blended in with the buzz and made it relatively unnoticeable. Of course, listening to almost any other kind of music proved annoying since my earbud would randomly, intermittently buzz at me. Finally, one day, I noticed that when I touched my Android phone, the buzzing sound would increase in volume. I thought at first that this was due to my bodily position somehow stretching the wire, but with further testing I confirmed that my Android phone was the culprit. I slowly discovered that touching different objects, even when the headphones were not plugged into the speakers, would result in volume changes of this buzz. One thing I noticed was that touching the headphone jack, whilst touching the Android phone that increased volume, would silence the buzz. With further testing, I noticed that touching my metallic keyboard would also silence the buzz, even whilst touching the Android phone or under any other circumstance in which there was a buzz. I finally realized that my body is somehow conducting electricity when touching objects such as my Apple keyboard, headphone jack, or Android phone and that these are all related to the annoying buzz and nullification thereof. I found this bizarre and fascinating. Ever since this discovery, I've found that I can silence this annoying buzz by pressing any of my fingertips on my metallic keyboard. This is also annoying, since it can make typing awkward to continually have one finger pressing against the metallic part. Nonetheless, I have no idea why this works at all; I suspect it might have something to do with my usage of the keyboard to charge the headphones via its USB port every night, but I have no substantiation of this hypothesis. So my question is twofold: How does this bizarre phenomenon work wherein my body is apparently conducting electricity from objects which somehow control some anomalous buzz in my headphones? And how can I make this buzzing sound stop without keeping my body in contact with those objects? Obviously, I can't hold the headphone jack and listen to anything at the same time, and this habit of touching the metallic part of my keyboard is not great for typing nor my wrists which already suffer from CTS. Any insight is appreciated. <Q> The "buzz" is almost certainly RF pickup. <S> This can be the mains (low frequency, 50/60/100/120Hz, unlikely in this scenario given a phone is involved) or rectification of the carrier frequency of the phone - remember how old tape players would make a "duh duh, <S> duh duh" sound whenever a text message is received. <S> Human bodies are conductive. <S> When your skin is dry you are about 100kOhm to 1MOhm. <S> When your skin is wet, that goes down to about 10kOhm to 100kOhm. <S> As to why touching a metal keyboard kills the hum, or even touching the headphones jack. <S> Basically as you are a nice large conductive area. <S> When connected either to earth (e.g. via the keyboard shell and PC) or to the ground of the phone (e.g. headphones jack), you are basically changing how your body is interacting with the electric fields around you. <S> EMI is a dark art - it's hard to say exactly what current path you are interrupting, or how you are interacting with the fields. <S> But generally if you ground yourself it stops you acting as an antenna - sort of like shorting yourself out. <S> One simple option you could try is to buy an anti-static wristband. <S> That would allow yourself to be connected to earth (or to your keyboard) without having to touch the keyboard. <S> Alternatively you could try simply charging your phone from something other than your keyboard to see if that stops noise injection. <A> But then both channels would receive the noise. <S> Second - the source of this noise. <S> Third, reposition your phone to the left (if it is on the right) to see if the noise moves into left bud. <S> Generally I think you will come to the conclusion that something is wrong with right channel of the headphones and headphones <S> are faulty (as the right wire "picks up the RF" as Tom said in his answer, and then amplifies this signal when you turn noise cancellation on, but left does not). <A> My guess is that there is a break in the insulation of the right earbud and that electrical hum from your body is flowing into the noise cancellation amplifier. <A> If you have a multimeter available, you can put it into AC voltage measurement mode and try to measure between the different metallic objects. <S> For example, touch one probe to the keyboard and other probe to some metal part on the phone. <S> If you find a ~60 volt (for 120VAC countries) or ~120 volt (for 240VAC countries) voltage between the objects, it is most likely due to ground potential in the devices. <S> Many mains-powered devices nowadays are designed without a ground wire, and RF filtering capacitors inside the device will leak a small amount of electricity. <S> This becomes apparent when you are between a grounded and an ungrounded object. <S> These issues can usually be solved by placing a galvanic isolator between the headphones and the computer. <S> You can search for "3.5mm audio isolator" to find suitable devices.
| You must try another headphones to see if noise is caused by headphones or is emitted by the source device. The main fact, in my opinion, is that noise is heard only in right channel. Try wrapping the bud in cling film and see if that stops the buzz. So there is nothing unusual about becoming a conductor. First thing comes to mind is issue with grounding. Note that you should only touch the objects with the probe, not with your skin when measuring.
|
Amplifying high frequency AC using op-amp or alternative methods Right now, for my project, I am trying to design a circuit for generating 10 kHz to 1 MHz AC signal with ~80 Vpp to 100 Vpp. Currently, I chose to the AD9850 chip for generating AC with Vpp being around 0.6 V. By using multi-stage OPAMP with large gain-bandwidth-product, I can successfully get high-frequency AC with Vpp being around 8 V. Using similar methods, I am trying to keep adding stages using OPAMP for boosting the AC. However, the challenges are limited by the power rails of the most of OPAMP with large gain-bandwidth-product. For example, if I want to get 80 Vpp AC, meaning the gain is X10, then the gain-band-width-product I need is 10 MHz. The OPAMP of such requirement typically doesn't have high bandwidth, which doesn't seem very useful. I am wondering if there any way for boosting the Vpp of such small AC signal to higher voltage over wide frequency band (up to 1 MHz)? P.S. If there are ways for designing power amplification circuit, it will be awesome. However for my application, there is no need to deliver power, hence amplifying voltage will be more critical. <Q> First of all: what you plan is dangerous. <S> 100 Vpp can kill you if there's any beef behind the source, and your friendly national radio frequency regulation officials will kick in your door if you happen to emit a couple 100 W at 1 MHz as RF radiation. <S> You've been warned. <S> 100 V peak-to-peak load at 1 MHz isn't really trivial to deal with. <S> Remember: any two conductors can form a capacitor. <S> So, your high-voltage line in parallel to a ground plane will happily couple over energy. <S> Make sure it doesn't – that might mean you'll have to construct things using enough spacing, or small enough dimensions, or with classical RF transmission line design. <S> Now, when we're talking about voltage, we'll have to talk about impedance: 100 V into a 100 kΩ load is much easier than into a 50 Ω system. <S> At these frequencies, you don't get around thinking about impedance matching – especially since things like reflections can lead to standing waves and dangerously high voltages >> <S> 100 V in places you don't expect. <S> So, first of all, if all you need is an oscillator: Maybe build a high-power oscillator instead of amplifying a small one. <S> That's quite possibly easier! <S> There's a lot of oscillator circuits out there, and you can adjust a lot of them using some control voltage. <S> You can build a simple control loop that compares the frequency (e.g. using a frequency counter from a microcontroller) to the should-be value and adjusts the control voltage accordingly. <S> Other than that <S> : overpowered high-frequency resonant devices are the very classical domain of amateur radio designs. <S> You can get power amplifiers for the 300 kHz - 3 MHz region relatively cheaply, even as military surplus equipment. <S> You don't need amplification, i.e. an increase of power , you just want more voltage – <S> if you can deal with a proportionate loss in current, then a simple 100:1 signal transformer will do your job; 1 MHz isn't hard for these, but 100 Vpp might be. <S> Datasheet reading, it is. <A> A ferrite-core transformer might be a good choice if you don't need much output current. <S> A material such as TDK/Epcos N30 should be suitable. <S> Eg. <S> B65611W0000R030. <S> Designing the transformer is a bit much for this kind of answer, but I would roughly guess 25:250 turns so very easily hand wound. <S> Do go through a proper design process before ordering cores and so on if you want to try this- <S> Colonel Wm. <S> T. McLyman's book is a good reference, and there are others I'm sure you can find in any engineering library. <S> You will likely need a power op-amp that can supply 50mA or more, and had a high slew rate as well as GBW product. <A> Can we provide an amplifier with small-signal transistors? <S> using some cascading to handle the "high voltage"? <S> [this use of FETs as high-voltage-shields, where "high" may mean 10 volts, is an old trick in IC design, <S> where the "shield" device need be no more than another polygate stripe + <S> the onchip biasing for that strip. <S> The gate-as-capacitor of MOSFETs is what permits this.] <S> What is this topology? <S> Fundamentally, it is a current feedback opamp, single-sided. <S> With voltage shields added. <S> Note Q2 not only shields, but minimizes the input capacitance, thus minimally loads the signal source. <S> Assume you need to drive 20picoFarads at 35 volts RMS (100 vpp).The power is F <S> * C <S> * Vrms^2, = <S> 1MHz <S> * 20e-12 <S> * 35^ <S> 2 <S> Power = <S> 1e+6 20e-12 <S> * 1,000 (approx.) <S> Power = <S> 0.02 watts <S> So lets consider this: simulate this circuit – Schematic created using CircuitLab <S> Is this circuit to be slewrate limited? <S> Assume we need to be 4X faster, to avoid distortion even in this feedback-controlled circuit. <S> For 1MHz at 50 volts peak, the slewrate is 1MHz * <S> 6.28 * 50 <S> = 316 volts/second. <S> Will our output node support that? <S> What is the load capacity? <S> Assume 10pF in each of the 3 output devices (Cob of the PNP, Cgatebulk of the PFETs), plus 20pF Cload, for total of 50 picoFarad. <S> To slew 1 volt in 1 nanosecond across 1pF, we need 1milliAmp current. <S> We are 3X slower, at 0.316 volts/nanosecond, but we need to drive 50pF. <S> Thus we need 15ma <S> (and we have not included the 4X no-distortion safety factor). <S> What is our pulldown current? <S> 50 volts/47Kohm or 1 mA.Thus the low-going slewrate will not support 1MHz at 100 voltsPP. <S> The high-going signal will be clean, what with the active pullup of the 2N3904. <S> But the low-going shape will be badly distorted. <S> Can we simply add a constant pulldown of 20 mA? <S> This in addition to the 47K pulldown? <S> The power dissipation soars, from 4mA <S> * 100volts ( 0.4 watts), to 24mA * 100 volts, with that extra 2 watts dissipated in the new pulldown (a current source?) <S> and in the 3 existing pullup devices (Q1, M1,M2). <S> All of a sudden we have the need to control temperatures, to practice heat-removal, possibly with moving air. <S> You might ask how audiophiles achieve high performance power amplifiers. <A> It can be done easily using a square waveform using RF MOSFETs, Ixys have very good ones that works up to 1000 V and 20 MHz or more. <S> ST has this one not as fast but can work at 250 V and 17 V with <20 ns rise/fall times: STD18NF25 <S> You should use an isolated half bridge driver with floating power supply at the high side.
| But: the easiest way is pretty simple: Build a transformer!
|
LEDs in computer case are non-polar? Normally I think of LEDs being polar and having a definite current direction, the "D" in LED standing for "diode". However, in working with with a computer case recently, the front part of the case has several LEDs, like the power-on indicator, and these connect via a Dupont two-way housing to a pin header on the motherboard. These connectors are non-polar--I can plug them in either way and it works. So, how is it that these computer case LEDs appear to be non-polar? <Q> They are bi-directional LEDs. <S> Most bi-directional LED have different colour, red, green being the majority, but you can get red,red: <S> It would be more expensive then a standard LED but still be a fraction of the cost of the cable plus connector and savings in assembly. <A> Indeed LEDs are diodes and only light up if the current flows in the right direction. <S> the case LEDs are actually 2 LEDs (or more) connected in anti-parallel so in one direction one LED light up, in the other direction the other LED light up (see Oldfart's answer). <S> I think this is the most likely scenario as it is the cheapest. <S> If neither of the above is true it could be that the motherboard does a trick: <S> the motherboard doesn't output DC like is usual but it outputs AC (not a sinewave but a square wave <S> , that's easy to do in digital circuits) <S> that way whatever way the LED is connected it will light up (half of the time but if that time is short enough, we humans cannot see that). <A> It's a bi-directional led -- two led's in a common package in back to back configuration. <S> It looks like a single led with equal lead size. <S> I don't know why they used it for computer application even though DC power is readily available. <S> Actually this led is not required for this application, they can go with traditional led's. <S> I came across these kind of leds in AC application. <S> In power panel indicator lamps. <S> There will be no DC supply available so they will use a capacitive/resistive power supply and connect a bi-directional led to it. <S> One led will be in forward bias for 1st half cycle other led will be forward biased for 2nd half cycle. <S> So there is no need of bridge rectifier, filtering capacitor here. <S> So they can save some money in high volume production. <S> For capacitive and resistive power supply please see schematic. <S> The component values we are going to select based on LED properties simulate this circuit – Schematic created using CircuitLab
| To make the 2-wire connection work both ways I see 3 solutions: the case LEDs have have a build in bridge rectifier
|
When adding binary numbers, how do you just ignore the overflow? So lets say I used 2's complement to put -17 in binary and then I added it to +27 , e.g.: +27 0001 1011b+ -17 1110 1111b------------------- +10 0000 1010b This calculation here should have an overflow of 1. Where did this overflow of 1 go? How can you possibly just disregard it when it would completely change the whole calculation? When you add 2's complement numbers, does it just always mean you have to work in a predefined number of bits, and if so, why? Also, does 2's complement have -0 value and a +0 or only one 0 value? <Q> Carry and overflow are not the same thing. <S> The MSB of a 2's-complement number is the sign bit. <S> The bit you're talking about is the carry-out from the addition of the MSBs. <S> If the signs of the operands are different, then there cannot be an overflow, regardless of the state of the carry-out Try a few examples for yourself to see how it works. <A> There are many ways to explain it. <S> Here is one. <S> Eight-bit signed binary can represent integers as low as -128 DECIMAL and as high as +127 DECIMAL . <S> So, why can it not represent the next greater integer, +128 DECIMAL ? <S> Answer: it could represent +128 DECIMAL . <S> The trouble is, the representation would be the same as that of -128 DECIMAL . <S> See: DECIMAL <S> BINARY-128 <S> 1000 0000 <S> -127 <S> 1000 0001-126 1000 0010... <S> +126 0111 1110+127 0111 1111+128 1000 0000+129 1000 0001+130 1000 0010... <S> Observe: <S> +128 <S> DECIMAL is indistinguishable from -128 DECIMAL ; <S> +129 DECIMAL is indistinguishable from -127 DECIMAL ; <S> +130 DECIMAL <S> is indistinguishable from -126 DECIMAL ; and so on. <S> By keeping the carry bit (it's actually not an overflow bit; overflow is something else), you would be affirming the false representation, wouldn't you? <S> Try it. <S> You'll see. <S> You don't want that carry bit. <S> NOTES <S> ON OVERFLOW <S> If you wish to know what overflow is, it's what happens when you try (for example) to add 96 DECIMAL + 64 DECIMAL . <S> The result comes out as -32 DECIMAL , which is wrong because the addition register has overflowed. <S> Note that the example, incidentally, has no carry. <A> Picking up this specific bit: <S> When you add 2's complement numbers, does it just always mean you have to work in a predefined number of bits, and if so, why? <S> Yes, you need to know the number of bits you are going to be working with, because that determines what the two's-complement representation of your negative number will look like. <S> So, in your example, you have: +27 <S> 0001 <S> 1011b+ <S> -17 <S> 1110 1111b------------------- <S> +10 <S> 0000 <S> 1010b <S> where there would be a "carry" out of the 8 th -bit. <S> If we were to incorrectly do the same calculation using more bits, and taking note of the 8 th -bit carry, we would get the wrong answer: <S> +27 <S> 0000 0001 <S> 1011b+ -17 <S> 0000 <S> 1110 1111b <S> << WRONG representation of "-17" in 12 bits.------------------------ <S> +266 0001 <S> 0000 1010b << WRONG answer in 12 bits. <S> However, if we do this again, but using the correct 12-bit representation of <S> -17 , then we again get the correct result, although here we are "ignoring" the carry out of the 12 th bit: <S> +27 <S> 0000 0001 <S> 1011b+ -17 <S> 1111 1110 1111b <S> << Correct representation of "-17" in 12 bits.------------------------ + 10 <S> 0000 <S> 0000 1010b <S> << Correct answer in 12 bits. <S> Conceptually, you can think of the "true" two's-complement representation of -17 as being an infinite string of 1 s, ending in ...10 1111 . <S> When doing calculations with a finite number of bits, you take just enough of those 1 s to fill your register and discard any "carry" that would go outside that size.
| There is an "overflow" only if the signs of the operands are identical AND the sign bit of the result and that carry-out are not identical.
|
Why does antenna tuner in crystal radio use capacitor and an inductor? I know that antennas can be capacitive or inductive depending on the relation of antenna length to the \$\lambda\$ . I know that crystal radios use both antenna and capacitor for tuning and I don't understand why because for me it would seem the antenna should only be capacitive and you should only need inductor for tuning. Why is there a capacitor in crystal radios and why is it used for tuning? <Q> You are very astute. <S> Of course, the value of inductance required will vary with the length of the antenna. <S> Reckon on 10 pF per metre as a starting point. <S> Perhaps a variable capacitor is popular because it can be arranged to dominate the antenna capacitance and make tuning less antenna length dependent. <S> A wide range, reliable variable inductor can also present challenges. <S> Go ahead and experiment. <A> It's a transmission-line thing. <S> The electric current propagates down the antenna and, approximately, reflects from the antenna's end back toward the transmitter. <S> Upon reflection, the current (but not the voltage) reverses. <S> By the time the reflected wave reaches the transmitter again—importantly, this does not happen instantaneously—the reflected wave (with current reversed) superimposes itself upon the signal <S> the transmitter is generating at that moment. <S> Are you handy with your phasors? <S> The impedance is the ratio of the sum of the voltages to the sum of the currents, phasor style. <S> If the imaginary part of the ratio happens to be positive—and this depends on the wavelength compared to the antenna's length—then the antenna is inductive. <S> Otherwise capacitive. <S> If you aren't sure that this makes sense, then here is a smaller idea to get you started: at the end of the antenna, the sum of the primary and reflected currents (but not voltages) must be zero because no current flows out the end of the antenna. <S> This smaller idea does not explain the whole problem but it does serve to orient your mind so that, after you have slept on it, you might have a better frame to start to grasp the rest of the problem. <A> For the AM broadcast band, few long-wire antenna builders erect a full quarter-wavelength wire (about 75 m) and settle for a shorter wire. <S> A shorter antenna benefits from added inductance to compensate for its capacitive reactance. <S> Once you include all the resistive components (don't forget ground losses), this inductor-compensated antenna has very low Q . <S> To effectively select one station from another, an LC resonator should have loaded Q of at least 100. <S> So you often see an antenna loosely coupled to a high-Q LC resonator. <S> Why is "C" varied rather than "L" for tuning? <S> Compare prices for each. <S> A variable capacitor maintains high Q over its very large capacitance range. <S> Variable inductors seem mechanically complex - <S> some air-core types are bulky. <S> Both tuning methods have been employed - there was a time when car radios used ferrite-slug-tuned inductors for tuning. <S> These were not crystal radios.
| You can indeed construct a crystal set without a physical capacitor, relying instead on the capacitance of the antenna alone and tuning by varying the inductance.
|
Am I exceeding the maximum ratings? I'm using LMC6482 opamp with +/-15V rail voltages and having weird behavior. This means Vcc is +15V and Vee is -15V in my case. Am I exceeding the specs? The jargon in the datasheet is not clear or should I say I'm not familiar with it. <Q> Yes, you are exceeding the specs. <S> Look at table 6.1 of the DATASHEET on page 3: <S> It clearly states the maximum difference between the V+ and V- pins is 16V. <S> This means you can have +8V and -8V, as the difference is 16V. As you have it right now, your difference is 30V, which is almost double the maximum ratings. <S> Chances are, you have damaged the op-amp and it will need to be replaced. <S> You should ALWAYS check the maximum ratings of any IC you are using if you are worried. <S> If you can, try and be within the maximum, so +7.5V and -7.5V would work nicely here, for a total of 15V supply. <S> Although directly under the Absolute Maximum Ratings, it does state: <S> Stresses beyond those listed under Absolute Maximum Ratings may cause permanent damage to the device. <S> These are stress ratings only, which do not imply functional operation of the device at these or any other conditions beyond those indicated under Recommended Operating Conditions. <S> Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability. <S> Some people new to electronics could take the maximum to mean that is what is OK to use. <S> The other bit that should be looked at is the Recommended Operating Conditions: Making sure you stay above and below the min/max should make sure the device works as specified, however, the Absolute Maximum Ratings table should always be checked too. <A> Figure 1. <S> V max . <S> This line of the datasheet is stating that the maximum voltage difference between V + and V - is 16 V. <S> You have probably damaged the op-amp. <A> I read your question as "yes I've read the datasheet, but its unclear". <S> So let's address how to read the supply voltage range specification as the manufacturer Texas Instruments write it in their original product data sheet: <S> Supply Voltage (V + - V - )... <S> MAX 16V <S> You have a V + of 15V and a V <S> - of -15V.Now we use the formula from the data sheet and get: (15 - (-15)) <S> = <S> 15 + 15 = <S> 30V <S> That's the way to interpret this voltage range specification. <A> Other answers mentione the asbsolute maximum ratings, which is NOT what youy should look for when designing a functional system. <S> Instead, you should use the recommended operating conditions. <S> In this case, those specify 15.5V. <S> As others have pointed out, that is not the case.
| In your case, you could check the absolute maxima to find out whether your chip had a chance of survival. So yes, you are exceeding specified maximum supply voltage range by 14V.
|
Is it safe to run Logic ICs at their maximum output current? I am building a circuit that will ultimately output to 8 7-segment displays. I am going to be multiplexing these displays. The displays I chose are https://uk.farnell.com/kingbright/cc56-12surkwa/display-seven-segment-14-22mm/dp/2478714 (common cathode) which lists the DC forward current as 30mA on the datasheet. I am planning on running the data lines for this display from the 4094 (SIPO register) and the cathodes (to do the multiplexing) from a 4017 (Decade counter). In the case of the 4094, the datasheet ( https://assets.nexperia.com/documents/data-sheet/HEF4094B.pdf ) lists the maximum input/output current at 10mA. My question is two part. Firstly, am I right in assuming these values given are per led / per pin and secondly, if that's the case, am I safe to run the 4094 at the maximum current output without using a resistor to go to the display? I know I should probably use a driver chip or something, but I just wanted to clarify my query about pushing the maximum ratings on an IC. <Q> In the case of the 4094, the datasheet ( https://assets.nexperia.com/documents/data-sheet/HEF4094B.pdf ) lists the maximum input/output current at 10mA. <S> but you can only drive 5 lines at 10 mA before you hit power supply current problems and, in any case you should not be driving the IO lines at 10 mA because that is their absolute maximum rating AND, without current limiting resistors this could easily be exceeded by your LED load. <S> You should not assume that the IO lines are current limited at 10 mA in other words. <S> Regarding the LEDs, 30 mA is the absolute max rating and you should not approach it. <S> I would say 20 mA is a fairly reasonable and safe limit as per this graph in their data sheet: - <A> Reading Table 6 of the datasheet I suspect your expectations are wildly optimistic. <S> From the I OH (output high current) with V DD at 5 V the output voltage, V O has drooped to 4.5 V with a 0.5 mA current. <S> At 1.4 mA it has collapsed to 2.5 V. <S> The results for output low are similar. <S> Firstly, am I right in assuming these values given are per led / per pin and secondly, if that's the case, am I safe to run the 4094 at the maximum current output without using a resistor to go to the display? <S> I don't think you'll get enough current. <A> I suggest reading the datasheet again. <S> They do their measurements at 10mA, that should give adequate brightness. <S> If you need more current, switch to another buffer with better driving capability, a compatible should be 74HC4094. <A> In principle no. <S> Running anything <S> at maximum anything is never a good idea.
| 30mA is the absolute maximum you can give to the LED without damaging it. Let's be clear about the current you can supply from the 4094: - Yes, the IO current is 10 mA
|
Charging a high voltage capacitor with power supply. How exactly? I have a semi-serious hobby project with a couple of friends where we need to charge a pulse operated capacitor rated to around 4kV with 1500nF capacitance. For this I need a high voltage supply and correct configuration to do the charging. Now I've done this before at around 300V but simulating this process with multisim is nontrivial because in this case I don't know the inner workings of kV-level sources the and now I have some questions: If I were to use an off the shelf high voltage source of around 10kV maximum voltage and 20W power, how will the system react when the source is connected, possibly through appropriate resistor? Someone suggested me that the namely excessive 10kV would immediately break the capacitor as the voltage drop is all seen through the insulation inside the capacitor. I think this is incorrect and the voltage drop will mostly happen inside the HV supply, but I'm not entirely sure. Let's use this cheap individual as our HV source example: https://www.ebay.com/itm/New-High-Voltage-Electrostatic-Precipitator-Power-Supply-With-Output-300W-30KV/163264230335?epid=27023884036&hash=item26034e73bf:g:lvwAAOSwQWxbIdWA:rk:1:pf:0 to summarize: -I- Will an excess voltage (measured at the source) break the capacitor before actually charging it? -II- If not, how does a typical HV source react to the situation? If connected straight to a capacitor (with effectively zero resistance), will the source just see the connection as about short circuit and promptly break or blow a fuse? Or will it just slowly start to ramp the voltage up, until the external capacitor is at equal voltage to source target (or until the capacitor breaks) <Q> The example power supply you show has a cuurent limit and a voltage limit, it will limit is output to whichever limit is encountered first. <S> Into a, short-circuit, or a discharged capacitor it will supply 0 to 10 miliamperes as set by one of the knobs on the end panel. <S> If you get a supply like that, but can be set to 4000V instead of the 5000V lower limit of the example device it will do what you want. <S> I see your correction from 1500uF to 1.5uF <S> that's now of the approximate scale of the capacitors present in microwave ovens, (slightly larger and slightly higher voltage) <A> If you really want to do this, first get a good life insurance policy. <S> Then it looks like you can have the output set to 5 <S> kV. <S> One simple solution would be to make a resistor divider, maybe this is the only application where resistor dividers are good for: Power rating should be about 10-40 watts, and the resistors will cost you about $75-$120 each. <S> The cap will be charged in about a minute or two. <S> However it is not clear what do you mean under "pulse operated" capacitor. <A> I have a semi-serious hobby project with a couple of friends where weneed to charge a pulse operated capacitor rated to around 4kV with1500nF capacitance. <S> You didn't say exactly what voltage you wanted to charge the capacitor to, but generally speaking you shouldn't go all the way up to the rating if you want the device to be reliable. <S> For this I need a high voltage supply <S> You can get a high voltage module from distributors like Digikey or Mouser. <S> https://www.digikey.com/product-detail/en/xp-power/G30/1470-4014-ND/6802063 <S> https://www.xppower.com/portals/0/pdfs/SF_G_Series.pdf <S> If I were to use an off the shelf high voltage source of around 10kVmaximum voltage and 20W power, how will the system react when thesource is connected, possibly through appropriate resistor? <S> Someone suggested me that the namely excessive 10kV would immediatelybreak the capacitor as the voltage drop is all seen through theinsulation inside the capacitor. <S> If you just put a resistor in series with the capacitor then the capacitor will likely break. <S> If you put the capacitor at the output of a voltage divider then you can lower the voltage enough so that it wont break. <S> Will an excess voltage (measured at the source) break the capacitor before actually charging it? <S> No. <S> The capacitor will break once it charges up past its rating. <S> Therefore there must be something to limit the input voltage to the capacitor. <S> If not, how does a typical HV source react to the situation? <S> If connected straight to a capacitor (with effectively zero resistance),will the source just see the connection as about short circuit andpromptly break or blow a fuse? <S> Or will it just slowly start to rampthe voltage up, until the external capacitor is at equal voltage tosource target (or until the capacitor breaks) <S> That question is impossible to answer in general without knowing the ratings of the components inside the power supply, and what fuses (if any) are used. <S> But I would venture to say that the output will probably just ramp up. <S> Nearly all DC power supplies include some capacitance at their output. <S> You would just be putting a little more in parallel with whatever is already there.
| For this a voltage divider is a good option.
|
Do output LEDs here need resistors? Consider: Here is the schematic I'm trying to work around. My major question is about the LED bar graph I want to use, on the right side; does it need resistors? I saw three different versions of this microcontroller use ... sometimes with, sometimes without, and the datasheet did not really help. On this point, and it also displays an example of use without a resistor. Bonus question: Is there something wrong in this? <Q> As always, READ THE DATASHEET! <S> The chip you use has programmable constant current outputs, so you don't need external resistors to determine the current, the chip does this for you. <S> The current sunk by each output is ~ <S> 10 x the current out of the Vref. <S> In your case 10 <S> * ( 1.2 V / (1k2 + 680 ) Ohm ) <S> ~= <S> 6 mA, which is OK for a normal (20 mA max) LED. <A> The LM3915 regulates the current to the LEDs. <S> You do not need a current limiting resistor for each LED. <S> In your circuit, R9 and R10 set the LED current. <S> Vref is 1.25V. <S> The current drawn through that pin controls the LED current. <S> According to the datasheet , the LED current is 10 <S> * the current drawn through Vref. <S> In your circuit, that'd be 10*(1.25V/(680 ohms + 1200 ohms)) <S> So, about 6.5 mA. To make the LEDs brighter, you reduce R9 and R10 (but keep the ratio the same.) <S> So, if you changed to R9=340 ohms and R10= <S> 600 ohms, you'd get about 13 mA for the LEDs. <S> The given current is per LED. <S> I've simplified the calculation. <S> The datasheet says you are supposed to take into account the current through the internal divider chain. <S> That amounts to about 0.5 mA, so I just ignored it for simplicity's sake. <A> No, you don't need resistors with LM3915. <S> The LEDs need to be driven with the correct current to achieve the desired brightness. <S> The resistors are used with LEDs to adjust the current when they are driven with constant voltage.
| LM3915 drives the LEDs with a constant current, which you can program, so you don't need the resistors.
|
Why does the voltage induced in the receiver coil of this WPT circuit decrease when a load is added (in parallel)? The following is a circuit that wirelessly transfers power via inductive coupling. The circuit is supposed to power a 12 V 0.15 A DC fan and a typical smartphone, which requires 5 V DC across it. The loads are connected in parallel to each other, as seen in the circuit schematic(though there is no capacitor at the output of the voltage regulator). As you can see in the picture below, it powers both just fine, but the phone only charges for a few seconds. And it can only charge both the fan and the smartphone only when the transmitter and receiver coils are very close to each other. The transmitter coil has 9 turns and the receiver coil has 39 turns. I then used a digital oscilloscope to measure the voltage induced in the receiver coil at two different loading conditions - at no load and at full load. The voltage induced in the receiver coil hand an RMS voltage of 28.3 V as shown in its waveform. It also had some ringing, which I assume is because the PCB terminal block acts as a capacitor. Anyways, I assumed that the voltage would remain 28.3 V because the DC fan and the phone are both connected in parallel so the the voltage at the receiver coil shouldn't change, or that's what I thought. So I then measured the voltage at the receiver coil when both loads were added, and, as you can see in the waveform below, two things changed: the ringing is now gone and the RMS voltage decreases to 13.0 V. Can someone please explain why the receiver coil voltage decreased even when the loads were added in parallel ? I am sorry for the long post, but I just wanted to make sure every little detail is given. Edit: Thank you, everyone, for the answer regarding the decrease in receiver coil voltage. I fully understood it. <Q> I think your real problem lies in understanding parallel and series circuits, and what they really mean. <S> If you have this: simulate this circuit – Schematic created using CircuitLab <S> Then you can rightfully expect the voltage to be constant, regardless of whether the switch is opened or closed. <S> This is what you expect your wireless power transfer to do. <S> What you don't realize is that the current changes depending on whether the switch is opened or closed. <S> You need more current when the switch is closed - both resistors are drawing current, so your voltage source must deliver more current. <S> Unfortunately, it can't do that. <S> It can only deliver as much current as it can pull through the magnetic field between the two coils. <S> If they are close by, or coupled through a piece of magnetic material, then you can draw more current and everything is as you expected it. <S> As it is, it looks more like this: simulate this circuit <S> R3 represents the current limitation of the coils. <S> With that in there, closing the switch causes more current to flow, which causes the voltage across R1 and R2 to change. <S> How limited the current is depends on how well the coils are coupled. <S> Better coupling (closer together, or using a core) makes the effect smaller. <S> Coils further apart makes the effect larger. <S> The same thing happen when using different sized batteries. <S> All batteries have some internal resistance. <S> The smaller the battery, the higher the resistance and the less current you can draw from it. <A> Can someone please explain why the receiver coil voltage decreased even when the loads were added in parallel? <S> If instead of the coils in your question you had a regular HF transformer coupling power to the load(s) <S> you would see very little reduction in voltage when adding more parallel loads. <S> This is because the two coils inside a regular HF transformer are very closely coupled and the leakage inductances on primary and secondary are very small. <S> More coupling means less leakage inductance. <S> Unfortunately, when you have coils that are lightly coupled the first thing to notice is that the Vin:Vout relationship is no longer 9:39 (that's the turns ratio by the way) <S> - it is somewhat less and that totally depends on the coupled flux from transmit coil to receive coil. <S> If the coupled flux falls to 50% then the voltage ratio reduces to half i.e. 9:19.5. <S> That's under no-load conditions <S> and it's worse when you take a load current (or more <S> load current) because there is leakage inductance to consider. <S> Leakage inductance is the inductive element of both coils that isn't coupled to each other. <S> Leakage inductance is in series with both the transmit coil and receive coil <S> so, as you take more power (more load current), there is a bigger voltage dropped across these leakage indutances and, inevitably, the real output voltage reduces. <A> the coil turn ratio is very less and hence most of the magnetic field is disturbed and lost without idnducing in secondary coil to get maximum power. <S> However this can be eliminated if you calculate the T1 and T2 with respect to Vin anad Vout. <S> Coming to the load, please draw the V-I characteristic of the circuit and draw the Q-point to know where excatly the circuit is operating at. <S> Usually when the loads are connected in parallel the resistance is low and hence voltage need to drive the circuit will be more in terms where the coil supoort this voltage transfer or not. <S> By this two possible solution you can understand the problem of high current drawn and voltage drop. <S> Thank you.
| Less coupling between transmit and receive coils means more leakage inductance.
|
Disadvantages of Buying FT2232H Chips of Uncertain Origin I was planning to buy this FT2232HL FTDI board from Aliexpress for basic FIFO applications. It is obviously fake; being cheaper than the entire chip itself and having no "FTDI" marking on top of it. I was wondering, what should I expect from this product in terms of performance and endurance? Will this device function properly or simply missing a key feature that is not noticeable at first look, such as the 4K buffer or some important protection? No need to mention infamous "FTDIgate", I suppose. I'm basically an electronics hobbyist, so simple words really appreciated, although not necessary. Thanks... <Q> Those might actually be real. <S> Parts are often available in China for far less than elsewhere. <S> The seller has probably concealed the FTDI logo in their photos for trademark reasons; I've seen other Chinese vendors do the same thing with other parts. <S> I've never seen a fake FT2232HL in the wild -- <S> the counterfeits I've seen have all been of the vastly more common FT232RL -- and the rest of the markings on this chip all have the exact same format and placement as those on a real part. <S> It would be highly unusual for a counterfeiter to perfectly reproduce all of the markings on a part except for the logo. <A> FTDI is known for their practices, they're updating their drivers <S> so they brick/damage non-genuine chips. <S> I would recommend another chip from another vendor. <S> Like CH340 etc. <A> Disadvantage, if it doesn't work as described in the datasheet, you have no guarantee of support, possibly no refund, and wasted time. <S> That's basically it for a one off project part. <S> The problems really come in at scale, for commercial products or products that can result in safety hazards. <S> Recall costs, litigation, factory rework, bad p.r. etc. <A> In the wild, only fake of FT232RL and FT232BL have been spotted. <S> I have used the very same purple CJMCU FT2232H board (bought from ebay) for doing JTAG. <S> It worked just fine.
| It's not worth to buy FTDI chips from china (sometimes are affected even chips from reputable sources). To the best of my knowledge, there are no fake FT2232 chips. I would recommend you to buy something else. Really bad fakes may damage something.
|
Can double-pole breakers trip each side separately? How many of you have used double pole breakers? Are double-pole breakers just two single pole breakers physically joined? Someone stated that only one side of the double pole breaker provided short circuit protection. Picture below is the exact GE model. Anyone familiar with it? Does only one side trip? The person who tested the 2-pole breaker to have only 1 side tripping is an US citizen who has done many tests with it. See the middle of this blog. http://myphilippinelife.com/philippine-electrical-wiring/comment-page-1/ Could it be a counterfeit product? Quoting him: "The assumption that the two halves of DP breakers can serve as SP breakers proved to be very wrong. The double-pole breakers are NOT just two single pole breakers physically joined. We found this out the hard way when we had a total short in one of our circuits and the 20 amp breaker did not trip, but instead melted a #12 AWG wire. This must have been a huge overload, far beyond 20 amps. We then tested the breakers on a test circuit. We found that only one side of our double pole breaker provide short circuit protection. It’s unknown which side may provide over current protection. Presumably, breakers made to be used as single-pole provide both protections in a single breaker, as do double-pole breakers used as a unit." I need to know this because I'm powering up 240v load and there is ground wire to the enclosure. If not both can trip, what would happen if the live line that shorts to the enclosure is connected to the breaker side that doesn't have short circuit protection? <Q> There is no need for confusion, one just needs to read the specifications ! <S> You have 1p breakers, one protected conductors. <S> You have 2p breakers, two protected conductors. <S> You have 1+n breakers, one protected conductor, one switched conductor, polarity sensitive. <S> And 4p or 3+N for three phase with or without neutral protection. <S> Look at the symbols. <S> One protected conductor. <S> Two protected conductors. <S> These symbols are printed on the unit. <A> There may be or may have been at some time, a legitimate use for a circuit breaker connected to a switch with a handle-tie. <S> It would be more than unusual to find such an assembly offered for sale today. <S> Such an assembly must not be offered for sale as a two-pole circuit breaker. <S> A two-pole circuit breaker is two circuit breakers that open simultaneously if either one trips. <S> That is true whether it has one handle or two handles tied together. <S> If a device is a two-pole circuit breaker with two handles tied together, the trip rating should be marked on each handle. <S> There should be sufficient information marked somewhere on each breaker to identify each one as a circuit breaker if separated. <S> It is not a good idea to install any circuit breaker that is not purchased new. <S> Even purchasing new-old-stock circuit breakers is less then the best idea. <S> PS <S> In my first paragraph, I was referring to circuit breakers of the type mentioned in the question that plug in to North American distribution panels. <S> I believe the 1+N breaker described by @Jeroen3 in another answer refers to stand-alone circuit breakers. <A>
| A two-pole circuit breaker is effectively two single pole breakers with their handles tied together, so that when either breaker trips, both will be turned off.
|
Is a bigger resistor different from a smaller resistor with same color stripes? I changed a resistor with same color stripes Yellow, Purple, Gold, Gold on a Pioneer surround system but the only difference was that the I put was a bit bigger. The problem is the system went into protected mode because of an error, I forced reset it and the fuse blew up. Was it because of the resistor I changed? UPDATE: It was not a fuse that blew up, It was 2 of D5SBA60 silicon bridge rectifier that blew up. There is leakage from there. I have pics of the 2 silicon bridge rectifiers and the resistor that I changed: I measured this resistor in ohms and only shows open line, other one is ok, about 5 ohms. I will be replacing it for a good one, to me it looks like it leaked. <Q> Is a bigger resistor different from a smaller resistor with same color stripes? <S> In general, a resistor can be characterized by three values: <S> The resistance <S> The maximum allowed power <S> The behavior (change of resistance) when the resistor gets heated The color stripes tell you about the resistance (and about the tolerance of that value). <S> So if the color stripes are the same, the resistor has the same resistance. <S> If the resistor's maximum allowed power is too small, the resistor will heat up and may be destroyed (e.g. burn). <S> There is no problem if the resistor's maximum allowed power is higher than required. <S> Although this is not sure I would expect that a "bigger" resistor allows more power than a smaller one. <S> Typically you can forget about the behavior when the resistor gets heated. <S> The problem is the system went into protected mode because of an error, I forced reset it and the fuse blew up. <S> Was it because of the resistor I changed? <S> You didn't change the resistor just for fun <S> but because your system did not work any more. <S> In this case you can nearly be sure that the resistor was not the only part that was destroyed. <S> If you only change the resistor, the other parts that were destroyed still are destroyed. <S> I guess that these parts caused the fuse to be blown - not the resistor. <A> The problem is the system went into protected mode because of an error, I forced reset it and the fuse blew up. <S> Was it because of the resistor I changed? <S> Well, you could have inadvertently changed the resistor for an inductor: - <S> Or you could have assumed that the component was a resistor when in fact it was an inductor. <S> Either way might cause problems. <A> For example: ( Image source ) <S> That, however, would not be the source of the problem you are experiencing, because higher power rating at the same resistance just means the resistor is less likely to blow.
| Typically the larger the resistor, the more power it can handle.
|
Electrical isolation problems when routing between pads of SMT resistors/caps According to answers to this previous question , routing traces between the pads of SMD caps/resistors, as shown in the picture, is not dangerous as long as trace to pad clearances are obeyed and the possibility of crosstalk is accounted for. That being said, this type of answer sounds incomplete to me: while the clearance between trace and pads may be ok, the via under the SMT component and bottom of the SMT component are separated only by a thin layer of solder mask, and it seems unsafe to rely on that kind of insulation. This source seems to agree (about solder mask being bad at insulating, not about the trace between pads question), and IPC-2221 also states something to that effect: "Complete reliance on coatings to maintain high surface resistance between conductors shall be avoided." So, shouldn't one also consider the possibility of this insulation failing? Wouldn't that make this kind of design choice bad? Could I estimate how much voltage a SMT component can handle between its bottom and a trace underneath it? <Q> Most, not all, SMT components have insulator on the bottom, between the end caps, so <S> the solder mask is not actually acting as a critical insulator and even if it wasn't there the trace would not contact any conductor. <A> As with anything in engineering, it depends on your design parameters. <S> Ignoring the fact that most SMD components have insulation covering them, and that just 0.4mm of solid insulation are needed to sustain a field in excess of 1kV. <S> If that component is meant to straddle an isolation barrier (e.g., a 3kV Ethernet common-mode capacitor) then that would be a big no-no. <S> It would definitively reduce the creepage distance, increasing risks, and fail some certifications. <S> In some cases you would even go as far as routing the PCB under the component to increase creepage distances. <S> If that’s a component in a low-voltage PCB (<10V) for most designs this will not be an issue, particularly for digital designs. <S> If this is a component in an analog design, crosstalk and leakage considerations enter into play. <S> My company once designed a board for a full-custom multi-channel, high-impedance, low-noise analog ASIC. <S> We sent a small 5-board batch for assembly, and expedited 2 for testing. <S> The test boards worked perfectly, the remaining 3 all failed. <S> After researching the issue we found out that the 2 boards had been washed immediately after soldering (for flux removal) while the remaining 3 were left unwashed for 3 days. <S> The leakage due to the flux residue was enough to cause a 3-fold noise increase, and this was just between the pins of a BGA package. <A> I think clearance would depend on the part. <S> Many passive Rs, Cs, etc. have thin metal bands for the end caps that would also tend to raise the body of the device away from the board, thus the design is not relying solely on the solder mask for isolation.
| Routing like that, does not work for this design. Of course, for manufacturability, it's generally better to have large clearances where possible, but there's nothing inherently wrong with running traces under parts so long as the design rules are satisfied. I think you should review the parts on a case by case basis.
|
Why are the diodes in this circuit forward biased in spite of no current flowing through them? Considering the following circuit, Normally in the +ve half cycle SCR1 is triggered after it takes its triggering gate pulse and then D2 becomes intrinsically forward biased so it's on and conducting the load current along with the SCR1. The question is Why do we consider D2 to be forward biased in the period between zero time to when SCR1 is triggered in the positive half cycle? Isn't it supposed to be "off" since SCR1 is not triggered yet so the there's no current flowing in the path in which it is connected? The same scenario is of course applicable to the SCR2, D1 in the negative half cycle. Any answers are appreciated, Thanks in advance. <Q> Isn't it supposed to be "off" since SCR1 is not triggered yet <S> so the there's no current flowing in the path <S> Even when blocking, the SCR will allow a small leakage current through. <S> For the first type I checked, this current is limited to 1 uA at room temperature or 100 uA at 125 C. Even though this current is small, it is enough to develop a forward bias (maybe only a couple 100 mV) across the diode. <A> Both SCR 1 and D 2 will have a little leakage and a tiny current will flow. <S> In addition there is the junction capacitance in both devices. <S> The result is that there is a very high impedance potential divider. <S> If they were equal then the anode of D 2 would be at half supply. <S> Of course, D 2 would conduct and prevent this. <S> Look at D 1 and D 2 in isolation. <S> They are directly across the supply but when the AC supply upper wire is positive D 1 is reverse biased but D 2 is forward biased <S> should the voltage at their junction. <S> Again the leakage of D 1 will cause this. <S> The other reason is that it is convenient in our circuit analysis. <A> You basically have a 'bridge' rectifier setup except the SCR's can be pulse-width modulated, such as in motor speed control. <S> The reason current is flowing before SCR1 is switched ON <S> is that the diodes D1 and D2 conduct current as soon as AC input has at least -1 volts on one phase. <S> D2 does not have to wait for a trigger to turn it ON if SCR1 is already forward biased (but not triggered), as D2 and D1 are conventional diodes. <S> EDIT: <S> SCR's often have snubber MOV's or resistor/capacitor across the SCR to protect it from inductive loads, which can have a strong back-EMF when the SCR is switched ON or OFF in mid cycle. <S> These snubbers allow a small leakage current to bypass the SCR at all times, plus any 'OFF' state leakage current the SCR has. <S> In practice the load always has a trickle of current flowing as long as AC power is applied, even if the SCR's are not triggered. <S> These types of power regulators often have a warning label that warns of a possible shock hazard at the supply outputs as long as AC power is applied, even if the SCR's are in an 'OFF' state.
| D1 and D2 supply the negative part of the current to the load, but the load has very little to no current flow through it until SCR1 or SCR2 is triggered.
|
Confusion over the power wires of USB (GND and +5v) I'm converting a battery powered device to be powered off a USB connection. I think I have everything figured out except one thing. I understand there is a GND wire inside the USB cable for power, and also the Vbus wire (I think Vbus is also called the +5v wire). I'm lead to believe one is like the positive wire, and the other is like the negative wire. If I just look at the two wires, I would think the Black one is the negative wire, so I would hook it to the negative terminal of the formally battery powered device (after doing proper connections with a resistor of course :) ). I would also think that the Red wire is the positive wire and hook it to the devices positive terminal. I would think all of that strictly based off colors and experience with other things like batteries and solar (maybe I was wrong then) . However after doing research, the names of these two wires makes me think the opposite. The Black wire is actually Ground, which makes me think it's actually like the "return path" for the electricity (so positive). The Red wire is referred to as +5v, which makes the think that is where the "source" of electricity is coming from (so negative). Which of these wires are the "source" (negative), and which is the "return" (positive) ? Thank You everyone!! EDIT:{ Thank You everyone for commenting and answering! All of your replies are helping a lot!!! I guess I always try to think about electron flow, and how electrons flows from an area that is really negative to an area that is less negative. I always thought a batteries negative terminal was the source, and the positive terminal was the return. To hear CURRENT flows from what we call and label the positive terminal is really shocking to me and made me take a step back, yet it makes a couple other things make sense. I find it sad that the most fundamental and basic electrical principles and ideas can actually be quite confusing. } <Q> Unfortunately, when we talk about current flow <S> it is opposite of the direction that the electrons move. <S> It can cause a lot of confusion. <S> Here is an example circuit with a battery and a lamp. <S> We usually use the following terminology: <S> You will almost never find anyone in the industry talking about electron flow. <S> It is always just "current", flowing from the positive ("+") terminal to the negative ("-") terminal. <S> Because of this terminology, we say that the positive terminal is the "source" of the current. <S> Voltages are measured between two points. <S> Imagine that the battery is 1.5V. <S> If you connect your voltmeter with it's red probe on "positive" and the black probe on "negative", it should read 1.5V. <S> If you reverse the probes, you will see "-1.5V". <S> All other voltages in the circuit are measured relative to this node. <S> It is sometimes referred to as "zero volts", or "0V", to make it more intuitive. <A> This confusion comes from too much knowledge about electrons and their sign of charge they carry in Physics. <S> In Electrical Engineering the "negative" terminal was never meant as "source". <S> The "positive" terminal is the "source", electrical current is assumed to flow from positive terminal to negative terminal (even if electrons are flying in opposite way), thus where the term "return current" is originated. <S> In most DC-powered cases the negative terminal has traditionally black color and is associated with (-) of a equivalent battery source, and a red wire is associated with positive (+) terminal. <S> So your initial consideration was correct. <S> But it is always a good idea to check twice, with a multimeter. <A> However after doing research, the names of these two wires makes me think the opposite. <S> The Black wire is actually Ground, which makes me think it's actually like the "return path" for the electricity (so positive). <S> There's a couple of miamprehensions there. <S> Electricity isn't a clear concept... usually the term is used to mean elecric power or electric energy, and these quantities usually only flow in one direction, from the energy source to the consumer - they don't return. <S> If you mean "electric current" <S> then yes that must return. <S> but for historical reasons most engineers use what is called "conventional current" and consider electric current to flow from positive to negative. <S> and so ground is considered the return. <S> It was in fact a man with a similar name to yours <S> Benjamin Franklin who decided which type of electric charge to call positive ans which to call negative. <S> It wasn't until the later discovery of the electron that it was realized that he had chosen the wrong polarity. <S> The US Navy, teaches their technicians "electron current" which does flow from negative to positive the same direction that the actual electrons flow. <S> The Red wire is referred to as +5v, which makes the think that is where the "source" of electricity is coming from (so negative). <S> Actually it's the source of conventional current, and the return for electrons. <S> The black is the opposite the return for conventional current and the source for electrons. <S> Which of these wires are the "source" (negative), and which is the "return" (positive) ? <S> Thank You everyone!! <S> The + in +5 <S> indicates that it is the positive. <S> the GND is the negative and in most computers <S> it's also connected to the safety ground via the main board and the power supply. <S> you should probably fit your resistor in series with the +5, but that probably won't make much difference in most cases. <S> I hope it's a simple device like a flashlight or a hand-held fan, a more complicated device may have variable current draw and not respond well to a resistive dropper. <S> in that case a voltage regulator module like "mini360" may be a solution.
| In an electrical schematic, the battery's negative terminal is generally referred to as "ground" or "return".
|
What's this component and how could these screws affect it? Today, I was seeing the circuit of an LNB deeply and a part of it catched my attention. Here is an image of the circuit: And here is two images of the bottom and the two components that catched my attention(red circles): There is two screws(Machine screw?)(green circles) that you can screw them up/down and this causes to get them close/far to the components. Questions: 1- What are these two components? 2- How do they work? and what do they do in this circuit? Added: Two other images: Also I have a demounted one that took from another LNB. Here is several image: Please note that this component is not soldered on the PCB, it looks it is glued to the PCB using a red glue as you can see in the images. <Q> They are tuning screws. <S> They alter the capacitance to ground of the circuit. <S> They are either altering the centre frequency of filters or oscillators. <S> They will be set up in the factory once the box has been assembled. <S> Once you've opened the box, there'll be no guarrantee you will get it back together with exactly the same position, so you may need to readjust the tuning screws to get back to correct performance. <A> The whole assembly including those ceramic blocks is what is known as a set of coupled “Tunable, dielectric-loaded microwave cavities” <S> the white cylinders are ceramic dielectrics that interact with the air dielectric in the metal cavity to create a high-Q tuning structure. <A> By adjusting the screw you simply change distance between housing to PCB.
| The screws are not mere capacitors, but these alter the physical characteristics of the cavities to change their frequency and Q-factor. It is no component, but as Neil explained a capacitor to ground made out of one part which is the housing and the other part is a PCB area.
|
Connecting a single LED to Motherboard CHA Fan Header I've been reading that it is possible to connect a LED to the motherboards CHA fan controller. The LED I had in mind was this Online people have been saying you would need a resistor as the voltage may burn out the LED otherwise. What I'm not understanding is how I determine the necessary resistance. The LEDs website says it runs at 9~14.5 VDC, it also says the Current Draw is 50mA This answer says $$Resistance = \frac{Source\,Voltage - LED\,Forward\,Voltage\,Drop}{Desired\,Current}$$ But what is my Forward Voltage Drop? Would my desired current be 50mA and the source voltage 12V. Also how would I go about connecting the two wires from the LED to the pins on the board. Would something like this be appropriate. <Q> Forward drops of red LEDs are about 1.7-2.5V, with the high output ones being towards the higher end, but there's some information you're lacking here. <S> The page says that there are 3 LEDs on the assembly, but doesn't indicate whether they're connected in series or parallel. <S> A 50mA draw for a high brightness LED would be reasonable to indicate that they are in series, which would be logical for a supply of sufficiently high voltage to allow that. <A> The LED you refer to in your link is really an LED assembly, not a single LED. <S> From the description, it is designed to be operated from 9 - 14.5 volts, so will include appropriate current limiting. <S> There is no need to add a series resistor with it. <S> Their forward voltages will vary from ~ 1.7 - 3.5 volts, depending on colour. <A> But what is my Forward Voltage Drop? <S> Would my desired current be 50mA and the source voltage 12V. <S> There is an old recipe for cooking rabbit which starts, "First, catch a rabbit. <S> " In your case, the first thing you need to do is decide which LED you are going to use. <S> Part of this process is to find a data sheet for that LED. <S> Second, you need to decide what current you want to drive it with. <S> That is why you need a data sheet. <S> In the case of the LED you've linked, read ALL of the web page. <S> The LED housing contains 3 LEDs (almost certainly in series) and a limiting resistor, so you don't need to worry about that part. <S> You can just hook it up to 12 volts and you're good. <S> Also how would I go about connecting the two wires from the LED to the pins on the >board. <S> Would something like this be appropriate. <S> There is no way to know. <S> You have not shown the pins on the board. <S> The connector is intended for <S> .025 inch square pins spaced 0.1 inch apart. <S> If that describes your drive pins, you're in good shape. <S> If not, not so much. <S> You need to measure your drive pins before you can tell what they require, and the measurement must be fairly precise - a ruler probably won't work. <S> However, at 75 cents apiece, you could consider just buying one or two and trying it, since 0.1 spacing is pretty standard. <S> If it doesn't work, just use it as the foundation for your junk box. <S> With this said, please look closely at the CHA FAN connector. <S> You need to look up the different varieties of fan which you might find.
| Fortunately, these assemblies have a series resistor built in (or at least the ones I have used have), to allow them to run on the stated voltage range, so you don't need to add any external resistor. The fan drive circuit will provide at least 50 mA (probably more like 1 A), but a great many LEDs will be destroyed by 50 mA. Individual "bare" LEDs do require current-limiting resistors. If it has more than 2 pins, your idea may not work.
|
Electrically detecting a not connected input I have a 0-30V DC signal and it can be physically disconnected from a circuit. I need to detect and generate a TTL output when this signal is disconnected. The "detector" circuit and the signal will share a common ground. The thing I can't figure out is 0V (GND) is also a valid "connected" state for that signal. Using standart approach of a pulldown for detecting unconnected state is not going to work. Edit: Thanks for all your input. Additional information: Signal is not digital, varies between 0-30VDC. Sorry for misleading tag, removed that. Which side I need to detect: I need to detect at receiver side and also need report that to sender. Impedance of source: Low, but going higher than 50mA load will going to disturb other things that depends on this signal. Pulling down lower than 0, higher than 30: I actually thought that but it is not seems feasible since I don't have these. Pulling to middle: 15V is valid signal, can't use that. Injecting signal: Nice idea, but receiving side need to be "basic" as possible and I can't modify freely the sender side. Is there any way to detect this electrically? Thanks <Q> Depending on the impedance of the source and how much you are allowed to load it, you might be able to do something like have the receiving device inject its own time varying signal into its own input through a very large series resistance. <S> If it sees a corresponding variation in the measurement, then it knows that the source impedance is also high; likely because nothing is connected. <S> This will mostly easily be done with a system that includes an MCU or is able to run software. <S> But you can easily add one. <S> A 34-cent (in quantity 1) ATtiny10 has an ADC and is available in a SOT23-6 package. <S> Pay the distributor a little more to pre-program it with your code, give it a resistive divider for the input range and a a large output resistor for injection and you should have a solution. <S> And it is only possible <S> where slight "back contamination" of the source is acceptable, ie, you wouldn't want to do it to a source also feeding other sensitive gear. <A> Basically place a pull/up pull/down to a middle voltage (e.g., a resistive divider to 15V) and use a couple of comparators (or transistors) to determine if the signal is around that window, at 0V or at 30V. <A> Are you allowed to choose a connector? <S> If so, many (if not most) barrel jacks have a third pin for detecting whether the connector is inserted. <S> Alternatively, you could use a connector with a few extra pins and have it short those pins together when inserted. <S> For the latter option, the following two methods come to mind: <S> In the first, the sending end has two wires going to the connector, and the connector contains two extra contacts that are shorted together. <S> The receiving end can sense when this connector is connected by checking if the two sense pins are shorted. <S> The easiest way would be to tie one to ground and pull the other high on the receiving board. <S> The second method uses only one extra contact: since you'll most likely sense by shorting it to ground, you can just short it to the signal ground and sense when that connection is made in the same manner. <S> This doesn't provide the isolation that the other method does, though. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The downside to these is that they only sense if a cable is connected. <S> You could in theory put the short on the sending end board, which would let you know that the sending end is on the other end of the cable, though. <S> It still won't be able to detect every fault condition; the main advantage is simplicity. <A> An interesting problem: I have assumed in this solution that a voltage divider is required to measure your 0-30VDC. <S> There are really only two conditions that exist. <S> 0-30VDC with the probe point connected (and <S> the voltage source and load represent a low impedance). <S> Under these conditions you need to present a divided voltage (I assumed 0-3V here) to an A/D convertor. <S> An open circuit on the probe point. <S> This circuit would seem to provide what is needed assuming you have an MCU sensing the measured voltage. <S> simulate this circuit – <S> Schematic created using CircuitLab M1 is normally always on, so the voltage divider R1, R2, R3 provide a 0-3V signal to an MCU A/D. <S> If and only if the input voltage read zero, you can turn off M1 and measure the voltage. <S> If it is ~2.8V then the probe is open circuit. <S> This is enough voltage difference to be sure it is open circuit and requires very little software change. <A> Since you need a TTL signal, I assume you have +5V available. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> You can generate the -5 with a 7660 :
| If your source is of low-enough impedance, you can pull-to-the middle and have a window-detector to sense the fault condition.
|
Is memory possible without a flip flop circuit? All the memory circuits I've seen use some form of flip-flop/feedback mechanism to store a value. Is this the only circuit design that can store a value? Is there anyway to create memory without a feedback loop? <Q> Flash memory stores bits in an isolated conductor within a floating gate transistor , with no feedback required to maintain the state. <S> DRAM stores data in the charge state of a capacitor, however the data will be lost over time due to leakage currents. <S> Core memory can store a bit in the magnetic state of a magnetic material. <S> Feedback isn't required to maintain the state, but it can only be read once before the state is disturbed. <S> The state is maintained without feedback. <S> However, they can only be written once. <A> To add to this list: Optical Drives that encodes binary data. <S> There is a laser that reads reflections on a particular surface. <S> If there is no reflection of that bit, there is a zero. <S> Otherwise, if there is a reflection of that bit, there is a one. <S> The data that is stored is in the form of Gray Code . <S> Punch cards , now considered rather obsolete, actually contains digital data. <S> Each hole, or lack thereof, would represent actual code for a computer to execute. <S> This website gives an example of how hole punches can relate to real code. <S> Writing is, while not relevant to this website, probably the oldest form of external memory outside of the living organism. <S> I suppose you can say the oldest form of memory is a nucleoid in a prokaryotic cell since that stores information on how it operates... <A> Assuming by memory you mean digital synchronous, the answer is YES. <S> The simplest FF is the fundamental sync memory cell which has internal feedback. <S> The async latch has external feedback using 2 gates. <S> By asynchronous memory, NO , it can be an isolated charge with a transmission gate or similar transistor type. <S> But be more explicit next time. <S> Your question indicates a opportunity to expand your awareness. . <S> Do you assume <S> we know <S> you mean only voltatile static RAM or all types of memory: <S> analog/digital, static/dynamic , electrical/mechanical/magnetic/optical/nuclear/acoustic or chemical . <S> Each type has a threshold, which is not necessarily binary <S> but I assume you mean logical and not visual , it can be linear or not, but must have defined thresholds and tolerances. <S> The question of "memory without a FF and/or feedback?" ... <S> Could be simply Yes.
| Fuses can be used to store information by simply overheating and destroying a small wire (or not).
|
Will voltage gain change in non-inverting op amp when load is connected? Is there any significant change in amplified output voltage when a load is connected to the output compared to a no-load connection in a non-inverting op-amp? Why? <Q> Is there any significant change in amplified output voltage when a load is connected to the output compared to a no-load connection in a non-inverting op-amp? <S> No, provided the op-amp's maximum current ratings (or minimum load resistance) is not exceeded. <S> Why? <A> No - the load will have (practically) <S> no influence on gain because in both cases the output resistance is negligible small and the opamp behaves (nearly) as an ideal voltage source. <S> The open-loop output resistance of the opamp is drastically reduced due to the negative feedback effect (typically below 1 Ohm). <S> EDIT : <S> Of course, the above explanations are valid only for such frequencies, where the used opamp "behaves as a nearly ideal opamp" - which means: We are allowed to treat the active device as ideal during calculation of the surrounding passive network - because this was the only reason we have chosen an opamp-based solution. <A> At high frequencies, where the open loop gain has dropped to only 100, or to 10, the addition of 100 ohms Rload will cause substantial errors in most opamp circuits. <S> Additionally, the distortion will rise because the differential Vin (between Vin+ and Vin-) is large at high frequencies, and requiring more output current requires more Vin which further increases the distortion. <S> Some opamps will even be upset in accuracy at DC, because of high Rout (10,000 ohms Rout, for some lowpower opamps).
| Because the negative feedback will cause the op-amp to adjust its output until the correct output voltage is given.
|
Turns Ratio and Transformation Ratio I am not able to understand the difference between this two terms. I searched it online but did not get an appropriate answer anywhere. <Q> Transformation Ratio: http://www.electrical-engineering-assignment.com/voltage-transformation-ratio-k <S> And Turns Ratio would be the number turns of the primary winding to the secondary winding <S> (edit: those were swapped originally). <S> Some transformers have multiple secondary windings as well to create multiple outputs. <S> More if there are more secondary turns than primary turns, the secondary voltage will be higher than primary voltage, and if fewer, the secondary voltage will be lower than primary voltage. <A> First, some definitions: <S> Turns ratio is a ratio of number of turns on primary side \$N_p\$ to the number of turns on secondary side <S> \$N_s\$ : <S> $$\upsilon_N = \frac{N_p}{N_s}$$ <S> Transformation (voltage) ratio is a ratio of primary voltage \$V_p\$ to the secondary voltage \$V_s\$ , both measured in idle state (without a load on secondary side): $$\upsilon_V = \frac{V_p}{V_s}$$ <S> In almost all cases You can assume that voltage ratio is equal to turns ratio, \$\upsilon_V \approx \upsilon_N\$ , but in reality they not. <S> Look at the transformer equivalent circuit: <S> Real transformer have some resistances of windings \$R_p\$ and \$R_s\$ <S> (here secondary side reactance and resistance are transformed on primary side), core losses (represented as \$R_C\$ ) and magnetizing reactance \$X_M\$ . <S> Depending on the load (current in the windings) these elements cause voltage drops so ratio of voltages measured on both windings will not be the same as \$\upsilon_V\$ . <A> IEEE Std C57.12.80 defines the "Standard Terminology for Power and Distribution Transformers". <S> IEEE Std C57.12.80-2010 defines the "turn ratio of a transformer" (not turn <S> s ratio) as the ratio of turns in a higher voltage winding to the turns in a lower voltage winding. <S> The definition says nothing about "primary" or "secondary". <S> The IEEE standard does not define a "transformation ratio". <S> However, the standard also says that the "turn ratio of a current transformer" is defined as the ratio of secondary to primary turns, while the "turn ratio of a voltage transformer" is defined as the ratio of primary to secondary turns. <S> For what it's worth, I have two textbooks on my shelf that define the "turns ratio" as the number of secondary turns divided by the number of primary turns.
| The transformation ratio is defined as the ratio of the secondary voltage to primary voltage.
|
Output impedance and loudness I've a DAC for headphones (GeekOut 720) which has two output jacks with different impedances: 47 Ohm (with a large headphone icon next to it) and 0.47 Ohm (with a small headphone icon next to it). I'm currently using Sony MDREX110AP headphones, with 16 ohm impedance according to its specs. When I connect them to the 0.47 Ohm output I get much louder output than with the 47 Ohm jack, which makes me wonder, shouldn't the smaller impedance output drive my headphones with less power than the larger one? If such is the case, why is the response louder for the larger impedance output? It seems to me that I'm not quite grasping the output impedance concept. Bonus question: what output should I use to get better sound quality and protect my headphones? <Q> I'm currently using Sony MDREX110AP headphones, with 16 ohm impedance according to its specs. <S> When I connect them to the 0.47 Ohm output <S> I get much louder output than with the 47 Ohm jack Possible explanation..... <S> The socket labelled 47 ohm has an output impedance of 47 ohms. <S> This means that with a 16 ohm load and, using the voltage potential divider equation, the output will be reduced from an open-circuit voltage of (say) X to a value that is about 0.254 X. <S> The socket labelled 0.47 ohm has virtually zero output impedance compared to a load of 16 ohms hence the output is barely attenuated. <S> A reduction in signal voltage level to 0.254 is an attenuation of nearly 12 dB which is more than halving the loudness level (based on 10 dB being a halving or doubling of perceived loudness at 1 kHz). <A> Bonus question: <S> what output should I use to get better sound quality and protect my headphones? <S> For "better" protection use the 47 Ohm output as that has a more limited output current (due to the internal 47 Ohm resistors). <S> The 0.47 Ohm outputs will also have some maximum output current but that maximum current will very likely have a much higher value than the 47 Ohm output. <S> For "better" sound quality: that depends on the headphone you're using. <S> In practice the best protection for your headphones is not to drive them louder than your ears can cope with. <S> So then you would not be using the headphones correctly anyway. <A> The ratio of the load impedance to the output impedance of the amplifier is known as the damping factor , and since the drivers have mass, and the voice coils generate a back EMF as the coil moves in the magnetic field, the relationship between the voltage applied to the voice coil, the current through it and the displacement resulting isn't linear, but has a time response, and so affects the frequency response. <S> The best (flattest) frequency response is generally achieved with a high damping factor (lowest output impedance). <S> On large speakers this is significant, but with the small drivers in headphones this may not be even noticeable. <S> Since a significant proportion of the signal will be dropped across the 47 ohm output impedance the loudness will be significantly different between the two, so it may not be easy to do A-B testing to see of you can tell the difference.
| When connected to the 0.47 Ohm output you might be able to damage some headphones but the sound level would need to be way beyond what your ears can deal with.
|
Are creepage and clearance value in common standard relative to ground? So I have been researching creepage and clearance for a few weeks now and I think I have a pretty good understanding of the concepts. However what I do not understand is some of the interpretations of the standards. My Question: When UL 61010 standard states a voltage, is that the difference between the two adjacent conduction pairs or is that voltage relative to ground. I think it would be relative to ground but thought I'd ask here. I am asking because theoretically you can have 2 1000V lines very close to each other and from what I understand there is no potential difference to cause an arc, however I highly doubt that you would pass any certification doing this. <Q> My understanding is that clearance and creepage requirements in safety standards apply for the separation between user-accessible parts and potentially hazardous circuits, not between two hazardous circuits. <S> I have access to the IEC 61010 standard, which I believe is very nearly identical to UL 61010. <S> In IEC 61010-1, section 6.4.2, the requirement is <S> If ENCLOSURES or PROTECTIVE BARRIERS provide protection by limiting access, CLEARANCES and CREEPAGE DISTANCES between ACCESSIBLE parts and HAZARDOUS LIVE parts shall meet the requirements of 6.7 and the applicable requirements for BASIC INSULATION. <S> [emphasis added] <S> and in section 6.4.3 CLEARANCES, CREEPAGE DISTANCES and solid insulation <S> forming BASIC INSULATION between ACCESSIBLE parts and HAZARDOUS LIVE parts shall meet the requirements of 6.7. <S> [emphasis added] Since presumably neither of your two 1000 V wires is accessible, these requirements don't apply, and not meeting the clearance and creepage distances between these wires shouldn't prevent you from meeting a 61010 standard. <S> However, you might still want to prevent arcs between these two circuits <S> (for example, when one is powered but the other one isn't), and the clearance and creepage values from 61010 may be a reasonable guide to how to do that. <S> One point in IEC 61010 that I'm not entirely clear on the interpretation of is in section 6.7: <S> Insulation between circuits and ACCESSIBLE parts (see 6.2) or between separate circuits consists of a combination of CLEARANCES, CREEPAGE DISTANCES and solid insulation. <S> This would tend to indicate that creepage and clearance should be observed between "separate circuits", but I don't see any "shall" clause saying when this must be provided. <S> caveat <S> I am not advising you on whether your design is safe <S> and you should have your design checked by a licensed engineer in your jurisdiction before you offer it for use by the public. <A> This is true for any document including UL 61010. <S> Creepage is more prone to a lower breakdown voltage so the surface ionic contamination of dust and moisture requires a much bigger gap which is sometimes rated according to location. <S> Clearance usually refers to air gaps between conductors or partial conductors, which may be rinsed away or vacuumed by preventive maintenance good practice. <S> Other Info <S> These two terms have resulted in a wide variety of insulator bushings designs in order to enhance the creepage path length and clearance gaps in certain standards. <S> The most prevalent test method is a lightning surge test at some level and rise/fall time. <S> This test acceptance level along with the pulse shape is used in the Power Industry to define a Basic Insulation Level or BIL, e.g. BIL200 means it can survive a 200kV lightning impulse. <S> Yet it would fail miserably with 100kV AC at low frequency and in my experience fail even if cleaned with alcohol wipes at 65kV. Insulation <S> can withstand higher peak voltage transients if they are faster than the ionization time needed to ignite air or the insulation defined by creepage and clearance. <S> Notice the Clearance between rings and the depth of the rings adds to Creapage path length <S> are different in each case depending on materials and environment risks (sand, dust, condensation, rain frequency) so one size or shape does not suit everyone. <S> Usually, when there is a weak arc, it cleans the surface of contamination. <S> A strong arc might add a carbon trail and make it worse. <S> If you are keen on this topic there are tens of thousands of thesis results on "Partial Discharge" <S> I picked one graduation project at random... <S> you may find easily Analysis of Partial Discharge in OIP Bushing Models ZEESHAN AHMEDStockholm, Sweden 2011XR-EE-ETK 2011:008 <A> There are two basic considerations regarding potential differences in standards. <S> Possible potential differences present during normal operation. <S> Possible potential differences present during reasonable fault conditions. <S> IEC60601, being a medical standard, has requirements for both. <S> If during normal operation both 1000V circuits, always have the same potential with respect to each other <S> AND there is no normal condition that violates this then the normal operation requirements apply. <S> If during a single or double fault condition a large potential difference can exist between those two circuits, then the fault conditions apply (this can simply be a requirement to ensure that a fuse is blown). <S> Keep in mind that normal for IEC60601 implies the presence of line voltage on any exposed part and thus across any isolation barrier in the system AND the presence of up to 5kV for 1 minute across any isolation barrier without significant system degradation. <S> Additionally, UL would require appropriate response to a static discharge model that has voltages of ~10kV. Disclaimer: Always get the required certification for equipment that goes into the market and ensure best practices for equipment that comes into contact with humans. <S> The certification process includes the verification of those isolation barriers.
| Creepage and Clearance are terms used for gaps in Electrical Insulation between electrodes or conductive end-points and not relative to Earth ground unless that happens to be one of the conductive surfaces.
|
Do 240V AC switches only need to open the active wire? I want to add a simple inline switch to a small, mains powered lamp (~240V AC, 10W Max). It's earthed; it has a typical 3-core cable with a 3-pin plug. I bought a bunch of switches, expecting each switch to have 2-3 contacts per side, but they only have 1 contact per side. In other words, they're only capable of breaking contact for a single wire. They have grooves down the adjacent sides to run/hold the other 2 wires, but it seemed strange. Is it fine to just open the active wire, as shown below? Note: Brown = Active. Blue = Neutral. This is the kind of thing I do all the time with 6-24V DC applications, but domestic appliances aren't really in my wheelhouse. Is there any reason this would be inappropriate or unsafe with 240V AC? <Q> In the USA only industrial devices have to disconnect neutral as well as the hot wire. <S> For residential use normally only the hot wire is disconnected, as neutral normally has a low voltage on it less than 10 VAC, which is not a shock hazard. <S> European and Canadian rules may vary about disconnecting neutral but typically follow the same UL/cUL/TUV regulations. <A> You should tell us your location, since this varies based on country. <S> In the US, 240V residential service is actually 2 legs of 120 out of phase with each other, so both wires are hot and both must be switched. <S> In much of the rest of the world, there is a true 240V hot and a 0V neutral, but plugs may be inserted in either direction, <S> so you never know which is which and again, must switch both of them together. <S> Even in places where hot and neutral are in theory <S> well-defined (such as for 120V appliances in the US), it's still not a bad idea to switch both together, since it's not too uncommon to find outlets miswired with the hot and neutral reversed. <S> In short, whether this approach is safe depends on your local electric code, but to guarantee it's safe to use anywhere, get a two-pole switch. <A> Without seeing the lamp, it sounds like it is something special as there is a ground wire as well. <S> Normally, standard household lights work with 2-pole plug so it is enough to have the switch on one wire only. <S> But in your case, who knows if there is an active power supply for a LED or fluorescent tube. <S> And these power supplies have input filtering, and having a switch on one wire only is a very bad idea. <S> Especially if ground connection fails. <S> And some grounded plugs are compatible with ungrounded wall sockets so you can't rely on that either.
| Remember that some plugs can be inserted in any way to socket so you get no guarantees which wire is neutral or ground.
|
Replaced 4x AA battery with 6V 3A DC adapter, but device won't work I'm hoping you smart folks can help me. I'm puzzled by what I thought would be a simple DC battery to DC adapter swap. The device I'm trying to mod is a a microchip activated pet door (SureFlap Microchip Pet Door on Amazon for about $150). It normally takes 4x Alkaline AA batteries. The manual does NOT recommend using rechargeable batteries because they may trigger a battery replacement warning due to their lower voltage. I thought, I could take a 6V 3A adapter (actual 6.3V on DMM) and splice on some alligator clips, clip them onto the battery springs and not have to worry about my cats being locked in/out due to a dead battery. I was WRONG. This mod resulted in a powered device, but no longer would the door trigger to my pet's microchips. Switching back to the batteries eliminates the issue completely. therefore, I know the device is not broken. I have confirmed power is being provided to the device, by taking my DMM probe to the springs on the device, and by pushing the "Learn" button on the device, which puts the door into the learn mode (unlocks the latch mechanism to allow a pet to pass through and register, it's supposed to re-latch to confirm a learned chip). Issues while on DC adapter power: Putting the door into "Learn Mode" initiates the unlock mechanism for the pet to pass through, but does not complete the learn process (re-locking) no matter how many times I try. It just hangs perpetually unlocked in this mode until it is canceled. Again, going back on battery only mode I can learn a chip easily. The device has a memory function so microchips do not need to be re-learned after a battery swap. However, previously learned chips no longer trigger the door to open. I can no longer get the door to trigger for my cats. Again, going back on battery only mode I can learn a chip easily. I thought initially I had an under-powered adapter, as I had a 6V 1A (6.0V on DMM) lying around. I bought a 3A adapter mentioned above and the problem persists. I am absolutely puzzled. Is there something I am missing about the characteristic differences of DC batteries and power supplies? I've had success in the past doing the exact same mod with toy motors and the like, but I'm wondering if the issues is due to the device being a more complex electrical device. 4x Alkaline batteries are 6.3V on my DMM, so I don't think over-voltage is an issue. Also, my 6V 1A power supply is dead on 6V. <Q> So I pulled the cover off one of these a couple of months ago with the same plan in mind, this is our second door, and the batteries only last 3-4 months. <S> The 6v of batteries in series seem to run the electronics and the 3v in parallel seem to run the rfid loop, so supplying just 6v DC gives the appearance that it all works, but failed to ever pick up tags. <S> I still want to hard wire <S> the SureFlap. <S> Plan is to make a pair of 3.3v supplied with different earths. <A> Low frequency (125 kHz) RFID usually requires a very low ripple power supply or effective noise filtering. <S> Switching power supplies are often a problem. <S> Linears are better. <S> Batteries are best. <A> Try to solder a good 1000 uF electrolytic capacitor near the battery holder springs.
| The system seems to run the batteries both in parallel and in series. You likely have too long wires, and your device likely uses powerful bursts of RF power to communicate with RFID chips, and the voltage sags momentarily.
|
PCB trace width can't meet the rated current The rated current for VCC5_AC from AC adaptor is 2A. According to the calculation on http://circuitcalculator.com , the trace width for 2A should be 30.3mil . However, as indicated above, the width of AC input pin of the BQ24030 is only around 12mil and I think it's useless to connect a wider trace to this pin, so the actual trace width of VCC5_AC connected to the pin is just 12mil . My question is: 1. Does this mean the regulator cannot drain the rated current 2A?2. If this is the case, is there any solution to solve this problem? Edit:Thanks to everyone's suggestion. I realize my mistakes are The uncertainty about changing the trace length in the middle, even a short part, which is not very significant in this case; The misconfiguration of trace width calculation tools; I've changed my layout as below which widen the power line <Q> So the pin and pad can handle much more current than a trace of the same width (even if they are made of lower conductivity materials). <S> A 10ºC temperature rise is rather conservative. <S> You can rearrange adjacent traces to maximize the wide trace run to within a few millimeters of the pad. <S> But, is there any reason why you didn’t use the datasheet’s <S> suggested layout as a guidance? <A> You did not consider that the temperature rise of a trace also has a dependency on trace length . <S> (The calculator assumes a infinitely long trace). <S> Let’s take a trace with total length of 1m with thickness of 30mils. <S> This is rated with 2A with 10°C temperature rise. <S> Now imagine a very tiny region/spot of that trace with length of 10mils where the 30mil trace with is reduced to 2mils. <S> Of course this „spot“ would increase the resistance a little and it would absorb a little more energy. <S> But the trace would still be able to carry that 2A current with only 10°C temperature rise. <S> Also consider that an IC has internal bond wires that usually have very small wire diameters. <S> But because they are very short, this is not a problem for the same reasons. <A> According to the calculation on http://circuitcalculator.com , the trace width for 2A should be 30.3mil. <S> * <S> With a 10 degree temperature rise. <S> Everything is a resistor, even board traces. <S> The maximum current trough a resistor is defined by it's power rating, which is the maximum temperature. <S> If you want more, you need to dissipate more heat. <S> This means that for the a typical board trace it can run 2 Amps with a 10 degree temperature rise for the specified width and thickness, but 15 mil for a 30 degree temperature rise. <S> You did not specify the thermal resistance in C/W. <S> Which is also difficult to calculate. <S> The small trace of 12mil is connected on one side to the regulator part, and the other side a SMD component. <S> These are both parts that allow heat to be transferred away from the trace, increasing the current capacity of the trace. <S> Does this mean the regulator cannot drain the rated current 2A? <S> The regulator can do 2A without problems, so can this short trace.
| A short trace segment, that is sandwiched between large metal areas will dissipate heat much faster. Some considerations: pins and solder have a much larger sectional area than a PCB trace. The estimated temperature rise assumes a relatively long trace.
|
Voltage, inductance & lightning in a length of wire I initially got the idea after watching the famous Mike Holt video on grounding. https://www.youtube.com/watch?time_continue=138&v=mpgAVE4UwFw Mike warns that longer wires to ground rods can attract more energy. So I thought he meant the lightning voltage can increase after passing through the wire (it doesn't as one of the Answers has detailed at length). I have many surge protection devices which protect many circuits so I wanted to know the mechanisms of it. And I tried to review the physics below: Given the inductance for a given length of wire, the induced voltage along the length is given by: $$v=L\frac{di}{dt}$$ So the greater the rate of change in current, the greater the induced voltage. Hence the longer the wires. The greater is the surge voltage. From here : <Q> Besides U= <S> R I, there is another formula valid for the inductor which is U= <S> L <S> dI/dt. <S> This formula reads like this: <S> If current changes , voltage is proportional to that change. <S> This is why voltage can get very high across the inductive wire because current change is huge in case of lightning. <A> The inductance of free space is 1.26 uH per metre and the lightning is travelling through free space before it hits a wire like a lightning rod. <S> The lightning rod will have pretty much the same inductance <S> so there is no more voltage generated than that naturally produced by the lightning's electric field <S> should it by-pass the rod or actually conduct through it. <S> Inductive reactance is like resistance. <S> If the wire is longer, and more resistance, why would voltage increase? <S> Not really. <S> Remember the current would decrease from increased resistance, so voltage shouldn't increase. <S> Lightning has a current that is independent of what might be in its path and, the voltage it produces is going to be about the same irrespective of what it encounters i.e. it behaves more like a current source not a voltage source. <S> As I said in my comment, your question isn't very clear as to what scenario you are describing so if I have not addressed the scenario you have envisaged, you should draw a picture. <A> I will explain what the article is saying. <S> See schematic. <S> L1 represents the inductance of the long wire. <S> I1 is the 8kA 80/20 waveform. <S> The longer the wire, the larger L1 will be, and the larger the voltage across I1 will be when the pulse waveform is applied. <S> That is all the article is trying to say. <S> Yes, a longer wire has more inductance, and consequently, it will have more voltage develop AT THE POINT OF CURRENT INJECTION. <S> Not down at the end of the line away from the current injection point. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Now, where did the 8kA waveform come from? <S> The article doesn't talk about that. <S> I suppose it could be from a direct lightning strike, or (more likely) it could be induced in the wire due to a strike to a nearby object. <S> I don't think there is anything wrong with the article. <S> I thought it was interesting.
| In the case of lightning or surges, the longer the wire the more inductive reactance and the greater the voltage.
|
How to isolate the following relay circuit from mains? How to isolate the following circuit from mains or safely send a 5V signal from RPi to turn the relay on? I currently have a 5V signal going into the IN pin of the relay board and RPi ground to the GND pin of the relay board and it works. Is it safe even if I remove the 1.2V battery. I’m not very experienced with 220V AC. <Q> The relay's coil and the switch already provide proper mains isolation. <S> However you power the relay via a non isolated supply. <S> Connect it to your RPi and your RPi will then become mains live . <S> If you want to keep the powering of the relay the same (i.e. non isolated) you will need to either use another relay (there are relay modules for RPi) or an optical isolation module. <S> Then that module will provide the isolation. <S> The circuit that you show does not provide any mains isolation. <S> The reason that the relay is there is to switch a large current, not to provide any isolation. <S> I’m not very experienced with 220V AC. <S> Then educate yourself on the subject before messing with circuits at mains voltage. <S> Even seasoned professionals treat mains voltage with respect and so should you. <A> The circuit is live from mains voltage and the RPi is not isolated from it <S> so don't touch it or anything connected to RPi! <A> Other answers tell you why your current design is dangerous, this will answer how to do this safely. <S> You should get relay (board) <S> that is capable of switching mains, but can be triggered with 3.3 V. <S> This relay will then provide enough isolation between mains and your RPi. <S> PS, this kind of relay boards are popular and can be found on all of mayor distributors websites.
| Get an opto-isolator between RPi and the relay circuit so there will be isolation between the circuits and RPi is safe to touch. It is a "capacitive dropper" circuit which is not isolated.
|
Why are ground pours isolated from each other on the top layer? I am reading the application note from TI about the LM3409 evaluation board.In the board layout (Figure 3) the bottom layer is a single GND pour. But top layer has also some copper pours which end up being connected to ground, such as the ones at LED-, C5, D1 and C1. What I don't understand is: why are they all not connected to each other on the top layer, since they are all the same net ? <Q> why are they all not connected to each other on the top layer, since they are all the same net ? <S> Because this is a switching converter. <S> In switching converters very high currents can flow, often these or only very short current pulses. <S> If we "just" connect everything to the ground plane directly it is unclear where these currents actually flow. <S> Yes all is connected but due to resistance of the copper ( <S> low but it is always there) and inductance (a wire of 1mm has 1nH inductance, also small but still there) <S> these current peaks can still influence the operation of the circuit. <S> For example the grounding of the chip must be such that no voltage (or as little as possible) is induced across it <S> otherwise the chip will not have a "clean" ground which will prevent it from regulating the current properly. <S> So most often a "star ground" scheme is used, read more on that here . <S> I'm not saying the ground scheme used on this PCB is a star ground but it will be a deliberate choice of the designers to make it like it is. <S> Often the IC's datasheet will also include a recommended PCB layout and that might include a grounding scheme as well. <A> This looks like a power supply circuit. <S> The reason for that is a switching supply generates high spikes / transients, and the via (and also copper) acts like a small resistor. <S> To have separate ground on the top layer reduce the impact of high transients into the ground plane by keeping the current where we want it on the top plane, and avoid going to some places we don't want it to flow. <S> Basically, it allows to better control of where the current is flowing on the board. <S> If it was a plain plane on the top, it would be difficult to predict where the current would flow, it may flow near sensitive IC causing unwanted effects. <A> Are you sure the pour at LED- is ground? <S> Since it's a through-hole component I would expect the GND pins to connect to the bottom layer ground pour, and the top layer pour is probably a power net. <S> Therefore connecting the other top pours to each other may not be as practical as you might think. <S> Keeping point-connections to the primary ground plane/pour is a better practice for PCB routing.
| I expect this was done to prevent ground loops (a strip of pour on the top layer connected by vias on either end to the bottom ground pour).
|
adding a switch for direction reversal in 12v DC motor w/ PWM controller system I have a circuit for a 12v dc motor with a battery and a PWM controller. the system sort of is in this order battery-->PWM-->motor. I want to add in a switch to reverse the polarity to switch directions of the DC motor at will. Without the PWM, its a pretty simple operation and straightforward, but I was wondering how to do it now with the PWM. Do I put the switch after the pwm before the motor or between the battery and pwm? I wasn't sure how the PWM would affect the system direction and didnt want to ruin anything in my system while implementing the new switch <Q> There are a few ways of doing this, but the easiest is the one to insert a DPDT relay in line with the motor. <S> Depending on the polary of the output, you might need to connect VCC instead of GND on the contact of the Relay, but the concept remains the same. <S> With a simple switch or a GPIO you can drive the relay and change the direction simulate this circuit – <S> Schematic created using CircuitLab <A> Figure 1. <S> Modifications required. <S> Be careful with this. <S> Reversing the motor while at speed will cause high currents to flow as the momentum of the motor must be overcome to reverse it. <A> Consider replacing the motor controller entirely with a H-bridge controller. <S> A H-bridge is a motor controller that allows you to control speed with PWM and change direction with 2 digital IO pins. <S> The L298 is a popular one, plenty of modules available for cheap. <S> You can control 2 DC motors with it.
| You can reverse the motor with a double-pole, double-throw (DPDT) switch.
|
When to choose active-low over active-high for a switch? I was reading this intro article: https://learn.sparkfun.com/tutorials/logic-levels/all#active-low-and-active-high Is there a particular time when an active low signal is preferred over an active high signal or vice versa? Does it make a different for simple buttons/switches, or maybe ICs? Just curious if one has benefits over the other. Thanks! <Q> Many things come into play when choosing whether a switch is active high or active low. <S> As others have mentioned, it can depend on your IC and what it needs, safety concerns, other circuit needs, industry standards, or if none of these are relevant, personal preference. <S> Is there any safety related to your device, and do you need a "dead man" switch? <S> In other words, if part of your circuit fails to work properly, which state does the switch need to default to in order to prevent something dangerous from occurring? <S> For example, say you have a circuit that controls a crane holding a large weight with a quick-release switch. <S> If, for some reason, the trace were to be broken or a component removed, causing the switch to no longer be "forced" to a certain state, which state would it default to? <S> You would want to set up your circuit so that it defaults the "inactive" state, whether high or low for the given device. <S> Pull-up and pull-down components would also come into play here. <A> Active low is much more common. <S> I pretty much always wire switches that way, and most switches I see on other peoples' designs are also active low. <S> I don't actually have a good reason why. <S> That may be the only reason. <S> I only remember doing active high once, and the reason was that the button had to wake up the processor from deep sleep, and it needed and active high signal to do that. <A> For example, if you are using some high-side voltage switch that delivers some power to another device (USB port power as example), and if you want to avoid a glitch on power on, you select "active high", because the control signal is likely to stay at zero for some time until your MCU boots and start running. <S> A small capacitor to ground will ensure that the signal stays at logic zero. <S> If you use "active low", the control signal will stay low until MCU/controllers comes to mind, which will temporarily enable the controlled unit. <S> Practically it all depends on ramping rate of the power supply rails, various built-in "undervoltage protections", etc. <S> , so it all depends, and no universal recommendations are possible..
| Selection of enable polarity largely depends on desired behavior of whatever is controlled during power up of the device. I think conceptually active low switches are similar to "open-collector" outputs, and people are accustomed to thinking about open-collectors.
|
Ultracapacitors as a battery; how long will they last? I would like a formula to be able to calculate how long it would take 6 2.7v 350f ultracapacitors connected in series to degrade from 14.4 volts to 11.5 volts given a parasitic draw of a specific load. For example:A bank of capacitors replacing the lead acid battery of an automobile, charged to 14.4 volts by the alternator. How long can the car sit with the engine off before the voltage dropped to 11.5 volts? 11.5v it's a minimum voltage before the starter will not turn over the engine. 6 2.7v 350f ultracapacitors at 16.2v 58.33fBalancing board Q. Do the balancing board resistors cause the capacitors to drain faster?Q. How fast does a ultracapacitor drain on its own not connected to anything? 12v systemParasitic current draw of 0.03Amps58.33fStarting voltage 14.4vMinimum voltage 11.5 <Q> Let's look at a simple analysis first. <S> The basic equation relating current and voltage is $$\frac{dV}{dt} = <S> \frac{i}{C} <S> $$ where i is in amps and <S> C is in farads. <S> For a current of .03 amps and 58.33 farads $$\frac{dV}{dt} = 5.14 x 10^{-4} $$ <S> so in one hour $$\Delta V = 1.85\text{ volts}$$ Since 14.4 minus 11.5 equals 2.9 volts, your ultra caps will last about $$\Delta t <S> = \frac{2.9}{1.85} = 1.57\text{ hours}$$ <S> This is so short a period that you simply don't need to worry about self-discharge currents. <S> EDIT - Along the same lines, you need to take a look at the load on a car battery. <S> The big-ticket item is starting. <S> Starting loads are typically 100 to 200 amps. <S> For a current of 100 amps (and this is best-case, remember. <S> Starting in cold temperatures takes rather more.) <S> we find $$\frac{dV}{dt} = <S> 1.71 $$ and for a 2.9 volt drop, $$\Delta t <S> = \frac{2.9}{1.71 <S> } = 1.69\text{ seconds}$$ For 200 amps, of course, the time is half that, or about 0.85 seconds. <S> So you might want to reconsider using caps (ultra or otherwise) for a car battery replacement. <S> Also, just for fun, you need to check the spec sheet for the maximum current which can be drawn from an ultracap without damaging it. <A> You will need to carefully study what the ESR is for these ultra capacitors. <S> Some of these types of capacitors may have an ESR that is higher than a standard lead acid battery making them less than suitable for providing high amperage currents for running a starter. <S> Other manufacturers make ultra capacitor types that are specifically designed for providing starting assist. <A> A capacitor voltage drops quickly in the beginning of a discharge. <A> Car batteries are designed for the high currents that a starter requires. <S> We could be talking of 100A or even more. <S> But the calculations are straight-forward. <S> 6 <S> * 350F capacitors in series gives you a capacitance of 350F/6 <S> = 58F. 100A for a drop of 3V gives you a duration of 1.75s. <S> SO that better be a very fast starter, <S> if you give it twice the drop or half the current that's 3.5s. <S> 30mA drain (which is 100 times higher than the self-discharge current for these size capacitors) for a drop of 3V would be 97 minutes.
| A battery holds up its voltage during a discharge until it is nearly dead.
|
References or guidelines for PCB connectors Are there references or guidelines to establishing which pins is recommended to use for the power, which for the ground, which for the analog signals, etc. on the various poles of the PCB connectors? For example, in a board to board connector where is recommended to place the gnd? on one ends near the pins of Vcc or is better to separate vcc and gnd by placing it each other at the two ends. Or again, where is it better to place a pin for analog signals? Maybe between two pins of gnd? <Q> No, there are no general guidelines that cover all the 1000s of kinds of PCB connectors. <S> For specific types of connectors, there may be very strict requirements. <S> ( image source ) <A> Besides from standards' required specifics, on some connectors you might have some function specific pins, such as bigger pins dedicated to power, like this connector from samtec: ( image source ) <S> But we are stating the obvious here. <S> You may also have longer or shorter pins for hot-plug connectors, where you want to be sure to connect something before or after something else is connected. <S> Such as the one that worried this SE user: https://superuser.com/questions/1030382/broken-connectors-pins-on-graphics-card . <S> This can also be seen in board to board connectors. <S> See also this example from a maxim appnote: https://www.maximintegrated.com/en/app-notes/index.mvp/id/4705 . <S> Generally, you wouldn't want to mix and put close together analog signals and high speed digital signals, because the noise produced by the digital signals can be coupled to the analog pins and generate noise in the analog part of your board. <A> In general, connector layout follows the same principles as PCB track layout. <S> You want to...1) Minimize current loop area by examining where current flows forth and back and route those conductor pairs as close as possible to each other. <S> 2) Maximize separation for different current loops. <S> It‘s not only galvanic isolation (common signal path), but also capacitive and inductive coupling that is reduced by maximum separation. <S> To sum it up: Identify all current loops, then minimize and separate them.
| For example, if you have a USB connector, it's very definitely required to connect the pins according to the USB standard:
|
How critical is PCB layout for USB Full-Speed? I have designed a custom USB hub PCB with a TI TUSB2046(USB Full-Spped hub). Considering 12Mbps data rate, how critical are the layout constraints for the USB data lines? I did not follow the exact layout guidelines (had a short stub, slight length mismatch etc, did not use a differential impedance calculator). The hub gets enumerated on the host PC, but the downstream devices don't. Could the PCB layout have anything to do with this? EDIT: I have attached the schematic. EDIT: I have attached the Device manager screenshot. Please enlighten, thanks. <Q> It is more critical than the layout for a 400 kHz I2C bus, but not as critical as a 6 Gb/s SATA bus. <S> It is possible that you have layout issues that are preventing the downstream devices from enumerating. <S> These "issues" might include, but not be limited to, proper layout of high speed signal paths. <S> You might also have a problem with power distribution or bypassing. <S> Maybe you installed the wrong resistor somewhere. <S> Perhaps you have a bad solder joint on a connector. <S> You might want to try asking a more specific question and providing much more information if you need more detailed advice. <A> Page 18 of the TUSB2046 datasheet says in section 11.1.3 that "The thermal pad of the TUSB2046x and any of the voltage regulators should be connected to this plane with vias. <S> " Based on your layout, it looks like the thermal pad is only connected to the GND plane through a few relatively thin traces. <S> I suspect that this is part of your problem. <A> Its quite old thread but will add my two cents. <S> I have been designing several USB devices and haven't had any problems just by applying these easy to understand rules made by Intel. <S> My personal experience is that is good to try comply with most of the requirements or you will be surprised at the latest in EMI testing... <S> At least check them out. <S> (Sorry didn't find original sources): <S> High Speed USB Platform DesignGuidelines http://apachetechnology.in/KC/Multimedia/PCI/hs_usb_pdg_r1_0.pdf <S> EMI Design Guidelinesfor USB Components https://www.ti.com/sc/docs/apps/msp/intrface/usb/emitest.pdf Good luck!
| The PCB layout for USB Full-Speed is somewhat critical.
|
What do the product and sum symbols mean in digital systems? I have some questions in a professor's material and in that questions there are the mathematical symbols for product and sum receiving numbers as parameters as following: ∑(0,3,4,6) =∏(1,2,5,7). The question ask me to prove that for circuit with three inputs ∑(0,3,4,6) =∏(1,2,5,7). This is not clear to me. <Q> \$∑\$ stands for SoP or Sum of Products. <S> The 1's in a truth-table. <S> The 0's in a truth table. <S> To illustrate the process: \$∑(0,1,4,7) = ∏(2,3,5,6)\$ . <S> SoP (Minterms) $$∑(0,1,4,7) <S> = <S> \overline <S> A \overline <S> B <S> \overline <S> C <S> + \overline <S> A \overline B C + A <S> \overline <S> B <S> \overline C + ABC$$ <S> Simplify: <S> $$∑(0,1,4,7) = <S> \overline <S> A \overline <S> B <S> + \overline <S> B \overline <S> C + ABC$$ <S> PoS (Maxterms) $$∏(2,3,5,6) = <S> (A <S> + \overline <S> B + C)\ ( <S> A <S> + \overline <S> B <S> + <S> \overline C)\ (\overline <S> A + B <S> + <S> \overline C)\ (\overline <S> A <S> + \overline <S> B + C)$$ <S> Multiply it out: $$(AA + <S> A <S> \overline B + AC + A <S> \overline <S> B <S> + \overline <S> B \overline <S> B <S> + \overline B C + A \overline C <S> + \overline <S> B \overline <S> C <S> + \overline C C) <S> \ <S> (\overline A + B <S> + <S> \overline C)\ (\overline <S> A <S> + \overline <S> B + C)$$ <S> Simplify: <S> $$(A <S> + <S> \overline B)\ (\overline <S> A + B <S> + <S> \overline C)\ (\overline <S> A <S> + \overline <S> B + C)$$ <S> Multiply it out: <S> $$ <S> (A <S> \overline A + A B + A <S> \overline C <S> + \overline <S> A \overline <S> B <S> + \overline <S> B B <S> + \overline <S> B \overline C)\ (\overline <S> A <S> + \overline <S> B + C)$$ <S> Simplify: <S> $$ <S> (A B + A <S> \overline C <S> + \overline <S> A \overline <S> B <S> + \overline <S> B \overline C)\ (\overline <S> A <S> + \overline <S> B + C)$$ <S> Multiply it out: $$\overline <S> A A B <S> + \overline <S> A A \overline <S> C <S> + \overline <S> A\ <S> \overline <S> A <S> \overline <S> B <S> + \overline <S> A \overline <S> B <S> \overline C + A B <S> \overline <S> B + A <S> \overline B \overline C <S> + \overline <S> A \overline <S> B <S> \overline <S> B <S> + \overline <S> B <S> \overline <S> B <S> \overline C + A B C + A \overline C C <S> + <S> \overline A \overline <S> B C <S> + <S> \overline <S> B <S> \overline <S> C C$$ Simplify: $$ <S> \overline A \overline <S> B <S> + \overline <S> B \overline <S> C + ABC$$ $$∑(0,1,4,7) <S> = <S> \overline <S> A \overline <S> B <S> + \overline <S> B \overline <S> C + ABC$$ <S> $$∏(2,3,5,6) <S> = <S> \overline <S> A \overline <S> B <S> + \overline <S> B <S> \overline C + ABC$$ <S> So \$∑(0,1,4,7) = ∏(2,3,5,6)\$ . <S> By a similar process you can show \$∑(0,3,4,6) <S> = ∏(1,2,5,7)\$ . <A> In Boolean algebra, "product" is normally equivalent to AND, and "sum" is equivalent to OR. <S> But I'm still not sure how to interpret the question. <S> Obviously, the two lists are complements of each other (when combined, you get 0, 1, 2, 3, 4, 5, 6, 7 without any duplicates, representing all of the possible states of three Boolean variables), but I don't see how that relates to <S> AND and OR. <A> The Sigma (capital E looking) signifies a sum , and the pi (i think?) is the product. <S> The SUM is like an add symbol - it provides an OR case. <S> So the ∑(0,3,4,6) means that the output of that circuit is 1 when either 0 OR 3 OR 4 OR 6 are active. <S> So if only 6 was active, the output would be (0+0 <S> +0 <S> +1) making the output 1, so it works. <S> The Product is like a multiplication, and the same case as an AND gate. <S> So for ∏(1,2,5,7), the circuit would turn on when all of those are activated, i.e. (1 x 1 x 1 x 1 is the only combination that would activate the circuit). <S> You must use this logic to make a circuit that fulfills the question. <S> All the while, bearing in mind that the 0 to 7 are decimal equivalents of the binary representation of your 3 switches - and this makes sense. <S> 3 input means a total number of 2^3 = 8 combinations - <S> e.g. <S> 000,001,010,011 and so forth. <S> I guess the question asks to use the logical axioms you know of <S> (should have been taught! <S> there are many important ones) and describe how the circuit that ORs the 0,3,4,6 is the same outputs as one that ANDs <S> 1,2,4,7. <S> Think about shortening it into logical steps that enable you to simplify the equations and make the other one. <S> The question you have been given is basically a proof question - go from one to the other.
| \$∏\$ stands for PoS or Product of Sums.
|
Clamping negative voltage on comparator input (LM393) I need to compare a AC voltage against a reference voltage. I'm only interested in the positive part of the cycle so I need to clamp the negative part of the cycle to protect the comparator input. I need some degree of precision so I'd prefer not putting a diode in series with the AC signal. The first thing that comes to mind is a simple diode clamp: This will clamp the input to approximately -0.65V. However, the LM393 datasheet says -0.3V is lowest voltage allowed on a input, stating in the notes that going any lower may cause the output to behave erratically due to parasitic action: 1) Is there a simple, common way to solve this problem? 2) I've seen the above solution with a simple clamp diode used in commercial devices. Does this mean the problem is not as bad in reality and the datasheet is just overly protective or the commercial product was just poor design ? <Q> You could use a Schottky diode, at the currents you're running it should stay in the 0.3V range. <S> Alternatively (or additionally) you could put a resistor from the positive input to ground, creating a divider that will keep the input in the recommended range. <S> This will also reduce the voltage seen on the positive half of the wave, so you may want to modify your REF accordingly. <A> You can use a Schottky diode. <S> There is a lot of leakage, especially at high temperatures, with a Schottky so calculate that. <S> As mentioned in 2. <S> note that the forward voltage drop of the Schottky will go down as the susceptibility of the input goes down at high temperatures, so the -300mV is conservative. <S> If you divide the input by, say, 2.5:1 <S> then you'll have no less than -0.26V at the input. <S> Note that the voltage drops will track with temperature and their -0.3V limit <S> applies over the temperature range <S> , so it's a bit conservative. <S> Of course you would alter the reference voltage by a suitable factor. <S> This will have some effect on the response time of the comparator and noise immunity. <S> Less general, but applicable to your specific case, perhaps, you could use a BJT as follows: simulate this circuit – <S> Schematic created using CircuitLab <S> The transistor part number shown has a relatively high Vbe breakdown and gain. <S> An ordinary NPN BJT could be used but the input must never exceed Vref + 5V for most types (including when Vref = 0). <A> You could use a precision rectifier circuit (OpAmp + Diode) in half wave rectifier configuration. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> I overlooked the obvious and realized one could clamp from the other direction with a zener diode. <S> For example, if VCC is 12V and one clamps to VCC with a 10V zener then the comparator's input voltage would never drop below 2V. <S> The reference voltage to compare against is above 2V <S> so it does not interfere.
| You could use an ordinary diode as you have shown but add a resistor from the non-inverting input to ground.
|
54V 5A DC thru "regular" coax "TV" cable for use as a "poor man's" solar power cable? In the effort of saving money without having to buy expensive solar cables (and because I have a lot of extra coax cable lying around doing nothing), I would like to use a piece of coax cable (that looks like antenna cable), to transfer 54V and up to 5A of solar power into the house. The length would be no more than about 20 feet and can be made even shorter. This is a very small solar application to charge a small 48V battery bank. If I do not know the type of cable (such as RG-6) so that I cannot just look up the specs on it, generally speaking, is it fairly safe to assume just about ANY piece of coax normally used for cable TV or antennas can handle 54V and 5A? I think it is reasonable. Note that I would not use the end "F" connectors, I would use stripped ends to attach to the solar panel cables and somehow weatherproof them, and on the charger (indoor) side, also stripped ends. I should mention that the near 5A flow would only be in certain conditions (like when the battery bank is in a mid state of charge and there is full sun directly over the panels). I would say on average, the current flow should be more like 2.5A to 3A. <Q> Your voltage is high enough that the electrical codes require you to use mains type power cable. <S> This is made in mass quantity, and so, is cheap. <S> However there is no need for silly "solar wire". <S> They already make mains rated electrical wire for use outside. <S> 14 AWG outdoor rated cable such as UF-B should suffice. <S> Do not use NM. <S> You can also use common THWN-2 individual wires in Conduit, either EMT or outdoor rated electrical PVC. <S> The PVC conduit will start to degrade from UV and turn white after a year or two in the sun. <S> At that point, give it a quickie swiff sand, and paint it with Rustoleum white metal primer then a topcoat of your choice. <S> If you want to give yourself headroom for future expansion, use 12 AWG or 10 AWG. <A> Almost any coax or video cable center core would be able to carry 5A. RG6 for example has an 18 AWG core, capable easily of in excess of 5A as a single cable. <S> See the AWG current carrying chart here . <S> Notice in the chart that an 18AWG wire could carry up to 9.5A ... <S> BUT.... you must realize that any temperature increase in the coax would be bad. <S> The core is NOT protected by the normal PVC coating (good to over 100 degC), but using a soft low loss material. <S> This is not as good at high temperatures and would deform easily. <S> This would have a much greater current rating. <S> I would suggest the outer shield could probably carry 10-15A without any problems. <S> You could even connect the center core and the shield together and use as a single conductor ... <S> this would easily meet your needs with two cables. <S> Update: There's a lot of misinformation in the comments specifically about RG6 and RG59 <S> Here is a link to a reasonable supplier of cable comparing the two. <S> Notice that both have relatively heavy shields, easily capable of the current requirement. <S> Here is a link to a short form datasheet for RG59, RG6 and RG11 <S> The screen is copper and looking at the Ohm/km it is easily classified at around 14-16AWG current capability for both RG59 and RG6. <A> look at any 5A lighting cable. <S> Check the voltage from the solar panels <S> (I think the ones I have are around 70V) - it will probably be well within the insulation rating of standard mains cable (120V or 240V). <S> Choose main cable that gives a margin of error, say 20%, over the rated maximum current output from the solar panels, rather than one giving the exact rating. <S> You want cable that loses least due to resistance as well, so consider that higher-rated cable most probably has a lower end-to-end resistance for a given length, and hence will be more efficient. <S> Ensure that contacts at each end are low-resistance, too. <S> I strongly suggest you consult either with a local qualified electrical tradesman, or at least check websites about wiring and safety - which includes fire risks. <S> eg for UK standards: https://www.diydoctor.org.uk/projects/cablesizes.htm <A> No, you can "not" assume that any "random" coaxial cable can "reliably" carry 5A. Determine what kind of cable you have, then look up its specifications. <A> Most coax has a type or part number laser-markes onto the outer jacket at periodic intervals. <S> If not, measure the diameter of the inner conductor and convert to an equivalent AWG. <S> You could also pass 5A through a sample piece in an environment representative of your worst-case thermal situation (e.g. when it's going through a thermally insulating feedthrough) for ~30 mins and see if there's an appreciable temperature rise. <A> I think the 1/4 inch (or so) coax cables (RG59, RG6 etc.) would have too small a center conductor to safely carry 5 <S> Amp, The 0.4 inch cables (RG8 or RG11) should be OK for 5 Amp. <A> Keep in mind that you could have excessive voltage drop, especially in the center conductor. <S> There is usually a very thin layer of copper (less than .002" thick) over the high-resistance steel core . <S> Buy the 20' of cheap UF cable as suggested. <A> Assuming there is no marking, the best way to know if it can carry 5A is to look at the wire thickness. <S> Ideally measure it with a vernier caliper. <S> If it's thick enough to require some strength to bend it with your fingers (after isolation removal) and it doesn't look like a tiny telephone wire or an ethernet cable, and if it's single strand (monolithic), then it's probably good for 5A.It's very important that the cable be monolithic. <S> If it's not, forget about it. <S> Please note that using coaxial cable, you will need two cables: One for positive, the other for negative. <S> You can't use the external armour as a conductor. <S> So you will use 40 feet instead of 20. <S> It may be more convenient to buy a normal double cable and save work and fixture and improve aesthetic on top of improving safety. <S> Another consideration is length. <S> How much amperes a cable can cary also depends on length. <S> You cannot test over 3 feet if you are going to use 20. <S> The same cable won't heat with 3 feet yet may heat with 10 feet. <S> The impact of length is exponential, it means it increases very quickly. <S> 20 feet is still a fairly short distance to assume that the risk is minimal with a solid coax cable. <S> But I would not venture over longer distances.
| I'd suggest if you are using the coax just because you have it readily at hand, you could use two coax runs and just use the outer shield as the conductor. Despite the "try it" suggestion above, I would say do not use coax cable for carrying 5A. The outer braid and centre conductor are optimised for carrying RF signals on the outer surfaces of the wire strands, and the strands are too thin to support that kind of current, even if the centre one looks thick:
|
How to get +6V and -6V out of 12V PSU I am designing a guitar pedal using OpAmps, and i need to feed them with +6V and -6V (beucase the musical signal is senoidal centered in 0V). I need to use a 12V DC PSU for the pedal, and i need to convert to positive and negative voltage. If possible it would be better if it was +12V and -12V but if its not possible i can work with +-6V. I also need this to be reasonably simple and cheap.Thanks! <Q> Ground is an illusion. <S> We choose a node and decide we're going to call it 0V, and give it the magical name ground. <S> If you create a reference of 6V from your 12V supply, and call it ground, your 12V supply just became +/-6V. <S> Of course, ground is also assumed to be low impedance, so you'll have trouble if you create it using a 100K voltage divider and then try to use it as a current return. <S> Because of that, we generally call it Vref, and thus remember to take into account its current limitations relative to the supply. <S> If there's a DC offset between Vref and your I/ <S> O, capacitors will resolve it nicely. <A> I'm assuming you mean <S> +/- <S> 6 V from the body of your question, rather than +/- <S> 5 V from the title. <S> There are a number of ways to achieve this, depending on both your budget, and power budget. <S> You probably don't need a huge amount of power for this application, so the easiest route is probably TI's TLE2426 rail splitter IC. <S> A second option is something like the following, the Virtual Ground node isn't really 0 V, it's +6 above the GND node, but you treat it as your 'virtual ground' and <S> the actual ground node becomes -6 <S> V. simulate this circuit – <S> Schematic created using CircuitLab <S> If you need to sink and source more current than the opamp can supply you can add a buffer (such as TI's BUF 634) which is an expensive option, or put a push pull stage within the feedback loop. <S> You could also AC couple and bias your signal to <S> +6 <S> V <S> so you don't need to worry about the negative supply. <A> My go-to is the TMA0512D, which will give you +/-12V from a 5V DC supply (ie USB). <S> They do a bunch of different input and output spec versions. <S> They're isolated, but connecting input ground to output ground is perfectly acceptable. <S> They're also quite noisy, so you'll have to do some filtering to the power rails.
| If you're feeling really lazy (and can afford ~5USD a board), Tracopower (and competitors) make DC-DC converters which will do this.
|
How to turn on high-side MOSFET of a buck converter I'm trying to simulate some buck converters with real MOSFETs instead of ideal switches. The problem is that I don't know exactly how to properly turn on the transistor. The simple buck converter would be simulate this circuit – Schematic created using CircuitLab Theory says that the MOSFET should enter the triode region when $$v_{DS} < v_{GS} - V_{t}$$ but this seems complicate to use because how could we determine the voltage between the transistor and the inductor in a real situation?. So this solution came to my mind: $$v_{DS} < v_{GS} - V_{t} \Rightarrow v_{GD} > V_t$$ So my questions are: Is that correct? Then sould I apply \$(9+V_t)\$ to the gate to turn it on properly? Is there any other way to make this? Maybe with a lower voltage on the gate? <Q> However, if you used a P channel device with source connected to incoming supply, the gate being pulled down to 0 volts will turn the P channel MOSFET on. <S> Clearly your input supply voltage needs to have a minimum value to ensure the source-gate voltage for the P channel device <S> is sufficient for decent MOSFET activation. <A> If your output voltage is higher than your gate threshold, you can use a boost cap between the transistor source and gate. <S> You'll have to put some resistance between the gate drive and the gate, the RC constant will depend on your switching speed. <S> When the FET is off, the source voltage is zero <S> and it's easy to turn on; once you switch the transistor on, the source-gate cap pulls the gate even higher to improve efficiency. <A> To switch an N-channel FET on you need to pull the gate up to a voltage significantly higher than the input there are a few options here <S> If you are only simulating then you can put your gate drive circuit between the gate and the source of the transistor. <S> This may not be practical in the real world. <S> Use a high side driver IC. <S> These work by charging a capacitor from the supply when the source of the transistor is 0V. <S> This occurs when the diode is conducting. <S> These can be difficult, if not impossible to start if for example charging batteries as the initial voltage at the source of the FET <S> is positive and not 0V. <S> With a suitable resistive load however (as shown) it should be OK. <S> Use a gate drive transformer . <S> Use a P-Channel FET instead, as suggested by Andy, the source is now connected to the supply and you pull the gate low to turn it on. <S> P-Channel FETs tend to be more expensive than N-channel FETs and few are available at higher powers.
| If you are using an N channel device as shown in your diagram then yes, to fully turn on the device you need to have a gate voltage that is several volts higher than your incoming supply voltage.
|
Is an ethernet switch considered as an ASIC? I work as an electronic reliability engineer. In order to estimate the reliability of integrated circuits, I need to know their type. Thus my question. Is this ethernet switch Marvell Link Street-88E6341 considered an ASIC, or it is simply a digital IC? EDIT : It appears that this IC is more like an ASSP. Here is the définition of an ASSP from wikipedia https://en.wikipedia.org/wiki/Application-specific_integrated_circuit An application specific standard product or ASSP is an integrated circuit that implements a specific function that appeals to a wide market. As opposed to ASICs that combine a collection of functions and are designed by or for one customer, ASSPs are available as off-the-shelf components. ASSPs are used in all industries, from automotive to communications.[citation needed] As a general rule, if you can find a design in a data book, then it is probably not an ASIC, but there are some exceptions. For example, two ICs that might or might not be considered ASICs are a controller chip for a PC and a chip for a modem. Both of these examples are specific to an application (which is typical of an ASIC) but are sold to many different system vendors (which is typical of standard parts). ASICs such as these are sometimes called Application-Specific Standard Products (ASSPs). Examples of ASSPs are encoding/decoding chip, standalone USB interface chip, etc. IEEE used to publish an ASSP magazine,[2] which was renamed to IEEE Signal Processing Magazine in 1990. <Q> ASIC means 'Application Specific IC', and <S> that device is very application specific. <S> If you want to build a 4 port Ethernet switch with it, it will do it, and only that. <S> So yes, you need to use the 'ASIC' column for the MTBF figures from your reliability tables. <S> The fact that such figures are next to meaningless for each individual case is irrelevant for what you need to do. <S> As a reliability bean-counter (bean-counter, perjorative term for accountant who does not need to understand what goes on underneath the figures), you only need to show that you have added up the correct numbers in the correct way. <S> The term 'ASIC' covers such a range of complexities, technologies and use-cases, the only realistic measure is whether the manufacturer can sell them successfully. <S> If he can, it means they don't fall over too often. <S> That means an asic intended for engine compartment use in a car is likely to be a lot more reliable than one intended for room temperature use in a cheap consumer item, and strangely enough, a lot more reliable than military use ones as well. <A> The chip you are referring to includes Gigabit PHYs and TCAMs etc. <S> So it has much more than what someone would loosely term as a "digital IC". <S> So this should fall under the ASIC category in my opinion. <A> Marvell Technology Group Ltd. (MRVL) Moves Lower on Volume Spike for September 10 : <S> Marvell Technology Group Ltd and its subsidiaries is a fabless semiconductor provider of application-specific standard products . <S> The company's product portfolio includes devices for storage, networking and connectivity. <S> Profile: <S> Marvell Technology Group Ltd (MRVL.O) : Marvell Technology Group Ltd., incorporated on January 11, 1995, is a semiconductor provider of application-specific standard products . <S> The Company is engaged in the design, development and sale of integrated circuits. <S> The Company develops System-on-a-Chip (SoC) devices. <S> It also develops integrated hardware platforms along with software that incorporates digital computing technologies designed and configured to provide an optimized computing solution. <S> Its product portfolio includes devices for storage, networking and connectivity. <S> In storage, it is engaged in data storage controller solutions spanning consumer, mobile, desktop and enterprise markets. <S> Its storage solutions enable customers to engineer products for hard disk drives and solid state drives. <S> Its networking products address end markets in cloud, enterprise, small and medium business and service provider networks. <S> Its connectivity products address end markets in consumer, enterprise, desktop, service provider networks and automotive. <S> Its storage, networking and connectivity products power networks and data centers around the world. <S> Application-Specific Standard Product (ASSP) : <S> An application-specific standard product (ASSP) is an integrated circuit (IC) dedicated to a specific application market and sold to more than one user. <S> A type of embedded programmable logic, ASSPs combine digital, mixed-signal and analog products. <S> When sold to a single user, Gartner defines such ICs as “application-specific integrated circuits” An ASIC sold to multiple customers.
| Historically they'd be referred to as Application-Specific Standard Products (ASSPs).
|
Am I exceeding current limits for the USB port? This USB 2.0 hub gets the power from one this PC 's one of USB port. The hub is connected to six of this USB DAQ devices. The hub both communicates and powers the six DAQ boards.The power for the DAQ is given as: I have read here that max current cen be drawn from a USB 2.0 port is 500mA and for USB 3.0 port is 900mA. In my case it seems the current needed for six DAQ is 230 * 6 = 1.5A. Does that mean I'm exceeding limits for the PC's USB port?? <Q> You definitely exceed the current limit. <S> Further more the standard says 500mA and 900mA, but you can not count on these values. <S> A lot of USB ports provide far less current than that (except of course those that are designated chargers) and will shut of if you load them to even half of the value. <A> I recommend to add external power supply. <S> Edit : <S> Seems like hub had external power supply so good to go. <A> The USB 2.0 standard requires that each port can supply 100mA and puts a maximum value of 500mA on a port. <S> Enumeration is the process by which a device connects to a host. <S> Part of this is requesting the current the device requires up to 500mA. <S> A device should not draw more than 100mA until it has requested it and the request has been accepted. <S> For this reason unpowered hubs are usually limited to 4 ports or less: 100mA per device plus up to 100mA to run the hub. <S> So yes you are asking more current than the host port on your PC <S> is guaranteed to be capable of. <S> Dedicated chargers are an exception and may provide more, for example the charger for my mp3 player will provide 1.5A max.
| When I device connects it must draw 100mA or less until it has enumerated. Yes, you are definitely trying to draw too much current from USB 2.0 port if you add more than one of those devices in one port.. Powered hubs usually provide 500mA a port and may have more than 4 ports as a result.
|
What is the "maximum power" of an antenna? I was reading the datasheet of an antenna and I came across the parameter "Max. Power (total)", measured in Watts. What does this stand for? Can it be measured to check that the datasheet is right? <Q> It actually stands for the maximum power that you can push through this antenna. <S> This typically has three reasons: <S> When designing the antenna, there's some point at which the electrical field is maximal. <S> You have to be sure that the electrical field still doesn't lead to dielectric breakdown (or excessive nonlinearities) <S> Safety: Power - <S> > <S> voltage -> safe to operate in the specified environment (electrocution risk); also: power - <S> > power density -> safe to operate (hurting people in the main beam); this is usually more of a system than an antenna aspect. <S> Heat: No real-world antenna is 100% efficient. <S> The remainder of energy is converted to heat, which increases antenna temperature, which might change or damage the antenna. <S> So, to evaluate these, you'd need to have a pretty detailed simulation of the antenna; typically, you'd want to actually test maximum power, not only simulate it, which will inevitably risk damaging the antenna you have. <A> When connected to a transmitter, this (or any) antenna is designed to handle transmitter power levels up to this specified limit without degrading performance or posing a safety hazard. <S> There is no easy way for you to test this manufacturer's rating without destroying the antenna or risking harm. <A> If the transmitter ends up pumping more power than the stated maximum into the antenna, the losses in the antenna will overcome its heat dissipation capability and things will start to overheat/melt. <S> Note that it's specified at a particular ambient temperature, because running the antenna in a hotter environment will compromise its cooling, so it won't be able to take as much power. <S> Why do you suspect the datasheet is not right? <S> Do you think it's underestimating the capabilities of the antenna? <S> Or that it's overestimating it and the antenna will melt way sooner than at the rated power? <S> Either way, the only way to check experimentally is to take a transmitter, make it feed the rated power into the antenna, and see whether things melt. <S> Note that you will probably destroy an (expensive!) <S> transmitter this way if the antenna fails.
| It's just the maximum transmit power the antenna is designed to handle.
|
Photodiode almost no mV at analog port So I have bought a photodiode , which I intend to hook up to the analog port of my Arduino, so that I can measure differences in the light that the photodiode picks up. I realized, that when I don't ground the photodiode, I get a lot of mV spanning from 2600mV to 5400mV when I measure with my multimeter - Obviously, however, I cant supply my analog ports with 5.4v or possibly more, as I would destroy the Arduino. I then tried to ground my anode with the output just before the resistor as follows: simulate this circuit – Schematic created using CircuitLab Unfortunately now, I get close to nothing with a 10kΩ resistor. even with 40kΩ, the output is nothing to brag about - I would at least expect something in 1000mV range, but I barely get 200mV. What's going on here - Am I doing anything wrong? <Q> You have a datasheet that references two different versions with different responses, nevertheless back of envelope calculations are... <S> Your photodiode (datasheet references two) has a 6.3uA or 13uA typical Isc at 100Lux. <S> 6.3uA*40K= 252mV, <S> 13uA*40K=520mV. <S> So no major surprise there... <S> This doesn't take into account your light source spectrum which will modify these values (see the spectral response curve). <S> If you want higher voltages, you will need some amplification (plenty of info on "photodiode amplifier") to get you started. <A> A specification for accuracy is missing. <S> Leakage current of the photodiode is probably less than that of Arduino, but also impacts low-light accuracy. <S> Leakage currents are affected greatly by temperature. <S> If you're using analog-to-digital converter, increase the current-sensing resistor to a large value to improve sensitivity, but be aware that large value resistors, while fairly temperature-stable themselves, make temperature-variable leakage currents impact accuracy to a greater degree. <S> If you're only interested in light level changes , then to a first approximation you can calibrate out the offsets caused by leakage by taking a zero-light reference reading as a stored reference, and measure light-level changes from that point. <S> A change in temperature might require a new reference reading. <S> Consider too the maximum light level you anticipate. <S> This will set the maximum value of current sense resistor...as the voltage across the resistor approaches +5V, the diode's voltage decreases - your detected voltage is no longer proportional to light intensity. <S> A requirement for very wide-range detection (both low-light and high-light situations) might suggest switching in various values of current sense resistors. <S> An extra I/O pin can be programmed for a logic low, or else a high-impedance state where its attached resistor is disconnected. <S> But now leakage is from two I/ <S> O pins : simulate this circuit – Schematic created using CircuitLab <S> In this circuit, high-sensitivity is achieved by programming the I/O pin to be high-impedance, so that R2 (100k) is not connected. <S> R1 (10Meg ohm) is the active current-sense resistor. <S> However the leakage current of the R2 <S> I/ <S> O pin still impacts accuracy. <S> To decrease sensitivity in high-light situations, the I/ <S> O pin is set to be active logic low. <S> Now you have 10Meg in parallel with 100K as the current-sense resistor. <A> As pointed out in another answer, the configuration you have will saturate (no voltage across the diode) and cause non-linearity at full scale. <S> You don't describe your application at all (light value range) <S> so it's hard to divine an answer. <S> For example, Let's assume you are going to be sensing in the range of 1-10k Lux <S> (See here for ranges/scenarios). <S> At maximum Lux level you'd expect the S1223 to pass about 6.3mA at full scale. <S> You want that full scale to be either 5V or 3.3V depending on the Arduino you are using. <S> You need to be able to adjust your full scale setting (calibration) but are limited to the resolution of the A/D for the low end of the scale (about 6uA/LSB). <S> You also here run into leakage currents for the A/D input that may dominate a reading on the very low end. <S> You also need to ensure that there is a reasonable voltage across the photo diode to prevent no-linearity, so driving the diode from the same supply as your MCU is not going to work well. <S> Assuming you are driving the Arduino from Vin and not from the MCU VCC level, you could do the following: simulate this circuit – Schematic created using CircuitLab <S> Assuming a 5V Arduino and a Vin of 9V or greater, the above will ensure that you don't exceed the A/D voltage yet always have at least 4V across the photo diode. <A> This is pretty basic. <S> Your DMM is 10 MΩ input which shunts the low current into a higher voltage instead of 10 kΩ. Since 10 MΩ is 1k bigger than 10 kΩ, so is the voltage yet the same power P = VI. <S> Depending on your experiment and desired dynamic range of voltage, change the value of R1 to obtain the desired conversion of PD from I to V. <S> (conversion factor is just Ohm's Law V=IR). <S> Perhaps 100k to 1M is more suitable. <S> Panasonic makes an inexpensive 5mm radial "Light sensor" that compresses the range with a log scale so >4 decades of light input from near dark to bright sun gives an output to 5V output with a selected R-value to choose your optimum input light range. <S> The sensitivity, S for Silicon, is 0.6 A/W <S> at λ=λp with a declining sensitivity from IR towards blue. <S> This is the same as 0.6 uA/uW. <S> The output current depends on the surface area of ~ <S> 5 x 5 mm like a tiny PV power source. <S> Consider 1uA times R1 = <S> 1Mohm <S> * 1uA <S> = 1V output. <S> This simply uses the shunt resistor to convert the photon microamps * R = microvolts. <S> For overvoltage protection, the analog inputs are usually ESD protected with Diodes but limited to 5mA or so RMS so in bright sunlight at 100 klux, you might expect a short circuit current of 13 uA/100 lux * 100 klux <S> = 13 mA. <S> To prevent this from flowing into the internal Analog port, they use an ESD-protection shunt diode to Vdd, but it is rated for only 5mA steady or so. <S> You can solve this in many ways to prevent Vin > 5V by PD cathode voltage drops (0.7V) from 5V or add an input series R to the Analog port from 1M shunt to 10k series. <S> "Shunt" means parallel or bypass. <S> Can you figure out my suggestions?
| As others have pointed out, leakage current of your Arduino input pin likely limits the accuracy, especially for low-light measurements.
|
Is it true that on a modern processor, parallelism is possible on a single core? Final Edit : I just realized that when use the word "parallelism", it's almost parallelism==ILP , I originally thought even a single instruction could be divided into several phrases, and at that level there would be some parallelism, but then I realized this has no meaning. Both my title and my example didn't mentioned anything about more than one threads' parallelism as done by HyperThreading, so @user110971's is the correct answer, without doubt anymore. (In the philosophical level, I just need a base-case condition to return my recursiveness of finding the deepest part of parallelism) Edit3: I made a graph for my Edit2 , and I found this video on YouTube about HyperThreading useful. Edit2: In short, for my question I adopt the definitions on Wikipedia, and for the definition of the terms: Parallel: Two threads, run independently, at any physical instant. So one thread won't interrupt the other, at any instant. Concurrent: Two threads, run independently, interleavedly is allowed, i.e. not restricted to parallel, and one can interrupt the other. In short, for me and Wikipedia writers, Concurrent includes Parallel. Thanks. Edit: Just to be clear, for me parallelism means true parallelism, I add a "true" for it because people I talked to tend to think parallel==concurrent . (See my second link) Is it true that on modern processor, "true" parallelism is possible on a single core? I asked elsewhere but didn't get a confirming answer. What I want to know is e.g. whether at t=0, two instructions are fetched and executed. At the same physical instant. My question came from here : parallel computing is impossible on a (one-core) single processor, as only one computation can occur at any instant (during any single clock cycle). <Q> A superscalar processor can execute multiple instructions at the same time by using multiple execution units. <S> There are certain limitations depending on the architecture. <S> It is not true parallelism. <S> If you have to calculate $$A = B <S> + C,$$ $$D = <S> A + 3,$$ you cannot execute both instructions at the same time. <S> However you can execute $$A = B + C,$$ <S> $$D = <S> D + 3,$$ simultaneously by utilizing two ALUs. <S> So as an answer to your question, you can have a certain level of parallelism on a single core, as long as your instructions do not use the same hardware resources. <A> On some processors this is (sometimes) possible. <S> Since different instructions use different processor resources (ALU, floating point, load, store, etc), it's sometimes possible to parallelize some of them. <S> For example, see here for details on how that works on an Ivy Bridge (x86) CPU: https://dendibakh.github.io/blog/2018/03/21/port-contention <A> There are lots of different types of parallelism. <S> Instruction level parallelism is a feature of any superscalar processor. <S> Multiple instructions are in progress at any point in time. <S> However, those instructions are from the same thread of control. <S> Thread level parallelism within a single core is possible with hyperthreading -- two separate threads using different core resources at the same time. <S> One thread can use the integer ALU while another is executing a load or store. <S> Data level parallelism is also a type of parallelism. <S> SIMD units can execute the same instructions on multiple registers at the same time. <S> For instance, if you need to apply the same blur transformation to every pixel in an image, you might be able to do that 8 pixels in parallel, but within the same thread of control.
| It is indeed possible to have parallelism on a superscalar processor.
|
How does an IR LED turn on and how can I test to see if its not broken? I'm an electronics beginner. Does an IR LED turn on like how regular LEDs turn on or does it only turn on when you've assigned a specific code for it to transmit? The reason why I ask: I bought some IR LEDs (940NM). I'm just trying to get them to turn on and view them with my phone camera. Do I have to use an IR sensor or can i just apply some sort of voltage and it turns on? What is the easiest way of doing this? I'm using an Arduino. Here is a link of the LED i bought: https://www.amazon.ca/Gikfun-Infrared-Launch-Emission-Arduino/dp/B0154HHAKG/ref=sr_1_1_sspa?ie=UTF8&qid=1544379560&sr=8-1-spons&keywords=gikfun+ir+led&psc=1 <Q> An IR LED is a "regular LED". <S> It's a diode that emits light. <S> You hence use it like any other LED <S> : You get a datasheet that says how much forward current they are typically used with (e.g. 10 mA), what the forward voltage is (e.g. 1.6 V), and then you put them in series with a series resistor to your voltage source. <S> I'm not going to go into detail about series resistors here, because there's literally thousands of explanations and calculators for LED series resistors out there. <S> You might be confusing an IR LED with an actual IR transmitter integrated circuit, which contains an IR LED, but also other things like a digital packetizer, and a power supply. <S> But: if that's the case, we have no idea what IC you're talking about, so we couldn't answer that. <S> EDIT after you added a product page link : <S> This looks like LEDs. <S> So, this is just a plain IR LED. <S> By the way, amazon's not the place to buy electronic components. <S> You wouldn't buy car tires in a vegetable shop, either. <S> Go for one of the large electronic distributors, like Arrow or Digikey . <S> You'll notice that when you buy from professionals, components will come with datasheets that actually define what they do. <A> IR LED's themselves turn on the same way as other LED's. <S> But there are also IR LED transmit and receive modules which contain additional circuitry to encode and decode data. <S> Those LED's you linked to, however, appear to be simple LED's. <S> They should just turn on. <S> You can try a 5V supply with a 1k resistor in series. <S> Electrically, LED's are directional. <S> Current can only flow through them in one direction. <S> The positive supply should be connected to the longer lead of the LED. <S> But if in doubt, try it both ways just to be sure. <S> Note that a lot of cameras have IR filters specifically to block IR light from getting to the sensor <S> , so the camera may not see it unless it is very bright. <S> If 1k resistor does not show up, you can try a bit lower like 470 or <S> even 330 Ohms. <S> I probably would not go too much lower with a 5V supply for fear of damaging the LED. <S> It may also be a good idea to try several different cameras if you can. <S> Security cameras often do not have IR filters because they use IR light to provide something like night vision. <A> Just test it with a camera or a phone to see the IR
| Of course the IR led is turning on like a regular LED.
|
How the low inductance of short ground clip probes prevents interference? Below are photos of two scope probes with different ground clip lengths: I have read that the shorter ground is used to minimize the inductance of the probe ground lead. But what does that help for? What happens when the inductance of the ground lead is low? What kind of interference it prevents? <Q> It doesn't prevent interference . <S> It prevents ground lead impedance. <S> Simply imagine an inductor in series with your ground connection: that acts as a low-pass filter. <S> So, high-speed currents can't be grounded, and for these, your instrument seems to float . <A> I was invited to assist in debugging a switching regulator IC; problem was "two kinds of oscillation". <S> I asked what were the frequency of oscillation, and answer was 80 MHz. <S> I asked "how long is the scope ground lead" with answer being "The usual 6 or 8 inches". <S> I explained "The resonant frequency, of 200 nH (8") gnd-lead scope probe with 15 pF input capacity, is about 90 MHz. <S> " <S> Turns out the silicon designer had cranked out LDOs in his prior IC work, and had never needed to learn fast transient probing methods. <S> Here he got to learn about scope probe ringing. <S> The other form of oscillation/noise/weird-behavior involved jitter in the timing of entering and exiting discontinuous modes. <S> That involved very very slow decays of the regulated voltage and timing errors caused by thermal noise. <S> =================================== <S> What is the resonant frequency of the coiled springy Ground structure, pushed onto the Ground ferrule? <S> Ignore the possibility of poor contact, where the numerous turns scale up the inductance. <S> In other words, assume the path length is 1 cm of Center plus 1 cm of GROUND return, or 2 cm total or about 20 nH total. <S> This is a good assumption, because the formula for inductance is Constant * Length * (1 + log(length/wiresize)), causing the computed inductance to be a mostly linear function of length. <S> What is the resonant frequency of 20nH and 15pF?I use (F_MHZ)^2 = <S> = <S> 25,330 / <S> ( <S> L_uH * C_pf) <S> where 1 uH and 1 pF = <S> > F_MHz = sqrt(25,330 <S> ) = 160 MHz <S> We have 0.02 uH and 15 pF, with product of 0.3. <S> Divide that into 25,330, with quotient of 75,000. <S> The squareroot is about 280 MHz. <S> How about improving that ringing? <S> Can we dampen? <S> Yes. <S> Add an external discrete resistor at the probe tip. <S> Value?Go for Q=1, thus Xl = <S> Xc = R.Xc of 15 pF at 280 MHz, given 1 pF <S> at 1 GHz is -j160 ohms, is 160/15 * 1,000 MHz/280 MHz or approx. <S> 30 ohms. <S> What does this do to the probe behavior at high frequency? <S> The Trise will be approx. <S> 15 pF * 33 ohms, or about 0.45 nanoSec or 450 picoSec. <S> Fast enough?Just grab a 33 ohm discrete resistor and use needle nose pliers to crimp that resistor lead around the center pin of the probe tip. <S> And there should be no ringing at the 280 MHz Fring. <A> There are three effects two consider here. <S> Transformer Action (H-Field): <S> Any loop within a changing magnetic field gets a voltage induced into it. <S> This is the idea behind transformers. <S> A long can see more flux so is more susceptible to magnetic pickup. <S> Capacitive Effects (E-Field): <S> Any two conductors separated by an insulator for a capacitor. <S> Since \$ <S> C = <S> \dfrac{\epsilon <S> \cdot <S> A}{d} \$ <S> Ground lead inductance: As pointed out by Marcus inductance in the ground lead increases the impedance to high frequency signals and a longer wire has more inductance. <S> You can also reduce the inductance by wrapping the ground tight to the probe but it is less good than you have shown in your second picture. <S> Which of these dominates depends on the circuit you are testing. <S> I regularly connect the the ground lead of my probe to the tip of the probe. <S> This should should see nothing as you are measuring the 0V of the scope. <S> However, It will show you where there are significant magnetic fields in your circuit.
| having a shorter wire reduces the are of one the plates and hence the capacitance reducing E-Field sensitivity.
|
Measuring a small resistance, ~0.001 ohm I have a low resistance resistor that I would like to use to measure the current through another circuit, but first I need to accurately determine its resistance. Its data sheet says it is 0.001 ohm +/- 1% simulate this circuit – Schematic created using CircuitLab A basic setup is to apply a voltage to the resistor, measure the current going through it and the voltage across it, the set up in the diagram above. I am having some trouble understanding my current and voltage measurements and how the probes may effect the circuit. The first thing is measuring the voltage. If I touch my probes together I get a reading of 0.02 mV. Is this something I need to offset in my measurement? For instance, if I measure 0.16 mV, should I subtract the 0.02 record the measurement as 0.14 mV? Secondly the current measurement, when my power supply is OFF, my multimeter reads 3.7 mA, as I vary the current limit it is 3.7 mA less, than what the power supply indicates. For example, if set to a 200 mA current limit, the multimeter reads 197.3 mA. The idea is to use one multimeter to verify the current to the resistor, as the power supply reading may not necessarily be accurate. However, as I write this I realise my power supply has an OFF button for the voltage output and for the device itself. When the device is OFF, the current reading is 0 mA, when it is ON, but the output is OFF, the reading it 3.7 mA, and when the output is turned ON (with the current limit 200 mA) the current reading is 197.3 mA. So I reason that the current reading on the multimeter is probably fine as is. It is just when the supply is ON, even if the output is off, there is a small current leaking through. But I am still not sure about the voltage. EditThe diagram I meant was this, with 2 separate meters one for current one for the voltage across the resistor. simulate this circuit <Q> You can't "accurately determine" such a low resistance using household DMMs, which are likely completely lack of any calibration whatsoever. <S> Accuracy class of your household DMMs is way worse than 1%, especially on the sensitive low-voltage range, and all your results will be suspect and useless. <S> Plus you need to control temperature of contacts very carefully and avoid thermal gradients, otherwise thermal EMF will screw all your results. <S> Instead, you should trust the datasheets (if the manufacturer is reputable), and follow ALL recommendations on how to mount/connect/use this device, including PCB pad shapes/solder technique and configuration of voltage sense traces. <S> A resistor is much simpler device than digital multimeter, so it is easier to believe that the class accuracy (1%) is better sustained in resistor than in multimeter. <S> If anything, you should consider calibrating your DMMs using this resistor, not the other way around. <A> I agree with both of your statements, subtract the 20 µV (or add it, depending on polarity), and use the meter measurement of current directly. <S> You have no way of correcting for a span error on either meter. <S> You will also want to use a relatively high current to minimize errors. <S> To verify 1 mΩ to within, say, ±0.1% (since the resistor is allegedly ±1%) requires a measurement to within 1 µΩ, meaning you will have to be very careful with the connections. <S> Thermal EMFs can also be a problem, which you can partially mitigate by reversing the polarity and making another measurement. <A> The datasheet for the part you link ( CSS4J-4026 ) shows the recommended (basically required if you want their 1% accuracy) pad layout. <S> Notably, it is <S> a 4 terminal resistor and the claims about it being "1 mΩ ± 1%" is only with respect to the voltage out the sense terminals when passing current through the shunt terminals. <S> The resistance across the shunt terminals will be larger. <S> The model for the resistor as a whole is something like: simulate this circuit – <S> Schematic created using <S> CircuitLab <S> I don't think there are any specific guarantees as to the resistance on the leads, other than they're "low", probably no more than 10-100% <S> the resistance of the shunt itself.
| When measuring such a low resistance, it's vital to use a 4-wire technique .
|
Is using product circuit within my product legal? I'm building a smart plug and I want a circuit to convert from 220vac to 5vdc so I'm using a charger circuit ( image source ) to deliver the 5vdc I need for the wifi module as it is with no changes made. Can I sell this product under the right terms? <Q> Given that that specific charger was designed by Apple, no you may not. <S> Also bad karma to not credit picture to original source here . <A> You bought the hardware. <S> I don't think there's any IP load on this... <S> if it's patented, you bought the rights along with the hardware (not to duplicate it, but to treat that piece of hardware as your property). <S> If you want to resell it, that's your choice. <S> If you modify it, it's best to try to eliminate the original logos and trademarks from your product, since you don't want to misrepresent your modified product as someone else's (they probably won't want to assume responsibility for any negative publicity or liability you might encounter). <S> FCC/CE/UL approvals may be necessary for you to sell it into certain markets. <S> You will need to requalify the modified components. <S> If you're only making a dozen for your buddies, likely nobody's going to worry about it unless something goes horribly wrong. <A> If you mean you want to embed the Apple charger electronics inside your product, You can do what you want with things that you own. <S> They probably don't want their name associted with your product. <S> it's not like they are going to provide warranty support for such modified products, nor do they want to be held responsible for any problems your modifications may cause. <A> It depends on how many you're making. <S> If you're just making a few of these units for yourself to use or some of your friends in a non-commercial purpose. <S> Making a 5 volt power source such as a USB charger is trivial today. <S> having someone integrate a circuit similar to that USB charger on to your custom PCB for your Wi-Fi module would be cheaper in the long run then packaging a premade USB power source. <S> As far as taxes etc goes, if you're manufacturing thousands of these it will probably be done in China and you will never pay an import tax on individual components because they won't come to you. <S> a Chinese manufacturer would purchase all of the components needed and either ship you or a distributor your final product. <S> I don't know what country you live in <S> but if you are receiving a product that is to be sold again, you may not even need to pay import taxes on it. <S> If you are the one designing and selling it.
| You can modify and sell it. No one cares what you use, as long as you're not commercially selling this product or making money off of it you can use an Apple charger or whatever else you want to put in it. If you are making thousands of these units and selling them for money in a commercial setting, then you must not use someone else's design without permission. If you're advertising it for sale, you can expect somewhat more attention from authorities.
|
How to tell how sensitive a photodiode is? I am looking to buy some new photodiodes for a project. Currently, I have been using expensive photodiodes with a picosecond level rise and fall time and a very small area to pick up light. The problem is that I am not getting much light into the photodiode so the readings are quite low and need to have more of a range. I was just wondering what the measurement for how sensitive a photodiode is and if anyone has any good ideas for near-infrared (800-850 nm) photodiodes which are extremely sensitive so have a large range from not much light which is what I need. This is the type of photodiode I am looking for Any ideas? <Q> Depending on the speed you need, you may well be out of luck. <S> You state that your current diodes "with a picosecond level rise and fall time", while you link to a PD with 12 nsec rise and fall times. <S> Furthermore, you say that your PDs are "expensive ", but the linked units are only about 6 bucks in onesies, and if you think 6 bucks is expensive for a photodiode, I suggest you need to do some research. <S> Try Digikey or Mouser. <S> So it's not really clear exactly what photodiodes you are talking about. <S> With that said, silicon photodiodes all have pretty much the same maximum sensitivity, .55 <S> to .65 <S> A/W. <S> And you only get high speed by reducing the capacitance of the chip, which means low sensitivity. <S> So you basically have 3 options. <S> 1) Go to a bigger PD and accept the lower speed. <S> While you have been using very fast units, you have not actually justified your need for speed, so this may be an acceptable course of action. <S> How much speed do you really need? <S> 2) <S> If you really and truly need nsec rise and fall times, keep your current diode and provide a collection lens to increase the amount of light incident on the PD. <S> Yes, this means you'll need to redesign your apparatus, and learn some optics, but that should not be an insuperable problem. <S> 3) Go to an APD (avalanche photodiode). <S> These will respond to lower light levels, and you can get fairly fast units. <S> Of course, you'll also need to learn how to drive the little buggers, but think of it as a learning experience. <A> How to tell how sensitive a photodiode is? <S> There's a curve in your device's datasheet that tells you exactly that: <S> Combined with the line in the Characteristics table that tells you the sensitivity is 0.55 A/W at 850 nm, this gives you the sensitivity at whatever wavelength you are using. <S> (Note: in the optical communications field, we'd call this a responsivity curve, not a sensitivity curve. <S> For us, sensitivity is a measure of the minimum detectable signal) if anyone has any good ideas for near-infrared (800-850 nm) <S> photo diodes which are extremely sensitive so have a large range from not much light which is what I need. <S> Standard p-i-n photodiodes can't produce more than one carrier pair per photon absorbed, so you won't find any with a dramatically stronger response than this one. <S> This will increase the cost. <S> Some other solutions: As others have said, you can use an avalanche photodiode (APD), which has an internal current gain process to effectively increase the responsivity above 1 carrier pair per photon. <S> However these require very carefully controlled high-voltage bias, which will increase your system cost. <S> Or, if your problem is actually focusing your light beam onto the small device area, you could use a larger device (which will be slower and will tend to be more expensive). <S> Finally, a solution that hasn't been suggested yet in another answer: You could be sure your light source is chosen to match the peak responsivity wavelength of your O/E. <S> Another comment: The Mouser page you linked calls this a phototransistor , but the Osram datasheet just calls it a photodiode, and its responsivity is typical for photodiodes, not phototransistors. <S> Another way you can get internal gain in the device is to use an actual phototransistor. <S> I don't use these devices regularly, but I expect they might be relatively slow compared to ordinary photodiodes. <A> I was just wondering what the measurement for how sensitive a photodiode is <S> The spectral sensitivity is quoted in the data sheet as 0.55 amps per watt so, if you could illuminate the sensitive area (1 sq mm) with 1 milliwatt of light at about 860 nm <S> you'd get 0.55 milliamps produced at the output. <S> The graphs in the data sheet show how this falls away for different light wavelengths. <S> anyone has any good ideas for near-infrared (800-850nm) <S> photodiodes which are extremely sensitive so have a large range from not much light which is what I need <S> Requests for product recommendations are off-topic. <S> However, you'll always get more signal with a bigger sensitive area but the speed will be proportionally slower. <A> A photomultiplier tube (PMT) can give ~10^6 gain, fast rise times (150 ps) and large sensitive areas (~10 mm dia) - all these specs at the same time! <S> You can use them to detect (and time the arrival time) of single photons. <S> Have a look at the websites of Hamamatsu, Newport & Photek.
| If you are working at one specific wavelength, you might be able to find or custom-order one with an anti-reflective (AR) coating for that wavelength and get near a 25% improvement in responsivity (based on the 80% quantum efficiency spec for this device).
|
Burning hex files into multiple micro-controllers at a time. I am using attiny88 and the usbasp programmer. Right now I am burning 1 micro at a time. But it is a time-consuming process during the production. Is there any way to burn multiple microcontrollers at a time just using 1 programmer? If I want to roll out my own software to do such a thing, what should be the procedure to do so and what are the thing will I need? Thankyou <Q> Is there any way to burn multiple microcontrollers at a time just using 1 programmer? <S> I'd be surprised if the software that comes with the vendor's programmer supports it, though. <S> Some other options: Get a gang programmer and program the parts before loading them on the board. <S> Make a pogo-pin fixture to speed up connecting and disconnecting the programmer from the board, and speed up your existing process. <S> Your assembly vendor can probably either do this or recommend a third party to do it. <S> This can be reasonable for batches of maybe 50 or 100 or more parts. <S> Order the parts pre-programmed. <S> This is probably only reasonable for batches of 5,000 or more parts. <A> It sounds to me like you produce smaller batches that do not justify buying expensive programming equipment. <S> We usually have the controllers pre-programmed by the manufacturer. <S> For your Attiny88, check out <S> microchipdirect.com Microchip offers free samples of the programmed devices. <S> Labeling is cheap, too. <S> I recommend printing the 4-digit firmware checksum on the device so that you can check later in what state the Attiny is. <S> At least have a color dot on the device so that you can verify if the device is programmed at all. <S> This way you can also avoid mounting exoensive programming connectors on you board. <S> This alone will compensate for costs of pre-programming. <S> (Better have the connector footprint in your layout, though, you might need it later to fix bugs in produced batches.) <A> As mentioned in other answers, there are several options to increase flashes per hour: - A gang programmer. <S> - Multiple programmers and a bit of software to operate them. <S> - Standalone programmers. <S> (eg: <S> ISPnub) <S> - A bootloader with one-to-many support. <S> Regarding the bootloader, for one product I've developed a CAN-bus bootloader that supports multiple nodes while only transmitting the actual binary once. <S> With a binary of half a MB this saves a lot of time. <S> But since you have an ATtiny88 <S> I suspect this is beyond the capabilities. <S> Other methods are to only flash a tiny bootloader during production and load the final firmware during testing. <S> This also allows to stock produced units and flash the latest firmware right before shipping.
| Hire a programming service to program the parts for you. If your micro uses JTAG as its programming interface, and you can arrange to connect the micros you want to program together in a JTAG chain, you may be able to do this.
|
What is modern fire alarm cable made of? I'm curious about the fire alarm cable that's being installed in a new building next to my office. In the fairly distant past, I learned that fire alarm cable was "pryo" cable. Under the red jacket it was a copper tube containing two conductors, all mutually insulated by a white mineral powder. Apparently it would stay working unless a fire melted the copper, because there was nothing inside that could burn or decompose. What they are using today appears to have layers of polymers. Under the red outer layer is a stiff white jacket. Inside is a bare (earth?) wire and two wires insulated with blue and brown polymer. What are these polymer materials, and what happens to them in a fire? Was the "pyro" cable deemed overkill and used only for lack of alternatives to PVC in past decades? <Q> That sounds like FP200 or similar. <S> The copper tube with mineral insulation was MICC cable. <S> MICC is a pain in the arse to terminate which is why no installer likes doing it if they have any choice, and the modern synthetics have good enough properties in a fire to make them compliant with the appropriate standards and are not hydroscopic if incorrectly terminated. <S> MICC tended to fail insulation test after a while if the person fitting the potting gland on the end was not taking sufficient care. <S> There are multiple vendors of modern fire alarm cables and they all have their own trademarks and 'secret sauce' chemistry. <A> Some is made from ordinary PVC and others of XLPE (cross linked polyethylene) or XLVA (look it up), silicone and even Teflon. <S> Some cable is made to fail in a fire. <S> The insulation melts, the conductors touch and that triggers the alarm. <A> The flexible cables <S> (image below from this link) <S> you saw probably have a layer of Mica as insulator in there (which is a 960 <S> °C safe mineral isolator). <S> Some of them can withstand close to 1000°C for up to 3 hours. <S> However, that's under the assumption that no external pressure (e.g. from parts of the cable housing falling onto them) is applied to them. <S> One way to ensure that would be putting them in safe metal tube <S> – and that's basically what the mineral powder filled tubes are. <S> If you, however, ensure that there won't be other things failing and scraping the mica insulation off the cable, then you don't have need for any copper tubing! <S> Also, if you look at the picture above, you can see an aluminium "wire armour"– practically your tube-to-go! <S> So, if you have a metal cable conduct, then you're pretty safe: most of the other cables' isolation will be gone the moment the flame-retardiant silicone rubber of your fire alarm cable gives in, so these cable will have reached a somewhat "stationary" pose. <S> The risk of one of them changing position sharply enough to scrape of insulation is small. <S> Same if the cable is running alone on some plaster wall. <S> So: fire-proofing cables is a process, not only a material :) <S> Your flexible cables might be very well as safe as metal tubes filled with mineral powder for some use cases, moreso in others (think about non-fire-related failures, like water ingress), less in mechanically difficult situations. <S> It's maybe less about over-kill, but about safety of installation.
| Fire alarm cable can use a variety of insulations depending on application.
|
Determining Impedances of an Op-Amp Circuit I'm trying to review some old concepts, and thus far, there was one that I couldn't really understand: impedance of circuits involving op-amps. Assuming an ideal op-amp, it has infinite input impedance and no output impedance, but that's only for the op-amp itself. I'm having trouble understanding how to find the input/output impedance of some op-amp circuits as a whole. Take the standard non-inverting amplifier for instance: simulate this circuit – Schematic created using CircuitLab Using the ideal op-amp rules, since the non-inverting input is connected to the input voltage through Z1, the input impedance would be infinite as no current can flow through the op-amp terminals. However, when you look at the output impedance, you remove the input source by shorting it to ground, making the non-inverting input equal to ground (as well as the inverting input). My book says that the output impedance would be 0, but I don't understand how this is the case. Replacing the load resistor with a current source, you just see an internal op-amp 'output' resistance of 0 ohms in parallel with Z2 to ground, so is that set of parallel impedances the cause of the 0 ohm output impedance? Is this logic correct? It feels that because of the nature of the ideal op-amp having 0 output resistance, all op-amp circuits would have 0 output resistance. Is this always the case, or are there some exceptions? I'm trying to develop some methodologies for measuring such impedances in circuit problems as it's hard for me to wrap my head around. <Q> The op-amps themselves don't have zero output impedance but when configured with negative feedback they do. <S> That's OK. <S> However, when you look at the output impedance, you remove the input source by shorting it to ground, making the non-inverting input equal to ground (as well as the inverting input). <S> My book says that the output impedance would be 0, but I don't understand how this is the case. <S> I find that the 0 V input case is less helpful than, say a 1 V input case as it is too easy to balance out circuits with 0s everywhere. <S> Let's use 1 V. <S> And lets add some external R out to make the output obviously non-ideal. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> R out is the output impedance of the op-amp. <S> With R out in circuit, ask yourself what does the output of OA1 have to do to get 1 V at the inverting input? <S> Answer: it has to get the voltage at OUT = <S> \$ <S> \frac {Z_3}{Z_2+Z_3} V_{IN} \$ . <S> That means that the output of the op-amp actually has to go some distance beyond V out to compensate for the voltage drop across the output resistance. <S> It feels that because of the nature of the ideal op-amp having 0 output resistance, all op-amp circuits would have 0 output resistance. <S> Again, it's not the op-amp itself <S> but rather the feedback that gives the circuit this nature. <S> Does that help? <A> Just to add a little more to Transistor's answer (a mathematical approach). <S> You can look at it this way. <S> This is the circuit model of the op amp (with intrinsic output impedance) plus the external resistors: simulate this circuit – <S> Schematic created using CircuitLab <S> Obviously from the circuit, \$V^+=0\$ . <S> You can try to find and expression for \$\dfrac{V_{\text{test}}}{I_{\text{test}}}\$ . <S> Also \$V^-=V_{\text{test}}\dfrac{R_1}{R_1+R_2}\$ , \$I_o=\dfrac{V_{\text{test}}+AV^-}{R_o}\$ , and \$I_f=\dfrac{V_{\text{test}}}{R_F+R_1}\$ . <S> You combine those, and obtain: $$ \dfrac{V_{\text{test}}}{I_{\text{test}}}=\dfrac{R_o(R_1+R_F)}{R_1+R_F+AR_1+R_o}$$ Given the fact that \$A\$ is a really large number (the op amp open-loop gain), the \$AR_1\$ term dominates in the denominator. <S> So, $$ \dfrac{V_{\text{test}}}{I_{\text{test}}} \approx <S> \dfrac{R_o(R_1+R_F)}{AR_1}$$ <S> Remember that \$G=\dfrac{R_1+R_F}{R_1}=1+\dfrac{R_F}{R_1}\$ <S> is the closed loop gain. <S> Which allows to further re-write this as: $$ \dfrac{V_{\text{test}}}{I_{\text{test}}} \approx <S> \dfrac{R_oG}{A}\to <S> 0$$ <S> And that approaches zero or a very low value. <S> As you can see the output impedance under negative feedback is even smaller than the intrinsic output impedance of the op amp given the fact that \$A\$ is large and \$G\$ is no doubt much smaller. <S> If you were to just ignore <S> \$R_o\$ <S> this would be ideally zero. <A> The 90 degree phase_shift of the OPAMP's open loop gain has the result of producing an Inductive Zout. <S> This Zout, when loaded with a capacitor, results in ringing that may need dampening. <S> A good value, to place between the OpAMP output pin and the Capacitor, is R = sqrt(L / C).
| Using the ideal op-amp rules, since the non-inverting input is connected to the input voltage through Z1, the input impedance would be infinite as no current can flow through the op-amp terminals.
|
Driving a LED in the most energy efficient possible way I got into a bit of a challenge with myself, just for the sake of learning something about low power stuff. I want to build a device that has basically two requirements: blink an LED every 5-10 seconds with a microcontroller last the longest time possible on a lithium button cell (something like a CR2032 or smaller) The input voltage to the system will be ranging from 3 to 1.8 volts, so probably i want to pick a red LED so that the power is above it's Vf until the end. My microcontroller will consume around 10uA when active and 1uA when sleeping. So the LED will probably be the most power hungry component. Now it comes the question: what's the most energy efficient way to drive it, to get the shortest visible pulse? Putting a resistor in series with the led would mean wasting a lot of power, even half of the power that goes into the LED. A constant current driver would waste as much power as the resistor plus some power to stay on itself. The only solution that came to my mind until now is to connect the LED directly to the microcontroller and adjust the pulse duration until I can see it blinking. But will this be the most efficient way? I don't care about simplicity or bom cost, it's a 1-off thing. Even an overkill circuit if it's more energy efficient than the resistor is better for me <Q> you could make a small high side buck converter with a low rdson mosfet (if you want you can make it synchronous too to improve the efficiency even more) so that it wakes up just in the short time the led is active. <S> You have to pick a mosfet so that it has the smallest gate capacitance though because it needs to switch in the fastest way possible for two reasons: while charging the capacitor, some energy gets dissipated into heat (very very small heat) and <S> the mosfet while switching becomes for a short time a resistor <S> and i'm sure you don't want resistive components all around the circuit. <S> The buck converter can be made with a fixed frequency and fixed duty cycle to save some energy. <A> Roll your own converter, perhaps. simulate this circuit – <S> Schematic created using CircuitLab Pulse the GPIO high for long enough to charge the inductor to the desired peak current,then bring it low to discharge through the LED. <S> If the GPIO sticks on, the current is unlimited except by inductor DC resistance and MOSFET, so you may wish to degrade it a bit by adding a series resistor to handle such a case. <S> But in practical terms, I think you'll do very well by buying the LED with the highest brightness at a given low current and using a resistor. <A> You could create the same effect as a boost regulator by adding an inductor and a NMOS FET. <S> Then you can choose any color LED. <S> To keep it really simple, pick a blue one that won't be activated at your supply voltage. <S> Ground the cathode, connect the inductor from the anode to your supply. <S> The FET drain goes to the LED anode, source to ground, gate to output. <S> When you want to blink the LED, turn on the FET for an amount of time (that you can determine experimentally), and then turn it off. <S> The built up current in the inductor will blink the LED for you. <S> The inductor will efficiently limit the input current based on the pulse width with fewer losses.
| If your LED has a low enough forward voltage to turn on by itself from the supply, you can just put the FET between the cathode and ground.
|
Which components can be measured while soldered on a PCB board already? I am assembling nonlinear oscillators on PCB boards for applied math research [Colpitts (100 kHz, 3 V_pp), FitzHugh-Nagumo (100 kHz, 15 V_pp)]. I am working with some other people that want to do ODE simulations, so I am pushing to provide some qualitative results quickly. This means I sometimes solder up components before I rigorously measure them, because an approximate measure (~100 ohm vs 99.24 ohm) is enough for the data I need to hand off. Can I measure these components (resistance, inductance, capacitance) once they are soldered in, or do the connections negate this possibility? Sorry if this may be a basic question, but my background is not in electronics. I understand that I can remove them, measure them, and then re-solder them, and this is probably the obvious approach--I would prefer to avoid doing this because small qualitative changes in the behaviors are important to me, and re-soldering would probably cause that. Should I just take the time/repeatability hit and always measure isolated components? Also, do any of you have an intuition on what magnitude of stray capacitance occurs on a PCB board? I know that software layouts like PSpice avoid these problems, but I don't know how to use that functionality yet--if I'm being pessimistic, would I see 10 pF? 100 pF? Edit: I include a picture of one of the soldered circuits so you can get an idea of spacing and the complexity of the circuit (not pictured--the leads for the V+/- power sources for the op-amp). Edit 2: I include a schematic of the pictured circuit, so I can ask where I might consider that suggested capacitor. <Q> Most technicians will un-solder one end of a leaded component it the need to measure it, as this is usually the hardest way to mess up the measurement. <S> With specialised equipment Any 2 terminal component that is not parallel with another can be measured in-circuit by nulling out the other nodes and measuring it's impedance. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Here unknown Z1 can is compared against known R1If both are resistors the comparison will be the ratio of the voltages <S> Za and Zb do not affect the reading because V1 is a voltage source, and current in those parts does not effect the voltage <S> a proble A. Zc and Zd do not affect the reading probe B is a virtual ground and thus Zc and Zd have no potential difference and so pass no current. <S> the grounds on Za Zb Zc Zd may be applied with aditional probes (usually clip probes). <A> Would have to see your circuit to figure out whether you can measure in-circuit at all without the connections disturbing the measurement. <S> However, if you application requires, as-per your example, 4-digit accuracy on resistance, there's no way you can assume your connections aren't going to disturb the measurement. <S> I'm assuming you're doing this power-off. <S> Trace capacitance is order 10pF. <S> There are calculators online that will work it out for you. <S> The details of course are dependent on trace length, width and your PWB stackup. <S> For example https://technick.net/tools/impedance-calculator/ <A> Unless you have a ground plane or twisted pairs or close proximity, stray capacitance can be < 1pF. <S> It all depends on length/gap ratios of or between conductors. <S> Twisted pair is 0.5~1 <S> pF <S> /cm , single traces much less single trace <S> Inductance can be 10 nH/cm <S> , paired mutual inductance again depends on length/gap ratio. <S> For 100kHz range this is almost negligible. <S> For relaxation oscillators, R & C tolerance contributes to errors. <S> For LC oscillators , L & C tolerance contributes to errors. <S> Just make it neat with correct parts in the correct locations. <S> A final check on power supply resistance helps prevent the obvious with a DMM. <S> Compare your solder joints with the best and learn to do it fast in < 2 seconds with a clean tip and clean copper board. <S> I might solder cut resistor wire for probe test points for signal and ground on outputs.
| If have ony an ordinary meter then you cannot make accurate in-circuit measurements because the other connections will skew the result, but such measurements are possible with specialised equipment.
|
Resistors in parallel but with a capacitor in between them? If I have a source between two resistors in series, can I just add the resistors and place the source below,under them?If I have some element in parallel like a capacitor, between two resistors in parallel, are the resistors still in parallel? If so why? simulate this circuit – Schematic created using CircuitLab Is it the same as: simulate this circuit <Q> On a schematic, wires are perfect and have zero impedance, so both schematics are exactly the same. <S> On a schematic, the goal is maximum clarity. <S> It doesn't matter that it looks different than your board, as long as you arrange it in the way that is easiest to understand. <S> In a real circuit, wires and traces have resistance and impedance, so if they are long enough, <S> the way stuff is organized can matter. <S> It depends on the currents, frequencies, type of circuit, etc. <S> If this was the case here, the person in charge of the schematic would write a note next to the components for the person doing the layout. <A> Yes, the resistors are still in parallel. <S> I like to define "in parallel" two different ways. <S> First, if you can see that both terminals (i.e. the ends) of the elements are connected together then the elements are in parallel. <S> An important point to remember is that elements connected in parallel must have the same voltage across them. <S> So, all of the elements...the resistors, the capacitor, and the current source... <S> in both of your schematic are in parallel. <S> This is a single node pair circuit, and the voltage must be the same across all of the elements. <S> Parallel elements can be interchanged without changing the behavior of the circuit, as long as they remain connected in parallel. <A> Two dipoles are in parallel if you can draw a closed loop going through those elements and nothing else. <S> It doesn't matter how close together they are on a schematic, whether they have neighbors, or whether they are actually drawn in a parallel arrangement or at an angle. <S> What matters is that exactly the same voltage is applied to both at all times. <S> Two dipoles are in series if they have a common connection point which has no other connections. <S> Again, the actual geometrical layout of the schematic or the presence of neighbors on other terminals doesn't matter. <S> What matters is that exactly the same current flows though both at all times.
| Second, if the voltage across the two elements must be the same simply because of how they are connected, then they are connected in parallel.
|
Does Crystal/Oscillators package matter? I design a lot of PCBs that uses microcontrollers with external clocks. For some reason a lot of the example designs always tend to use the big generic HC-49 package. Even factory made modules that I purchase tend to use that package. I typically source my components from LCSC which has a large variety of components. Are there any disadvantages to using the smaller packages for crystals other than price and availability? <Q> This is probably mostly because of cost per unit reason as you mentioned. <S> For scale projects unless the PCB area is not concerned, I would chose the cheapest and high volume solution. <A> Crystals have much more important properties than frequency, size and cost. <S> These are operating temperature, frequency and temperature tolerance, load and shunt capacitances and ageing. <S> Obvious advantages of HC-49's size - easiness to mount and power dissipation. <S> But I did not see industrial or enterprise designs using HC-49 last decade (even on big boards where HC-49 will fit). <S> The biggest they use is HC-49S, or chip crystals. <A> Certain packages can offer different sets of frequencies. <S> For example, the 3.2x2.5 package can be had with frequencies up to 80MHz, and with tolerances of 10ppm. <S> Parasitic capacitance and inductance also comes into play, the 2 vias of the HC-49 and the 2 large pads of the HC-49S have larger parasitic capacitance than the pads of a small SMT device. <A> Yes, the package can make a big difference. <S> It's much easier to get an HC-49 crystal to start up than the equivalent HC-49S, for example. <S> Smaller crystals will also have a lower maximum drive level, which will cause aging if you overdrive. <S> Will the crystal start up reliably across all conditions? <S> Will there be too much current, causing the crystal to age prematurely? <S> Does it have the frequency tolerance that your application requires? <S> What about across temperature?
| Therefore, HC-49 package crystals and oscillators are preferred in most cases. Read the crystal datasheet and make sure it matches up to what you need: They also have worse pullability (probably not an issue for your application).
|
Multi master SPI mode? Or any intelligent way to switch only time between two masters? I have an LCD display which is powered from a pretty powerful micro, with GPU and all sorts of stuff. However, it turns out that it will take it over 5 seconds to boot the core. From a user experience perspective 5 seconds to see any boot up image/animation on screen after turn on is unacceptable. So i was thinking of including a separate very cheap micro which can hold the master line for the first couple of seconds and provide the boot up image. It would then hand over the SPI bus to the main micro. This of course is not the only use case of the smaller micro. I would also use it for all the backlight control. The larger micro might go into a sleep state and i would like for the smaller micro to still keep the display on. (So basically the main micro will simply tell the small micro what brightness to keep things on and a default brightness in case the main micro sleeps). Is there any way i could hold the small micro as master for first 5 seconds and then let go to the main micro for the rest of the time (and as a bonus, hand it back to the small micro when the main micro goes into sleep)? Thanks! <Q> The main problem here is probably not to pick a suitable MUX - most analog switches will probably work. <S> But rather how to sync "GPU" and "MCU". <S> Because MCU should be speaking most of the time, except when GPU takes over, then it should be quiet. <S> The GPU can't just cut the SPI wires when it pleases, because then it will corrupt an on-going SPI transfer. <S> This can have very bad side effects if the MCU is interrupted when writing commands to the display. <S> You can solve this by having the two devices listen to each others /SS lines and use that as a means of "arbitration". <S> GPU: <S> When /SS line out from MCU is pulled low, remain quiet during the on-going transmission. <S> When /SS from MCU goes high, grab the bus by starting a SPI transfer and thereby pulling /SS from GPU low. <S> MCU: <S> Before starting a SPI transmission, check /SS line from GPU. <S> If /SS line from GPU is high, we may send. <S> If /SS line from GPU is low, go passive/sleep for a certain amount of time, before checking again. <S> MUX: <S> Wire it so that the two different /SS lines are used as channel select, determining the source of MOSI and CLK. <S> (MISO shouldn't be needed for most displays.) <S> Either by finding a suitable switch or by inverting the signal of one of the masters through BJTs or similar. <S> You can perhaps make the MCU /SS recessive by connecting it through a 10k pull resistor, so that the GPU /SS can override it without having two outputs competing. <S> I suppose there are lots of ways to solve this. <A> It would probably be simplest to pick a "small micro" that has two SPI interfaces. <S> Use one as a master to drive the display, and the other as a slave attached to the "large micro". <S> Then, your small micro's firmware can arbitrate between passing the large micro's transactions through to the display and sending its own commands. <S> Note that sending data to the display this way is straightforward. <S> But if the large micro needs to read anything back from the display, a little more thought is required. <A> The straight forward way to implement what you want is to insert some circuitry between the processors and the display. <S> This circuitry can take two forms: <S> Use a four bit wide multiplexer chip that can MUX the four SPI control lines (SPI_CS, SPI_CLK, MISO, MOSI) for each of the two masters to the display interface. <S> The selection control for the MUX would come from your low cost MCU. <S> Use two separate 4-bit wide tristate buffers to select one master interface or the other to the SPI interface on the display. <S> Normally the same part would be used for both masters and so it would take two control lines from the low cost MCU to control the tri-state of the two buffers (or another added inverter gate). <S> This scheme does require you to use care when you actually switch the display from one master to the other. <S> You would want to avoid switching while there is an active SPI transaction in progress on the interface. <S> Some devices could get confused when this happens. <S> Other SPI devices would recover simply by driving the SPI_CS signal to the inactive level for a period of time. <A> Quad SPDT analog switch would do also such as <S> http://www.ti.com/lit/ds/symlink/ts3a5018.pdf That one is a 3.3V level, there are 5V level switches as well.
| Alternatively with careful part selection you may find two tristate buffer chips, one with an active high enable and the other with an active low enable which can then just be connected together and controlled from one pin of the low cost MCU.
|
What is a fast built in op-amp to use in OrCAD Pspice Capture? Or how can I design one? I am trying to simulate a 100 kHz FitzHugh-Nagumo oscillator in OrCAD Pspice capture (this paper gives the motivation for the configuration, but is for a 180 Hz oscillator, https://ieeexplore.ieee.org/abstract/document/6313098 ). I have built this oscillator and have the differential equations, but we are trying to troubleshoot some discrepancies between experiment and simulation at a high level. The ODEs look okay for an individual oscillator, so I want to reproduce a single oscillator in PSpice. We are using a fancy op-amp with a 50MHz bandwidth, AD844 (datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/AD844.pdf ) which does not appear as a simulate-able component in Pspice. I am not an electrical engineer, so please humor me with what I hope are reasonable questions. I am pretty new to PSpice as well. First question: what is another high bandwidth op-amp that does appear in Pspice? I have been hunting for an hour and I'm not getting any closer. Second: if there isn't a suitable built in op amp, is there a way I can enter values from the datasheet into a generic op-amp shell? There appears to be this kind of a method for Multisim, but I can't find this interface for OrCAD Pspice. My FHN: C1=13 nF, R3=100 Ohm, R1=110 Ohm, R2=100 kOhm, L1=100 uH. Edit: I should comment that we are using AD844 rather than LM358, a more normal 1.2 MHz bandwidth op-amp, because the LM358 doesn't seem to support oscillation. I don't know why that is--I wouldn't be surprised if the LM358 clipped the waveform a bit, but it doesn't move at all. This is a separate mystery that I also welcome commentary on. <Q> This TI document Using Texas Instruments Spice Models in PSpice covers it, with the specific example of the <S> THS4131 <S> 145MHz fully differential op-amp. <S> Follow <S> all the instructions-- <S> you need to add the library as indicated or you'll just get errors. <A> The oscillator builds in amplitude, until R3 dissipates just as much energy as provided thru R1. <S> Does the LM358 have enough gain-bandwidth to support an oscillation at your Fres? <S> And to drive a 100 ohm load (R1). <S> I'd also look carefully at the phaseshifts on the Vin- pin. <S> 100Kohm seems way too high for operation with <S> 1uS (100Kohm and 10pF or more Cin of the opamp). <S> Regarding the opamp model: edit the unity gain bandwidth of the PSPICE model. <S> There likely is an R+C in the 4-terminal gain element used in the opamp. <S> Adjust that tau to match the 844. <S> Also consider changing the Rout of the 844 model. <S> And slewrate. <A> At its bare simplest, an ideal opamp is a high gain VCVS, or VCCS with proper termination. <S> To mimic some gain bandwidth, use the VCCS with a parallel RC at the end, here's the netlist: G1 0 out in+ in- <S> {Aol/Rout}C1 <S> out 0 {Aol/(2*pi*GBW*Rout)}R1 out <S> 0 {Rout} <S> Where Aol is the open loop amplification (linear, not dB), Rout is the output resistance/impedance, and GBW is the gain-bandwidth product. <S> This has no limits, so it will happily simulate kV and up. <S> You can add two anti-series Zener at the end for that, or a more involved commanded JFET circuit. <S> If you also want input impedance, add a resistance, or a complex network of RLC, if you want... <S> Here's the part where I stop and point out to @Spehro Pefhany's answer if you want more finesse. <A> So along the lines of @Spehro's answer, I didn't realize that companies released these files for download. <S> It was pretty easy to find the file, with that insight. <S> Installation was still non-trivial, but this youtube video showed it in exact detail: https://www.youtube.com/watch?v=t5cQIFGpuNs
| Pick an appropriate op-amp, download the Spice model from the manufacturer and install it in Orcad.
|
Would an AC induction motor rotate if the power factor were unity? I know about active and reactive power as a big picture. Active power is what really does the job and the reactive power circulates back and forth in and out of the system. I also know the math behind them to some extend and active reactive components ect. Where Im stuck as is that why power factor is set near unity like 0.8 or 0.9 but never unity. By adding capacitor banks why would power factor not made unity? In other words why is active power needed for inductive loads? I might be askng something foolish but I couldnt prove it to myself. <Q> Power factor is not "set", per se. <S> Non-unity power factor happens , in spite of the fact that we'd like it to be exactly one. <S> In the US, large installations like mills or factories are often charged both for real power and reactive power, at different rates (or they're imposed with a surcharge for non-unity reactive power -- it's the same thing, but shows up differently on the accounting sheets). <S> Such installations will go to some effort to bring the reactive power down, either with actual capacitor banks or with synchronous motors that aren't powering anything but are adjusted to look capacitive at 60Hz. <A> Where Im stuck as is that why power factor is set near unity like 0.8 or 0.9 but never unity. <S> The Power Factor (to be precise, displacement power factor) isn't set to 0.8, 0.9. <S> A generator will be capable of producing VA. <S> If a resistor was place across the terminals then the DPF & PF would be 1. <S> It is the load that draws reactive current and the phase shift is dependent on the load. <S> This can be compensated by some reactive components so the supply see's a DPF closer to unity, but this doesn't change the fact that the load will draw a non-unity DPF <A> Yes, it's a bit foolish. <S> Ultimately, motors only care about current and the magnetic field that it produces, not the voltage that produces that current. <S> The phase relationship between them (the power factor) doesn't matter at all. <S> Power factor limits <S> are never exactly unity, because in practical terms, it's never possible to completely eliminate reactive elements in a circuit. <S> For example, there is the leakage flux inside the motor — it's never possible to couple 100% of the flux between the stator and rotor — which makes it look like an inductor. <A> What sets the power factor below unity is the motor itself. <S> This is true for many devices that need to produce a magnetic field: inductors, transformers, induction motors. <S> They all need reactive power basically to create a magnetic field/flux. <S> The physical reasons lies in Lenz law between the emf \$e\$ and the magnetic flux <S> \$\phi\$ : $$ e(t) <S> = <S> -\frac{d <S> \phi(t)}{d <S> t} $$ <S> \$e\$ <S> is in phase with the voltage and \$\phi\$ with the current. <S> So the current is lagging 90° behind the voltage, hence the reactive power consumption. <S> Note that, for the same power, an induction motor needs more reactive power than a transformer, because there is a need for an air gap between stator and rotor (if you want the motor to spin). <S> This air gap requires more current to create the magnetic flux, and as a consequence more reactive power. <A> This image should help you understand unity power factor. <S> Which is simply the phase difference between the voltage and the current sinusoids of the system. <S> The photo below shows this in the time domain . <S> You can see unity, leading and lagging power factors caused by balance or imbalance in this phase difference. <S> However it is also useful to think about this in the phasor domain . <S> Which is the left column in the image below. <S> This allows us to simplify the math to understand how to "achieve" unity power factor. <S> We need to align the voltage and current vectors. <S> To do so we can either add capacitance into the system or add inductance to the system, depending on the initial system's capacitance or inductance. <S> Your question title specifically appears to be about how your induction motor will operate in a system with unity power factor. <S> It would rotate optimally. <S> You should research the advantages of power factor correction in a system to understand why. <S> Now your other questions, why is power factor set to .8 <S> or .9 <S> , once again the devices in the system whether they are inductive or capacitive loads will determine the power factor of the system. <S> The device itself will typically have a power factor rating as well which is how it will contribute to the overall system when it's in use. <S> As you have already pointed out it is usually around .8 <S> or .9, typically lagging, because most of our loads are inductive! <S> There are a ton of induction motors and machines connected to the US grid for example. <S> Thus the grid typically requires adding reactive power to balance out the more typical inductive loads in the system.
| This is done to reduce the phase different between the voltage and current sinusoids in the system.
|
PNP and NPN transistor characteristics for this project (see link inside for schematic) I'm working on this project https://github.com/diyhue/Devices/tree/master/HueDimmerSwitch I would ask which characteristics I need to keep in consideration to choose that two NPN and PNP transistors? Are these one a good choice? NPN: S8050 J3Y PNP: S8550 2TY EDIT:I forgot to mention I need transistors in SMD package <Q> S8050 and S8550 are "obscure" transistors in my opinion, why use those? <S> They will probably just work though, their Hfe is > 100 and usually that's all that matters in such a low power circuit. <S> I'd use BC547(NPN) and BC557(PNP) <S> but that's because I have plenty of them (as do many other hobbyists). <S> If you're in US you might choose 2N3905(NPN) and 2N3906(PNP) instead. <S> But really: it does not matter much, the circuit does not rely on "special properties" of specific transistors. <A> There are no special requirements for those transistors- <S> the 8050/8550 in SOT-23 are just fine. <S> There are probably slightly cheaper ones- <S> those have a relatively large die. <S> You could also use MMBT3904/3906, MMBT4401/4403, 2SC2712/2SA1162 etc. <S> etc. <A> You want a TUN (transistor universal npn) and a TUP (transistor universal pnp) how they are often called. <S> You can find a Selection here for example: http://pencho.my.contact.bg/start/comp/tuptun/tuptun.htm <S> BC547 <S> and BC557 are classic examples and very widely used. <S> According to the specs of the S8050/S8550, they should also work just fine.
| But looking at the schematic (of which you should include the picture, not just a link) I think almost any general purpose NPN/PNP will work.
|
What are the use cases for a closed solder jumper on a PCB? I've come across the the symbols for closed solder jumpers in design libraries, and now I came across one in a design. I get why you might include an open jumper that could be solder closed, but what is the use case for a solder jumper that is already closed in the pcb layer? An example of the symbol: <Q> In this case write protect is optional. <S> And disabled by default. <S> Cut the trace if you want to enable it, link by solder to disable it. <S> Sometimes you have a need for normally closed solder jumpers. <S> Sparkfun: <S> How to Work with Jumper Pads and PCB Traces <A> In addition to the specific explanation that @Jeroen3 provided for your example, there is at least one additional purpose of this type of jumper <S> (Note that the symbol can also be reused for more general jumper purposes and not only the solder-jumper footprint) <S> Serve as a "net-tie" <S> (Term from altium). <A> Jeroen3 is absolutely correct. <S> As for a common use case, think about it as the option for a (semi-)permanent switch. <S> It's somewhat similar to placing 0R resistors in places you might want to break the connection later. <S> A company I worked for had developed at least one board where there were 2 of such NC solder jumpers. <S> Both led to input pins on the uC. <S> That board was roughly 9 out of 10 times used for a specific function and the remaining times as a gateway to such boards. <S> Those gateways had a little extra hardware on them, but that extra hardware needed to be tested manually after production. <S> One of those NC solder jumpers would be cut at the end of the test procedure to indicate both that this was a special board and that the special features were operating successfully. <S> The uC would no longer receive a high-input on the cut line and now everybody including the uC would know the product is safe to be used. <S> The other line was used in case a board had been modified in such a way it was no longer fit for use in the field. <S> Think of demo-applications and testing rigs. <S> Those boards were no longer fit for sale. <S> There are probably many, many more (ab-)uses possible.
| If you have say, AGND and DGND , or GND and SHIELD and want to make certain that they are connected together at exactly one point (and not common net which prevents you from using DRC to review the ground separation), you may use a closed solder jumper to do this if the EDA does not have a special element.
|
How to reduce measuring angle of JSN SR04T? I wanted an waterproof ultrasonic sensor. So I used JSN-SR04T. But the problem is it has huge measuring angle(75%) which results in measuring obstacles which are not required. How can I reduce the measuring angle of the sensor? JSN SR04T: Data Sheet: http://www.ekt2.com/pdf/412_CH_ULTRASONIC_MODULE_4PIN_WATERPROOF.pdf <Q> This question probably needs to be in another section, like physics. <S> But be that as it may, there are practical ways to control the field of view (FOV): <S> Use a phased array of several transducers and mix their delayed signals <S> such that the timing is for ultrasonic waves from a certain direction. <S> Also, if the speed of sound varies, you'll need to adjust those delays accordingly. <S> And, of course, the transducer would need to be at the focal point of that lens, and pointing toward the lens. <S> (Note that although the spec sheet doesn't say, ultrasonic transducers are typically very narrow-band, which is good because FZP lenses have very narrow bandwidth). <S> Place the transducer pointing in to one end of tube that is at least several wavelengths long, but <S> with many small holes drilled along its length such that the total hole area is comparable to the area of the opening at the far end. <S> (There should be at least several holes per wavelength along the tube, and don't put the holes all on the same side of the tube). <S> Use a megaphone. <A> I'm not an in this matter although I have used industrial ultrasonic sensors and improved their response by adding an aluminium tube to the front surface in an attempt to guide the waves somewhat. <S> For medical ultrasound scanners an array of sensors is used to "focus" the beam by using electronics and software. <S> You can read up on the techniques in Ultrasonix's Receiving Ultrasound Data . <S> ifm , manufacturers of a wide range of industrial sensors have an interesting demonstration video of a "sound tube" focusing head for one of their M18 (the cylindrical sensor's thread size) sensors which addresses the problem of beam spread. <S> See How to use the sound tube . <S> distance Detection zone <S> switch-on/switch-off graph <S> Target <S> 50 % of the target in the detection zone switch point <S> *Figure 1. <S> Image source: E23000 Sound Tube . <S> I haven't read up on the device but observe that the diameter of the tube is approximately the same as the diameter of the transducer which seems to be about 9 mm (half the diameter of the cylindrical case). <S> I note also that the sound tube is cut at about 45° and I imagine this reduces spread at the tip. <S> It may be worth your while studying their datasheet to find the frequency of operation of the sensor and figure out the relationship between this and the dimensions of the tube bearing in mind the speed of sound in air. <S> With that information you can experiment with your own sensor. <A> As per answer from @Digiproc, you can find 1 transducer with a megaphone conical like structure in these sensors which serve the purpose for small angle (1 of them has an angle of 8 degrees) <S> https://www.ebay.com/itm/254197630425 <S> https://www.ebay.com/itm/254170672823 https://www.ebay.com/itm/254203626684 https://www.ebay.com/itm/254256494748 https://www.ebay.com/itm/254245897098 https://www.ebay.com/itm/254265364388
| If the speed of sound is fairly constant, and you want to use only one transducer, then you can place the transducer in a box with walls that absorb the sound, but with a window containing an FZP lens for 40kHz.
|
Problem when adding teardrops in Altium It seems easy to add teardrops for connections in Altium. But in my design, after adding teardrops, it throwing errors which indicating the 'teardrops' violate my clearance constraint such as: Clearance Constraint: (0.144mm < 0.2mm) Between Pad U16-A13(65mm,52.6mm) on L1 And Region (0 hole(s)) L1 Won't Altium resize the teardrop size according to the clearance rules? How to solve this problem? <Q> In your Teardrop options window, make sure the "Adjust teardrop size" checkbox is checked and that "Force teardrops" is unchecked. <S> If you have "Force teardrops" checked then it will create the teardrop regions regardless of what's around it, and will ignore the clearance rules. <S> And, as Koray mentioned, if you have a polygon pour around the teardrop you will need to repour, and if you have a region around the teardrop you will need to manually modify it to meet clearance rules. <A> Probably firstly, you are adding a regionsecondly you are adding teardrops. <S> If you use polygon instead of region, you can do this modification automaticaly. <S> just repour polygon will solve. <A> I had the some problem but now, I found the reason. <S> You have to enable the "Online DRC" ( Preferences -> PCB Editor) Only with this option, it considers your Design-Rules.
| You need to re-modify your regions after teardrops.
|
What enables the home appliances and electronics to work on single-phase? Talking about the home appliances and electronics, if it is single phase that we are using in houses and currents get to zero every half cycle, how do the home appliances (using AC) and electronics (using AC as rectified to DC) continuously function (inspite of periodically recieving 0 current)? <Q> how do the home appliances (using AC) and electronics (using AC as rectified to DC) continuously function (inspite of periodically recieving 0 current)? <S> A full wave rectifier and reservoir (smoothing) <S> capacitor are used to "hold-up" the voltage during the time that the AC is close to zero volts: - <S> It acts like a water tank - if the main water feed into the home gets shut down for a period of time, the reserve water tank will keep the home supplied in water until the main water feed flows again. <A> how do the home appliances (using AC) ... <S> The actual torque being transmitted from the windings to the armature is roughly sinusoidal at twice the line frequency (so, 120Hz for a 60Hz line frequency). <S> The motor spins because the average torque is in the desired direction, but it is kept spinning through the current zeros by inertia. <S> and heaters have heat capacity: <S> The situation is the same for a heater -- the actual heat being dissipated in the heater is AC at twice the line frequency, plus some average heat. <S> (It goes as \$(\cos <S> \omega t)^2\$ ). <S> Heaters generally have long time constants, so the temperature is averaged out. <S> and eyeballs have persistence of vision: Similar to the above, it take some time for your visual receptors to respond to changes in the light striking them. <S> Most lighting (even incandescents, to some extent) flash on and off, or at least vary in intensity, at twice the line rate. <S> You perceive the light as steady because the light-sensitive cells in your retina time-average the light coming into them. <A> The home appliances and other devices that do not use rectifiers use thermal and mechanical mass to smooth operation under pulsating power. <S> The element of an incandescent light bulb does not cool very much when the power drops to zero for a small fraction of a second, so we don't notice the lights flicker. <S> Single phase motors vibrate and make more noise than that three-phase motors, but inertia keep the speed relatively constant. <S> Some single-phase motor have capacitors that are continuously connected, that smooths the power somewhat. <S> Other motors get some smoothing from the difference in resistance and inductance in two current paths inside the motor. <S> Loops of wire, called pole shades, around a portion of the magnetic core also help to reduce vibration and smooth torque in motors and reduce vibration in electro-magnets.
| Because motors have inertia: When you spin a motor using single-phase AC, the torque goes to zero when current goes to zero.
|
What is this connection of resistors? Parallel or serial? How i can simplify this electric circuit? <Q> Two identical voltage source with internal resistance, I theory we can consider every identical voltage source will have same internal resistance. <S> but its not.. it will vary. <S> With my understanding it is an voltage sources in parallel configuration with their internal resistance. <A> Ideal situation: <S> Resistors are in series. <S> Both end nodes of the resistors have a potential of E volts, therefore, the potential across both resistors are 0V. <S> This results in zero amps current. <S> Non-ideal situation: <S> Both batteries have slightly different voltage source value with its own internal resistances. <S> This will incur a different voltage potential at both end notes, resulting in a potential difference across both resistors. <S> This will cause a low amount of current to conduct through the resistors. <A> The two resistors are in series (so they add), and the two voltage sources are back to back <S> (so they minus [voltage drop]). <S> The corresponding circuit would be like so: simulate this circuit – <S> Schematic created using CircuitLab <S> The battery is at 0 V because the E Volt batteries are back to back, cancelling out the voltages as they are the same potential.
| The schematic is something looking like two voltage sources connected in parallel.
|
Adding Debug LEDs to PCB I'm working on the next revision of a prototype PCB board,and from the first one I learned that LEDs would be veryhelpful instead of having to probe each pin/wire for acertain state. In this regard I have a design question; how would you addLEDs for debugging purposes to a PCB, such that they don'tinterfere with or alter the voltages and currents, and stillkeep the added components to a bare minimum. As of right now my thought is placing a MOSFET gate on thewires in question, and then let that control the LED. But I'dlike to know how you would do it, as I am no expert in electronicsand always looking to learn from more experienced people. UPDATES: · The signals being debugged are, of course, digital in nature. · The LED's in question are going to be SMD, of course. · If you have schematic examples that makes it so much easier to understand :D — Thanks in advance :) <Q> The question is a bit general to be able to answer very well, but it isn't a bad one, in fact. <S> I can make some suggestions. <S> Early prototypes typically get more debug LEDs. <S> Many might get removed as the design progresses. <S> Every power rail usually gets its own indicator LED. <S> For these I typically use a LED with a series resistor and a zener, so that even if the rail is low the LED dies. <S> For instance, on a 12V rail I would use something like a 9V1 zener and 470R with the LED. <S> For the rest it depends rather heavily on the type of circuit. <S> Anything with a microcontroller usually has a LED to show the device is running, and i will often add a few unassigned LEDs if there are IO pins to spare. <S> For these I usually prefer test points. <S> As a general guideline, you need at least 1 or 2mA for a LED to be visible, and of course the effect of loading needs to be taken into account. <S> As you say, a transistor could be added if needed. <S> At this point though, I would ask myself how necessary this is. <S> Hope that helps. <A> Where to start?.. <S> I'll start from this line: ...and still keep the added components to a bare minimum. <S> The bare minimum doesn't include LEDs for helping the designer 1 debug. <S> What a designer to do instead? <S> Add test points for the oscilloscope <S> [if you don't have access to an oscilloscope of some kind, get it]. <S> You can kludge-wire temporary LEDs to the test points, if you want to. <S> Output the state of your program on a serial terminal, or a debugger, or radio, etc. <S> You can can get more information that way than with LEDs. <S> Add a small number of thought-out LEDs which reflect the state of your system. <S> I usually add at least three: power/status, activity, fault. <S> These are controlled from the software, and they have their own dedicated pins. <S> LEDs are useful only for slowly changing signals. <S> If you have 8 bytes arriving on a serial RX line at 19.2kbaud, you will not see it with an LED. <S> Too brief for a human eye to spot. <S> If strategically placed LEDs help your users debug, those are different situations. <S> For example, you device is controlling an external relay, and the user provides a relay and wires it to your device. <S> It makes sense to provide an LED which lights up when your device activates the relay. <S> If the relay doesn't activate when the user expects it, he can tell (at least to some degree) if the cause is in the relay, or in your device. <A> For a State machine that changes slowly use 2mA LED current on any <=5V logic family with the series R to determine the voltage drop and current. <S> This can be hardware states or unused points with breakpoints assigned to send some code pattern to an LED port. <S> The LED debug mode could also be disabled by design if using battery power after debug, using a 0.1" 2 pin disable jumper clip that you can pull for gnd return for all LEDs.
| I don't usually put debug LEDs on actual digital or analogue signals, unless they really say something very useful about the circuit state, or they are there for the user anyway (for instance a "SIG" or "OVERLOAD" led in an audio chain). First off it depends where I am in the design cycle.
|
Can I put Li-ion batteries in series and discharge them at different voltages? I need to run a pump (drawing 95mA at peak flowrate) at +14V and the rest of my circuit runs on +3.3V. To save on battery costs, I was thinking of purchasing four 18650s at 3.6V 3500mAh per cell and stacking them in series to produce ~14.4V needed for the pump (it can run between 10-15V and we are going to use PWM to control the voltage i.e. the flowrate). Could I also run two terminals from one cell (at 3.6V) and regulate that to 3.3V for my lower voltage loads? I understand that this will cause one of the four cells to discharge faster than the other three, but I plan on using a BQ29209 balancing chip to maximize the capacity I can get out of them. Would it be wiser to just use two buck converters from 14.4V down to 12V and 3.3V respectively? Ideally, if I had more money, I would put 4x 3.6V in series = 14.4V @ 3500mAh, and then another 2x 3.6V in parallel = 3.6V @ 7000mAh to get more capacity. <Q> Would it be wiser to just use two buck converters from 14.4V down to 12V and 3.3V respectively? <S> Yes, that would be a MUCH better idea. <S> Tapping off 3.6 V for making 3.3 V is a BAD idea as you would be using that single cell differently (loading it more) compared to the other cells. <S> Then this cell's charge state will at some point be different from the other cells. <S> You would need separate charging circuits to handle this properly. <S> Also that single cell will wear out sooner than the other cells. <S> Using a buck converter to make 3.3 V from the 14.4 V is easy and <S> much better design wise as all cells will be treated equally. <A> As @Bimpelrekkie already mentioned, the buck converter is easy and relatively cheap <S> (I assume you do not need any high currents there) to implement and much better idea from almost any point of view. <S> Your proposal has at least two significant problems: Single Li-ion cell is not good source for circuit which needs 3.3 V. Typical end-of-discharge voltage for LiIon cell <S> is less than 3.0 V, but you would need to stop discharging somewhere slight over 3.3 V (depends on LDO dropout voltage), so lot of cell capacity will remain unusable. <S> (If your MCU circuit can work with 3.0 V or even less, than this is not so much issue.) <S> Balancing with BQ29209 means, that you are simply putting a resistor in series with higher-voltage cell. <S> It means that you other cells are discharged with the same current as the first one, but energy is lost in joule heat. <S> It is in no way "... to maximize the capacity I can get out of them" <S> Besides, I am not sure you can easily adapt BQ29209 to balance 4 cells in series. <A> Your proposed design is flawed, consider either step up or down. <S> I give the considerations for each. <S> Pros <S> 3.3V Buck converter for 1mA to 0.1A is much simpler than a Boost regulator in component count. <S> 14.4V <S> Boost converter is better regulated than a 4S = 12 to 16V pack and delivers constant energy when needed and may be disabled when not for high efficiency. <S> Cons a 14.4 Boost converter is more complicated ( but easy to follow TI webBench designs ) <S> Other <S> Both Buck and Boost in this range will be about 85% efficient but the Boost can be disabled when not needed. <S> a 3v~4V 4P pack with a buck-boost converter for 3.3V can extend the capacity of the pack unless you use an 3.0V ultra low dropout LDO . <S> whichever pack config voltage consumes <S> the most energy ( watt-h ) is the preferred voltage. <S> 4P= 3 to 4V or 4S=12~16V <S> only you can calculate this and use in your design spec for efficiency, energy storage, discharge time, complexity and cost. <S> start with a better design spec.
| Also if you charge the cells the other cells could be fully charged while that single cell isn't fully charged yet.
|
Current Rating of JST connector PER PIN Hi, I'm just wondering about the current rating of the JST-XH and JST-VH connectors PER pin. For example, in the XH connector above, ** it says 3A current rating, is that split between all pins or doesthat mean one pin can carry 3A? ** So in essence, if I dedicate two pins to VCC, then I could achieve 6A? <Q> You may add currents per pin but the MAX ambient temp spec range reduces some unknown value due to increased self-heating. <S> E.g. <S> 3A^2 <S> * 20 mOhm = <S> 180mW <S> so the pin contact temperature might rise 40'C but adjacent pin temp somewhat less. <A> The current will be more likely to share more-or-less evenly if your wires are at least 1ft (30cm) <S> long (and at least roughly matched in length). <S> That's 16m \$\Omega\$ for the AWG22 wire vs the 10-20m \$\Omega\$ contact resistance. <S> If you're anticipating possible high ambient temperatures, you might want to scale back the total current a bit to account for uneven sharing. <A> They mean per-pin. <S> Note that you must use 22ga. <S> wire (largest size this takes) to get the highest current rating.
| Yes it's per pin, however I think you're talking about paralleling contacts to double the capacity.
|
How should I mount DB9 Connector? How do I mount that DB9 Connector on this GPB? Any tricks? <Q> You could also use a DB9 terminal with an IDC connector, I suppose you use a pitch of 2.54 mm. <S> e.g. <S> 2_54mm-pitch DP9 Connector <A> This is the limitation of using generic 0.1" PCBs or breadboards — many components cannot be mounted in them directly. <S> A summary of alternatives, from neatest to worst in my opinion: <S> Get a custom PCB made with the appropriate hole pattern ("footprint"). <S> PCB manufacture is very cheap and fast these days, and it allows you to skip wiring interconnections between components and have better documentation of how your circuit is actually put together. <S> However, it does mean you have to know what you want the rest of the circuit to be like (though you could design a generic hole-grid "prototyping area" onto a board just like the board you already have). <S> Get a "breakout board" which accepts the DE9 socket and also 0.1" spaced header pins, which you can solder or put into a socket on your board. <S> This is a good option if you have reason to stick with 0.1" systems or want to work on a solderless breadboard. <S> Breakout boards are also available for surface-mount components and such; it's worth considering them for many similar problems. <S> Cut new holes in the PCB to accept the mounting tabs and either cut holes for the pins or bend the two rows oppositely to get them onto a square grid. <S> This will require grinding/filing, not just drills, because the existing holes will interfere. <S> It will probably not end up giving the connector proper mechanical support <S> and so you run a high risk of the connections breaking after some use. <A> Not much you can do except take a drill to the proto board and hack it out until you can get it to fit. <S> Screw it in place then solder wires directly to the pins. <S> Messy but it will work. <S> It is what it is, in this case. <S> EDIT : you can of course ask yourself if it's really needed. <S> If you are attaching a DB9-DB9 cable, why not just make up a cable with the required gender at one end and wire directly to the board? <S> A couple of drill holes and a cable tie to give strain relief, you're good. <S> See sketch below. <A> One trick i have seen in the past is to use a connector that has the right-angle wires open at the back. <S> This gave enough flexibility to push the pins sideways into a square grid. <A> I have done it once before, but it is not an easy task. <S> The pitch of the connector is greater that the one of the breadboard, but by bending closer and at every 2 pins you skip one hole, it will fit. <S> Beware, it won't look pretty, and if you are making something that is semi-permanent, you would be better off making a custom PCB.If space allows, you could alternatively use a straight pin connector, which will be easier to wire in.
| Have the DE9 connector on a cable and attach the cable to the board either permanently as dmb's answer suggested, or using a more convenient connector such as a 0.1" header.
|
Where does the other end of the secondary in a solid state tesla coil connect? Yes, i know it's a very elementary question, it's my first time build. All circuits shows that the not- sparking end of a sstc is connected to ground, but exactly where? do they mean the LITERALL ground or the ground on the wall outlet or just leave it unconnected?It's based on Steve Wards mini SSTC <Q> It's a source of confusion, even for (some) builders of Tesla coils. <S> Or at least, where best to connect it is. <S> The current that flows from the high voltage terminal of a TC has to return somehow to the bottom terminal. <S> As the frequency is several hundred kHz, and the impedance is very high, just the few pFs of capacitance between the top terminal and 'ground' is adequate. <S> What's 'ground'. <S> If you are running in the middle of a field, it's obviously the earth beneath your feet. <S> If you are running in an apartment on the 14th floor, it's actually the mains wiring and any metallic pipes in the walls, the floor, the ceiling. <S> Some of these may be connected together, some may be relatively isolated. <S> This is where the spark currents may introduce voltages between (say) the line conductors and the earth conductors in your building's wiring, and upset your, and your neighbours' electronic equipment. <S> What people running indoors will often do is to use a 'counterpoise', a large sheet of alli foil or chicken netting laid out on the floor beneath the coil. <S> This becomes the ground, at least the major ground at RF. <S> When running indoors, it's also a really good idea to connect some X2 rated capacitors between line conductors and mains earth at the coil supply, to short these together at RF. <S> This reduces the amount of voltage that the TC currents will induce in the wiring. <A> It's based on Steve Wards mini SSTC <S> The circuit produced by Steve Ward is fairly explicit: - I've added red boxes around the two symbols for mains ground used: - For incoming mains ground i.e. the ground on your AC home wiring and <S> The ground at the bottom of the secondary coil (the same electrical point). <S> do they mean the LITERALL ground or the ground on the wall outlet or just leave it unconnected? <S> The wall outlet ground and this, for most sane and sensible electrical installations should be rodded through to proper terra-firma ground. <A> Beware: for coil harmonics up in the rf (well above 500KHz) <S> you can easily hit a cable-resonance in the power cable ground. <S> Suddenly you'll start getting stung when touching your microwave or fridge. <S> Also, you'll be broadcasting for miles, since your "ground" wire becomes an antenna. <S> And excellent ground for a small TC is a metal table top under the coil system. <S> So, connect to a metal (magnetic) workbench surface with a screw driven in the sheet metal. <S> Or, try a 3ft section of steel-mesh "hardware cloth." <S> And then, also run a separate ground wire to the screw of an electric outlet. <S> A Tesla Coil is a high-voltage animal, hence it's actually a capacitor. <S> It's connected to a tiny plate (the hv terminal) <S> adjacent to an enormous plate (the ground.) <S> To confine the strong EM fields so they don't spew all over your apartment building, just connect the base of your TC secondary to a very large conductor-plate that's right under the coil. <S> Note that whenever you're in the e-field of a Tesla Coil, you'll get shocks <S> /burns if you then brush your fingertips against grounded metal. <S> So, if you're using large sheets of foil as a nearby ground, perhaps you'll want to cover them with a pad, or turn your cardboard with brown-side-up. <S> Or even attach the foil or mesh sheets to the underside of your workbench.
| Connect the secondary bottom, the mains wiring ground, and any safety gap and filter returns here. Or, just cover a very large piece of cardboard with foil (4ft if you can find some,) stick it under your coil, and for a ground-wire then strip a few inches of stranded wire, splay it out and tape it to the foil.
|
Use audio frequency to light up multiple LEDs Need some help here - I need to light up about 20 different LEDs based on the frequency input(200 Hz-20,000 Hz) Eg: The circuit should light up the 1'st LED when the input frequency is between 200 Hz and 300 Hz Similarly: The circuit should light up the 2'nd LED when the input frequency is between 500 Hz and 600 Hz And so on... I thought about using a band pass filter, but I don't think it would work with frequency ranges tight as these. Below is the band filter I used to try out filtering 11,000 Hz - 15,900 Hz but the LED lights up even on 9,000 Hz . Band Pass Filter Graph What can I do to get this done? <Q> There are two issues here, I think. <S> Well, three, <S> but I'll save that for last. <S> First, R2 should be at least 10 times R1. <S> When the output frequency is high enough, the impedance of C2 will be very low, and the combination of R1/R2/C2 will basically look like R1 and R2 in parallel, which is not what you want. <S> Second, since your last element is C2, the output to the LED will look (more or less) like a voltage source, and you don't want to drive an LED from a voltage source. <S> All else ignored, once you reach the forward threshold voltage of the LED, any further increase will produce a very large increase in brightness. <S> Finally, and this is harder to explain <S> , a bare LED is what's called a non-linear load. <S> That is, it provides a very large apparent resistance when reverse-biased, and a very small apparent resistance when forward-biased above its threshold. <S> This changing resistance will feed back into your filter and affect your results. <S> Finally finally ( <S> and yes, that's 4 out of 3), this is not a good approach for what you are trying to do. <S> Most importantly, your expected output curve is very inaccurate. <S> It might do for a 100 Hz to 10kHz, but single RC sections simply don't have the selectivity you want. <S> For instance, your low-pass section, R2/C2, when taken by itself, has a gain of .822 at 11 kHz, .705 at 16 kHz, and .623 at 20 kHz, so you can see that it's not doing much over this frequency range. <S> The filter as a whole has a peak response at about 16 kHz, but its -3dB point is a bit below 3 kHz. <S> So it's no wonder you're not getting the results your figure led you to expect. <S> TLDR: <S> If you what better selectivity, you'll need to use a much more sophisticated (multipole with a better LED section) circuit. <A> A set of MFB filters could be used. <S> For example, something like this: simulate this circuit – Schematic created using CircuitLab Design equations for an MFB filter are in this AD paper. <S> I used a Q of ~10. <S> The input amplitude has to be about 1V or so to cause the LED to turn on, and without some kind of signal processing before the input the width of the band that turns the LED on will vary somewhat with the input amplitude. <S> If you have a suitable micro such as a MIPS <S> PIC32 or an ARM Cortex M4 <S> you could do this with basically one chip vs. 5 quad amplifiers and 100 passives for the filters, doing it the analog way. <A> If you truly want isolation between the filters, such that there is no bleeding of energy between adjacent-frequency-bands, then you need infinite-Quality-factor ("Q"). <S> Unfortunately, infinite-Q requires infinite time to response. <S> I doubt you are that patient. <A> We hear frequencies on log scale or octaves log base 2. <S> So in order to accomplish 20 bands how many half octaves does this make? <S> 20 Hz-20,000 Hz is 3 decades or 10 octaves or 20 half octaves. <S> THen you must define your dynamic range. <S> Let's say range = 0 <S> to -30 dB has a BW of 1/2 octave. <S> So the BPF must be very high Q around 100.
| Your filter is working just about as it should.
|
simplest way to create an activatable alarm on a speaker? I have made a circuit that produces a 3.3V high when its active and 0V when it is off. Now I would like to extend it with a speaker that plays some sort of alarm (although it shouldn't be too intrusive, but clearly understandable) that I wan't to activate with said circuit. So it plays some sort of tune or alarm for as long as the signal is high. So what would be a simple way to create a triggerable alarm/tune without the need for a computer? Ideal would be some sort of chip with preprogrammed music or something on it that I could just hook up to a speaker and that could simply connect to the output of the circuit. I have looked for something like that but it doesn't seam to exist, they always require a computer or a raspberry pi to set the samples. And just connecting a speaker to the signal outright just creates an irritating tone. <Q> Sonalerts (trade name) are piezoelectric sounders that can make a wide variety of noises when power is applied, with no other components. <S> You may hear one version as the audible signals on some pedestrian crosswalks. <S> They should be available from most major distributors. <A> A relatively simple circuit that might get the job done is an oscillator based on a NOT gate (also happens to be my choice for Stack Exchange icon). <S> This will create a single frequency square wave tone where the frequency can be adjusted by the capacitance value C. <S> The value of C will need to be relatively high to bring frequency down to audio range. <S> Without any amplifier, you are relying only on the output current of the transistor(s) within the NOT gate to drive the speaker which may or may not be sufficient for your application. <A> In the last century I could buy a chip which produced a (rather distorted) <S> 3-tone <S> descending major chord chime with decay. <S> Used for door chimes. <S> As I still hear the sound in the bake-off section in Lidl, I guess it or similar chips are available. <A> just connecting a speaker to the signal outright just creates an irritating tone <S> Actually, it should only create a click, unless you have poorly filtered 3.3V power. <S> A mechanical device that operates at 3.3V with sonic output could be a doorbell-style mechanism. <S> The basic principle of these is a delayed turn-off switch,where, after the clapper swings to hit the bell, an electrical contact openswhich turns off the power to the electromagnet that swung the clapper over... <S> (c) draws a bow across a violin or (d, e, f...) <S> Few options are as energy efficient, though, as the resonant-platebeeper in an alarm watch. <S> That requires modulation, not just voltage, applied,but you can tune it for sound frequencies that are very easy to hear.
| Another option might be a low-voltage DC motor, either with an eccentric weight (like some old phone/pager vibrators) or a movingpart that (a) rotates a music-box drum mechanism, (b) drops amarble from a feed hopper every time it rotates or
|
Attaching wires to a SMT footprint I have a pre-made motor controller which I want to re-purpose for a hobby project by pulling the MCU off and attaching to a custom control circuit (with a more powerful MCU, current sensors, etc). The MCU is a LQFP-48 7mm package (0.5mm pitch pins). It seems like attaching to standard SMT footprints is a reasonably common prototyping task, but I can't find any products designed to do this. What is the name of some kind of adapter/interposer/something which is designed to solder onto the PCB in place of the MCU, and how would I go about finding one of the right size? I've found a similar product called 14 pin DIP to 14 pin SOIC/SOJ , but that's very generic and hard to search for more of. It's particularly hard to search for because there are a lot of products for going the other way (attaching a SMT IC to larger wires). Some pictures of similar products I found for reference: Just a name and/or source for those little metal clips on the edges would be helpful too, so I can attach them to my own PCB. Finding some kind of SMT 0.5mm-pitch header strip would work too (solder those to the existing PCB, and then to a PCB of my own on top), but I can't find any that small. If anybody has other ways to achieve the same goal, I'm interested in suggestions there too. Some approaches I've already considered: Soldering wires directly to the pads is hard because they're tiny. Finding other places on the PCB to solder wires is kind of annoying because it's a lot of wires to attach, and some of the nets don't go very many other places. Getting a custom PCB with 0.5mm castellated edges made for cheap doesn't seem to be possible. <Q> You've basically covered all of the common solutions in your question. <S> There are some other specific areas to look for a connector that can be soldered to a QFP footprint, such as emulation adapters or socket converters. <S> Googling for these terms brings up some options for other QFP footprints, such as QFP44. <S> I suspect that these mostly target at common memory IC footprints, so it may be difficult to find a QFP48x0.50, specifically. <S> Another option might be to use a QFP test clip. <S> This requires that there be a QFP IC attached to the board, but that IC must not interfere with the signals you're interested in. <S> You might be able to make this work by simply holding the MCU on the board in reset, which should keep all of its IO lines high impedance. <S> If that won't work for some reason, you could replace the MCU with a dummy package that has no die and no internal connections--these are available from specialist suppliers for assembly testing purposes. <S> All of that said, emulation adapters and test clips are not likely to be very reliable if your prototype will be subject to handling or other motion/vibration. <S> The most reliable solution, assuming you can't get a castellated PCB made (0.5mm is pretty small for castellations as you've noted), is probably to solder wires from the MCU pads to a header. <S> This won't be especially easy, but with some fine magnet wire (I usually use a 34AWG Beldsol, which has a solderable enamel insulation), a steady hand, and a good microscope <S> it is certainly doable. <S> You will of course need to find a suitable place on the board to mount a connector. <S> A small PCB that has a connector of your choice broken out to <S> 1.5mm solder pads would be a big help there. <S> The upside is that, done properly, this method can be quite reliable, especially if you glue all of the wires in place. <A> Rather than electrically change it, I'd give serious thought to reprogramming the existing MCU with a custom firmware that makes it a delegate for more sophisticated off-board logic, using whatever fast interface you can bring out. <S> And check to make sure there isn't a more powerful part in a compatible package. <S> I'd only try to solder to the board for debug purposes using fine enameled magnet wire under the microscope, but would prefer to avoid doing that for actual usage . <S> If you do try to make such a lashup, a key could be having some sort of termination structure right next to the pads, do that right <S> and you could potentially even use single uninsulated strands pulled from a larger stranded wire - <S> but again, only for debug. <S> Or rather than making contact at the MCU, go for the FET gates themselves or their gate drive circuitry, which is hopefully less dense. <S> Essentially, treat the existing board as an array of FETs and related parts, temporarily, on the way to making your own. <A> How about a board like this: <S> https://www.amazon.com/QFP32-QFP44-QFP64-QFP100-Breakout/dp/B00XSC2CZS <S> Usually you can find these boards with the "breakout" keyword and the name of the package. <S> Not sure why not <S> , I do it all the time, you just need some large through-hole pads that you put on the edge, half-way through the cut line. <S> You can make a PCB and have like 20 pcs manufactured for something like less than 20$. <S> (sorry for formatting, I'm on mobile).
| If you can't get hold of a suitable dummy package, then you might be able to lobotomize the existing MCU by carefully grinding out the die and bond wires from the package, but this should probably be a last resort method. Getting a custom PCB with 0.5mm castellated edges made for cheap doesn't seem to be possible. Such bodge wire techniques, done properly, can even be acceptable on production PCBs, although you certainly want to do what you're doing more than once!
|
STM32 CAN bus receive interrupt is sometimes not fired, and CAN transmit sometimes times out I have two STM32 boards connected via a CAN bus. They periodically transmit a message to each other. For some transmissions however, HAL_CAN_Transmit returns with a timeout HAL_TIMEOUT . Similarly, sometimes the CAN receive interrupt does not get fired. There is not a real pattern when it works and when not. However, resetting a device seems to induce timeouts more often. When investigating the signals with a scope, they appear to be fine. The receiving transceiver acknowledges the signal as well even when the CAN receive interrupt is not fired. What could be the problem in this case? This is the code to transmit a message. It is called by the main loop. void send_can_message_handler(void* task){ hcan.pTxMsg->StdId = 0x321; hcan.pTxMsg->ExtId = 0x01; hcan.pTxMsg->RTR = CAN_RTR_DATA; hcan.pTxMsg->IDE = CAN_ID_STD; hcan.pTxMsg->DLC = 2; hcan.pTxMsg->Data[0] = can_messages_sent; hcan.pTxMsg->Data[1] = 0xAD; HAL_StatusTypeDef status = HAL_CAN_Transmit(&hcan, 500); can_messages_sent = can_messages_sent + 1; if (status == HAL_OK) { uint8_t data[2] = { 79, 75 }; HAL_UART_Transmit(&huart1, data, 2, 100); } else if (status == HAL_ERROR) { uint8_t data[2] = { 69, 82 }; HAL_UART_Transmit(&huart1, data, 2, 100); } else if (status == HAL_BUSY) { uint8_t data[2] = { 66, 85 }; HAL_UART_Transmit(&huart1, data, 2, 100); } else if (status == HAL_TIMEOUT) { uint8_t data[2] = { 84, 73 }; HAL_UART_Transmit(&huart1, data, 2, 100); }} This is the interrupt code. void USB_LP_CAN1_RX0_IRQHandler(void){ /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 0 */ /* USER CODE END USB_LP_CAN1_RX0_IRQn 0 */ HAL_CAN_IRQHandler(&hcan); /* USER CODE BEGIN USB_LP_CAN1_RX0_IRQn 1 */ FillBuffer(&canBuffer1.State, hcan); // Enable receiving again. if (HAL_CAN_Receive_IT(&hcan, CAN_FIFO0) != HAL_OK) { // Handle error. } /* USER CODE END USB_LP_CAN1_RX0_IRQn 1 */} FillBuffer simply copies the data to a buffer. void FillBuffer(CanBufferState* state, CAN_HandleTypeDef hcan){ for (size_t i = 0; i < 1; i++) { state->Buffer[state->WriteIndex] = hcan.pRxMsg->Data[i]; state->WriteIndex = (state->WriteIndex + 1) != BUFFER_SIZE ? state->WriteIndex + 1 : 0; }} <Q> I chatted with an STM32 employee about this problem some time ago, and he wrote I had to wait until the next version of the HAL library. <S> My version at that time was version 1.6.In version 1.7 of the HAL library the problem is solved. <S> I moved to another communication method so never tried CAN with the new version 1.7, but this should solve the CAN transmit error, specifically on <S> STM32F103. <S> I have been notified by tyr.bentsen (see answer/comment of him in this post). <S> Thanks for the notification. <S> The software can be downloaded from ST.com: stm32cubef1 Scroll to the bottom where you see the software installations and download the STM32CubeF1 1.7 and Patch_CubeF1 1.7.1. <A> You need to add the code to verify this assumption but, A common reason that the interrupt is not fired is that the interrupt flag is not reset soon enough. <S> On your interrupt, the interrupt flag reset should be the first instruction to be made, so that if a new interrupt happens when you are still in the interrupt routine, it will fire back again. <S> If you reset the interrupt flag at the end of the routine, then you may have had a new interrupt happening that you would miss. <A> First off, if you are using a breadboard check that your RS pin is properly connected to GND or pulled down to GND depending on your transceiver that you are using. <S> That pin usually puts the transceiver in an idle mode if floating or high. <S> In your code check that the automatic Sleep and all of that is configured right. <S> Here is my example hcan1.Instance = <S> CAN1;hcan1.Init. <S> Prescaler = 9;hcan1.Init. <S> Mode = <S> CAN_MODE_NORMAL;hcan1.Init. <S> SJW = CAN_SJW_1TQ;hcan1.Init. <S> BS1 = CAN_BS1_13TQ;hcan1.Init. <S> BS2 = CAN_BS2_2TQ;hcan1.Init. <S> TTCM = <S> DISABLE;hcan1.Init. <S> ABOM = <S> DISABLE; // <S> Automatic bus-off managementhcan1.Init. <S> AWUM = <S> DISABLE; // <S> Automatic wake-up modehcan1.Init. <S> NART = DISABLE; // <S> No automatic retransmissionhcan1.Init.RFLM = <S> DISABLE;hcan1.Init. <S> TXFP = DISABLE; <S> These parameters can make the bus go in to a dormant state if the messages do not come in frequently. <S> Also I have noticed that the remote request frame scenario does what you described. <S> Even if you got everything working and set up correctly it only reacts some times. <S> One last thing for your bit rate. <S> The most accurate place to find the parameters is http://www.bittiming.can-wiki.info/ . <S> Make sure that both microcontrollers are set up the same. <S> As Damien mentioned: On your interrupt, the interrupt flag reset should be the first instruction to be made, so that if a new interrupt happens when you are still in the interrupt routine, it will fire back again.
| Another common reason is that you have higher priority interrupt code running somewhere, like a timer, that starves the CPU, or that your interrupt routine is too long to execute.
|
What is harmful for electronic circuits? Voltage or electrical current? Its said that if you get more electric current, the electronic device in a circuit will just take what it needs and its not dangerous, so if we raise the voltage and therefore the electric current increases but the device will take just the electric current it needs, where is the parameter I am missing to undertand why increasing the voltage is dangerous for the device? Thanks <Q> A device draws the correct current only at the correct voltage (usually specified as a range). <S> If you change the voltage (go outside the specified range), then the current that it draws might change too, to an unsafe value. <S> Here are a few examples: <S> With resistors, current rises linearly with voltage. <S> Power dissipation rises with the square of the voltage. <S> Usually not too much of a problem, at least until you reach the dissipation limits. <S> With capacitors — especially electrolytics — there is a voltage above which the current rises dramatically when the internal insulation breaks down. <S> With transformers, raising the voltage raises the current which increases the magnetic field within the core. <S> When the core reaches saturation, the current rises dramatically, leading to excessive dissipation in the windings. <A> Electronic devices don't "take only as much current as they need" by magic: they're designed to work that way. <S> The simple answer is that by attempting to power a device with a higher voltage, you are violating the design parameters that make it work. <S> As with any device, operating outside the design parameters often leads to failure. <A> There are many failure modes in semiconductors. <S> These are prevented by staying well within the Absolute Maximum Specs. <S> The answers are shown by the units below. <S> {V,mA,'C} <A> If a device fails because of heat, that's power , which is a combination of voltage and current. <S> If it fails by punching through a gate, that's voltage. <A> Its said that if you get more electric current, the electronic device in a circuit will just take what it needs and its not dangerous, It depends on what the circuit is. <S> most consumer appliances are voltage fed and there that statement is correct. <S> so if we raise the voltage and therefore the electric current increases but the device will take just the electric current it needs, where is the parameter I am missing to undertand why increasing the voltage is dangerous for the device? <S> The device may be designed to expect a certain voltage and if the wrong voltage is applied <S> the wrong current will be taken. <S> Above a different level the device may overheat causing thermal shutdown and/or permanent damage. <A> Both are dangerous. <S> For example, consider the rate of change of both voltage and current. <S> That is, \$ \frac{\text{dv}}{\text{dt}}\$ and <S> \$ \frac{\text{di}}{\text{dt}}\$ resepectively. <S> Now, if \$ \frac{\text{dv}}{\text{dt}}\$ is high i.e. which is called a voltage overshoot or voltage spike, the electronic devices may run into a problem of incompatibility with the voltage and may fail. <S> This can be prevented by using snubbers and a simple snubber will have a series connected \$RC\$ in parallel with the device to be protected. <S> The capacitor's discharge current in the snubber circuit will be limited by the resistor \$R\$ . <S> If \$ \frac{\text{di}}{\text{dt}}\$ is high, it means that the increase in current is higher than spreading velocity of the current hence leading to the concentration of current (i.e. high current density) at a particular point called the hotspot and it heats up rapidly and the internal components will get damage due to the high heat produced as a consequence of the Joule's heating effect. <S> This high \$ \frac{\text{di}}{\text{dt}}\$ can be prevented by using a diode in parallel with a series \$RC\$ in parallel with the load and finally an inductor in series with the supply. <S> An example is shown below for an SCR based half wave rectifier. <S> Various other implementations of \$ \frac{\text{dv}}{\text{dt}}\$ <S> protection is shown below. <S> Capacitor blocks sudden voltage change and can be proved mathematically below as: \begin{equation}C = \frac{dq}{dV} = \frac{idt}{dV}\end{equation <S> } <S> Thus, for a constant current, \begin{equation}C \propto \Bigl(\frac{dV}{dt}\Bigr)^{-1}\end{equation} <S> Similarly for an inductor, \begin{equation}V = <S> \frac{d}{dt} (LI)\end{equation} Assuming inductance as constant, \begin{equation}V = <S> L \frac{di}{dt}\end{equation} <S> Thus, for a constant voltage, \begin{equation}L \propto <S> \Bigl(\frac{di}{dt}\Bigr)^{-1}\end{equation} <S> Thus, inductor opposes sudden change in current. <S> Image credit for all the above images: Rashid, M. H. (2018). <S> Power Electronics(4th ed.). <S> Noida, UP: <S> Pearson India Education Services Pvt. <S> CIN: U72200TN2005PTC057129 <S> ISBN : 978-93-325-8458-7
| Above a certain level the device cannot withstand the voltage, resulting in permanent damage.
|
Why is current controlled feedback faster than voltage controlled feedback in PWM controllers? Looking at modern ICs, we prefer current control feedback over voltage control feedback, due to the speed of the feedback. Current control will react faster than voltage control. Here are 2 images, first of voltage control PWM feedback and secondly of current control PWM feedback But why is current control fundamentaly faster? Both images come from the RECOM DC/DC book of knowledge <Q> All transistors have GBW limit whether they are BJT’s or FETS. <S> Yet common emitter or source configurations are unity gain thus maximum BW. <S> This is why ECL and CML and current mode comparators are fastest yet have lower input impedance. <S> But in this analog case the CM PWM does not have to integrate the voltage and simply compares the voltage error with the current * Rsense <S> =Vs to match the scaled down voltage error in order to cut off the driver (reset). <S> The voltage error ripple is reduced by detection on each pulse rather than the integration of many pulses from the filter time constant which must be many pulses in delay to reduce ripple voltage. <S> The Voltage Mode Feedback (VMF) with a 2nd order group delay response is twice as much even if the BW were the same, yet we know the pulse feedback has much higher loop bandwidth than the switching frequency so the small step delays are much less. <S> added <S> But given the Volt-second saturation limits of the inductor's charge current, there are limits to the benefit of the CML feedback when the PW rises to 100% for large step load or large input step voltage changes. <S> These tradeoffs improve the small step response delay more than the large step response but in both cases improve stability and ringing. <A> I disagree with the statement that current-mode control is faster than voltage-mode control. <S> The control-to-output transfer functions are certainly different between the techniques and probably easier to compensate with current-mode control. <S> However, the controlled parameter in both cases remains the same: the duty ratio \$D\$ . <S> It is the way you construct it which differs between the adopted approaches. <S> Remember that available volt-seconds are identical for a given structure whether you talk about voltage- or current-mode control. <S> In voltage-mode control or VM, you directly control <S> \$D\$ <S> via a comparator observing the error voltage and an artificial sawtooth. <S> In current-mode control or CM, the artificial sawtooth is an image of the inductor current whose peak is controlled by the error voltage, hence the name also found in the literature of indirect duty ratio control . <S> But if you take a boost converter for instance, the maximum crossover frequency is limited by the RHP zero <S> and it is the same in CM and VM. <S> You have a similar situation with a buck-boost or a flyback converter. <S> If you take a buck converter operated in voltage-mode control, there is no theoretical upper crossover limit below half of the switching frequency. <S> More complicated with current-mode control where subharmonic poles hamper the response at half the switching frequency. <S> Oui, the dynamic response of a CM converter is of 1st-order at low frequency (3rd-order converter in general for the 3 basic structures) and thus easier to control - in most cases - than the VM counterpart. <S> Also, mode transition from CCM to DCM and vice versa is less troublesome in CM than in VM, making CM the most popular control scheme. <S> But a lot of dc-dc bricks are still operated in VM not CM: better open-loop output impedance, no need for slope compensation which distorts current limit, feed-forward brings excellent input rejection in VM etc. <S> As a preliminary conclusion, no straight answer! <A> Maybe this answers your question: A constant voltage regulator is responsive only to changes in the load voltage and adjusts the duty cycle accordingly. <S> As it does not directly measure load current or input voltage, it must wait for a corresponding effect on the load voltage with any changes in the load current or input voltage. <S> This delay affects the control characteristics of the switching regulator so that there are always several clock periods required for stabilization. <S> The control loop must therefore be compensated to avoid overshoot or output voltage instability. <S> (Source: Section 1.2.5 PWM-Regulation Techniques from the RECOM DC/DC Book Of Knowledge ) <S> So, the VM won't change the duty cycle until the output is already wrong, because it measures the output. <S> While CM can change the duty cycle of the fly to make the output stable, according to the changes in current...
| The Current Mode Feedback (CMF) reduces the inner loop to a much faster 1st order LPF for smaller Step load variations.
|
about formula in temperature of resistor I have 10 watt resistor. I am using resistor with ac current. I need mathematical formula for learning temperature of resistor in t time. temperature of resistor depends P=V^2/R and time. Such as for R=20 ohm. Formula inputs: V,R,t Formula Output: temperature. Is there a formula for this state? <Q> No, there is no formula that can calculate the resistors temperature given only the resistor value, the voltage across the resistor, and time. <S> You need much more information for this calculation, including the ambient temperature, the thermal mass of the resistor, the rate of heat conduction through the resistor leads, and the rate of heat loss to the ambient air. <A> With constant voltage, the power converted to heat in a resistor is $$P= <S> U^2 <S> R$$ Problem: <S> \$R\$ is not constant, but for metals increases linearly with temperature \$T\$ , i.e. it has a temperature coefficient i.e. \$R(T) = <S> R_0 <S> + <S> \alpha \Delta T\$ : <S> $$P= U^2 R(T) = <S> U^2 \left <S> ( R_0 + \alpha \Delta T \right) = <S> P(T)$$ <S> So, but what is the temperature? <S> The temperature is the amount of heat (i.e. \$\int P \,\mathrm d\tau\$ ) that can't be deducted into the environment, times some material constant, i.e. something looking roughly like $$T(t)=\beta\int_?^t P(T) <S> d\tau <S> + \gamma \int_?^t{\left(T_\text{ambient}-T\right)^2 <S> \,\mathrm dt} + \epsilon\text.$$ <S> That means your Temperature is proportional to the integral over a function of the temperature – congratulation <S> , you've found a differential equation with badly defined boundary conditions! <S> So, no, there's no easy formula; you'll need the supplier of these resistors to tell you the thermal resistance . <S> If their datasheet doesn't specify that, you can't go on. <S> Anyway, if someone is trying to sell you high-power resistors without thermal data in a datasheet, stay the hell away from that supplier <S> – there's a high chance you will get something that isn't actually rated for 10W, badly specified, or not as reliable as promised. <S> Simply only buy components from reputable sources ( Mouser , Arrow , Element14 , Digikey ), and not from places like Aliexpress (where your image is from). <A> There is a common formula, but I doubt it's going to help. <S> In this case, you should be aware of the concept of thermal resistance <S> In general, it is possible to find a number RT such that for power passing through a material or structure, <S> $$ \Delta T = <S> RT x P $$ , where delta T is the temperature difference between the two sides of the material/structure, and P is power being dissipated. <S> Problem is, RT is usually found experimentally. <S> There are a few exceptions. <S> For instance, if your resistor is in a vacuum, and you know its emissivity, you can find its equilibrium temperature from the blackbody equation. <S> In many cases, though, accurate determination of emissivity is also done experimentally, although common configurations are probably available. <S> Emissivity is a matter of material and texture, and lots of work has been done to determine the effects of these properties. <S> This is commonly done for the packages of power semiconductors, and RT numbers are common on the data sheets of many power transistors and ICs. <S> Many heat sink manufacturers will provide an effective RT for their heat sinks, and you can use this to calculate how hot a resistor or transistor will get at a given ambient temperature. <S> Note, though, that RT will be different for each heat sink, and will vary wildly with airflow velocities across the heat sink. <S> Even if you're talking "natural convection", which is what happens without a fan blowing, RT will vary depending on orientation of the heat sink. <S> Some orientations will encourage the generation of air movement (which is what actually cools the heat sink) more than others. <A> If you assume the CORE of the resistor is silicon/clay/ceramic, and assume the CORE is 2mm diameter (1mm radius), and you keep the pulsed!!!! <S> power shorter than the thermal timeconstant of silicon for 1mm cube, then we can reason like this <S> 1 cubic meter of silicon has 11,400 seconds time constant <S> 0.1 cubic meter of silicon is 100X faster <S> , at 114 seconds 0.01 cubic meter (1cubic centimeter) is another 100x faster,at 1.14 seconds 0.001 cubic meter (1 cubic millimeter) is another 100X <S> faster, at 0.014 seconds (11.4 milliSeconds) thermal timeconstant. <S> Thus for heat pulses faster than 11.4 miliSeconds, the heat has not even completely heated the resistor core, and certainly has not begun to exit the resistor by the leads, or by air flow, or by radiation. <S> For long pulses, its best to have very short leads out to wide pieces of metal, to heatsink the resistor. <S> Some resistors have double-sided mounting flanges and have flat metal bottoms, to dump the heat into underlying heat sinks, with the heat-path being just 2 or 3 or 4 milliMeters.
| If you have a resistor which is thermally bonded to a spacer block which in turn is bonded to a large heat sink whose temperature you know, you can look up the thermal resistance of the spacer material and calculate the temperature drop across the spacer from its dimensions.
|
A basic question about amps, watts, and charging batteries Why do we speak of watts (and not amps) when we refer, for example, to the "7.5W Wireless Charger for iPhones," but when we talk about cord-based USB charging, the specs typically refer to amps (and not watts). For example, one page explains that the "USB spec is 500 mA maximum current. The charger provided with your iPhone can provide up to 1000 mA." The difference between amps, watts, and volts is something I have struggled to understand since high school, which was a long time ago for me. I've re-read your standard references like Wikipedia, but I'm still not getting it. Can someone help me understand these concepts by demonstrating how I would apply them to understand how to compare the difference, in performance, between a 7.5W wireless iPhone charger and a 1000 mA corded USB charger? Thanks in advance for your help and patience. <Q> It is really very simple. <S> You cannot have watts without amps flowing at some voltage level. <S> Then: watts = volts <S> * amps <S> Don't make it more complicated. <S> If something is rated to deliver 7.5watts then that power is delivered at some voltage. <S> Divide the 7.5 by that voltage and know the corresponding amperage capability. <A> The reason for the difference is that it's kind of apples and oranges. <S> With a wireless charger <S> it's (hopefully!) <S> safe to assume that the whole chain is reasonably efficient, and in the end what you care about is how much energy is stuffed into your battery, not how many electrons have passed through. <S> So the volts and amps don't matter as much, and in the case of the power that's being transferred wirelessly, aren't even in play. <S> For USB, you can fully specify the power by specifying the current. <S> USB is (or should be) <S> a fixed 5 volt system. <S> So a 1000mA charger will supply up to 1000mA, which means up to 5000mW (or 5W, but I didn't want to make you do all the conversions until the end). <S> I'm not sure how to help you with the amps/watts/volts problem -- <S> watts = volts <S> * amps <S> if you're talking electricity, but because energy is a much more fundamental physical property than anything electric, watts = force * speed, or torque * rotational speed, or any number of other physical quantities that multiply out to power. <A> The Amps only is useful when V is constant. <S> However W is useful always regardless if V or A or both change. <S> USB has constant 5V thus 1.5A is needed for 7.5W and thus a 1000 mA USB charger cannot drive that. <A> When you talk about Watts it's because you want to know roughly how long the device will take to charge another device or in the case of a battery device how long it will last. <S> Talking about Watts gives you an idea of how much punch it can deliver or withstand depending on the type of device. <S> In the case of Amps you talk about them because you want to impply in a way the mechanical strength or resistance of the device and its wires when conducting current. <S> That's because a 40 AWG wire, for example, can withstand as much as 1.5A <S> According to this , however, in theory it could transmit hundreds of volts as long as 1.5 Amps are not reached. <S> And Remember Watts = <S> Amps (times) volts. <S> So if you talk about just watts you restrict to a defined voltage <S> but if you talk about Amps its more about the resistance and in a way duration of a device. <A> The difference between amps, watts, and volts <S> You cannot compare the three because they are all measurement units for different physical phenomena. <S> An Amp is a unit of measurement of electric current. <S> A Volt is a unit of measurement of voltage. <S> Here is how they relate. <S> Imagine a fire hydrant with two attached hoses, each having a nozzle at the end. <S> One is a fire hose and the other is a garden hose. <S> The fire hydrant provides water at a certain pressure, let's say 100psi. <S> That pressure can be thought of as voltage . <S> Water flowing out of the fire hydrant can be thought of as current . <S> If you open the fire hydrant valve without an attached hose, you will get a lot of water flowing out of the fire hydrant because there is very little resistance to water flow when there is no hose attached. <S> If you use a fire hose, you get somewhat less flow because the fire hose restricts the water flow a bit (small resistance). <S> If you use a garden hose, then you get very little flow compared to the fire hose (high resistance). <S> The water pressure at the fire hydrant cannot push a lot of water(current) through the small diameter garden hose (high resistance). <S> Pressure(voltage) remains constant. <S> Water flow(current) decreases when resistance to flow increases. <S> Now to explain power, somewhat. <S> The water flowing out of a fire hose has enough power to peel bark from a tree, because the pressure at the nozzle is still quite high and a lot of water is flowing. <S> A garden hose spray may be able to knock some leaves from a tree, because the water pressure at the end of the hose is quite low and the rate of water flow is much less.
| A Watt is a unit of measurement of electrical power.
|
Converting Christmas Village from DC to AC So this was the year we bought a AC-powered O-gauge Lionel train and a battery-operated village to add to our Christmas tree decor. The problem, the village eats batteries like a kid eats cookies. Here is the setup: 3 village houses running on (3) AA batteries each [1.5V * 3 = 4.5V each house]—batteries last the longest here, two houses have 1 LEDs, the church has 2 LEDs. 1 village skating rink that also plays music and goes through batteries faster (3) AA batteries [4.5V]. There are 2 bright LEDs, 2 lamp LEDs, and 16-17 LEDs that blink to the music. 2 street lamp posts running on (1) 3.5V CR2450 button lithium battery [3.5V each lamp). The box calls it 3V—these batteries go fast too. The bulbs are not designed to be replaced and there is no such indication of the watts or mA consumption. The options as I see it are to buy a AC-to-DC power adapter for each of the two circuits above—3.5V circuit/adapter and 4.5V circuit/adapter. I have found for example, an AC adapter with a DC output of 3.5VDC@400mA. I have no idea if that would work for the lamp circuit and if done in parallel to keep volts the same at 3.5, does that 400mA become 800mA and what that means to the bulb that is currently running on 3.5V@650mAh. I guess what I need to learn is what rating that bulb could be on a unit where a bulb is not designed to be replaced or its mA use documented. The other option of course is to create a custom circuit board and get my hands dirty in the details—I have 10.5 months so I'm open to it. I would imagine a single AC input split into two circuits that are individually transformed. I would love to have a setup on a board where I had screw terminals, one for each circuit to add each unit (house or lamp) to the board. Are there kits for this? I greatly appreciate any thoughts, directions, and/or lessons. UPDATE #1The current in mA for each device is as follows: 2 Street Lamps draw 10mA@3V each (each one has 3 small LEDs) 2 Houses draw 35-40mA@4.5V each (each with 1 LED) 1 Church draws 40-50mA@4.5V (2 LEDs) 1 Skating Rink draws between 10-240mA@4.5V (16-17 LEDs, 2 constant, the rest flashing, plus plays music) Total per circuit: 20mA@3V 85-330mA@4.5V UPDATE #2With confidence gained from suggestions here, I've cracked open each unit. The lamp posts with 3 tiny LEDs in each, have a 51Ω±5% inline resistor. The houses have no resistors (1 LED in each house). The church (with 2 LEDs) has 2 lines to the positive battery post, one without a resister, the other with a 220Ω±5% inline resistor—my guess is this is going to an LED in the tower and dropping the power/brightness a bit for the small space to equalize the appearance of the 2 lights. The skating rink has no in-line resistors, but a printed circuit board and speaker. <Q> The simple answer for the houses that run from 3* 1.5V cells is to simply use an off-the-shelf cell phone charger. <S> These are nominal 5 Vdc output. <S> Note that most alkaline cells start off at about 1.6 Vdc but decay quickly down to the nominal 1.5V value. <S> If you are concerned that 5V is a tad bit too high, simply add a standard silicon diode in series with either lead, making sure to observe polarity. <S> This will drop the voltage down to near 4.3 Vdc or so. <S> The street lamps are a tiny bit more work - just use more silicon diodes in series with the power supply leads that feed those lamps. <S> Two diodes will drop your 5V power supply down to near 3.3 Vdc. <S> I think highly of Genuine Samsung cell phone chargers: <S> nominal 5 Vdc at 2 Amps. <S> You even may have some hanging around from old phones. <S> If not, they are readily available from eBay and other sources. <S> Just be sure to purchase Genuine chargers - <S> some of the Asian-made knockoffs are complete trash. <A> 3 village houses running on (3) AA batteries each [4.5V * <S> 3 = 13.5V total] ... <S> This is most likely incorrect unless the battery packs really are in series. <S> Why? <S> Because there is no need for 13.5 V to drive the LEDs. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> A very simple approach. <S> A transformer will supply AC which isn't suitable for the LEDs. <S> You would need a DC power supply. <S> You now just need to drop the voltage or limit the current to protect the LEDs. <S> Silicon diodes have a "forward voltage drop" of about 0.6 to 0.7 <S> V. Adding one in series with each of your 4.5 V loads should work and add three in series with the 3 V street lamps to create a 2 V drop. <S> Any common diode such as 1N4148 or 1N4001 should do the trick. <S> Just watch on initial power-up. <S> If the LEDs seem much brighter than when battery powered we may need to add in some resistance. <S> simulate this circuit Figure 2. <S> Using resistors. <S> The original battery supplies may be relying on the internal resistance of the batteries to limit the current. <S> The diode solution may not limit it enough so a resistor solution may be safer. <S> The 100 Ω resistor will limit the current to a safe value for the LEDs. <S> Add resistors in parallel to increase the current where the models have more than one LED. <S> Use two in parallel for two LEDs, etc. <S> For wiring, get an old USB lead, cut the 'B' plug off and use the red (+) and black (-) wires. <S> To avoid screw terminals you could consider wiring each model individually to one or more USB hubs. <A> Do just two wires leave the battery compartment to the test of the unit or are there possibly three. <S> Two will be the best thing for an upgrade solution. <S> Three wires means that the batteries are being used in a way that multiple voltages are being tapped so more complicated. <S> The second thing needed is to get a good grip on how much current is supplied from fresh batteries in each of the units. <S> For this you are going to need a digital multi-meter (DMM) <S> [Do not get scared here. <S> Decent enough meters can be had on Amazon or eBay for around 30USD.] <S> By inserting some paper or tape to isolate one battery contact from its corresponding battery terminal you can then use the DMM in current measuring mode. <S> Use the meter leads to probe on both sides of the temporary barrier to complete the circuit from the battery terminal to the battery socket contact through the meter. <S> Obviously do this when the unit is switched on. <S> These readings will give you a starting point as to how much current you will require for all the units plus say a 20% margin. <S> Then this will allow you to size the source current requirement. <S> Your simplest solution will be to find a wall wart or AC powered brick that supplies 5VDC. <S> A good bet would be a 5V supply from an old USB hub. <S> These often have a rating of 2.5A which is a good guess to be more than adequate for your battery replacement application (still do measure your loads to make sure though). <S> Take the output of that 5VDC supply and run the + side through a forward biased power Schottky diode. <S> Use one for each of your loads to spread the current across multiple diodes. <S> (A 1N5819 diode is suitable and can handle up to 1A and can be purchased from a place like mouser.com). <S> These diodes will drop the 5V from the brick down into the range of 4.5 to 4.3V if you not trying to run too much current through them. <S> For the one unit that uses 3.5V you can then run its power through two more series 1N5819s to further drop the voltage. <S> Should be a fun simple project. <A> LM317 can provide 4.5V from >6.5V input and 3V add R=4.5V-20mA*R=75 <S> Ohms with one per house either added to house or supply side. <S> Given load 20mA@3V 85-330mA@4.5V simulate this circuit – Schematic created using CircuitLab <S> This means if your supply is fixed then use R3=50 ohm, but if variable then R must be reduced to some value, possibly 5~10 Ohms if 8Vmin or directly to U1 input. <S> But then worst case heat is 400mA * (18V-4.5)= 5.5W which needs a finned heatsink > 2" <S> So if you'd rather not have any heatsink or just a little 2W heatsink, then you need a lower input DC supply like 7~9Vdc 400mA
| An economical solution, and readily available, is a USB phone charger all of which give out 5 V at, typically, at least 500 mA which is plenty for your application. The first thing you need to do here are to check each unit's wiring.
|
Discharge time of 12 V 8.4 Ah at 5 mA I have a motorcycle battery rated as 8.4 Ah (20 HR). It also says 8 Ah (10 HR) and I am not sure what the difference is. Anyway, I have a GPS tracker fitted with a rated consumption of 5 mA. According to this formula I have to divide battery capacity by consumption: 8.4 Ah from battery / 0.005 A consumption = 1680 hours (70 days) Is this correct? The reason why I am posting this is because the battery says 8.4 Ah, which is only double as many mobile phone batteries: Why is this motorbike battery so heavy then if it's only double the capacity? Is it because it's a 12 V one? My knowledge in electronics is zero as you can see. <Q> I have a motorcycle battery rated as 8.4Ah <S> (20HR). <S> It also says 8Ah (10HR) <S> and I am not sure what´s the difference. <S> The figures are telling you that discharge current of \$ \frac {8.4 \ <S> \text {Ah}}{20 \ \text <S> h <S> } = 0.42 \ \text <S> A \$ will last 20 h and \$ \frac {8.0 \ \text <S> {Ah}}{10 \ \text h} = 0.8 \ <S> \text <S> A \$ will last 10 h. Given that doubling of discharge rate the total energy out is actually surprisingly close. <S> 8.4 from battery / 0.005 consumption = 1680 hours (70 days). <S> Correct method. <S> (I didn't check your numbers but they look right.) <S> Why this motorbike battery is so heavy then if it's only double the capacity? <S> Is it because it's a 12 V? <S> Two reasons: As you suspect, the 12 V is related. <S> The energy stored in the battery is given by \$ <S> V <S> \times <S> I \times t \$ <S> so a 12 V battery will have three times the energy storage of a 4 V battery. <S> Your 12 V battery has a capacity of \$ 12 <S> \times 0.42 \times <S> 20 = 100 \ \text {VAh} <S> = 100 \ <S> \text <S> {Wh}\$ . <S> Battery chemistry. <S> Your mobile phone battery is a lithium based battery. <S> According to Green Transportation : Lead acid energy density is 33 - 42 <S> Wh/kg <S> so we would expect your battery to weigh about 3 kg. <S> Lithium ion energy density is 100 to 265 <S> Wh/kg <S> so we could get the same energy storage in a 0.4 kg battery. <S> Figure 1. <S> Energy densities for various technologies. <S> Source: EPEC . <A> From here : If a battery has a rating of 100AH @ 20Hr rate, then that battery was discharged over 20 hours with a 5 amp load. <S> Starting batteries, on the other hand, are typically rated at 10Hr rate, because they are used faster, so the 20Hr rate is not as important. <S> A battery has an internal serial resistance. <S> The faster you discharge, the higher are the losses, and that is why they provide a different capacity for different discharge rate. <S> In your case since you discharge very slowly you can take the first value. <S> Your formula is correct. <S> However batteries also have a self-discharge rate that you might want to consider if you need a long period. <S> You need to multiply the capacity by the voltage to know the total energy stored, <S> so 8.4 <S> Ah <S> * 12 V = 100 <S> Wh. <S> A 8.4 <S> Ah 5 V battery will have less than half capacity. <S> Also lead–acid batteries <S> (probably what you have) are heavy and low power density. <A> Wanted to add this as a comment to Transistor's post which was quite good. <S> As someone who maintained tons (literally) of lead acid batteries and one who has worked with EVs (electric vehicles) it has always struck me that lead-acid and "all other chemistries" go by different "C" standards. <S> The power densities notwithstanding (and mentioned by others) I did not see anything related to the standard discharge difference between car batteries and other chemistries. <S> A discharge rate of "1C" means you discharge at an amperage equal to the battery's amp-hour rating. <S> For most batteries the rating on the battery (i.e. 8.4A-hr) is the amperage you discharge them to get your full 100watt-hrs of energy (see prior posts). <S> The standard rating for lead-acid batteries, however, is 0.1C (or 1/10th their rating) and you should expect your rated energy (12v*8.4A*1hr or about 100Whrs) delivery at 0.1C discharge (0.84Amps in your case). <S> Unfortunately lead-acid batteries form a gaseous barrier (forget if it's at the anode or cathode) that creates much internal resistance at high sustained discharge rates. <S> When that happens much of the 100Whrs turns into heat in the battery <S> and you get less out (IIRC about 55% out at 1C). <S> Other chemistries are typically rated at 1C and some even boast "up to 10C or 20C discharge rates". <S> In your case, 0.005A is so low (70 days to deplete the battery) that you are competing with the self-discharge rate of lead-acid chemistry, typically 0.5-1.0% per day.
| The capacity decreases at higher discharge rates. Li-ion batteries (like on the phones/laptop) have much higher power density, so they will be much lighter for the same amount of stored energy.
|
MOSFET Heating in LED Driver Circuit I have designed LED Driver circuit using IRF540 and use PC817 Optocoupler for isolation. However, the MOSFETs are heating too much after giving the PWM Signal. One of my LED panels is 110W. What could be the reason for this? The schematic is below, let me know if any modification in the circuit if required. <Q> There is no way for your MOSFET to turn off. <S> Figure 1. <S> Move R39. <S> The problem is that when the opto turns on Q1's gate capacitance is charged up. <S> When the opto turns off there is no discharge path. <S> If the gate voltage gradually leaks away Q1 will gradually turn off resulting in substantial current through it while there is substantial voltage across it <S> so the power will increase drastically. <S> By moving R39 to the position shown the 'on' condition won't change but there is a discharge path for the gate. <S> Turn off should be very fast. <A> Faults <S> The input cap shunts the AC signal <S> The Vgs is not 0 to 12V input & output current is too high for Opto PC817X Series is obsolete <S> Fixed Change input R=760 ohm to <S> ~5mA = (5-1.2V)/R Change output Ice to 1mA , <S> Both R's = <S> 10k~12k <A> Furthermore, the voltage divider formed by R10 and R39 is lowering the gate drive voltage, which is not the right way to drive the MOSFET. <S> Try removing C11 and R39 to get a better PWM signal at the MOSFET's gate.
| Capacitor C11 is causing your PWM signal to look more like a dc voltage, which is not the right way to drive the MOSFET.
|
how to avoid brownout caused by a multimeter on esp32 I am using the VOLTCRAFT VC130 multimeter for measurement of current through my esp32. The microcontroller runs perfectly with two 1.5V batteries(~3V as read by multimeter in voltage mode). But when I put the multimeter in current mode between power supply(batteries) and esp32 in series for the monitoring the current. The brownout detector triggers. The brownout voltage level is 2.43 V +/- 0.05 for the esp32. <Q> To prevent this problem you select a small value resistor to put in place of where you are at present trying to place the multimeter for the current measurement. <S> Then use the meter in voltage mode to measure the voltage drop across the resistor. <S> Using Ohm's law you can compute current from voltage divided by resistance. <S> The meter internally uses this same technique in the current mode. <S> However at whatever current range you were using the meter's internal resistance is high enough that the net voltage drop is sending the MCU into the brown landing zone. <S> Care must be taken with this though to avoid running your target device at a voltage above its ratings. <A> This meter can read down to 200uA full scale or 400mV full scale. <S> That means it uses 400m/200u=2k series resistor for the lowest scale so when it comes out of sleep mode you get a Brown Out. <S> If your IoT device spends more time sleeping, you could also put a large e-cap across the meter in the mA range to average current. <S> But dV = Ic*dt/C <S> so depending how long pulse current = <S> Ic and duration dt = and value of Cap, C determines the change in <S> dV needed to prevent brown out. <A> I can think of two reasons why you may want to measure current: you worry about what the peak current is and whether your batteries can provide it, or you want to know if how long your batteries will last. <S> Now, bear in mind that power consumption of such devices can vary a lot depending on whether and how often they are transmitting, but also what kind of operations they are performing. <S> For a fun activity, write a tight loop that does nothing, and compare it with a tight loop that writes to flash (sequentially, and not for long, or you'll kill your flash), and compare the power drawn. <S> But I digress. <S> Anyway, if you are interested in the instantaneous current draw during the wake cycle at a higher temporal resolution than your voltmeter will show you, use the same technique as Michael Karas suggested, but hook up your oscilloscope across the shunt (needless to say, if your scope does not have an isolated ground, use two channels in differential mode). <S> To see how long your batteries will last, just put in a fresh set and let them run until they die. <S> I know it sounds silly, but you'll get more reliable results this way. <S> Of course, if you are aiming for multi-year battery life with very long sleep cycles, this won't quite work :) <S> While we are at it: the two easiest ways of reducing the power consumption are to limit the maximum transmission power (there are API calls fro that) and also lower the clock rate. <S> I assume by your statement that you are using two 1.5V batteries that you are not using one of the breakout boards with the built-in regulator, but that you are feeding 3V to the module directly, correct?
| Another technique that can be used is to power the unit from an adjustable bench power supply where you can tweak up the source voltage slightly to compensate some for the drop for a series multimeter in current mode.
|
Thevenin Equivalent Voltage: why ignore the 3-kΩ resistor? In order to find the Thevenin voltage here, why is it that the 3k Οhm resistor is ignored and no current goes through it? (hence \$V_{TH}=8mA \cdot 7kΩ = 56V\$ ) <Q> Computing a Thevenin Equivalent requires two steps: <S> Obtain the Thevenin Impedance <S> \$Z_{TH}\$ <S> Obtain the Thevenin Voltage <S> \$V_{TH}\$ <S> In order to compute \$Z_{TH}\$ <S> you have to "turn off" the independent current source. <S> As it is a current generator you will need to place an open circuit there. <S> This will "disconnect" the 4k resistor from the circuit, giving you \$Z_{TH} = 7k\Omega + 3k\Omega = <S> 10k\Omega\$ , as the resistors are in series. <S> In order to obtain \$V_{TH}\$ <S> you need an open circuit between the terminals A and B. <S> Having this open circuit will cause no current to flow through the 3k resistor, as it would violate Kirchhoff's First Law. <S> That current would have no way to get "back" to the circuit, so you would be diminishing the electron count! <S> Another way to look at it is as if you had an infinite resistor between A and B. <S> The air acts as an insulator, so given a real valued voltage drop in A and V \$V_{AB} = <S> \alpha\$ <S> you would get: $$I = <S> \lim_{R \to \infty}\frac{V_{AB}}{R} = <S> \lim_{R \to \infty}\frac{\alpha}{R} = <S> 0$$ <S> No matter how you want to look at it, you have no current flowing there. <S> This leaves the current flowing only in the left loop. <S> Having no current in the 3k resistor means we will have no voltage drop there. <S> Remember that we want to find \$V_{TH} = V_A - V_B\$ . <S> Following the circuit we see that the only drop involved is the one in the 7k resistor. <S> By Ohm's Law, that drop will be \$V_{DROP} = <S> I·R\$ , so: <S> $$V_A = V_B - I·R \to V_A - V_B <S> = V_{TH} = - I·R$$ <S> Being <S> I = <S> 8mA <S> and R <S> = 7k \$\Omega\$ . <S> This is the Thevenin Equivalent and why the 3k resistor doesn't play a role in the Thevenin Voltage. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> The Thévenin voltage is also known as the "open-circuit" voltage. <S> In this case, the open circuit is between points A and B. <A> The Thevenin voltage is when the output terminals are open-circuit so any series resistance (3K in this case) has no effect. <S> We can also ignore the 4K resistor since it's in series with a current source, and the open-circuit voltage is \$8mA \cdot <S> 7K\$ <S> = 56V (A is negative wrt B). <S> When you go to calculate the equivalent series resistance from that voltage, the 3K will come into play. <S> You can apply the current divider formula to find the current through the 3K (5.6mA) and thus the output resistance. <S> Or just replace voltage sources with shorts and current sources with open circuits and look at the resistance looking in from the output.
| Because it's an open circuit, no current flows through the 3k resistor, and thus there is no voltage drop across it.
|
Non electrical background trying to make a cool little custom project - Help please? Brief bit of background - I've built my own PC's, I've repaired phones, changed plugs, fit light fittings from diy stores, and have a basic (very basic) understanding of electronics, but have found myself wanting for various reasons trying to build a custom project with light bulbs in series. I've got mine and my partners initials in 10 inch high wood pieces from hobbycraft, ( these style ) and wanted to add some bulbs ( these type ) in series, to prove an aesthetic/design concept. I would use these light bulb holders and this battery pack to power it all. The end result would ultimately look something like this (just not dog related...) My question relates to whether using the bits I've researched and chosen, whether it would a) work, b) be bright enough, c) look decent. Each letter I anticipate will use 15 mini bulbs. Could 4 AA batteries power all 45 bulbs or shall I split into 3 circuits of 15 for each letter?Would I be better off on mains power or is that way too much?Can I connect all these bulbs in series? Any other tips and advice welcome. If this works, I'd like to then recreate this on a bigger scale for our wedding day, which would sit at the side in the venue - I like the idea of creating this, as I'm quite craft-sy, and enjoy building things and again I have a very specific vision of what I want, which isn't achieved by hiring them. I've chosen to build rather than buy because also nothing out there is exactly the way I want it - I want lots of smaller bulbs, instead of bigger ones. I also don't like the white globe look, and want the bulbs to be filament style. Any help? Thanks in advance! <Q> 4 AA's ? <S> not a chance ... <S> these are 1.5V 0.3A = 0.45W <S> * 45 = 20 Watts. <S> But here's the kicker. <S> For the conductor to reach a nice warm 2100'C <S> it takes 10x or 200 watts to start and that decays to 20 Watts as/if it ever reaches that temperature. <S> Otherwise it is a short circuit and then the battery starts to rise in temp. <S> Better stick to Xmas lights with lower power or LEDs. <S> and get much a better battery that can handle the current. <A> You're going to struggle with only 4 AA cells. <S> First 15x1.5V bulbs = <S> 22.5V. <S> But 4x1.5V cells = <S> 6V. <S> So if you're wiring them in series, then the voltage is all wrong. <S> You would need 15 AA cells to get the right voltage. <S> Those lamps take 0.3A. <S> You want three strings of them, running at once, which gives 3x0.3A = 0.9A. <S> AA cells will just about do that, but not for very long - an hour <S> if you're lucky. <S> A safer option would be to use a ready-made power supply, maybe 12V or 24V. <S> Adjust the number of bulbs in series and/or the voltages of the bulbs. <S> But make sure you don't exceed the current capacity of the power supply. <A> If you insist on these bulbs rather than more efficient LEDs, you can use a "brick" type 12V or so switching power supply powered by the mains. <S> You need to have substantially more capacity than the running power of the lamps to allow it to start, as @Tony suggests, since switching power supplies have short-circuit protection. <S> If you run them at nominal voltage, you can put 8 in series for 12V and add a couple 1N4004 diodes in series with a chain of 7 for each letter. <S> That will draw 0.6A per letter, for a total of 1.8A. A 12V 5A (60W) supply may be adequate. <S> I would be inclined to try a 60-90W spare 19V-ish laptop supply with a string of 15 bulbs in series for each letter. <S> That's about 18% less voltage than nominal <S> so the bulbs will last longer. <S> As well as getting dimmer, less efficient at turning electrical watts into lumens and lasting longer, the lamps get redder in color as you reduce the voltage (and thus the filament operating temperature), which may matter to you.
| Mains voltage will be too high - all 45 bulbs in series is still only 67.5V. Higher voltage bulbs would work, but could be lethal if not wired properly.
|
Looking for Serial-controlled PWM generator I'm looking for a chip to generate some PWM signals. Here are my requirements: Controllable via serial interface (SPI, I2C, or similar) Outputs 10-20 kHz PWM signals (even better if adjustable) Outputs should be basic logic level (open-drain, push-pull, etc) Not constant current, buck, boost, etc. I've found plenty of LED drivers that can do this, but that won't work here. Should be able to run on 3.3 V supply, but 5 V is OK too. 8 b resolution is good enough, higher is fine. I've used (and love) the PCA9685 . It works really well, and is very flexible and easy to use. Sadly it tops out around 1.5 kHz (or 3 kHz with fastest allowed external clock), so I can't use it here. I found the LT8500 , but it can only do about 6 kHz and isn't nearly as convenient (external PWM clock needed for example). My end goal is to control 4 H-bridge brushed DC motor controllers from a Raspberry Pi. I need the high frequency to set the motor switching frequency, and I'd like to use a separate chip as the Pi will be doing various other tasks. I don't want to use software PWM, as I don't want to risk the motor going crazy if there is a software hiccup on the Pi. <Q> My end goal is to control 4 H-bridge motor controllers from a Raspberry Pi <S> Sounds <S> like you actually want an H-Bridge that is controllable via serial line, not an H-Bridge driver that is controllable <S> + H-Bridge. <S> TI has such devices, e.g. DRV8830 , but <S> that's more designed for smaller motors (<= 1A). <S> But the motor driver category has loads of things! <S> If this is for a stepper motor: there's dedicated stepper motor drivers, that actually take care of generating the offset-phased PWMs for you from a single control! <S> That makes things easier, and cheaper. <S> They also exist with built-in H-Bridges, if you want to save on complexity, space or cost (and your motor isn't too beefy). <S> If you really need to control your own H-Bridge drivers: I'm pretty certain that the easiest, and most cost-efficient, way to do that is getting a microcontroller to do that. <S> Since controlling multiple whatever-drivers as a slave to a main controller is an extremely common job, e.g. in automotive applications, there's loads and loads of microcontrollers that have more than plenty PWM units. <S> In fact, there's dedicated product lines that are advertised for exactly that, motor control. <S> (but to be honest, every mid-range microcontroller, eg. <S> STM32F100 and up, would have sufficient PWM units.) <S> The NXP Kinetis-V series comes to mind. <S> Those are relatively mighty processors, but they come with all the bells and whistles you'd need for motor control, and things like motor control designer software (which I've never tried). <S> Lower-cost controllers like the STM32F10? <S> can be had shy of 2€ and have 7 timers, of which TIM1 alone would suffice to generate 4 different PWMs from the same clock source, including automatic dead times (super important for H-Bridge control). <S> That's still a relatively mighty controller – 32 bit core, lots of serial peripherals to choose from (3× UART, 2× SPI, 2× I²C, and you can still bitbang or write your own interrupt-driven synchronous serial), and it comes with a widely supported architecture <S> ; there's multiple RTOSes that you can choose from, so that you don't have to write your own task management (getting commands from the serial peripheral, and translating that to PWM settings). <A> You could go the analog way of producing a PWM with a 10 – 20 kHz width Use your Raspberry Pi, or some other clock source to generate a sine or triangle or sawtooth wave of desired frequency. <S> A hardware PWM unit of the Pi, followed by a RC low pass that has a cutoff above the fundamental frequency would probably work reasonably well; AC couple the result to a VCC/2 biasing resistive voltage divider. <S> Get a cheap four-channel DAC and use it to generate four threshold voltages <S> Get four comparators (or a comparator chip with four channels) to compare analog waveform to threshold voltage. <S> The sky is the limit :) <S> When using a sine wave (e.g. an actual analog oscillator or a low-passed square wave), your "threshold to PWM width" relationship won't be linear, but you'll probably have enough computational power on the Pi to use a lookup table to solve that problem. <A> If the "program your own microcontroller" route seems to complex: <S> You can cheat programming the microcontroller completely! <S> Get a MCU that has enough PWM units (e.g. the STM32F100C8 mentioned above). <S> Just compile the minimum code necessary to set up all the clock speeds and IO ports; luckily, manufacturers like ST deliver graphical tools to generate that code for you. <S> You really just have to open one of their recommended IDEs and hit "compile" and "flash". <S> If you buy a ST Nucleo board, you get a flasher + eval board + MCU for the price of pretty much 2× <S> the MCU, so that'll be relatively straight forward. <S> Then, you abuse it as puppet, by putting it into debug mode and interacting with its PWM peripherals using SWD (serial wire debug) interface. <S> The idea comes from Micah Scott's article in PoC||GTFO 0x10, p. 26ff . <S> You install OpenOCD on your Pi, then you follow one of the many guides online explaining how to use the Pi GPIO as SWD interface; they all boil down to having an OpenOCD .cfg file containing interface <S> bcm2835gpio and <S> the other settings necessary to a) make OpenOCD speak correctly to your Pi's GPIO, and b) make OpenOCD speak SWD in a manner compatible with your microcontroller. <S> One example (which I didn't test, though) can be found here . <S> Once that has been set up, you can just run openocd -f yourconfigfile.cfg , have it connect to the microcontroller via SWD, and then connect to TCP socket 4444 (typically) on localhost. <S> You can then issue commands like mww to write to arbitrary memory addresses. <S> You just modify hardware registers as necessary to set up the PWM channels to your liking (or adjust them). <S> You can find the right settings in the programming guide of your microcontroller (it's not much harder than figuring out what to write over I²C to make an I²C-based PWM controller do your work). <S> Another route, especially if you're familiar with python, is to use the PyGPIO lib and do it directly without going through debuggers like OpenOCD.
| For your lower-kHz range, a quad-opamp IC would probably do; you could also use differential-to-single ended-converters (e.g. as used for robust digital communications).
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.