source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Can I accidentally create a coil with a bunch of isolated cables? I just finished rearranging furniture in my room and I ended up with a lot of cables next to each other, some of them powering electronics that draw a few hundred watts. Is it any risky - for example, can I create a coil this way? I am aware that this way I can probably cause some powerful interference. <Q> You're quite likely fine. <S> Here are the problems that could occur due to cables running close together, and why they won't for you. <S> However, inductance arises from current flowing around a loop . <S> In a typical power or signal cable, the opposing currents flow in two or more conductors in the same cable. <S> This means that there is very little loop area, and what there is is between the wires inside the cable itself. <S> (This is actually very important for high-speed data cables — unwanted inductance can degrade the signal, so they have carefully-designed pairs of wires and outside shields.) <S> If you had some kind of circuit with two widely separated wires, then you could accidentally create problematic inductances. <S> Current through the greater-than-zero resistance of the wires creates heat. <S> If you have a large coil of cable instead of spreading it out, then it gets hotter because there's more heat being put into the same area, and less airflow. <S> Sufficient heat melts insulation (possibly causing a short circuit) and starts fires. <S> This is unlikely to be a danger because any well-made power cable should be able to deal with “a few hundred watts”, assuming you are using standard 120V/240V AC line cords. <S> If you're making custom cables or a low-voltage (e.g. 12V) power system, well, make sure you're not using undersize conductors. <S> (This is the problem that PlasmaHH's comment is about — unrolling everything is likely unnecessary, but you don't want to find out the hard way that someone had a high-power device plugged into an underrated extension cord, and uniform safety policies are easier to enforce.) <S> Cables running parallel to each other — whether or not they are in loops — can couple noise between them, when the noise is “common-mode” (flowing on both conductors, not oppositely). <S> Generally, this poses no safety risk at all because the noise is very low power, but it can be undesirable in analog audio systems or radio receivers. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> An inductive coil. <S> Figure 2. <S> Cancellation. <S> Unless you wired your equipment with single wires it would be impossible to create a coil of the type shown in Figure 1. <S> Because your cables contain the feed and return current in very close proximity the inductance caused by the current to the load is exactly cancelled out by the current returning from the load. <S> Note that cables coiled up tightly are a different problem. <S> If they are carrying significant current (for the gauge of wire) they will get warm or hot. <S> This may cause insulation breakdown or even fire. <S> Interference in this situation would only be caused if your power cables ran beside signal level audio cables such as microphones or phono leads. <S> If you can't hear it in your loudspeakers then all is well. <A> You will hardly create an inductor, since in each cable the current flows in both directions, making magnetic flux zero. <S> So, don't worry.
| As you worried about, creating an inductor causing unwanted coupling between wires.
|
Sensing state of an electrical appliance I know nothing about electrical engineering however... Is there a way I can detect when an electrical appliance is on? For example when I turn on my tv, a small blue light turns on so I know, but say I have a device that doesn't show it is on, such as a printer, but there's no display. Is there something (a component) I could put that can sense when something is using power?And where would the best place be to place such a device? <Q> Yes. <S> A current transformer properly applied, preferably to measure the differential mode current thru your device, would be the primary component. <S> That produces a low voltage and isolated signal proportional to the current drawn by the device. <S> You then threshold detect that signal, and use the result to drive something that turns a LED on or off. <S> The details of how to do this are beyond a reasonable answer here for someone that "knows nothing about electrical engineering" . <S> This is like trying to explain in a few written paragraphs how to drive a car, when the explainee has never even seen one. <S> At your level, you should just go out and get some off the shelf device that does what you want. <A> They are available for USA 120 volt, 60 Hz power. <S> If you want something like that for another power spec, you can search. <S> If you want to modify the appliance, you can find a point inside that is energized when the appliance is on and attach a light. <S> If you are qualified to do that sort of thing, you can figure it out. <A> Maybe something like a power meter would do the trick. <S> When your appliances are on or being used the current draw would increase. <S> So as long as you test it for the specific appliance (ON/OFF) <S> then you should know what the ballpark number is for when they're ON. <S> (There may be some negligible current draw still for specific appliance even when they're " <S> OFF")I'm thinking something like this could do the trick: http://www.amazon.com/TS-836A-Energy-Voltage-Electricity-Monitor/dp/B00E945SJG Hope <S> this helps
| There are smart outlet strips that turn on the remaining outlets when the appliance plugged into the first outlet is drawing above some minimum current.
|
What voltage is a 3-LED light from a LED-TV? I have some "NDV rev1.1 4248 back lights" from a television. There is a print that sais "94V" on the strip, and on the wire supplying the strips it said "96V". Every strip has 9x buttons which have 3 LED's in them. So i devided 94 by 9 and figured that every button should have 10.4V roughly, which makes sense, because a white LED is normally 3.5 volts. I have a 12v Lithium battery which measured 11.1V so i tested one of the LED's with it and it lasted less than one second. Are the LED's are rated for 10.4V roughly and not more? <Q> 94V-0 is a UL marking indicating the flammability rating of the PCB material. <S> As others have said, you ideally need a constant-current LED driver or failing that a series resistor in order to drive that LED board safely. <S> If you know that they are white LEDs then expect each one to drop in the region of 3.3V. <A> If you blew them out that quickly, it is most likely because LEDs need controlled current . <S> Controlling only voltage to them doesn't work because they are diodes and have a "non-linear response" to voltage. <S> Try connecting a potentiometer to the + of your battery, turn the pot to about 1Kohm rssistance, then connect the 1 pod of leds & turn down the resistance until they light well without blowing. <S> Once you find a good point with the pot, measure voltage across your pot, then disconnect the battery & measure resistance the pot is set at. <S> dividing the voltage (in volts) across the pot by the resistance setting (in ohms) will give you the current (in amps) that your leds need. <A> The 3 black dots are the LED defuser mounting pads. <S> There's only 1 LED per lens, so each strip in the picture has 9 LED's, at 3.3v = 29.7 V, (24v DC for a means of touch testing on the +/- <S> spots on the connector end. <S> If you "scratch" the white strip between each led, with 3v battery, (2 x AA soldered in series together <S> ) you can test each led. <S> The one that doesn't light is the bad strip.
| The 94V marking you see on the PCB is not a supply voltage rating.
|
How to test if zero crossing is working? I used circuit like this: On led I get: 3.3 mA and 1.3V What is the best way to test if zero crossing works with arduino or multimetar? <Q> A simple test is to use a multimeter to measure the voltage on the output. <S> Since it should be PWM you should see something between 5V and 0V. <S> If you see 5V or 0V, then it's not working, but if you see something between the two, it's probably working. <S> Another option is to connect an LED with an appropriate resistor between 5V and the output, then sweep your eyes across the LED. <S> 100Hz is very low frequency, and it should appear that instead of a solid light streak in your vision there should be a dotted line of light pulses if the zero crossing is working correctly. <S> You can then hear the 100Hz zero crossings if it's working correctly. <S> If you have an arduino, though, it's easy enough to count the number of pulses per second and verify correct operation. <A> Does your multimeter have any sort of frequency counter function? <S> Some do, and that would be simplest — verify that the output of the detector matches your line frequency. <S> Otherwise, program the Arduino to be a frequency counter and look at the results there. <S> It isn't hard to do. <S> Just count the rising edges for one second and print out the value. <A> Here's a simple Arduino program for measuring the AC crossing interrupt: #define ZERO_DETECT 2 // <S> Your arduino interrupt pin#define BOARD_LED <S> 13 <S> // <S> on board LED// volatile required if you are going to reference this variable// outside of the interrupt procedurevolatile <S> byte <S> zeroCrossCounter = 0;void setup() { // <S> You don't need a pullup since you can use the Arduino pullup <S> pinMode(ZERO_DETECT,INPUT_PULLUP); pinMode(BOARD_LED,OUTPUT); digitalWrite(BOARD_LED,LOW); attachInterrupt(digitalPinToInterrupt(ZERO_DETECT),AcZeroCrossingInterrupt,RISING);}void loop() { // <S> put your main code here, to run repeatedly: // <S> Nothing to do here}void AcZeroCrossingInterrupt () { <S> if ( <S> ++ <S> zeroCrossCounter == 60 ) { <S> // blink LED approx every 1/2 second <S> zeroCrossCounter = 0; digitalWrite(BOARD_LED,!digitalRead(BOARD_LED)); }}
| Another option is to connect a small, low power speaker and series resistor between 5V and the output.
|
Which is the objective of an Base-emitter resistor? Can someone explain me the purpose of the resistor R2? If I remove R2, the circuit will perform the same result, won't it? simulate this circuit – Schematic created using CircuitLab <Q> R2 is used to prevent a floating base. <S> It gives it a defined state, in case the node labeled 2.8V isn't connected. <S> It's a weak pull-down resistor . <S> A floating pin, not pulled to a known state, will act like a mini-antenna, and can float high or low many times and turn the transistor on and off at random. <S> If that node is driven all the time, either high or low, then R2 is superfluous and can be removed. <S> If the node is connected to for example a microcontroller gpio, that can go High-Impedence/Input (likely at start-up), then R2 keeps the transistor off until the microcontroller goes into output mode. <S> If the transistor is actually a Mosfet, then R2 is a small drain resistor. <S> Mosfets have a capacitance that may keep it on, if not drained. <A> Many transistors allow a small amount of leakage current from the collector to the base. <S> If nothing were connected to the base of the transistor, that current could bias the base-emitter junction to 0.7 volts and then get amplified by the transistor, such that the total amount of leakage current sunk to ground would be the emitter-base leakage current multiplied by the transistor's current gain. <S> In some applications, the amount of leakage current--even amplified--may be small enough not to be objectionable. <S> Adding R2, however, will often cut the leakage current by more than an order of magnitude. <A> With those nodes at those voltages, you are correct, R2 makes very little difference to how hard Q1 is turned on. <S> If you replace the R1 drive with 3uA (for instance) instead of 2.8v, the performance is very different. <S> As an exercise for you, calculate the current required into R1 to a) start the transistor conducting b) bring the collector voltage (Vo) down to 1 volt (assuming a current gain of 100) with R2 present, and with R2 omitted. <A> R2 at 100K does not affect the circuit to any significance as Neil UK has stated. <S> In fact it could be 10K and things would be fine. <S> R2 does provide a useful function of pull down and should be left in circuit. <S> Consider a high gain transistor and /or a leaky pcb or even mains pickup which is generally electrostatic and therefore of a high impedence nature.
| Adding R2 provides an alternative path for collector-base leakage; if R2 issmall enough that the voltage across it stays below 0.7 volts, current that flows through R2 will still represent leakage from the collector to ground, but it won't be amplified.
|
Why alternators are used to generate DC? Why is it that to generate DC, it's often an alternator that's used? Couldn't commutator rings be added and do without AC-DC conversion? I'm asking because I wonder how efficient it usually is for a typical RC car motor to be used as a DC generator. Thanks <Q> Brushes and commutators which need to actually switch current will often be far more wear-prone than slip-ring assemblies which don't need to perform any switching functions. <S> This excess wear comes about both because it's hard to make a smooth surface with multiple separated contacts (without the space between the contacts being higher or lower than the surrounding contacts themselves), and because switching contacts under load puts extra stress on them; while a motor or generator with many windings will put smaller switching stresses on the commutator than one with fewer, a non-switching slip ring will produce none. <A> They do have slip rings so that the excitation can be controlled to regulate the output voltage with changing speed and load. <S> The efficiency is probably comparable to a DC generator with a commutator, but automotive manufacturers were likely thinking only of manufacturing cost when they switched from commutator generators about 50 years ago. <S> There are fewer DC generators larger than automotive generators, but some are manufactured specifically for use with wind turbines. <S> Some of them have permanent magnets and no slip rings. <S> Some of them have AC-DC-AC converters in order to have both battery energy storage and AC output. <S> They are said to be competitive with other types of generator systems in terms of efficiency. <S> They are also attractive because they can run at lower speeds eliminating the need for a speed increasing gearbox. <S> RC car motors can be either permanent-magnet DC motors with commutators or brushless DC motors. <S> The brushless motors can be used as AC generators and the output can be rectified to provide DC. <S> The output voltage is proportional to speed in both cases, so both need electronic regulators to provide constant DC. <S> The brushless DC motors are probably a little more efficient. <S> I suspect that they are a little higher quality because they are part of a more expensive system including the electronic speed controller require to use them. <A> Regenerative braking systems usually include the use of DC drive motors, as the magnetic coupling is stronger than that of AC alternators. <S> Of course, eddy current braking systems use a solid disk, such as on trams and trains, but the energy dissipated into the wheels as heat under braking cannot easily be captured as electric energy to charge a battery, unless a rethink of the systems of brushes and commutators are employed using modern materials.
| For automobiles, you can be sure that alternators including the rectifier are less expensive to manufacture.
|
How to Connect USB/Ethernet Shields to Chassis or Digital Grounds I have a PCB with a few USB and RJ-45 Ethernet connectors on one side. I'm quite confused as to how exactly I'm supposed to be hooking up the SHIELD pins on them though. This is for a host device that will interface with peripherals. It is provided regulated 5V 10A power by an external PSU, and is intended to be used inside a vehicle. I have found this question ( Should chassis ground be attached to digital ground? ) along with others which helped me somewhat, but I'm still confused. The accepted answer on that says to use mounting holes, but I'm not sure if I understand fully. I'm not sure if the mounting holes connect chassis/digital grounds together directly or if they only connect to the metal enclosure. I assumed the later. Even more confusing: What if I wanted to use a plastic enclosure? I'd prefer plastic, but I assume metal would protect it better against EMI inside the vehicle. Here is a ( very simplified) example of my current layout. And the schematic (just in case, not really useful) The shield pins connect to the CHASSIS plane which is isolated from digital GND . The physical housing for the connectors should also be touching the metal enclosure as well. The CHASSIS plane is connected to the metal enclosure via the mounting holes/screws. The power supply GND is connected to the metal enclosure via the lower left mounting hole. This in turn connects GND to CHASSIS via the metal enclosure itself. Am I overthinking this? Should I just connect the shield pins to GND and call it a day? <Q> You may or may not be over thinking this, it depends on what your application is, and if you have to pass any regulatory inspections for a product. <S> This depends on if your enclosure is insulated or not. <S> Another thing to keep in mind is you can also have RF running through the shield, and RF should be considered if you need to build a product to pass emissions testing (cables make great antennas, and can even help induct lightning RF onto your board). <S> For now I'll talk about ESD. <S> A good reference for all things ESD and RF is this book Electromagnetic Compatibility Engineering by Henry W. Ott. <S> I'll quote it <S> So where should cable shields, transient voltage protectors, and I/ <S> O filters be connected when the product is in a plastic enclosure? <S> There are three possibilities as follows: <S> To the circuit ground plane (poorest choice) <S> To a separate I/O ground plane as discussed in Sec. <S> 12.4.3 <S> To a separate large metal plate added to the bottom of the product (best choice) <S> In your case if none of the cables go on the outside of a vehicle I wouldn't worry too much about RF. <S> If the cables aren't going to be in contact with people (buried in the dash) <S> I wouldn't worry too much there either. <S> If there going through the middle next to people I would worry. <S> You can think of your vehicle ground like earth ground. <S> The car may collect a charge but it also functions like a faraday cage so everything on the inside will be near 0 (except for something like a seat cover that has been charged up, any metal connected to the chassis will be near 0V (0v being the voltage with respect to the car and not "Earth" ground)). <S> I've also included an image to suppress ESD in a metal case from the same book: <A> so you'll have somewhere to "dump" noise. <S> In most vehicles just about every metal surface is grounded to the (-) terminal of the battery (unless you have a wonky + ground vehicle). <S> You can pull ground from a radio gnd wire, a metal chasis mounting bracket, a nearby frame member, etc. <A> There are two approaches to this problem that make sense: Connect the chassis ground and the signal ground to the chassis at many points, but do not connect them to each other Connect the chassis ground to the chassis, and leave the other mounting holes isolated , then connect the chassis ground to the signal ground at where the signals cross the plane split. <S> Approach 1 (your current approach) provides a good (low-L) high-frequency connection, which is why it's used in applications such as computer motherboards. <S> However, it comes at a cost -- it can allow low-frequency currents to flow into the signal ground from the chassis, which then causes a noise problem due to common impedance coupling in the signal ground. <S> Approach 2 eliminates the potential for loops and common impedance coupling, but risks excitation of the inside of your box with the ground plane acting as an edge-fed patch antenna at RF -- most undesirable, especially if you have a box that's bad at stopping RF. <S> It also can be used with plastic boxes without extra work -- <S> approach 1 requires the board screws to connect to a retrofitted image plane or interior shield to provide continuity, in that case. <S> As to plastic vs. metal boxes -- a metal box can provide good EMI shielding, but needs to be designed with a bit of care to avoid inadvertent slot antennas at mechanical seams. <S> Plastic boxes can have EMI shielding designed in to them, or retrofitted using an inner foil layer; if an overall EMI shield is not used in a plastic box, though, the bare minimum I'd recommend is a sheet of metal somewhere in the box to serve as an image plane. <S> (This can be the same thing as the ESD ground plate.)
| The general idea is to shunt the ESD to ground through the chassis and away from your electronics. Connect your shield pins to GND, then run a grounding wire/strap from your metal enclosure to something else in the vehicle that's grounded
|
Integrating wireless transmitter with old door chime system The building I live in have an old door-chime system, and I wish send a wireless signal when the door-chime is triggered. There are multiple push-buttons at different locations connected to the same circuit. The only place I can access my part of the wiring of the old door-chime system is behind one of the push-buttons, the rest of the system is buried behind concrete and walls. There's an AC transformer hooked up to the system to drive a door bell. The bell has been removed some time in the past, and the wires are not accessible - and are probably shorted. I've measured 8V AC over the button, the button is normally open. I've a board with a wireless transmitter, it's triggered by pulling an interrupt pin to GND. Powered by a 3v battery. I want to pull this pin low to trigger the transmitter whenever the doorbell circuit is closed. My naive idea is something like the following: simulate this circuit – Schematic created using CircuitLab Will this work? Or will the AC source (which hits the base and emitter of the transistor) ruin this somehow? <Q> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> What you've probably got. <S> There's something strange about your setup. <S> If there is a short where the bell was (LO-Z in Figure 1) <S> then there is a danger of the transformer overheating if the button is held in or fails short-circuit. <S> If the bell had simply been removed there would be two breaks in the circuit and you wouldn't detect voltage on the switch - unless it's a high impedance meter picking up strays. <S> As per my comment, see if there is enough current to light a 6 W, <S> 0.5 <S> A car tail lamp. <S> simulate this circuit Figure 2. <S> AC-less solution. <S> Since you don't seem to mind using a battery, the AC is no advantage. <S> It can be disconnected and the house made a little safer. <S> You'll need to figure out which button has the supply. <S> Extend these out and hook up to the parallel switches. <S> I really don't know if the long house wiring will affect the input so some testing may be required. <S> A small capacitor - 100 <S> nF? <S> - across the original fob button may do the trick. <A> With the ac voltage being higher than your circuit voltage, it could easily end up damaging your components. <S> In order to avoid this damage, you pretty much have 3 choices: <S> Disconnect the ac power, then simply wire the switch directly to your circuit. <S> Purchase a relay that can be triggered by 8VAC, wire the relay to the AC power & the switch, then have the relay activate your circuit. <S> Build a bridge rectifier & a voltage divider (and mayne a comparator, if you end up having trouble), so you can "filter down" that 8VAC to something closer to the 3VDC that your circuit can use. <A> So, imagine the situation. <S> You have your wireless receiver hooked up to drive a bell in your apartment. <S> What happens next.... <S> Some guy down the street activates his key fob to open his car door and your bell tinkles. <S> Someone in the same apartment switches on their remote controlled lights and your bell tinkles. <S> In fact anyone using the same frequency will activate your bell. <S> But it's worse than that - <S> any receiver worth its salt will have pretty good sensitivity (in order to maximize range) and the data output pin will be jumping up and down continually - any bit of RF energy in the vicinity of your radio's operating frequency will trigger your receiver and after about 5 minutes you'll disconnect the power and curse radios forever. <S> You MUST send something intelligible from your transmitter that can be 99.999999999999999% reliable at being uniquely decoded by your receiver as the message you want to hear. <S> This means your transmitter has to: - Send a recognizable preamble of data <S> Send a codeword that you can recognize as likely coming from your transmitter and very few else <S> Send some error checking bits that allows you to verify that it is YOUR transmitter sending the message. <S> Adding more sophistication to the transmission gives you far fewer instances of an incorrect positive. <S> You need to send data. <S> You need to receive data. <S> You need to decode data. <S> You need to verify that data. <S> You need microprocessors.
| If you purchase a remote control coded key-fob or a standard wireless doorbell system you should be able to solder some wires onto the push button pads or leads.
|
Soldering error with wire I was soldering a magnet wire with a normal copper wire, and while doing that, i burned a small part of the magnet wire, so will this affect the conductance of the wire?? <Q> If it is in a coil then the answer is possibly. <S> If the cross sectional area has been reduced then 'yes'. <S> See if you can zoom in on it with a camera, microscope or magnifying glass. <S> Will it hurt? <S> If you can, clip off the burnt end and try again. <S> You may want to use a lower temperature on your iron. <S> Also make sure the burned end that may be devoid of insulation is not 'connecting' to any other conductors. <A> Most likely you burned the insulation, not the copper part of the wire. <S> Be aware that burned insulation no longer insulates, but also creates a layer that makes soldering difficult. <S> It's not clear what part of the wire you burned, and whether this was accidental or not. <S> If you deliberately burned the end to remove the insulation, then finish the job by lightly scraping it off. <S> Once you get bare copper color, it will solder fine. <S> If you burned some other part of the wire accidentally, like part of a coil that is already wound, you may have problems. <S> Look carefully to see if adjacent windings are now touching. <S> You might be able to fix this by brushing off or very carefully scraping off the burnt insulation, then fixing the wire in place with epoxy after making sure nothing is touching. <A> I usually burn the enamel off the magnet wire by turning up the soldering iron to about 800F and (dipping the tip of the enamel wire in fosin flux) and then onto a hot solder glob. <S> Conductance is proportional to cross sectional area, temperature, and the conductivity of the material <S> so no you aren't going to affect the conductance by removing the enamel coating. <S> But like others have said it depends on your application.
| If you just burned the insulation on the outside then 'no'. That depends on your application.
|
solar power ESP8266 microprocessor circuit to turn off when low voltage I intend to run an esp8266 microprocessor on only solar panels so it is on during the day and off/disabled during low light conditions that do not supply sufficient power. Is there a circuit that will hold the esp8266 reset low until voltage is sufficient (>3v) to power the esp8266? Hysteresis would be beneficial. <Q> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Voltage detection circuit. <S> I suggest that you need a circuit to hold the reset pin on your micro until solar output is high enough to reliably power the circuit. <S> Figure 1 uses a comparitor to do this function. <S> When the supply voltage divider, R3 - R4, exceeds the R1 - R2 setpoint the micro will be enabled. <S> (You need to figure out setpoints and whether to invert the logic or not.) <S> Note that you may need to add some hysteresis to this to prevent rapid cycling as you load / unload the solar cell. <A> When the solar panels provide no power you need to get that power from elsewhere. <S> Circuits do not generate power, they only store and/or consume it. <S> That power can be stored in a battery or capacitors. <S> Capacitors cannot store large amounts of power unless they are very large. <S> Rechargeable batteries are more economic in that respect. <S> For a full night without sunlight you need to use batteries or you could use a power adapter to provide the power from mains. <S> Silly options are: a (diesel) generator, animal or human on a treadmill, something mechanical to store/release electrical energy. <S> In the end a (rechargeable) battery is the simplest solution. <S> So that is why almost everyone is using that. <S> How to connect the solar panes and batteries so that switching between them is automatic is asked and answered many times already on stackexchange, just search for that. <S> Edit : after a comment it appears that this is not what you're looking for. <S> I was confused because you sort of steered your question into the "maintaining power" direction while you don't need that ! <S> You can do this with an opamp or comparator. <S> It also depends how the esp module needs to be reset (active low or high). <S> Switching on/off the power to the esp module like you suggested in your question is not a good idea as it allows the system to enter in an improper state. <S> Normally the esp module will perform a "power-on reset" when power is applied but it is not good practice to rely on that when the power goes up and down as in your case. <S> What you need to do is keep the ESP in reset while power is not OK. <A> So far, there's no such thing as as a perpetually free lunch and, as FakeMoustache has already stated, you need an arrangement to ensure that power to the ESP8266 will be cut off until such time as the PV can deliver the ESP8266's maximum rated current and then connect the PV quickly enough to the 8266 to bring it out of RESET. <S> You'll also have to deal with the fact that when the sun goes behind a cloud and the PV can no longer support the 8266 you'll have to do the same thing as when the sun first came up, unless you don't mind power outages to the 8266. <S> If you do mind, then you'll need some sort of storage in order to run the 8266 during those "brownouts", which is where your otherwise free lunch gets expensive. <S> The most logical choice, it seems to me, would be a rechargeable battery, and which type of battery would be best would probably depend on the rooftop environment. <S> Also, keep in mind that the capacity of the PV will now have to be increased in order to provide power to the 8266 as well as simultaneously charge the battery. <S> Lastly, I think, you'll have to provide some means to distinguish day from night so that when the sun goes down your widget will power down instead of thinking that the sun just went behind a very large cloud and run on into the night.
| What you need is a circuit that keeps the uC in reset when the voltage from the solar panels is too low.
|
Are FPGAs more intuitive to learn than microprocessors for doing DSP I want to learn to make DSP hardware I have never done any DSP and only a little bit of programming, but I have been making analog circuits for 15 years. I like the idea of learning FPGAs because it sounds more like building circuits, but people often say FPGAs are really difficult. Maybe these people are used to sequential programming. I am wondering if FPGAs are more easy to learn than microprocessors if doing the things that FPGAs are good at. For example if I want to make an FIR filter, will an FPGA will be more intuitive? <Q> Take a tip from which way the professional industry is moving. <S> Some organisations program the DSP parts of their FPGAs by writing a MATLAB or C program, then use a synthesis tool to compile it to VHDL. <S> Much the same as most people stopped writing machine code or assembler, when compilers became accepted as the way to do it. <S> However, these tools are usually very expensive, and hinting at them how to parallelise the design is a huge learning curve, so they're not applicable to hobbyists at the moment. <S> Not many companies use them for production either, because there are still plenty of DSP engineers that grumble 'they can do it better on the hardware than a compiler', just like assembler programmers used to grumble 30 years ago. <S> Even if you do actually want to target hardware eventually, always start with an easy to use tool like MATLAB (costs), Octave (free) or Python+numpy+matplotlib (free), so you can see what's happening, and generate some test vectors to prove out your hardware. <S> You will be able to do audio DSP quite happily in reasonably available DSP microprocessors. <S> However, doing radio frequency work will need FPGA. <A> Whether you use a microcontroller with DSP functionality, a DSP chip or an FPGA is (at least theoretically) not as important as what algorithms and filter coefficients that you use. <S> So once you make the leap to digital processing, it becomes a matter of whether you need the performance that only an FPGA can give you or not. <S> Even within an FPGA design you have various trade-offs, for example, we're doing a CORDIC calculation and to save resources we serialize the calculations so that fewer multipliers are required. <S> You can make small changes such as unrolling loops with microcontrollers, but basically you're stuck with the processor(s) on the chip <S> and that's that. <S> I don't think it's at all easier to use FPGAs.. <S> the parts are generally in needy packages (BGA typically), they need a lot of power and different power supplies, the flexibility leads to more variation in performance (due to layout, for example) and power consumption is also more variable. <S> Keep in mind that you will typically need other functionality to get signals in and out and for supervisory tasks. <S> Chips like the Zynq combine a small 32-bit microcontroller ARM core with an FPGA and should be the best of both worlds, but we've found the learning curve to be fairly arduous, even with expensive tools such as added cost MATLAB packages. <S> Many complaints exist about the vanilla FPGA tools, if you look at the forums and they tend to be expensive if you need all the capability. <S> Right now, I think the combination of a processor and FPGA is a good solution for many signal processing tasks, whether integrated or not (there is also the possibility of 'soft' processors on the FPGA, but they tend to be a bit underwhelming in performance and use a lot of resources). <A> I would say that the easiest way to get started in DSP is in PC software, starting with higher-level tools like Matlab, intermediate difficulty languages like Python (with numpy this is quite fast enough for mere audio), down to C. <S> Once you have an algorithm working in C it can be ported to a microcontroller or dedicated DSP. <A> Like many have pointed out that FPGA can be tough for learning the DSP algorithms themselves. <S> I think one of the main reasons you would use an FPGA is to reduce the processing time. <S> But implementing an algorithm on the FPGA does require you to learn an HDL. <S> Even if you use pre built IPs you still need to connect and perform inter IP communication if necessary. <S> A DSP based micro controller would be much easier to deal with.
| FPGAs are more expensive, more complex, have less user-friendly software tools and are harder to debug.
|
Program to make bode plot of transfer function? For different purposes, I sometimes have to draw an bode plot. I first of would like to know if there is any piece of software which can draw them for me. So I gave in the transfer function and then it gives me the bode plot (both phase and the magnitude). This would save some time at occasions. Ok, so now the real question. I have the following transfer function. $$ H(j\omega) = \frac{j \frac{\omega}{\omega_0} }{1 + 3j \frac{\omega}{\omega_0}} $$ The modulus can be calculated as follows (correct me if I am wrong): $$ |H(j\omega)| = 20 \log_{10}(p) - 20 \log_{10} \left(\sqrt{1+(3p)^2}\right)$$ (where \$ p=\frac{\omega}{\omega_0} \$, with \$ \omega_0=\frac{1}{500 \times 6.37 \times 10^{-7}} \$). \$ 20 \log_{10}(p) \$, would be easy, but I am not sure how to calculate the second one? How do I calculate the (magnitude) bode plot of \$ -20 \log_{10} \left(\sqrt{1+(3p)^2} \right) \$ <Q> I will directly link to the Matlab bode plot section... <S> http://www.mathworks.com/help/ident/ref/bode.html?refresh=true <S> It works nicely and the program is simple as dirt. <A> You probably don't have Matlab or other similar software, otherwise you would not be asking the question. <S> You'll also learn more about how the calculations are executed. <S> As for calculating the 2nd expression 'by hand', how far have you got? <S> The calculation is pretty elementary. <A> I just use my favorite programming language (Rust) to output the results, either as an SVG image or as a text file that I then pipe into gnuplot. <A> Matlab is indeed very usefull for this, but also very expensive. <S> If you are familiar with linux I would advise to use Octave which is very similar to Matlab and it is free. <S> Another option is to use a web based solver, like WolframAlpha . <S> As the bode plot is used to give an impression of the transfer function and most of the time the exact value is not important, it is easier to sketch the plot than to calculate the phase and magnitude formula. <S> You already have the transfer function, so it is pretty easy to draw a bode plot on paper, by using some tricks. <S> When you rewrite the formula to show the poles and zeroes, you can simply know where to draw them in the plot. <S> $$H(s) <S> = <S> \frac{s}{1 + <S> 3s}$$Zero: <S> s=0 <S> The zero gives a positive slope of 20db/dec. <S> Pole: (1+3s=0), so at s=-1/3 <S> The pole gives a reduction of the slope at s=1/3, after which you get a horizontal line. <S> Only thing you need to know is the magnitude at a point in the graph. <S> Easiest is to take the flat part (as it is still flat at infinity), <S> so $$H(s\rightarrow \infty) = <S> \frac{1}{3}$$ <S> For the phase plot, you start with the 90 degrees phase caused by the zero. <S> As calculated, the pole causes a phase shift at s=1/3, so a transition is drawn centered at 1/3. <S> As a rule of thumb, the transisition takes 2 decades (so from 0.03 to 3). <S> Look at this course for example to have some more info on drawing bode plots.
| So if you want a simple low-cost solution - use Excel.
|
Charging circuit for bulk 1.2v 1200mah ni-cad batteries I am seeking advice about how to construct a charging circuit for 1.2v 1200mah ni-cad batteries. I have around 60-70 of these batteries and I want to create a bulk charging circuit so I can charge 5 or more (preferably 10 or so) at once while still being able to charge only 1 at a time if that is all that needs to be charged. I found this schematic: and a descriptive post here: http://www.electro-tech-online.com/threads/help-me-build-a-simple-nicad-charger.90780/#post-714659 about the math behind the charging for the original posters circumstances, but I am wondering if I can simply parallel the load to multiple batteries to charge many at once. I am sure the LM317 can handle 10 batteries at 120ma charge rate. Overall question: Is it possible to use that schematic and parallel the load to multiple batteries? Also is this math correct as per the following details: Battery -> 1.2v 1200mahCharge rate -> 0.1C*1200mah = 120maCharge time -> (1.4 * 1200mah) / 120ma = 14 hoursR1 -> 1.25v / 0.120ma = 10.416ΩDC supply input -> (1.2v * 1cell) + 2v = 3.2v or higher How many watts should R1 be in this situation? Is it also safe to increase the charge rate from 0.1C to 0.2C or 0.3C? I don't have any way to monitor the batteries temperature. These batteries were manufactured in 2011 so they are pretty new (if it makes a difference). <Q> If you're going to charge a string of cells with a constant current, they must be wired in series and you must provide a bulk supply with enough output voltage to supply the headroom and the reference for the regulator, as shown in this excerpt from TI's LM317 data sheet: For charging current limits check the NiCd manufacturer's data sheet. <S> The power dissipated by the series resistor will be\$ 1.25V \times Ichg\$, and the power dissipated by the LM317 will be \$ <S> (Vin - (Vbat + Vref)) \times <S> (Ichg + Iref)\$. Note that the LM317 will dissipate more and more power as fewer and fewer cells are connected. <A> How many watts should R1 be in this situation? <S> Watts = <S> V 2 /R or I 2 <S> *R, which works out to 0.15W. <S> In order to keep surface temperature down and increase reliability you should double that to get the resistor rating, ie. <S> 0.3W or higher. <S> Is it also safe to increase the charge rate from 0.1C to 0.2C or 0.3C? <S> I don't have any way to monitor the batteries temperature. <S> Charging at much higher than 0.1C may cause the batteries to overheat once they reach full charge. <S> However it should be safe at 0.2C if you time the charge and stop when a little over 1200mAh has been put in. <S> This is recommended even at lower charge rates, because Nicads suffer voltage depression when overcharged. <S> Is it possible to use that schematic and parallel the load to multiple batteries? <S> The cells must be wired in series, not parallel. <S> Each cell will reach ~1.5V at full charge, and the regulator needs about 3V of headroom, so with 10 cells in series your power supply will have to deliver at least 18V. <S> Now what happens when you try to charge a single cell with the same power supply? <S> The regulator then has to drop 15.25V @ <S> 0.12A <S> , so it will dissipate ~18W. <S> This is doable, but a very large heatsink will be required to stop it from overheating. <S> It would be better to lower the supply voltage when charging fewer cells. <A> You're in luck. <S> NiCads are extremely easy to charge if you're not in a hurry. <S> Simply charge for 16 hours at a nominal C/10 rate, and don't worry about overcharge. <S> A 1C rate will provide the nominal capacity in 1 hour, so a C/10 rate is 1/10th that. <S> In your case it's 120 mA. <S> Furthermore, you don't have to be picky about precision current control. <S> If you you have a 12 volt supply, you can use a circuit like simulate this circuit – <S> Schematic created using CircuitLab to charge as many sets of 4 as you like. <S> Each set draws 0.12 amps (more or less) <S> so you can charge about 8 sets with a 1 amp power supply. <S> The 62-ohm resistors can in theory be 1 watt resistors, but I'd go with 2-watt units, just in case you've got a shorted battery or two in any given chain. <S> I recommend checking the each string of 4 for voltage after about 1 hour. <S> If the voltage is less than about 4.5 volts, you've probably got a dead cell in the string, and you want to pull it out. <S> With a shorted cell the limiting resistor will see more than the nominal 7.2 volts, and the charge current will be larger than you expect. <S> This is not a problem in the short run, especially if all the cells are pretty well discharged, but should not be allowed to persist for long. <S> If you then try to recharge some cells which are only partly discharged, you can get an idea of how the charge process is going by looking at the voltages, and you can stop recharging at a reasonable point. <S> In general, though, NiCads won't be damaged by overcharge at a C/10 rate.
| I recommend starting with 4 cells you know are fully discharged, and then take voltage measurements every couple of hours or so (write them down somewhere) so as to get a rough idea of how recharge proceeds.
|
3-pin MOSFET: P or N type? This may be a silly one but I couldn't seem to find an explicit answer: with a 3-pin MOSFET, how do I determine whether it's an NMOS or PMOS? I'm making some assumptions here: I've already found the Gate pin, which has no conduction to the other two pins (at the voltage level of a DMM diode test) I don't know whether or not an internal protection diode is in use I don't know if the Source is tied to the Bulk (not that it matters, since there is no Bulk/Body pin in a 3-pin MOSFET) Thanks! <Q> Assuming that is is an enhancement MOSFET (most common): <S> If it becomes conducting if the gate voltage is some volts <S> higher than the source or drain voltage <S> it is a N-MOSFET. <S> If it becomes conducting if the gate voltage is some volts lower than the source or drain voltage <S> it is a P-MOSFET. <S> It is very likely that there is an internal protection diode (there are only very very few MOSFETs without them; at least if it is a power MOSFET).You can use it to find out which pin is source and <S> which one is drain: P-MOSFET: <S> anode is connected to drain, cathode is connected to source N-MOSFET: <S> anode is connected source, cathode is connected to drain. <A> Measure the polarity of the body diode (between the two non-gate pins). <S> The cathode is either the drain of an n-channel or the source of a p-channel. <S> Apply a moderate positive voltage (say 8V) with a series LED and resistor to to the cathode with anode grounded. <S> Tie the gate to cathode. <S> If the LED turns on it's n-channel, if it is off then it is p-channel. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> (This is assuming it can only be a p or n channel enhancement mode MOSFET, if it can be a JFET or depletion type or other type again, then other tests will be necessary). <A> With the part number you can easily find a data sheet online that will give you more information than you will probably need. <A> A p-channel FET turns on as the gate goes more negative. <S> One a small voltage (perhaps a volt) is applied between the source and drain (choose terminals arbitrarily), change the gate voltage to be -1 and then 1 volt. <S> If you don't see a difference, try using slightly higher voltages. <S> The FET will likely be operating in the subthreshold region, so the currents may be VERY small (nanoamps to microamps). <S> Note that at room temperature, the subthrehold current in a good MOSFET should increase by 10 times for every approximately 70 mV of gate voltage change. <S> If the positive gate voltage allows a higher current, then it is a n-FET.
| A n-channel FET turns on as the gate voltage becomes more positive. Many common FETs have an internal diode between the source and drain (body connected to the source), so you may be able to determine the source vs drain by using the polarity that produces less current.
|
Is it possible to directly interface a MEMS ADMP541 microphone over I2S with any Microcontroller? I have bought a MEMS ADMP541 Evalution kit to record voice samples with arduino controller MEMS microphone will produce digital o/p , I2S communication protocal My question is should I directly connect the MEMS microphone to arduino mega/ any controller ? Or do I need to use any interfacing circuite b/w mic and controller <Q> I find this MEMS microphone : ADMP504 <S> As you can see this microphone has a analog output so you need to connect it to a dedicated codec microphone input ADAU1761 . <S> The codec is connected to a controller via I2C. <S> If your microphone has an integrated codec than you can connect it directly to the arduino without a problem. <A> Most microcontrollers have an SPI port, but not that many have an I2S. <S> An SPI port could be used to communicate with an I2S microphone, with a few caveats, mainly the SPI bus usually works with 8 bits bytes and the I2S with 16 bits words, and the I2S requires a Lef-Right clock signalling to indicate when the data is coming from the left or right in an stereo microphone. <S> See Interfacing an I2S Device to an MSP430 Device <A> There is at least one library for the Arduino Due to communicate with I2S audio devices. <S> Arduino Playground (list of libraries.) <S> Arduino Due I2S github.
| If you are using audio in mono, and your microcontroller allows to change from 8 bits to 16 bits registers (some of them do), you can use it.
|
Measure indcutor ripple current in a SMPS I need to measure the ripple current in a buck converter. In general, I add leads to the inductor and use a current probe. My issue now is that the inductor I am using has such a low inductance that the leads are almost doubling the total inductance. If I can't use a current probe, I would prefer to make the measurement with only one voltage probe. The only way I can think to do this is add a high precision resistor between my output capacitor and ground. I'm concerned though that in order to get an acceptable resolution from my oscilloscope, the resistor will be large enough that it adds substantial voltage ripple at the output. Are there any other methods anyone has had success with? <Q> You could use a hall-effect current clamp sensor. <A> If you perform a De-skew to compensate time delays on the current probes you may have acceptable results. <A> If you dont want to do the current probe then you are talking <S> a low value resistor like the others have said .Im <S> assuming that your output and input voltages are low because you are using 100nH .Hence <S> the current sense resistor has to be a low value so converter operation is not affected .Ballparking <S> between 10 and 100milliohm will allow the converter to operate normally. <S> Clearly your expected probe voltages will be low .The sensitivity of the scope will be adequate but probe noise pickup will be bad obscuring <S> the expected triangle signal <S> .What <S> I do here is use a BNC connecter and RG58U coax instead of <S> the scope probe .Most <S> scopes dont have a low impedence termination switch , <S> Sure termination is a good thing <S> but I generaly dont bother because my cable is only half a meter long and I get inflicted with otherpeoples strange scopes <S> .If <S> you do this <S> you will get a proper clear waveform .Now off the subject have you considered using an air cored coil which off course wont saturate .!00nH should be easy to do in air . <A> Sense the current to transform it into a voltage hence a transimpedance op-amp. <S> See the LTC6102, you can simulate circuits using LTSpice.
| Having in mind a standard Buck with a capacitive output filter, one straight forward option would be measuring the capacitor and load current at the same time and add it via the oscilloscope.
|
Wire microswitch so state can be read from Raspberry gpio I'm trying to check whether a series of valves (described here Can I measure if current is on or off in cable with 24v DC (in a cheap way) ) are open or not. Updated question to be more specific after getting some answers: If I mount a micro switch, like the one in the image below, on the valve so that the "normally open" pin on the switch is closed when the valve is opened, how would I wire it to a gpio on a Raspberry so I can check if it closed or not, e.g. every 10 minutes? I might use the gpio utility to check the pin. Would I then wire the "common" to a 3.3v on the Raspberry and the "normally open" to a gpio and then set the pin's mode to pulldown with gpio mode <pin> down ? And the read the pin with gpio read <pin> ? Question 2: Can I wire multiple switches to the same voltage pin on the Rapsberry? Question 3: Can I freely select to use either 3.3v and 5v? <Q> The pin on the left is the common. <S> The pin in the middle is normally open. <S> The pin on the right is normally closed. <S> (You can see the contacts touching). <S> How you wire it up depends on the input configuration for the GPIO. <S> If you configure the Pi GPIO with internal pull-up resistors then the switch needs to "pull-down" to ground. <S> If you configure the Pi GPIO with internal pull-down resistors then the switch needs to "pull-up" to 3.3 V. simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> Pull-up and pull-down arrangements. <S> If I mount a micro switch, like the one in the image below, on the valve so that the "normally open" pin on the switch is closed when the valve is opened, how would I wire it to a gpio on a Raspberry so I can check if it closed or not, e.g. every 10 minutes? <S> Would I then wire the "common" to a 3.3v on the Raspberry and the "normally open" to a gpio and then set the pin's mode to pulldown with gpio mode down? <S> And the read the pin with gpio read ? <S> Correct. <S> Question 2: <S> Can I wire multiple switches to the same voltage pin on the Rapsberry? <S> Yes, they will all share the same voltage and can be wired to the same pin. <S> There is very little current involved. <S> Question 3 <S> : Can I freely select to use either 3.3v and 5v? <S> No. <S> You need to use the same voltage that the chip is using. <A> You can, but you would have trouble when the switch is open. <S> When the GPIO pin is not connected to anything (when the switch is open), it would act like an antenna and go high and low at random. <S> So you'd want to tie a resistor from that pin to ground. <S> There are a few technical reasons to do this a little differently. <S> Connect a resistor between 3.3v and the leftmost pin (with GPIO), and connect the middle pin to ground. <S> When done this way, you will input a 1 when the switch is open, and a 0 when it's pressed. <S> Your software can reverse this logic if necessary. <A> @transistor has given an excellent answer, but I would like to add a little to it. <S> When interfacing to a switch which may be a short distance from the Raspberry Pi <S> I suggest adding a few components to protect the inputs of Pi from voltage spikes that are so easily induced into wiring. <S> The following circuit will do exactly that. <S> In addition it will provide a little contact debouncing. <S> Search the forum for "switch debouncing" to understand it. <S> simulate this circuit – <S> Schematic created using CircuitLab
| I might use the gpio utility to check the pin.
|
Calibrate without a known good voltage source I'm traveling and don't have a known exact voltage source. I do have a variety of electronic components such as resistors of various flavors and am wondering if there is some kind of trick to getting a known voltage value against which I could calibrate a DMM ( which would in turn allow me to calibtate all sorts of other stuff). Any ideas welcome! <Q> If you're serious, somewhere down the line you're going to have to buy - or build - something which is more accurate than the device you're calibrating/testing. <S> If it were me, I'd build, and I'd use an array of Zeners - LM4040s - rather than a single reference and a voltage divider to get various output voltages from - let's call it - the voltage calibrator. <S> That way, there's only a single non-precision current limiting resistor required between the raw supply and each Zener's cathode, and the inherent accuracy of each Zener's output voltage will be maintained since it won't be compromised by the tolerance of the voltage divider's resistor chain. <S> There are 6 individual output voltages available from LM4040s: 2.5V, 3V, 4.096V, 5V, 8.192V, and 10 volts, and they're all wired as shunt regulators, like this, where the value of Rs is determined by Ohm's law and is: $$ R_{S} = \frac{V_{DD <S> } - V_{OUT}}{I_Z <S> } $$ <S> The LM4040 exhibits a very stable Vout for a very wide range of Iz, so for an LM4040-10 with a Vdd of 12V and an Iz of 1 milliampere, Rs would be: $$ R_{S} = <S> \frac{12V - 10V}{0.001A} <S> = 2000 \text { ohms} <S> $$ <S> It's important to realize that current taken by the load connected between Vout and ground will cause the current through the Zener to be decreased by that amount, but with high-resistance loads, (voltmeters and such) that change in current through the Zener should have only a miniscule effect on Vout. <S> Finally, checking DigiKey for prices <S> yields USD 1.78 for a 10 volt +/- <S> 0.1% unit, which is pretty close to dirt cheap, so putting together an array of all six Zeners certainly won't break the bank, especially since the current limiting resistors can all be vanilla 5% carbon films. <A> If all you've got is resistors, that's not going to go so well. <S> Resistors are great at being linear devices. <S> Voltage references (of the two terminal flavour) are very nonlinear devices <S> (voltage is constant irrespective of current). <S> But diodes aren't all that great, and different types/models have different voltage drops. <S> A Zener would be nice, but if you don't have a voltage regulator, I'm going to assume you don't have a Zener lying around. <S> If you have zinc, zinc sulfate, mercury, and mercurous sulfate, you could build a Clark cell , which provides a relatively constant 1.434V. <S> However, this requires fancy glass ware, platinum wires, and, well, mercury . <S> An alternative (with considerably better tempco) is the Weston cell ; again, this requires mercury and cadmium sulfate octahydrate , among other things. <S> I haven't the slightest idea what that is, but it sounds scary. <S> In your comment, you mentioned that you some regulators lying around. <S> These are by far your best bet. <S> The usefulness will depend greatly on the type of regulator, but if you have something like an LM317 regulator, the reference voltage will be 1.25V nominally, +/- <S> 50mV. A generic fixed linear regulator like a 7805 has about the same precision (4.8-5.2V), but if you have more precise regulators, those could be better. <S> Another trick would be to rip open a piece of equipment you own that has an internal voltage reference. <S> Perhaps the real question is, what's wrong with your DMM? <S> Any half-decent DMM should be accurate enough for a lot of tasks. <S> I mean, even those $7 meters they hand out for free at Harbor Freight <S> claim an accuracy of ~1%. <A> Voltage regulator voltage references: <S> TL431 or TLV431 are moderately decent for limited value of moderate (1.5% unless they are the higher-bin versions up to 0.5%... <S> LM317 likewise has a low-volt reference built in. <S> If the DMM is worth owning, it will be better than that without fussing. <S> If it's not better than that without fussing, it's not worth dragging with you while traveling. <S> Expecting USB power to be worth anything as a reference is just plain silly. <A> A USB port in a computer should be between 5.0 and 5.1V; if that precision fits you. <S> A healthy automotive battery that has rested overnight should be around 12.6 to 12.8V; if that precision fits you. <S> Inside a PC, there is a 3.3 Volt rail that should be less than <S> +/- <S> 0.1V, if that precision fits you. <S> A LED will show a steady voltage across depending on its color. <A> AA, C, D cells are available everywhere. <S> Their voltage is ~1.54V new. <S> Several in series will give decent accurate voltage steps for calibration using, 1 , 2 , 3 , 4... of them.
| If you've got any sort of semiconductor device, you could try and use a diode drop as a voltage reference.
|
Maximum forward current on ESD diodes I'm interfacing a dsPIC33EP512MC806 with a set of analog systems. The analog systems manage a battery and have vregs for the digital systems. The analog systems measure the voltage and current consumption of the battery providing feed back to the micro. The current is measured with a low quiecent current IC (ZXCT1010). The voltage is measured with a low quiecent current opAmp in a divide by four configuration. It is the opAmp that concerns me. The digital side will get shut down by disconnecting power from the analog side. The analog side will remain powered on. Because the analog side remains powered on the opAmp still applies about 2.1 volts to the pin of the processor. When the processor is powered on there is no current or at least less than the meter can measure. With the processor turned off there is about 300uA of current from the opAmp into the pin. I believe that an ESD diode is being forward biased. There is a 1k resistor and a 0.1uf capacitor serving as a low pass filter. Also there is another 1k resistor serving as input protection to the pin. This makes for 2k of resistnace between the op amp and the pin of the micro controller. I'm having a hard time finding any information on what the ESD diode can tolerate. Can the opAmp remain connected to the micro controller indefinitely if the micro controller is shut off? simulate this circuit – Schematic created using CircuitLab <Q> Have you got a spare IO pin? <S> If you have then get rid of the op-amp, make the resistor divider much lower impedance (suitable for a direct drive to the micro's ADC) and "connect" the potential divider to the 8.4V supply using a P channel MOSFET controlled by the spare IO pin via an NPN transistor: - 1 msec later you have measured your battery voltage and, given that you probably don't need to measure it for another minute or so, your average current is 1/60,000 times the current taken for that milli second when you connected the potential divider to the battery supply. <S> It's probably a good idea to have maybe 100 nF across the lower resistor too. <S> You might also be interested in the answers provided in this stack exchange question. <S> You might find that you can actually have very high impedance resistors directly feeding the ADC pin providing you have a capacitor across the lower resistor (see Hanno's answer). <A> The ESD diode you refer to is not really an ESD diode, it will not protect the processor against ESD. <S> I would call it an input clamp diode, and there is usually one from the I/ <S> O pin to Vdd and another from the pin to Vss. <S> 5mA. <S> At a first glance it would appear that your 300uA is well within specification and would not cause a problem. <S> However, the +5mA limit is when the processor is running under normal operating conditions, ie Vdd is 3.0V to 3.6V. <S> I would not assume that the same limit applies when the processor is powered down. <S> What can happen with some processors is that the injected current will try to power up the processor, which means that when Vdd is switched on the processor fails to start up correctly. <S> I don't know if this applies to the dsPIC. <S> If this is for a commercial product then I would want to be absolutely certain that the injected current causes no problems. <S> I would look to either eliminate it altogether, or reduce it to a minimum as follows: <S> Power OA1 from the same 3.3V supply used by the dsPIC, <S> so that OA1 cannot source a voltage when the dsPIC is powered down. <S> Put an analog switch such as a SN74LVC1G66 between the output of OA1 and the dsPIC, and only enable the switch when the 3.3V dsPIC supply is present. <S> You may decide that it is perfectly safe to apply 2.1V to the ADC pin, but in that case you could reduce the injection current to a minimum by increasing the value of R3 in your circuit. <S> You may find that you can increase R3 to 47k without affecting ADC accuracy. <S> As Spehro has commented, the source impedance of your original circuit is higher than that recommended by Microchip, but if you replace R4 with 0R you will be OK. <A> By doing this you are exceeding the absolute maximum voltage rating on the pins. <S> There is no safe current according to the datasheet. <S> It may well work okay <S> (strongly suspect it will), but there are no manufacturer guarantees. <S> Note that you are already well outside (by 10:1) of the manufacturer recommended source impedance of 200\$\Omega\$ (see 70621C ). <S> Again, this may work fine with a typical chip at room temperature, but it's not a good design for a mass produced product. <S> You are wasting 0.3mA of battery <S> current <S> , right? <S> Why not power the op-amp from the digital supply, then the wasted current is 100 times better. <S> Of course this raises the same question wrt the op-amp inputs, but that's a different question. <S> A 1N4148 and one additional resistor could deal with it.
| The maximum current that you can put through the diode is well specified by Microchip, they call it Injection Current , with a maximum of +/-
|
How to increase the current in this circuit? Im trying to build a circuit to send information using IR led, using pulse signals (Im trying to mimic a home appliance remote control). My leds ( datasheet ) operate at 1.3V, and their maximum pulse current is rated 200mA I need a very strong signal and since the "commands" I send are quite short, I understand that there's not much harm in operating it at higher currents. I tried to use two IR leds in series, aiming to 300~mA current flow trough the leds. I did the following calculation: Vs = 5VI = 300mAVdrop of each led = 1.3Vso R = 5v - 2.6v / 0.300A. I managed to build 22Ohm || 10Ohm = 7~ Ohm Im controlling the base of my BJT 2N2222A transistor using my controller gpio, which is rated at 3.3V.In reality, I measured 80mA, which isn't what I expected.I expected it to be in saturation, since: Vb = 3.3VVc = 0VVe = 0Ve < Vb > Vc => Sat. simulate this circuit – Schematic created using CircuitLab What am I doing wrong here? <Q> Your problem is base drive. <S> Your controller GPIO is unable to provide adequate current, even though your are effectively shorting it to ground (I say "effectively" because 0.7 volts, the actual limit, is much less than 3.3). <S> If you look at a 2N2222 data sheet and look at the saturation curve at the bottom of page 494, you'll see that, for 200 to 300 mA, you can hope for a saturation voltage in the range of 0.2 volts ASSUMING A GAIN OF 10. <S> In your circuit, with a 5 volt supply, 2 1.3 LED drops and 0.2 volts across the transistor, you can expect a current of $$i=\frac{V}{R} = \frac{5-2.6-0.2}{8} = <S> 275\text{ mA}$$ <S> This in turn requires a base drive of 27 mA, and your GPIO will never produce it. <S> So, how to proceed? <S> Well, you need to boost the current capacity of your GPIO pins, and you can do this with the following circuit simulate this circuit – <S> Schematic created using CircuitLab <S> Two extra transistors, rather than 1, are required to maintain the operating sense, in other words to turn the LEDs on with a logic high on the GPIO pin. <S> Of course, if you need an extra PNP anyways, there is no need for 3 transistors. <S> You can do it with simulate this circuit <S> This circuit will probably work well, but it's very slightly iffy in terms of total gain, and may not give quite as much current as you expected, but it will be much better than your first attempt. <S> The PNP can be any good signal transistor. <S> I've shown both 2N2907 and 2N3906. <S> Both will work fine. <A> There are several things wrong here: <S> You say the LEDs are rated for 200 mA pulsed operation. <S> That already takes into account that they will be on for a short time. <S> You don't get to pulse them at 300 mA and still expect them to work as otherwise specified. <S> No, you don't have 3.3 V B-E on the transistor, at least not unless you've already blow it out. <S> If the 3.3 V signal can source about 10 mA or so, then connect it with a resistor in series. <S> Figure 700 mV B-E drop <S> , so you want about (2.6 V)/(10 mA <S> ) = 260 Ω. To test the LEDs, you can run them separately without the transistor. <S> They will drop 2.6 V total, so (2.6 V)/(200 mA <S> ) = 13 Ω with 5 V applied should be about right. <S> However, at this current, the voltage drop of the LEDs is likely higher than the 1.3 V specified for steady current. <S> That will make your circuit more immune to LED voltage variations. <S> You might try driving each LED separately with its own transistor. <S> That will be less efficient overall, but will allow for better control of the LED currents. <S> Then you can drive the base directly with the 3.3 V logic signal, put the resistor in series with the emitter, and the LED in series with the collector. <S> The transistor will then act like a controlled current sink. <S> Figure 700 mV B-E, so that leaves 2.6 V on the base. <S> The emitter resistor is then (2.6 V)/(200 mA <S> ) = 13 Ω. <S> With the emitter at 2.6 V, 2.4 V are left for the LED and the C-E drop. <A> Ok, thanks to being reminded to use an N-MOSFET, I came up with this circuit for you: <S> The N-MOSFET should have a drain-source impedance of ~1.5ohm @ <S> Vgs=3.3V (from your GPIO pin), so taking 5Vdrive - 2.7V for 2x 1.35V LED drops, that leaves 10ohm for the resistor to give: 2.3V/11.5ohm=200mA through your LEDs. <A> Volt drop of LED: - <S> At 200 mA the volt drop is typically about 1.45 volts. <S> At 300 mA it's about 1.55 volts. <S> The data sheet tells you that 200mA is the absolute limit providing the duty cycle is 50% or less. <S> You can activate it at extremely low duty cycles (see graph above) of tp/T = 0.001 at up to 1A <S> but this is really pushing it <S> and it is likely that this is not very representative of the data you want to transmit. <S> So, 200mA from a saturating transistor (maybe 0.2 volts dropped) leaves a volt drop across a resistor of 5 - (0.2 + 1.45 + 1.45) = 1.9 volts. <S> A resistor value of 9.5 ohms is more appropriate. <S> However, you probably won't have the current capability in an IO pin to drive the base current to get that collector current. <S> At saturation, the Hfe of the transistor might only be 10 and therefore you'll need to push 20 mA into the base - can your IO pin do this? <S> But it's worse than this because the 2N222A cannot get down to 0.2V saturation <S> passing 200 mA - read the data sheet. <S> At 150mA it will drop 0.3 volts at a base current of 15 mA. <S> At 500mA it will drop typically 1V. <S> You have problems to solve in several areas to make this work but the first stage is understanding those problems!
| You need to control the current thru the base, not the voltage across it. It would be useful to use a bit higher voltage so that you can use a higher current setting resistor.
|
Vpp for American split-phase 110V AC I know the 'nominal' voltage of 110/115/120 is both based on Vrms and that stability @ any of those levels is pretty much a fairy tail. I also know that most rectifiers will output ~130-150V after re-assembling the waveform & filling a comditioning cap. What I'm not 100% sure on, and don't really feel like digging out my soldering iron & finding a few diodes to test it today, is the peak-to-peak voltage of the 110VAC 'hot' line. <Q> Place a high resistance (perhaps 1M ohm) from your + to - output. <S> Now there is a closed circuit which includes 2 diodes and a resistor. <S> Where is the source in that loop ? <S> (You didn't say you wanted voltage to GND) <S> Then you edited in a capacitor, which is ok. <S> LT Spice simulator might or might not be trusted. <S> Along with seeing no source in your loop, LT Spice agrees that voltage is zero. <S> The voltage at the cathode of D1 (my circuit), with respect to ground is 340 volts peak to peak. <S> ( I used 120 VRMS ). <S> The OP did state to use 110 VRMS . <S> The voltage at the cathode of D1 (my circuit), with respect to ground is then 310 volts peak to peak. <A> I know the 'nominal' voltage of 110/115/120 is both based on Vrms and that stability @ <S> any of those levels is pretty much a fairy tail. <S> Voltage is measured in Vrms. <S> Utility companies usually comply with their specified voltage with ±10%. <S> It's not a fairy tail. <S> It's a requirement. <S> I also know that most rectifiers will output ~130-150V after re-assembling the waveform & filling a comditioning cap. <S> A full-wave bridge rectifier will give out a peak DC voltage of \$ \sqrt 2 \cdot <S> V_{RMS} <S> - 2 ~diode~ <S> drops \$ (typically 0.7 V each). <S> I never heard of a 'conditioning' cap. <S> The smoothing cap will maintain the DC output at peak DC voltage on no load but voltage will droop between peaks depending on load. <S> What I'm not 100% sure on, and don't really feel like digging out my soldering iron & finding a few diodes to test it today, is the peak-to-peak voltage of just the 'hot' 110VAC line. <S> I.E. <S> Will the circuit below have ~130-150V, or ~260-300V across the + and - output <S> pins? <S> simulate this circuit – <S> Schematic created using CircuitLab Figures 1 and 2 based on original question, "Why is there no voltage reading between Probe+ and Probe-?". <S> Your circuit will have 0 V between Probe+ <S> and Probe- as there is nothing to induce a potential difference between the probes. <S> Even if you connect NODE2 to mains it just bounces the whole circuit up and down with respect to ground or neutral but still does not induce any potential difference between the two probes. <S> Edit after OP edit including deletion of the original wonky schematic: What I'm not 100% sure on, and don't really feel like digging out my soldering iron & finding a few diodes to test it today, is the peak-to-peak voltage of the 110VAC 'hot' line. <S> \$ <S> V_{P-P} = 2 <S> \sqrt 2 <S> \cdot V_{RMS} <S> = 2 \sqrt 2 <S> \cdot 110 <S> = 311~V\$ <S> Your diodes and capacitor are now irrelevant to this question unless you intended this: simulate this circuit Figure 2. <S> Positive and negative rails generated by half-wave rectifiers. <S> This circuit will give you the peak to peak voltage of the mains between the two probes. <A> You don't have to test anything, all you need to know is that the peak-to-peak value of the nominal (RMS) mains voltage is: $$ V_{PP} = <S> V_{RMS}\times 2\times <S> \sqrt{2}$$ <S> whether the output is taken across the entire secondary of the distribution transformer or from the center tap (Neutral) to either end, and what's a fairy \$ \style{color: <S> red;font-size:100%}{tale} \$ is that, in the long term, the mains voltage varies more than about +/- <S> 10% of nominal.
| Stability is not based on Vrms. Stability is determined by the ability of generators to maintain voltage despite fluctuating demand.
|
Why and when do SSRs heat? I'm using a 40A 120VAC SSR to control a 10A resistive load. It gets hot during use. Is this heat associated with the switching, with the load current, or with the voltage? And where does it come from? (Please provide an explanation that can be understood by a trade electrician with little electronic engineering knowledge.) <Q> SSRs (solid state relays) are usually SCRs or triacs that are activated via a opto-coupler, all built into a single package. <S> One problem with triacs and SCRs is the voltage drop across them when on. <S> This can be 1.5 V or more. <S> Check the datasheet of the SCR you are using. <S> It should tell you the voltage drop. <S> Electrical power into a device is the current thru it times the voltage across it. <S> If the SSR drops 1.5 V and you're putting 10 A thru it, then it will dissipate 15 W. Again, check the datasheet to see what kind of heat management might be required of this SSR. <S> There are SSRs that have lower voltage drop by using FETs, but these usually don't handle much current and are usually more expensive. <S> If you're not planning to switch often, then perhaps a mechanical relay might be more suitable. <S> These don't have one nice features of SCR and triac SCRs though, which is to turn off at the current zero-crossing. <S> That reduces emissions. <S> I know of one commercial product that used a SCR and relay in conjunction for switching AC line loads. <S> The SCR did the actual on and off switching, nicely synchronized to the AC zero crossings. <S> The relay did the heavy lifting by being turned on a little later and off a little earlier than the SCR. <S> The SCR therefore only dissipated power for a short time, and the relay never saw high switching stresses. <S> The lifetime tests suggested over 1 M switching cycles, something the relay would otherwise not have been good for. <S> To be clear, I'm not suggesting you do something like that. <S> I mention it to illustrate some of the properties of these things and how they have been harnessed and worked around in the past. <A> Consider: if the SSR looks like a tenth of an ohm when it's ON <S> and there's 10 amperes going through it, into the load, then the relay will be dissipating: $$P = <S> I^2 R = <S> 10A^2\times <S> 0.1\Omega = 10 \text{ watts} $$ <A> SSRs have resistance when they are on - considerably more than most mechanical relays, actually. <S> Perhaps more resistance than other SSRs if you have some sort of dubious brand which apparently lacks published specifications. <S> A 40A SSR is only a 40A SSR if it's attached properly to a proper heatsink, or on for VERY short times. <S> Follow the data sheet. <S> Well, assuming there even IS a datasheet. <S> 10 amps of current, squared, times the resistance when on of your SSR = heat. <S> What looks to be a poorly designed heatsink (and is there any sort of thermal pad ensuring excellent contact between the SSR and heatsink?) means they get hot, even with "only" 1/4 load.
| When the SSR is switched ON, it takes a little bit of power to do the switching, which heats it up a little, but when it's switched ON, the load current has to go through the switch's ON resistance, which causes the bulk of the heating.
|
repeatedly turning an incandescent light bulb on and off every 20 seconds will cause damage to the bulb? I have seen similar questions to this one but none of them were asked in the range of seconds only minutes. I just finished building a incubator for chicken eggs and I am using an incandescent light bulb as source of heat. The thing is I used a pretty sensible digital termometer an the light bulb turns on, last ~20 seconds on and then turns off again . I'm worried this will cause any damage to the light bulb or the relay that acts as a switch. The incubator works well but I dont want to replace parts every week. <Q> I'm not sure this is so mich an "original" answer as a combination/explanation/redinement of the other 2 already posted answers, but I'll try to help a bit. <S> As transistor pointed out in the question comments, the 'bulb'-life impact of rapid switching on several varieties of lights is discussed in some detail in If I flick the light switch on and off will it damage the light? <S> Autistic, Rothloup, and 2 posters in the other thread are all right about 'dimming' the incandescent greatly improving bulb life. <S> I would recommend using an inductor in SMPS buck-converter arrangement as likely being the most efficient (be careful though, the efficiency of that one inductor could surprise you, incandescents have a very non-linear response & tend to respond well to under-voltage drive). <S> While the buck converter could arguably be run on from non-rectified ac current, I would personally recommend using rectified & conditioned/smoothed DC (for predictable performance), and a pwm management that never cycles slower that 40KHz <S> (so you don't have to hear it 'sing'). <S> You should definitely replace the relay with solid-state components. <S> At the least, a triac or optoisolator/'solid state relay' can switch your load faster than a mec. <S> relay & love longer. <S> Better by far would be using a bridge rectifier & a capacitor to convert your input to smoothed/conditioned DC, then use a power MOSFET (if you get a 'logic-level drive' one, it won't even need any external buffering transistors) to run the aforementioned buck converter. <S> Putting it all together, if you PWM a buck converter, with solid-state switchgear, to keep the light somewhere between 'just warm' and 'hot, but barely glowing,' you should be able to maximize your energy efficiency, component lifetime, and the precision/stability of your incubator's temperature control. <A> The life of the Bulb is shortened by repeated turning on and off. <S> The relay life is also shortened by the inrush current of a cold filament. <S> If you did something with a light dimmer lamp life would be very good and there would be no electromechanical relay to worry about. <S> If you used a solid state relay, a high repeat frequency could be chosen so the bulb doesnt get stone cold. <S> This is all hindsight <S> so here are some things that can be done easily on what you have already built: Use a ntc (Negative Temperature Coefficient) <S> thermister to limit inrush current helping bulb and relay life Wire larger bulbs in series which reduces inrush and will be fine because its the heat you want. <S> Preheat the lamps by allowing a small current to pass through the relay conntacts. <S> (Preheating is nothing new, it has been done for years on car indicator lamps.) <A> If the issue is that your thermometer is too sensitive, <S> then it sounds like you need to add some hysteresis to the switch point. <S> If you are running the light off of a programmable microcontroller like an arduino or something, you can read the temperature and turn the light on a few degrees below your set point, and off a few degrees above. <S> You can also use pwm (maybe with an in line inductor to smooth the current) to turn it on at less than full power. <S> Combining these techniques should allow you to control your temperature, on time, and duty cycle as you wish.
| You must keep the repeat rate low because the relay has a finite number of operations before mechanical failure.
|
How camera calculates amount of color per pixel I don't know where to post this question sorry if it's in wrong section.I already know how pixels works they are combination of three colorsRED, BLUE and Green. But they should be mixed in different amounts tocreate a required color, I wanna ask how camera measures the amount of singlecolor to be mixed for the result color. Thanks. <Q> This only works because the human eye has receptors for red, green and blue light, and that's how it sees color. <S> The spectrum is certainly not necessarily the same for the light emitted by the monitor as what was originally measured. <S> For example, sunlight has a spectrum that looks like this: <S> But white light from an LCD display has a spectrum that looks like this: <S> It's a little more complicated than that because the filter colors in the display and camera don't match the eye response exactly. <A> Unless you are using a color camera to produce black and white outputs, you never combine them. <S> Instead, the outputs of each color are handled separately, and the display screen shows separate pixels for each color. <A> The camera does not measure the colour, it just measures the amount of red light, the amount of blue light and the amount of green light. <S> Those same numbers that go to make up the display pixel. <S> These days digital cameras do this by using patterned colour filters in front of their photo-receptors. <A> There are several things to it. <S> The dye in the camera that "converts" <S> the light to electrons does not have a linear response over the light spectrum - see an example: <S> So, to get a response for say three different colors/wave lengths - like red green and blue, you would need three image sensors having filters on top of them to pass only the desired wavelength. <S> Since it is not practical, they use a filter array on a single sensor and then obtain/interpolate all three colors for each pixel using information from neighboring pixels. <S> This does not represent the true information as it would be in the case of three sensors, but it is good enough for us: <S> There are several standards for image sensors to represent the data (which could be a new question), and the end point is to scale and display that data to match human eye perception (left), since it is different from sensor's perception (right). <S> As @Spehro Pefhany pointed out, we can use a mix of red green and blue color intensities to "create" any color to be perceived by human eye. <A> In cameras, each pixel location has a "well" that accumulate energy from photons. <S> Photon energy is converted into small amounts of electrical charge, which we can then measure (in millivolts). <S> To get colors, we apply filters, so that only energy with the right frequency is measured. <S> A typical setup is the Bayer filter, where a 2 by 2 pixel area collects Red/Green/Green/Blue. <S> This is then combined into a single RGB pixel in a post process called de-Bayering.
| The camera measures the amount of light in each 'bin', red blue or green, and that is the amount of light that your monitor should emit from the red, green and blue pixels in its display in order to be perceived by your eye as that original color.
|
Significantly reducing speed of single-phase AC motor I have a 1/3hp single-phase AC motor spinning my drill press. With the maximum reductions available through pulleys it still runs 10x too fast for one of my applications (i.e., the chuck turns at 360rpm and I need it around 30rpm). I'd be happy to cut the output torque proportionately to the speed reduction, but I've been reading about this for hours and I can't even determine: For what types of small AC motors is sustainable speed reduction possible? By what means? Triac? PWM? VFD? To what extent? Is 10x speed reduction possible? And then there's the problem that I can't even tell for sure what kind of AC motor I have. I can see that it has a 16µF (run?) capacitor bolted to its side. And here's a picture: I'm further bewildered because typical hacks for this problem involve hundreds of dollars in gearing or special motors. This entire drill press is $100, so I have a hard time believing there's not a sub-$100 solution. E.g., I'd be happy to replace the motor with one that runs on household current at something like 200rpm instead of this one's native ~1800rpm. But I haven't been able to find even that. Am I missing some fundamental limitation to producing torque off of household AC at very low rotational speeds? <Q> Voice of experience: Use a jackshaft and additional belts/pulleys , &/or change to a different motor (DC with DC speed controller or <S> 3-phase + VFD (variable frequency drive) variable speed.) <S> The DC motor and speed control can often be salvaged from a treadmill that someone gave up on using, for free. <S> The fundamental limitation of running induction motors slowly on household (60 cycle per second, 3600 cycles per minute) <S> AC is that the motor type you have has 4 poles if it runs 1800 <S> RPM - so you'd need 36 poles to turn 200 RPM on 60-cycle AC. <S> That would be a very rare bird indeed. <S> You're actually fortunate if your drill press motor is not 3600 RPM to start with... <S> The other limitations (which apply to "universal" motors that can more easily be speed controlled, but are terribly noisy by comparison)(and also to DC, and to a slightly smaller extent 3-phase + VFD) are terrible (worse than a linear reduction) torque, and poor cooling/overheating since the motor's (built-in) <S> fans are not running at a reasonable speed to cool it. <S> You might find gearmotors (normal motor speed of 3600 or 1800 RPM and an attached reduction gear) that run that slowly, but you won't like the price, especially if you want much power/torque. <S> The initial cost of the drillpress you are starting from has little impact on the cost of doing non-standard things with it (and may make a more expensive model that has better features such as dual reduction or a wider reduction range already built in look less expensive in the end.) <S> Then again, you may be starting with <S> completely the wrong tool - metalworking lathes are not too hard to find used affordably in moderate sizes, and typically have a "back-gear" setup standard that offers very low speed and high torque. <S> Good for coil-winding (at a guess since you don't say <S> and this is EE.) <A> This is what happens when "good" solutions aren't cheap enough: it's an off-the-shelf 12V 1A geared motor (designed for brass case preparation), clamped to the drill's drive shaft with a rigid coupling. <S> On highest reduction pulleys the chuck is turning about 50rpm. <S> Beauty in kludginess? <A> The problem is actually in the type of single phase motor you have there, a Capacitor-Start / Induction-Run (CS/IR) version. <S> It has a centrifugal switch inside that removes the starting capacitor and its associated auxiliary starting winding from the circuit at about 75% speed. <S> So as soon as your speed drops below that threshold, that switch re-engages and puts the start winding and starting capacitor back in play. <S> Those are not designed to be used continuously and will burn up (or rather, your motor will trip off line on over-temperature if you are lucky). <S> Your viable options, other than the additional mechanical ones, are to change it to a 3 phase motor and use a VFD that converts your single phase source to a 3 phase output; change to a single phase PSC (Permanent Split capacitor) motor and use a special VFD designed to operate that type; or change to a DC motor and DC drive. <S> There is nothing you can do with that particular motor that will work without destroying it. <A> The light bulb approach is elegant and will work. <S> Even if the motor has a start cap (as opposed to a run cap) this will work because a light bulb is a "negative resistance device. <S> " This means at the moment of turn on it's like a bare piece of wire. <S> As it heats up (a few seconds) its resistance goes up, so it will reduce the voltage applied to the motor. <S> Unlike DC motors, the interaction of an AC motor with its power source is quite complicated. <S> But the light bulb is very generic and will not interfere with those complex reactions. <S> Therefore I give Externet an "A".
| Bottom line, that type of motor is NOT designed to operate and anything other than full speed, regardless of how you attain a lower speed.
|
How does async data transmission actually work? I think I understand synchronised data transmission between A and B. They share a synchronised clock signal that indicates when the transmitter is sending a bit and the receiver should read the value. What I don't understand is asynchronised data transmission. I realise that there are start and stop bits and possibly a parity bit too but how does the receiver know when to "take readings" from the signal between the start and stop bits? <Q> For the most common asynchronous serial communications the protocol requires the transmit and receive ends to agree on the data signalling rate and the data format. <S> Format being an agreement between ends as to number of bits to expect from start bit through stop bit. <S> Knowing this the receiver just has to synchronize itself on the leading edge of the start pulse. <S> The receiver will also use a sampling clock that is a multiple of the agreed upon data signalling rate such as 16 times as fast. <S> Then the receiver can count 8 clocks from the start bit edge and arrive at the center position of the start bit. <S> From there the samples it takes every 16 clocks will be the data bit value for the expected number of bits. <S> If the last one is not the expected level of a stop bit the receiver then knows to post an error. <S> I just described the simplest version. <S> There are other receiver algorithms that will also see when the edges of the data changes occur within the start to stop bit interval and may shift their reference center position of the bit one clock either way in an attempt to track signalling distortion to some degree. <S> Another scheme used is to sample the data three times around the bit center position and require that all three samples be the same. <S> If not all the same the receiver posts an error as it realizes that the data is changing during the center time of the bit which indicates an out of sync situation. <A> The receiver starts at the leading edge of the start bit, waits 1.5 bit times, samples, waits one bit time, samples, etc. <S> In reality receivers often oversample: they take 3 (or even more) samples and use majority voting. <S> This arrangement works only when sender and receiver agree a-priory on the bit rate sender and receiver have reasonably accurate clocks <S> the '0-time-moment' moment is re-establised periodically <S> For the common asynchronous format, the '0-time-moment' is re-estabilised at every start bit, and the a rule of thumb is that the clocks must be ~ 1% accurate. <S> Note that with sufficiently accurate clocks on both sides a hybrid between synchronous and asynchronous communication can be used <S> : just one wire carries the data, and the occasional 'bit slip' is accepted. <S> Telephone exchanges used to communicate this way, with a central master clock synchronyzing the other clocks. <A> There are at least three basic forms of asynchronous transmission. <S> 1) <S> The UART, (Universal Asynchronous Receiver/Transmitter) where the transmit and receive clocks are asynchronous, but <S> both ends agree (by some out-of-channel means like baud rate setting instructions) to use approximately the same frequency. <S> The receiver detects a start condition (RXD going low), waits half an agreed bit period, and starts acquiring data. <S> As long as the baud rates agree to better than +/-5%, this system can operate for 10 bit periods (start, 8 bits, parity) before losing synchronisation, and it needs to re-synchronise at the start of each new symbol (character, byte). <S> Oversampling is a typical refinement on this scheme. <S> 2) Self-clocked schemes, where a clock signal is buried in the data itself. <S> One example of this is " Manchester code " where every clock edge causes a transition (change in level), every '1' data bit does, every '0' bit does not. <S> These can even operate in the absence of a pre-agreed baud rate, provided the receiver is allowed some short time to "learn" the clock rate from the data, and there is some convention for framing (such as the missing clock edges in the AES/EBU preambles ). <S> 8B-10B codes are another family of self-clocking codes, where each byte is converted to a 10 bit value with some specific characteristics (such as, approximately equal number of 0's and 1's for minimum DC content, no runs of more than 5 9's or 1's in a row) - guaranteeing there are enough edges to infer the clock rate. <S> IBM patented one implementation in 1984, but another was in use by 1982 for digital video transmission over fibre optic link (sketchy details on p.6 here) <S> 3) Handshaking, which requires two signals for handshaking as well as the data signals. <S> Each time the transmitter sets a bit, it also changes the state of its handshake signal (often called "Req" or Request). <S> The receiver notices this change, accepts the data bit, and replies with a state change on its "Ack" or Acknowledge signal. <S> This gives the transmitter permission to send the next bit. <S> In some respects, Req is similar to a clock line : however unlike a clock, there is no defined clock frequency or signalling rate, the transmission is reliable even if the receiver is busy and ignores its inputs for a while.
| The receiver known when to sample the signal by mutual agreemnet on the bit rate (= baudrate, in this case).
|
Why AC power plugs have three pins Can someone clearly explain the tasks of each pin in a plug. Is there a difference between one phase and three phase plugs? Does the electricity enters our home from line connection and goes back to the generator from neutral connection? The third one is connected to ground to protect us but is it really necessary because some plugs only have two pins. <Q> To power a device, current has to flow thru it. <S> That means it has to go in one place and come out another, which requires two wires. <S> The third wire of most outlets is a safety ground. <S> It is not necessary to power a device, but can be useful to some devices. <S> Any device that has a conductive outer shell is a potential safety hazard. <S> It would only take one fault to make the shell live, like the hot wire breaking or slipping off some mounting, then touching the inside of the case instead. <S> In general, we try to keep users two independent faults from danger. <S> The above example of the hot wire coming off and touching the chassis is just a single fault. <S> Now the chassis is at lethal voltage, and you don't even know this until you touch it and something grounded. <S> Then its too late. <S> In such cases, the chassis is tied to the ground line. <S> If the fault described above happens, hot is shorted to ground, which will cause a lot of current to flow and trip the breaker. <S> When the outer shell of a device is made of insulating material, the user can touch it no matter what went wrong inside. <S> Such devices don't require a ground connection, and there's often no place to connect it anyway. <S> Usually such devices are "double insulated". <S> That means the hot voltages are normally insulated with insulation on the wire and the like. <S> Nothing on the hot side is supposed to rub up against the case without a deliberate layer of insulation in between. <S> Then you still have the case if that layer fails. <S> Most line filters are common mode chokes, also called baluns, with capacitors to ground on the line cord side of both AC lines. <S> The balun increases the impedance of the unwanted signals, then the capacitors shunt the signals to ground. <S> This isn't possible without a ground connection. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Supply transformer supply and earthed appliance. <S> Yes <S> L <S> ive <S> is the supply, <S> N eutral is the return and the E arth is protection. <S> Normally there is no current in the earth wire <S> but if, for example, a live wire fell off inside the appliance and contacted the metal there is a risk of electrocution. <S> Earthing the appliance prevents the case rising to dangerous voltages. <S> In the event of a sever fault a high current may flow but the fuse will then blow, making the system safe. <S> Double insulated devices don't need to be earthed so a two-pin plug is adequate. <A> You're probably talking about the american plug style,so there will be two holes which look quite the same. <S> One of them will be the HOT pin and the other the NEUTRAL,which closes the circuit,so through them is supplied AC to your appliances. <S> The third one,whose hole looks like a mouth is the GROUND.This hole is connected to some metal rods or conductive objects(metal) which are buried into the ground. <S> This helps protect you form electroshocks in case you plug in a device which has a metal surface and one of the supplying wires accidentally touches the metal case,turning you into a possible conductive path(in case you touch the metal surface).Now <S> the GROUND pin will protect you,short-circuiting the metal case,drawing all the current so you won't be able to. <S> You should be able to notice the difference between 2 pin plugs and 3 pin plugs. <S> It's just that the 2 pin plugs don't have the GROUND pin,so you should be careful if you connect something with some exposed metal surface. <S> The rest is the same. <S> Note that the european socket's holes look different. <S> The supply pins have each a round hole and the GROUND connects to your appliance through two copper metal strips: https://en.wikipedia.org/wiki/Schuko . <A> Can someone clearly explain the tasks of each pin in a plug? <S> Assuming you mean a standard plug-it-into-the-wall-in-Canada-and-the-USA plug: the large flat opening on the left is the neutral. <S> It carries current but does not supply voltage. <S> The one on the right is the hot; it supplies voltage. <S> The roundish one at the bottom is safety ground. <S> It carries current never, unless there is an electrical fault. <S> It's there for cases where something has failed. <S> Is there a difference between one phase and three phase plugs? <S> Yes. <S> It would be disastrous if a plug expecting neutral and safety on two of the pins found voltage. <S> This would be asking for an electrical fire. <S> Plugs are designed better than that. <S> Does the electricity enters our home from line connection and goes back to the generator from neutral connection? <S> No. <S> The neutral goes to a metal rod hammered into the ground. <S> You can think of this as sending current back to the utility through the ground if you like. <S> The third one is connected to ground to protect us but is it really necessary because some plugs only have two pins. <S> You ask if it is necessary . <S> This is vague. <S> Is a safety ground necessary for the correct operation of the device? <S> Typically no. <S> There are some devices which require a solid connection to ground, but most do not. <S> Is it necessary by standard engineering practices to provide safety grounds for some devices? <S> Absolutely yes.
| Another reason for the ground connection is to allow devices to reduce both conducted and radiated emissions.
|
Electric bill for reactive power I have read that if you don't unlug the charger from the socket after charging your phone, although it is not connected to the phone, it still consumes power and your electricity bill adds up. On the other hand if I leave the charger plugged without the phone I assume the only power is reactive power and in residential buildings we don't get charged for reactive power. <Q> There are a couple of factors to consider. <S> 1) Old-style wall-wart chargers use a transformer that runs at line frequency (50 or 60 Hz). <S> High-quality line-frequency transformers <S> do present a large reactive load to the AC Mains. <S> Unfortunately, most wall-wart chargers do <S> NOT use high-quality transformers. <S> They usually run very close (or into) saturation and thus run warm or even hot. <S> That heat shows up on your power bill as energy consumed. <S> 2) <S> Modern chargers use a switch-mode power supply. <S> These can be extremely efficient when idling. <S> Bottom line is: If the charger is running warm, it is consuming energy and that usage will show up on your power bill. <A> <A> Low cost chargers probably consume 0.5 W when idle (no load, no phone plugged in). <S> High quality ones (e.g. Apple) consume < 100 mW -- typically 10 mW -- <S> when idle.
| Actually the transformer inside the charger is not ideal and has some winding resistance and therefore will consume a small amount of active power even if the phone is unplugged.
|
Is an SPDT switch spark-free? Question Will this switch spark when it is switched? Intro I am currently working on a electric longboard and I came across this problem.I have a LiPo battery providing power to the motor through the ESC (electronic speed controller). Now, when the batteries would run out of juice I'll have to charge them and in doing so I'll have to connect those leads to the charger. Most E-board builders use a loop-key to cut the circuit between the battery and the ESC. This is a good and working solution but the only problem is that if you were to forget to remove the loop-key you would potentially harm the ESC. An anti-spark on/off switch is more elegant solution, but still has the same problem. My question: would an SPDT switch with the following specifications suffice? Rated Voltage @ 15A 250VAC, 20A 125VAC Schematic simulate this circuit – Schematic created using CircuitLab <Q> No matter whether you use an AC or a DC rated switch, it will always bounce and it will always spark. <A> Have I interpreted your situation correctly? <S> If that's the case, you might consider adding a simple snubbing circuit, such as a capacitor across the switch terminals. <S> Such a circuit absorbs the energy that would otherwise create the spark (and the voltage spike that gives rise to it), and dissipates it more gradually. <S> A capacitor across the terminals is probably the simplest type of snubber, but there are many more sophisticated ones; the next step up might be a simple RC network, perhaps including a diode. <S> It depends on what's drawing the current, how much is being drawn, and how much inductance you've got in the circuit. <A> I don't know what components you have chosen for your longboard, but if the motor consumes say 1 kW of power in bursts, it will draw ~45 A and likely spot weld that switch closed. <S> If you are concerned about sparking, you can buy connectors that have integrated spark suppression, for example the XT90-S. Inserting the male connector into the female first connects the negative side and an auxiliary positive contact on the positive side. <S> This auxiliary contact is connected to the positive main contact with a resistor, which allows the ESC capacitors to charge slowly. <S> Inserting the connector further engages the main contacts.
| If I read between the lines of your question correctly, you're not directly concerned about the spark (e.g. because it might ignite flammable gases), it's the voltage spike that would accompany it that might damage the speed control circuit.
|
What well-known ICs have essentially no packaging? As a kid I once found a calculator whose IC was protected only by a loose plastic cover. With the cover removed, and with appropriate lighting, I could make out distinct features of the IC– including company logos– with a simple classroom microscope. I'm just a lazy enthusiast; I realize that most ICs are more expertly packaged, and I have no interest in milling, dissolving, or chipping away at anything. How uncommon was my childhood discovery anyhow? Are there any well-known integrated circuits I could buy or find that I can gaze at without much hassle? (In case anyone cares, the calculator I found was a CVS-branded "scientific calculator", model 185371.) <Q> They are sold as "bare die". <S> Basically this means that the silicon has not been wire bonded into a package nor covered up. <S> I've come across a few things including a few TI ICs that are available as bare dies. <S> In fact there is a whole page on the TI Website which lists parts they sell in this format. <S> However, I'm not entirely sure whether any of these will be available in small quantities. <S> Typically bare die stuff will only be used in very niche markets by people with the equipment to wire bond them. <S> It is likely that you would have to need 1k+ units before the companies would be willing to sell them to you. <S> In fact the reason most ICs are available in small quantities (other than samples) is that the big distributors buy in bulk and then resell to low volume customers. <S> A more economical option if you are just interested in looking at them (which is not surprising, they can be quite spectacular!), is to look on a well know auction site for "Silicon Wafer". <S> There are quite a large number of processed (but electrically defunct) 6", 8" and larger wafers for reasonable prices (sub $30). <S> These are even more spectacular than just a single die. <A> UVPROMs (Ultra-violet erasable read-only memorys) had a quartz window through which you could see the actual silicon chip. <A> A lot of the old (70's and 80's) uP, <S> RAM and such were produced in ceramic packages for hi-rel or hi-temp use. <S> These ceramic packages are easy to distinguish, since the ceramic is usually white or grey, not black. <S> The chip is installed in a well in the middle of the package, and a piece of metal foil soldered around the edges covers it. <S> If you clamp the IC down, it is usually possible to peel the foil away using an exacto knife or something similar. <S> In general, you're best off looking at old chips. <S> The newest (as in the last decade or better) are made with such fine features, like 14 nm nowadays, that details are simply invisible in visible light. <S> eBay is probably a good place to start looking. <A> You might be looking for UV erasable microcontrollers. <S> They were available from Intel, Microchip and others. <S> They have a more complex and interesting structure (not just a memory array). <S> Here is an Intel 8751H from this site: <S> There are plenty of die photos about, so you can compare. <S> Here is one (AMD, not Intel) from Wikipedia . <S> The quartz window distorts the image a bit, but you can easily remove the one shown (try a propane torch) if you don't mind destroying the chip. <S> They're not especially rare. <S> Also, with 10um or whatever features, you can easily make out the structure with an optical microscope. <S> The latest chips have features in the 20nm range (~500x finer), which is 1/20 a wavelength of visible light- <S> that means ~250,000x more minimum size devices can fit in the same area.
| Other manufactures (e.g. NXP, Microchip, etc.) will also likely sell bare die versions of some of their ICs. You can actually buy unpackaged ICs.
|
Why are charge pumps only used for low current applications? Typically the most expensive (and hard to get) elements in a SMPS are the inductors. Thus I was wondering if it's possible to use inductor-less switching mode power supplies (i.e. charge pumps) for generic use cases, for example a bench-top power supply, fixed high power DC-DC converters (several amperes and some hundred watts power), etc. All charge pump designs I could find though were for low power applications. What prevents one from designing a high power inductor-less power supply? Are there some inherent physical limitations? <Q> There are two problems with your idea. <S> One practical, and one fundamental. <S> The practical problem is that per amount of stored energy capacitors are more expensive than inductors, and on top of that the realy high-capacity capacitors (electrolytic) age. <S> This might seem counter-intuitive, but is nonetheless true. <S> (There was a question about this some time ago.) <S> Hence a flying-capacitor voltage converter, even an ideal one, is inherently inefficient. <S> (An ideal inductor-based voltage converter is 100% efficient.) <S> You might think it strange that the world is unfair to capacitors, but that is our human fault <S> : we supply power mostly from voltage sources. <S> For current sources the inverse is true: an ideal current converter from flying capacitors can be 100% efficient, while one from inductors must necessarily be lossy. <A> Capacitors would be better if the source and output were constant current. <S> You could charge the capacitor until the voltage rose to a certain level, then discharge the capacitor into the load impedance to maintain a constant output current. <S> You'd use a big inductor as an output filter to maintain the output current constant. <S> Since our sources are constant voltage and we usually want constant output voltage, using inductors to store energy and capacitors to filter it makes more sense. <S> Note that all efficient switching supplies have both capacitors and inductors. <S> Yes, charge pumps (flying capacitor) can take a voltage and move it around, flip it, even multiply by integers and such like, but every time you charge or discharge a capacitor through a resistive switch you lose a portion of the capacitor's energy change in the switch itself - a larger voltage change means more losses. <S> A lower resistance switch just means that the energy lost for a given voltage change is compressed into a smaller slice of time, the total remains constant. <A> If two capacitors or series strings of capacitors with different voltages are connected together, their charges will average out in a way which reduces the amount of energy stored therein. <S> If they are connected using an inductor, the excess energy will be transferred to that inductor and may subsequently be put to some useful purpose. <S> If the connection is purely resistive, the energy will be 100% converted to heat. <S> Minimizing the resistance will not reduce the energy loss; it will merely reduce the amount of time required for it to occur. <S> Consequently, in order for a charge pump to be efficient, the capacitors need to be large enough that voltage across them never varies very much. <S> In cases where a charge pump doesn't need to convey much energy, one canuse a linear regulator on the output and boost the voltage enough thatunder worst-case ripple conditions <S> the output voltage will still be highenough to maintain regulation, but efficiency will be limited by theratio of the load voltage times the boost ratio to the source voltage. <A> There are a few issues with charge pumps. <S> they can't offer efficiency and voltage regulation at the same time. <S> The only way to regulate the output voltage so that it remains constant during input voltage variations and load variations is to introduce deliberate inefficiency. <S> Current must pass through two switching elements (diodes or transistors) during both the charging and discharaging parts of the cycle (whereas with a buck or boost converter it only needs to pass through one switching element at a time). <S> Efficiency is highly dependent on the desired input to output voltage ratio. <S> If you want to make say a 1.5x voltage converter <S> then you would have to either use some complex multi-stage arrangement or make a 2x converter and run it in a deliberately inefficient mode.
| The fundamental problem is that charging a capacitor from a voltage source is fundamentally lossy (you dissipate heat).
|
Verilog assign result of module I am trying to take the result of a module and assign it to an input of another module, however I keep getting an error about declaring net types. I feel like I'm missing part of the syntax rules here, but I've been unable to find a solution. Any help much appreciated! Some nonsense code to demonstrate: module m1(SW, LED); input SW; output LED; reg [3:0] out; reg [1:0] x; assign x = out[1:0]; moduleA mA(.in(SW), .out(out)); moduleA mB(.in(x), .out(LED)); <Q> As the other answers say, your problem is declaring x and out as register type. <S> I'd also add that <S> your out variable is redundant. <S> You can use one variable to connect to the output of one module and the input of the other: wire [1:0] <S> x; moduleA mA(.in(SW), .out(x)); moduleA mB(.in(x), .out(LED)); Saves you declaring and keeping track of an extra variable and an extra assign statement. <A> You can't assign to a reg ister using the assign keyword <S> You can however assign to a wire . <S> wire [1:0] <S> x;assign <S> x = out[1:0]; <S> But it is possible to asynchronously assign within an always block (i.e. without a clock) to a register: reg [1:0] <S> x;always <S> @ <S> * begin <S> x <= <S> out[1:0];end <S> Two simple rules about net types: <S> wire = <S> assign reg = <S> always (and/or initial ) <A> The crucial point you're missing is the difference between net types and variable types. <S> net is a connection wire, usually this is keyword wire <S> but there are other net types for tristate, wired-or, wire-and, and a few other exotic cases. <S> You use net types for structural description. <S> variable is "temporary storage of programming data", usually this is keyword reg but could also be integer or real in a test bench. <S> Often reg ends up being synthesized with a D-flip-flop register, but not always. <S> A useful resource is Sutherland HDL's Verilog HDL Quick Reference Guide
| When you assign to something in an assign statement, or by connecting it to an output port of a module instance, you need to declare it as a wire instead of a reg.
|
What happens on STM32 when multiple (UART) Interrupts are triggered at the same time? is there an interrupt stack? I'm implementing a uart daisy-chain communication scheme with a Cortex M4.When a node receives a byte over one UART, an interrupt is generated ( RXNE ) and the byte is written out over another UART - since I use a send and receive buffer, this places the byte in the send buffer and enables the TXE interrupt which should be triggered subsequently. This means for every byte received, two interrupts are triggered. Now both UARTs can receive and transmit, and it is very much possible that both UARTs do receive a byte at the same time - now both will get a RXNE interrupt and trigger a TXE interrupt on the other UART. But only one ISR can be processed at the same time - what happens with the other ones? Is there an interrupt stack that can get full or interrupts simply called until all corresponding interrupt bits are cleared? The thing is that my application tends to lock up under the situation described above (with multiple bytes being received). Not however when the UARTs are set to a lower speed (this seems counter intuitive) or when there is only one side connected. <Q> What you are doing is quite normal and it should be possible to get it to work correctly. <S> The M4 processors have several dozen interrupt sources and it is very common for 2 or more interrupt requests (IRQ's) to become active at the same time. <S> The IRQ's are "latched" by the interrupt logic and the interrupt controller decides on the basis of priority which one to process first (by vectoring to the interrupt handler). <S> The 2nd IRQ is still latched, and is termed a "pending interrupt". <S> In simple terms when an interrupt handler has completed its processing it has to execute a special instruction called a "return from interrupt" which allows the interrupt controller to process the next pending IRQ. <S> Although we sometimes talk about "stacked interrupts" in a situation like yours, they are not kept on a "stack" as such, and so it cannot run out of space and loose IRQ's. <S> Generally the IRQ's remain latched until the corresponding IRQ bit is cleared by software. <S> It is difficult to know exactly why your system is locking up, you may have to provide more details. <S> A couple of things to look at: <S> Is your interrupt handler always clearing the corresponding IRQ flag? <S> If the flag is not cleared then the processor can get locked in a loop constantly vectoring to the handler and not allowing other things to run. <S> Does your interrupt handler always exit correctly by executing a "return from interrupt" special instruction? <S> If it does not then it will not allow the interrupt controller to handle another IRQ at the same priority level, and it will appear that your processor is no longer responding to these interrupts. <A> Usually in CPU/MCU sytem you have a priority setting which interrupt will be processed sooner. <S> When interrupt is triggered it goes in queue list. <S> STM32 has NVIC nested vector interrupt controller, maybe you should read some manual first. <A> You need to read up on the NVIC (Nested Vectored Interrupt Controller) that stm32 uses. <S> What happens will depend on how you have configured the priorities attached to each interrupt in the NVIC, you will need to read RM0090 (STM32F4 reference manual) in detail. <S> Interrupts are processed on the call stack just like function calls. <S> If one interrupt is in the middle of execution when a higher-priority interrupt occurs, then the second interrupt is stacked on top of the first and begins its execution. <S> When the second interrupt is completed, the CPU goes back and finishes off the first one, and then goes back to the user-level thread. <S> Yes, you can run out of stack space, but it's the call-stack not some special interrupt stack. <S> Note that the CPU has two stack pointers, and you have to be careful about which stack you're on, because that can change in an interrupt.
| If you set your UART interrupts to have the same priority, then the first one called will be allowed to complete before the second one begins execution.
|
Not able to solve Thevinin voltage I am trying to solve this circuit.Can you please tell me if I am in the correct direction. <Q> . <S> You calculated the value for I1 correctly. <S> It is 30 A.But you cannot use a loop where there's <S> (VA-VB).You have a loop with R2, R3, R4, and I1 instead. <S> If you use this loop, you get the correct value for the Thevenin voltage which is 1900 V. <A> I used mesh analysis on the leftmost loop and the current contribution from that loop turned out to be 30A counter clockwise. <S> Hence, a net current of 20A would flow through the 20 ohm resistor in the downward direction. <S> Now applying Kirchhoff's second law along a path passing through that resistor, the Thevenin voltage turns out to be 1900V as opposed to 2500V along the path passing through the current source. <S> Where have I gone wrong? <A> you have to calculate A:the output short circuit current; <S> B:the resistance between A and B <S> when V1 = <S> I1 = 0 . <S> A: <S> Short circuit current : <S> 1- I1 = 0 ; <S> Isc_v1 = V1 / <S> (R1 + (R2 // R3)) <S> * R2 / (R2 + R3) ; R2 // <S> R3 = <S> R2 <S> * R3 / (R2 + R3)2- V1 = 0 ; <S> Ics_I1 = I1==> Isc = <S> Isc_v1 <S> + Isc_I1 B: <S> Rab = R3 + R1 // <S> R2 = <S> R3 + R1 <S> * R2 / (R1 + R2) ; the internal resistance of I1 is infinity (open circuit) ; the internal resistance of V1 is 0 ; R4 have no effect on Vabthe equivalent circuit is a current source of Isc // <S> Rab to calculate a equivalent circuit of Voltage source with serial resistance <S> : from the last results : Calculate the open circuit voltage : Voc = <S> Isc <S> * Rab ; connect a voltage source of Voc in serial with Rab <A> It looks like you're trying to go in a loop from \$V_B\$ to \$V_A\$, then left through the 30-ohm resistor and down through the 20-ohm resistor. <S> That's fine, but for some reason you put the 50-ohm resistor on the other side of the equation! <S> Here's what the actual loop looks like: simulate this circuit – <S> Schematic created using CircuitLab <S> You don't need to follow a branch to talk about the voltage between \$V_B\$ and \$V_A\$! <S> So your loop equation would be: $$(V_A - V_B) = <S> (50 <S> \mathrm A \times 30 \Omega) <S> + (30 \mathrm <S> A \times 20 \Omega)$$ Or, alternately: $$(V_A - V_B) - (50 \mathrm <S> A \times 30 \Omega) - (30 <S> \mathrm A \times 20 \Omega) = <S> 0$$ <S> Usually in this case you can define \$V_B\$ to be the ground node (0 V), so the equation would just have \$V_A\$ instead of \$(V_A - V_B)\$. <A> There are many ways to solve this. <S> I suggest to simplify the circuit by following transformation steps that are also shown in the picture: <S> transform the Thevenin source (V1 + R1) into a Norton source I2 = V1 / R1. <S> transform parallel combination of R1 and R2 to one resistor R5 transform the Norton source back into a Thevenin source V3 = <S> I2 <S> * R5 transform series combination of R5 and R3 to one resistor R6 = <S> R5 + R3 <S> Now you have a simple single loop circuit. <S> You know V3 <S> and you know the current through R6 (it is 50A). <S> Calculate the voltage across R6 and add it to V3 to get the voltage between the two nodes.
| Your loop equation for the Thevenin voltage is wrong.
|
Is using Zener diode with a voltage divider sensible? I need to convert a floating 12 V voltage to more or less stable 3.3V. So I bought the appropriate Zener diode. Now, since there's such a difference in voltage, I want to make Zener's life simpler and reduce the chance of it being blown up by using a 1:2.5 voltage divider. So I calculate the required Zener resistor value using 11 V - the lowest possible source voltage: (V/2.5 - 3.3)/Iz = (4.4 V-3.3 V)/0.005 A = 220 Ohm . And then I use this value to calculate the value of the other resistor required for the 2.5 ratio (147 Ohm). simulate this circuit – Schematic created using CircuitLab The question is: does this make any sense? Will this work, or will the R2 interfere with Zener's operation?Is 4.4 V high enough source for 3.3 V Zener? <Q> Given that your current requirement is low and you do not need great accuracy <S> then a zener is a cheap and viable solution. <S> I would suggest filtering the spikes and using a circuit like this. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> The values can be calculated when we have all the information. <S> R1 = <S> 150ohms <S> , R2 = 150Ohms C1 = <S> 40V, 10uF. <S> The worst case automotive transient you will see will be load dump, most likely 40V for 100s of milliseconds <S> (this is an unlikely event and modern vehicles have central load dump protection, so very unlikely to see more than 40V for any length of time). <S> Coupled transients can be higher voltage but last for 10s of microseconds and will be removed by the R and C. <S> If the zener is 500mW or greater is will withstand <S> load dump condition for any length of time). <S> Use 1W resistors to give good transient capability. <S> The circuit will work below 9V in and still allow 5mA to bias the zener. <S> A 3.9V zener will meet your maximum 5V requirement and not be in danger of failing to give 3V (a 3.3V zener may be a bit close at low input volts). <A> R2 doesn't do a lot of good, except to increase the load current and decrease the overall efficiency. <S> Consider, your circuit could be redrawn like this: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> However what you can do is calculate the maximum current your load will require, then select R1 so that at maximum current, it drops most of the excess voltage from V1. <S> Of course if the load current decreases, then less voltage is dropped across R1, but that's why you have the zener. <S> Or another way to think of it: if you omit R2, then you already have a voltage divider, formed by R1 and your load. <S> So you just need to select R1 <S> such that R1 and your load make the voltage divider you want, accounting for the range of possible currents required by the load, and the operating range of the zener. <A> No. <S> Consider that R2 is in parallel with your load. <S> Removing it will be like reducing your load, which in turn means you don't need as much current through R1. <S> A larger R1 will mean that any transients on V1 result in a lower current spike at the zener, than would have been the case with R1 and R2. <A> This page seems like much ado about nothing. <S> Your R2 serves no practical purpose. <S> I'd replace it with an electrolytic capacitor to lower the output impedance and provide a more constant output voltage that is more immune from spikes and brown-outs on the input. <S> For a 10mA load, a value of 47uF will be just fine. <S> You didn't say how much your load current varies (if at all) from the 10mA nominal. <S> Let's say it could potentially double to 20mA. <S> And let's say the input voltage could potentially fall to as low as 10V. <S> And let's say we want the zener current to never fall below 5mA <S> otherwise voltage regulation will just get worse. <S> Finally, let's use a 3.9V zener, as this will suit your requirement better. <S> R1's value must be calculated for minimum input voltage at maximum output current. <S> So R1 = <S> (10V - 3.9V) / <S> (20mA + 5mA) <S> = <S> 244 <S> Ohms. <S> (Use a standard value of 220R) <S> The maximum current that will flow through R1 will be with the highest input voltage while the output is short-circuited. <S> Assuming an automotive application, Vin could be as much as 14.5V. Maximum power dissipation in R1 will then be 14.5V <S> * 14.5V <S> / 220R = 0.96W, so use a 1W resistor. <S> Under normal running conditions the dissipation in the resistor will be: (12V - 3.9V)^2 / 220R = 298mW, which means the 1W size resistor will stay fairly cool. <S> The dissipation in the zener under nominal conditions will be: (((12V - 3.9V) <S> / 220R) <S> - 10mA <S> ) * 3.9V <S> = 105mW, which is well within its capabilities. <S> Maximum dissipation in the zener will be at maximum input voltage and with the load disconnnected: ((14.5V - 3.9V) / 220R) <S> * 3.9V <S> = 187mW, which is still below its maximum rating. <S> (I believe it's about 400mW.) <S> So, make R1 a 220R 1W resistor, D1 a 3.9V zener diode, and replace R2 with a 47uF electrolytic capacitor, and you're all good to go. <S> Or... you could just switch to using something like an LM317 regulator with a couple of resistors to set the output voltage, and a capacitor for stability, but that's another story.
| It shouldn't be a big problem to create a zener shunt regulator for this particular situation.
|
I have three DS18B20's. I can't tell if any of them are working correctly I have three DS18B20's (or I believe at least two of them are DS18B20's). I am currently reading them through an embedded Linux board (Raspberry Pi in this case). I have two of the sensors in a breadboard, they give seemingly accurate temperatures. The third one is one of those DS18B20's enclosed in a "waterproof" cable from Ebay like this: When I read the sensors I get the following readings: pi@raspberrypi:~ $ cat /sys/bus/w1/devices/28-*/w1_slave45 01 4b 46 7f ff 0b 10 84 : crc=84 YES45 01 4b 46 7f ff 0b 10 84 t=2031257 01 4b 46 7f ff 09 10 c7 : crc=c7 YES57 01 4b 46 7f ff 09 10 c7 t=2143760 01 80 80 1f ff 80 80 2e : crc=2e YES60 01 80 80 1f ff 80 80 2e t=22000 So what this command does is simply get all the sensors and read from them. Pretty simple. Divide t=20312 by 1000 and you get 20.312°C But the odd thing is that the third sensor will only ever give temperature measurements that are to within 0.5 degrees, whereas the other two are capable of measuring down to what seems to be 0.1 degrees. At first I thought that the third one was broken, but when I checked the datasheet it clearly specifies that the part is accurate to ~0.5 degrees. I have made a table of the values I'm getting: Breadboard Sensor #1 | Breadboard Sensor #2 | Cable Sensor21.937 21.562 22.0021.812 21.562 22.0020.468 20.478 22.5019.584 20.201 27.0019.625 19.687 28.00 So now I'm totally confused. Are the breadboard sensors broken, or is the cable? If they are all working, they why is that two of them seem to have a higher resolution? Edit: I've been searching around more and it seems that there a few people who have encountered this, and other people have suggested that they might be fake chips! Update: The device driver for the sensors ( https://www.kernel.org/doc/Documentation/w1/slaves/w1_therm ): The driver also doesn't support reduced precision (which would also reduce the conversion time). <Q> Looking at w1_therm's source code , it doesn't ever touch the configuration register, therefore relying on the programmed precision setting in EEPROM. <S> Indeed your own data dump shows that the configuration byte is 0x7F for two of your sensors and 0x1F for one of your sensors. <S> This corresponds to 12 bits and 9 bits of precision respectively. <S> So all you need to do is initialize the configuration of your low-precision temp sensor once, store to EEPROM <S> and then you can use the original driver again. <S> Of course, a contribution of some cleaned-up code to set precision would probably be welcomed by the Linux community ;) <A> The datasheet says on page 2, Overview: ... <S> and the 1 - byte configuration register. <S> The configuration register allows the user to set the resolution of the temperature - to - digital conversion to 9, 10, 11, or 12 bits . <S> The \$T_H\$ , \$T_L\$ , and configuration registers are nonvolatile (EEPROM), so they will retain data when the device is powered down . <S> Page 8 shows the configuration details. <S> You need to set these bits to the resolution you want. <A> I would guess that the there's something <S> strange about it, <S> but it's not downright broken. <S> The DS18B20 has several "moving parts": <S> analog front end, A/D, 1-wire transmitter. <S> DS18B20 has an adjustable resolution setting, which is stored in DS18B20's non-volatile memory (see Configuration Settings on p.8 of the datasheet ). <S> The reduced resolution 9-bit reading occupies most-significant bits of the 12-bit temperature register (see last paragraph on p.3 in the datasheet ). <S> I would guess that these sensors came from the factory with different settings. <S> [disclaimer: <S> I haven't used DS18B20 myself. <S> I'm just reading the datasheet.] <A> Do you know the provenance of the odd sensor? <S> It's not unheard of for manufacturers to intentionally degrade by hard programming something like this. <S> Maybe the sensor is a lower bin device, perhaps higher noise or less linear, so has lower resolution fixed to mask this. <S> It can be DS18 compatible, without being one. <S> Perhaps it has been sold more cheaply to a contract and so been 'crippled' to fit the price.
| Usually, when an IC like that is broken, it either goes quiet (doesn't put out any readings at all), or outputs ridiculous values that are off the charts.
|
How to measure EMI without special equipment? I have bought a cheap dashcam to play with, only to discover that my GPS receiver stops working when it's on. After I ruled out power supply issues (both devices have batteries), I'm left with a hypothesis that the dashcam produces EMI interfering with GPS carries frequencies (1.2-1.5 GHz). Before I start wrapping my head the dashcam in tinfoil, I want to have an actual measurement of the interference I'm facing. Unfortunately, all I have at home is a multimeter and a toy oscilloscope , in no way capable of GHz measurements. I'm thinking about making some sort of antenna probe for my measurements: simulate this circuit – Schematic created using CircuitLab Is this approach realistic? Is there a way to reliably tune it to the frequency range of interest? <Q> Look at "SDR dongles" - USB dongles made ostensibly for laptop reception of TV broadcasts, but repurposed for amateur radio purposes and sold for tens of dollars. <S> Not all of them cover the spectrum up to GPS frequencies but some do, so shop around. <S> Combine "SDR dongle" with "spectrum analyser" and "open source" search terms <S> and I think you'll quickly have an outline of a solution - not a precision tool but something capable of diagnosing EMC problems and, if necessary, pre-qualifying equipment before expensive compliance testing. <S> Without doing any research I would suggest it's at least five orders of magnitude more sensitive (detecting microvolt signals) than your schematic of a diode-based wavemeter (detecting 0.x volt signals), so it should show most local interference even if it can't display a GPS carrier as a peak on the spectrum analyser. <S> A couple of minutes on Google suggest that they ARE sensitive enough to detect GPS signals presumably through the usual GPS techniques for extracting information from the noise floor. <S> This doesn't prove much in itself but gives me some confidence that this is a viable approach. <S> If anyone has more specific and detailed recommendations, please add a better answer (if it isn't too close to a shopping Q&A). <A> The best receiver you have is your GPS (or a friend's). <S> Without locking to the spread spectrum code to reduce the effective measurement bandwidth, the signal level is waaay below the ambient thermal noise. <S> What facilities does your GPS have for showing the strength and quality of the satellite signals? <S> My car Tomtom only tells me how many satellites it has acquired, when it's locked to them. <S> On some open ground, run a suitable GPS receiver, look at the satellite quality, and then bring your dashcam up to 3m, 2m, 1m, you get the idea. <S> This will enable you to get a qualitative measurement of whether it is indeed the dashcam, and then how well anything you do to it works. <S> It might be that energy is being emitted in all direction through the plastic case, in which case you're lost. <S> It might be that most of it is conducted down the supply cable, and a suitably sized ferrite 'stopper' on the cable will improve things no end. <A> This question is a couple of years old, but I noticed that no one seems to have identified the most likely source of the interference -- the HDMI signal coming out of the dash cam. <S> https://interferencetechnology.com/hdmi-cables-emi/ <S> # https://ieeexplore.ieee.org/document/1706346/ <S> EMI has been a notorious problem with HDMI, especially in low-cost designs. <S> The interference produced extends easily into and above 1GHz, as you can see in the reference material above. <S> I would start by assuming that the HDMI output is spewing copious amounts of EMI. <S> If you don't need that HDMI interface, you could try opening up your unit and "terminating" the outputs with a simple RC load, or cut off the end of a good quality HDMI cable and loading down the HDMI output with a suitable load.
| My walking Garmin OTOH has a page that gives me strength and quality of signals for all satellites it can see, whether they are fully locked or not.
|
optimal mAH 18650 cell required for laptop Good day I will be replacing my laptop batteries with 18650's, however my question is as follows. Stats : Battery pack = 6 cell (18650 type Li-ion battery) Time : +/- 3-5 Hours if memory serves. My laptop power supply is 19V, 3.95A. My laptop battery stats are 11.1V, 44mAh, 48.84Wh. I have already done battery tests with my multimeter, seems like I have 3 banks of 2 since the voltages are as follows: 2 x 3.786V 2 x 3.808V 2 x 4.089V This is a 2 part question: With my battery stats, is there a method I can calcuate the maximum time my laptop can/could last from a full charge? Can I use 18650 batteries that have e.g. 4000mAh? <Q> Yes, but only if you know the capacity of the original cells or you can get a measurement the average current draw. <S> The basic formula is time = <S> capacity / current. <S> However towards the end of the discharge voltage drops and the laptop may draw more current to maintain a constant power drain. <S> It will probably shut down before the battery is 100% discharged, so in practice you might get 80~90% of the rated capacity (assuming that the rating is accurate!). <S> No, because 18650 cells with a real capacity of 4000mAh do not exist. <S> 18650 <S> Battery Tests <S> 18650 Battery Buying Guide (test on all from eBay below $3) <S> Dangers of Ultrafire 18650 batteries <A> Rules on battery replacement when the battery has a charger: <S> Match battery chemistry Match battery cells (these first two will also match the voltage) <S> You can go to a higher amp hour, your charging time will be longer <S> One problem that you might run into is matching the battery cells, a good manufacturer will match the charge discharge curve with the other cells. <S> If you don't do this you could weaken one cell and have some major issues. <S> This is done by either proper manufacturing or measuring the cells and 'hand picking' them to match each other. <S> If you have a 3000mah hour batter and it lasts for 3 hours, you have drawn approximately 1000ma each hour. <S> So if you get a 4000mah hour battery you can last four hours but only in the ideal case because you can't draw down a battery beyond a certain voltage, you have to keep some energy in the battery: Battery University <A> The most typical cells in laptop batteries are of 2200, 2400 or 2600mAh capacity. <S> 3000 and 3100mAh have started to be used recently. <S> 4.4Ah means there are 2 cells of 2200mAh in parallel. <S> 11.1V means There are 3 in series (11.1 / 3.7V nominal = 3). <S> So you have a total of 6 cells of 2200mAh each. <S> Now, you can replace with identical cells, or with higher capacity ones. <S> You will have 5.2Ah instead of 4.4, so yes, you can use higher capacity cells but 18650 4000mAh ones do not exists. <S> The best ones on the market (original cells) are rated 3400mAh <S> (3700s will follow soon in sufficient quantity). <S> They are more expensive, though.
| Putting 2600mAh cells istead of the 2200 ones will be technically-valid and the only difference will be that the total capacity increases, therefore the battery will last longer (about 18% more time that it originally did). You can always determine the cell exact type from the stated total capacity and voltage of the battery.
|
Power switch (backup battery voltage is higher than main line voltage) The main power is USB charger 5V.The backup power is battery 12V.Output should be 3.6VCurrent goes to DC-DC LM2596 that gives 3.6V output. So, I cannot use simple schematics with zenner diodes or MOSFET cause to fact: voltage on backup battery is higher than that on main line . The ideal switch is relay . But it is so slow. Is one more scheme based on 2 DC-DC LM2596 with inverted OE pin. The next solution is LTC4412 , but its hard to find. Advise me solution, please. I know how to solder SMD and have a lot of different fets, transistors, zenner, etc. What about https://electronics.stackexchange.com/a/131048/97927 ? <Q> How about the following design? <S> (The 12V is constant, the 5V is switching on and off every second.) <S> When 5V is on, NMOS3 opens, pulling down gate of PMOS2, which thus also opens, pulling up gate of PMOS1, closing off 12V. When 5V is off, NMOS3's gate is pulled low closing it, which leaves gate of PMOS2 pulled up closing it, which leaves gate of PMOS1 pulled down, opening it. <S> Note, that when 5V is on, there is only insignificant leakage from the battery (proportional to the leakage current of the MOS gates). <A> First, let's look at couple of critical requirements from what you have described. <S> The USB has a tolerance of 4.75V to 5.25V. <S> Therefore somewhere between 4.75V and 4.5V from the USB input, the switch over has to occur. <S> And, whatever that goes between the USB input and the regulator input cannot drop more than 0.25V. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> An 1% or so <S> voltage reference is needed to set the switch over voltage to the middle of 4.5V-4.75V range. <S> A TL431 is a convenient circuit that takes the place of a voltage reference and a comparator. <S> The PMOS needs to be such that the voltage drop across is less than 0.25V at maximum operating current. <S> It is connected backward (compare to normal practice) to have the body diode oriented in the desired direction. <S> Personally, I would look for something other than the LM2596. <S> There are inexpensive switching regulators that operate up to 1.5MHz and therefore requires a much smaller inductor. <S> Also, if the input voltage requirement is lower, then M1 can be replaced with a diode. <A> I have seen this solution a couple of times. <S> Simple ORing schematic for this purpose: <A> There is a lot of circuit configurations you can try, but most of them have current leakage in the 12V supply. <S> - BC846 transistor - plain smd resistors - 5V coil relay like <S> this for ex. <S> When the 5V power is present, the relay coil is energized and goes to NO, so the 12V is disconnected from the DC-DC converter. <S> When the 5V power is not present the coil is not energized and so the Relay goes back to NC, so the 12V power is connected to DC-DC converter
| The LM2596 you have chosen has a minimum operating voltage requirement of 4.5V. If you want something simple you may try something like this As you can see the parts are simple enough.
|
Remove ground loop hum by 180º phase shift? I have a homebuilt subwoofer for my surround sound audio system. 400W constant, 900W peak. However, there appears to be an AC hum on the input line, and it becomes especially noticeable when I connect a preamp inline at the subwoofer end of the line. As in, house shaking 60Hz hum. That hum's gotta go. Is it possible to remove the effect of a ground loop by feeding an equal amplitude, ~180º out of phase copy of the loop frequency? I've been thinking about this and it seems like there would be some feedback or something. Would it work to use this schematic? If not, please correct it. simulate this circuit – Schematic created using CircuitLab And I'd love to have a simpler solution for active ground loop/AC hum elimination if there exists one. <Q> Trying to address power line hum with a notch filter in the signal path is a kludge at best, and is unlikely to yield the results you expect anyway. <S> The way to address this is to deal with the real problem of how the power line noise gets into your signal in the first place. <S> Surely there is much out there on this issue already. <S> Go study it. <S> This isn't the only possible cause, but one of the common ones is bad grounding between equipment. <S> If all the equipment is in the same room, plug it all in to the same outlet. <S> If it's dispersed, then you may need to look into isolation transformers and the like. <A> You would need a very selective (read complicated) <S> band pass filter or you would distort a decent chunk of your bass range. <S> Feedback would not be a real problem since there are no real feedback paths in that circuit. <S> It would be a lot simpler to take a mains transformer that outputs a low AC voltage, add a potentiometer and a capacitor in series with the secondary winding and mix the output with the line audio. <S> Even better would be to dismantle the ground loop altogether with an audio isolation transformer, or a TOSLINK S/PDIF optical digital audio cable. <A> All you've done is found a way to turn a bandpass filter into a band-stop filter. <S> And it would be a lot more readable if you drew it with the signal flow from left-to-right: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Also, that isn't exactly how opamps work; you'd need additional feedback paths around each one to implement the functionality that you're suggesting. <S> But in any case, this will only work to the extent that your interference is a pure 60-Hz sinewave. <S> It's far more likely that your problem includes harmonics (120 Hz, 180 Hz, etc.). <S> It would be far better to find and eliminate the source of the hum.
| You probably have a ground loop somewhere, so that the signal ground in one or more places is carrying some power return current too.
|
What is the purpose of the 7805 input capacitor? Most 7805 datasheets specify an input capacitor of 0.33uF or so. This one (the LM340 http://www.ti.com/lit/ds/symlink/lm340-n.pdf ) at least specifies that the cap is only required if the regulator is "far" from the power supply filter, without further qualifying what "far" means. 0.33uF is nowhere near low impedance at power line ripple frequencies so we can rule that out. Edit: the differences are self evident in the title of the question. <Q> This reduces input voltage fluctuations that occur as a function of current demand fluctuations, which the regulator has no control over. <S> The regulator can do a better job of keeping the output steady when the input is steady. <S> The regulator electronics are specifically designed to keep the output steady with the input varying over a wide range (that's the point of a linear regulator), but no such circuit is perfect. <S> Note the input regulation spec in the datasheet. <S> That tells you how much input variations are attenuated to the output. <S> However, that is usually at DC. <S> As the frequency of input variations goes up, the active circuit becomes less effective at attenuating them to the output. <S> Fortunately, a capacitor has lower impedance at higher frequencies, thereby reducing the voltage fluctuations due to current fluctuations at higher frequencies. <S> The capacitor does a better job as the active circuit does a worse job. <S> Another way to think about this is that the capacitor together with whatever impedance there is in the power feed to the regulator form a low pass filter. <S> This filter reduces the high frequency voltage fluctuations that the active circuit is less good at dealing with. <A> Remember that a pcb trace or wire has parasitic resistance and inductance, these effects need to be taken into account if the regulator is farther away from the supply . <S> These effects can be calculated with the RCL filter equations and by estimating or measuring the inductance and resistance of the wire between the supply and regulator. <S> The source impedance is being reduced by the inductance of the wire. <S> This is 'propped up' by placing capacitance near the 7805. <S> Since engineers are generally lazy, we don't do this because it is much easier to put a capacitor value that is sufficiently large. <S> If this problem is really keeping you up and night and a few cents is going to matter in your design, then either run through the calcs and find a model for your circuit or experimentally verify it. <S> I suppose for academics sake's you could delve into the inner workings of the 7805. <S> A frequency model, however, could be found and you could analytically determine if it would make a difference. <S> Which would be a colossal waste of time. <S> A better way would be to experimentally verify it. <S> Put the cap on, measure the AC noise across the resistor with a meter or scope. <S> Change the value, measure again, find out which is better. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> A voltage regulator is essentially a combination of a voltage reference with an amplifier. <S> Your schematic shows a fairly complex multi-stage amplifier. <S> The trouble with multi-stage amplifiers is you can get positive feedback through the power supply. <S> It is extremely difficult to make a multi-stage ampflier stable if it's power supply can act as a feedback path. <S> Therefore the incoming power needs to have a low impedance across a wide frequency range. <S> At the low end of the frequency range the low impedance is provided by the power supply feeding the regulator but at high frequencies the wires (or PCB traces) feeding the regulator have significant inductance and so a local capacitor is needed to maintain a low impedance. <A> The data sheet mentioned that "Bypass capacitors are recommended for optimum stability". <S> There is a possibility that the regulator be un-stable and self oscillating. <S> 'Far (long) connection wiring' added inductance and reduce effectiveness. <S> Many decades ago, when 3 pin regulator first came out, I recalled manufacturers spending more words in data sheet to explain this. <S> Now, it seems more relax. <S> May be the part are 'more stable' nowadays? <S> To be on the safe side, use a low ESR capacitor as data sheet recommends. <S> Can a 7805 ever oscillate? <S> http://electronicdesign.com/boards/don-t-bypass-your-capacitor <S> http://forum.arduino.cc/index.php?topic=116916.0 http://www.eevblog.com/forum/projects/unstable-linear-voltage-regulator/
| The input capacitor reduces the impedance of the power feed as seen by the regulator.
|
Write to sets of two bits in a register at a time in C I am trying to set multiple values into a 32 bit register, and each value has 2 bits. Trying to come up with an elegant way to do this. Write now I have something like this: struct MuxRegister {Uint16 PIN1:2;Uint16 PIN2:2;...}#define LED PIN1 (in a different file of course)#define PWM PIN2#define Mux_GPIO 1 (value from 0-3 selects different options)#define Mux_PWM 3MuxRegister.LED = Mux_GPIO;MuxRegister.PWM = Mux_PWM;... And I want to do something where I don't have to go through each MuxRegister.X and MuxRegister.Y for each of the 16 pins in the structure. My idea was to do something like this: #define BIT1 0x00000001#define BIT2 0x00000002#define BIT1 0x00000004#define BIT2 0x00000008#define LED (BIT1&&BIT2)#define PWM (BIT3&&BIT4)MuxRegister |= ((Mux_GPIO && LED) || (Mux_PWM && PWM) || ... ; But there is no mechanism to preserve the spacing for the Mux code (values between 0 and 3) register beyond the very first position. As in, the value for Mux_PWM in this example is 0x00000003 but the value for PWM is 0x0000000C, and they don't interact at all since they aren't "overlapping". Is there a mechanism with which to space out the values of the Mux codes so that they interact with the correct pin values? Sorry if I'm not explaining the question well. I don't have a lot of the correct terminology. <Q> Here's what I would probably do: typedef enum{ LED, PWM, ...} <S> MUX_E;uint32_t <S> MuxRegister;void SetMuxOption (uint8_t const option, MUX_E const bits){ MuxRegister &= <S> ~(uint32_t) <S> (3 << 2*bits <S> ); MuxRegister |= (uint32_t) <S> (option << 2*bits);} <A> Unions can be your friend: typedef union { struct { Uint32 PIN1:2; Uint32 PIN2:2; ... } bits ; Uint32 reg;} MuxRegister; <S> Now you can access it like: MuxRegister <S> muxReg;... <S> muxReg.reg = 1234; //As an integermuxReg.bits. <S> PIN1 = <S> 1; //As bits. <S> You will note that I made the bit-field entries Uint32 because you are using 32bit registers (not sure why you made them Uint16?). <S> You should also consider using standard types from <S> <stdint.h <S> > <S> such as uint32_t for better portability. <S> Depending on your compiler and whether it allows anonymous structures, you may be able to do: typedef union { struct { Uint32 PIN1:2; Uint32 PIN2:2; ... }; Uint32 reg;} MuxRegister; Which would be accessed as: MuxRegister <S> muxReg;... <S> muxReg.reg = 1234; //As an integermuxReg. <S> PIN1 = <S> 1; //As bits. <S> Sometimes unions can be a problem, but most of the time they work fine. <S> Most of the time the issue will be due to alignment of the words, but this is quite easy to check. <S> This really useful bit of code allows for compile time checking that a union is the expected size - usually if alignment goes out of whack the size will change. <S> # <S> define ASSERT_CONCAT_(a, b) <S> a##b#define ASSERT_CONCAT(a, b) <S> ASSERT_CONCAT_(a, b)#define ct_assert(a,e <S> ) enum { ASSERT_CONCAT(assert_sizeof_, a) <S> = 1/(!!(sizeof(a <S> ) == e)) } <S> Then you can do: ct_assert(MuxRegister,sizeof(Uint32)); <S> Which will flag up an error if the union is not a 32bit word. <S> Also, as a side note, be careful with your operators. <S> MuxRegister <S> |= ((Mux_GPIO && LED) <S> || (Mux_PWM && PWM) <S> || ... <S> ; That would do the bitwise or of MuxRegister with boolean true or false. <S> Why? <S> because you are using logical operators. <S> (Mux_GPIO && LED) will result in either true if both values are non-zero or false otherwise. <S> I think what you meant by that line is: MuxRegister <S> |= ((Mux_GPIO & LED) <S> | (Mux_PWM & PWM) | ... ; <S> This uses bitwise operators. <A> There isn't a super-concise, elegant way of doing this that I know of. <S> If you want to set multiple bits, you need, at minimum, the following information for each field: <S> The bit position (shift) <S> The number of bits in the field (mask) <S> The data that goes in the field <S> It looks like you also want to give functional names to the pins and the mux values. <S> That's a lot of information. <S> Honestly, I think your first code snippet is a good start. <S> The bit field structure can encode the shifts, masks, and pin names in the structure type, which makes the code reasonably concise. <S> You could save a step by naming the bit fields LED, PWM, etc. <S> instead of PIN1, PIN2, etc. <S> Alternately, you could shrink the code size by making a constant array of mux values, then loading them via a for loop: // <S> P1: <S> LED P2: PWM P3: <S> ADC P4: <S> SWconst Uint32 muxValues <S> [] = {MUX_GPIO, MUX_PWM, MUX_ADC, MUX_GPIO, ... //12 <S> moreMuxRegister = <S> 0x00000000;for <S> (pin = 0; pin < sizeof(muxValues) <S> ; pin++){ MuxRegister <S> |= muxValues[pin] << 2*pin;} <S> Or you could do something like: MuxRegister = (MUX_LED << 0 <S> ) | (MUX_PWM << 2) | (MUX_ADC << 4) | (MUX_GPIO << 6 <S> ) | ... <S> You can get fancy with macros to improve readability: <S> #define PIN(p) <S> (2 <S> * (p - 1))MuxRegister = (MUX_LED <S> << PIN(1)) <S> | (MUX_PWM << PIN(2)) <S> | <S> (MUX_ADC << PIN(3)) <S> | (MUX_GPIO << PIN(4 <S> )) | ... <S> But I don't think you're going to find something massively shorter. <S> You have sixteen unique mux selections, and one way or another, they all have to go in your code. <S> If you want unique pin names, that's another sixteen values.
| I would try just using a uint32_t instead of bit fields.
|
Need help on changing power supply I would like to know how can I change power supply to my microcontroller in the case of power cut so I can use battery instead all this be done automatically? <Q> A diode in series with the battery (and another one in series with the power supply)will do the trick. <A> you have a lot of options, and you really need to give more detail. <S> One option is to just use Schottky diodes in series with your supplies. <S> Further, if you know the exact voltage levels being supplied by your battery and PSU, you can make sure that only one supply will give current at a single time. <S> Another option for example is to have load switches on both your power lines and control them with the microcontroller it is powering. <S> Place an open-drain comparator on your main power rail and hook it up to the load switches. <S> You can also hook them up to your MCU, then when the comparator line goes low you will get an interrupt and control the load switches accordingly. <S> Place enough capacitance on your power line so your MCU doesnt brown out before the power switch occurs. <A> This might not be the perfect answer <S> but I'll try anyways <S> :3 : <S> I'm guessing you connect both to the same ground. <S> Another way is using an electromagnetic (relay) switch that when turned off connects to the battery. <S> Directly connect the power supply to the relay,when it is ON the relay will connect the regular power supply (another power line from the same source) to the microcontrollerWhen the regular power supply is off the relay reconnects to a battery supply. <S> I hope I've made my point as clear as possible. <S> Good luck!
| I can think of two ways to do this: First you can connect the battery and the regular power supply to the same power line, and connect diodes from each supply but you can only do this assuming the regular supply has a higher voltage (not necessarily by much)
|
Power consumed by light bulbs in series, parallel? simulate this circuit – Schematic created using CircuitLab So the problem I've been given is to determine whether the power consumed by a string of lights increases or decreases as more lights are added in parallel (and a similar problem concerning increasing number of bulbs in series). The problem states that the source is a standard wall electrical outlet (I'll assume it's like the ones in the US since that's where I'm at). Now, I don't know a whole lot about electrical standards anywhere in the world, so I'm not sure what exactly comes out of a wall, in terms of electricity and current. My understanding is that the current alternates (which doesn't really make sense to me because my light bulbs aren't flickering on and off like a sine wave). If resistance remains constant, that means the voltage is alternating too, since \$V = I \times R\$, so the value of \$V\$ is fluctuating proportionally with \$I\$ I was under the impression that, at least in the US, wall outlets had something like 120V and the current actually drawn is variable depending on your load. I thought that since the current is alternating, then as discussed above, the voltage must be alternating too, and maybe the 120V refers to the amplitude of the alternating voltage. Please correct me if I'm wrong, as it seems crucial to understanding the problem. So if you add light bulbs (resistance) in parallel, the overall resistance of the load decreases. If your max voltage remains constant, then more current would be drawn, no? Similarly for bulbs in series, the total resistance increases as bulbs are added, so the drawn current would be reduced. So for parallel bulbs, your power would increases, since \$P = I^2 \times R \$ and the \$I\$ term is increasing faster than the \$R\$ term is decreasing. Likewise for series, the power seems like it would decreases, since the \$I\$ term decreases faster than the \$R\$ is increasing. How far off am I? <Q> However, when analysing circuits with alternating current and simple resistive loads, it is much easier to work with average power instead of instantaneous power. <S> You can use RMS voltages and RMS currents to simplify your analysis. <S> The 120V voltage rating you get out of a wall outlet is given in RMS. <S> You can multiply this number by \$\sqrt2\$ to obtain the amplitude of the sine wave. <S> Your circuit analysis does seem right on the most part. <S> Assuming your input voltage remains constant, adding resistances in parallel decreases overall resistance and implies increased power. <S> Adding resistances in series increases overall resistances and implies decreased overall power. <S> If you rearrange for the voltage, you can see how the resistance \$R\$ of the circuit affects the power consumption of the circuit. <S> \$P = \frac{V_{rms}^2}{R} = <S> \frac{120 <S> ^2}{R} = <S> \frac{1.44\times10^4}{R}W\$ <S> Lastly, there's a few reasons why you might not observe the lightbulb to flicker when current changes direction. <S> One of which is that a light bulb doesn't dim instantly when power goes to zero (try switching off the lamp and you'll see the filament fades away slowly) so it still produces light as the instantaneous power momentarily crosses over zero. <S> Furthermore, 50/60Hz is generally fast enough that the flickering is indiscernible by humans. <A> Everything pretty much spot on except, maybe, the last paragraph. <S> " The I term is increasing faster than the R term is decreasing " <S> I will increase with the inverse of R. <S> You've got the idea though. <S> A couple of calculations should clarify the rest. <S> Regarding alternating current: when you spin the magnetic rotor in the coil of a generator the sign of the voltage (and hence the direction of the current) reverses every time the N and S poles of the magnet swap over. <S> This is how grid power is generated and also the alternator on a car engine. <A> Your conclusions are correct, but you might be missing a fundamental aspect of a domestic power supply: it is constant voltage , not constant current. <S> If resistance remains constant, that means the voltage is alternating too, since V=I×R , so the value of V is fluctuating proportionally with I . <S> Technically it's the other way round - I fluctuates [...] with V . <S> This misunderstanding stems from the terms "AC" and "DC", which suggest the current is the primary yardstick by which we quantify electricity. <S> It isn't; voltage is. <S> The voltage alternates, therefore the current alternates through a connected load (resistance). <S> With no load the current is zero but the voltage at the terminals of the wall socket is always there, oscillating away - unless you turn it off at the fusebox or distribution board. <S> With domestic electricity it makes life much simpler to ignore the concept of an alternating voltage and thus we refer to the Root Mean Square value of the voltage when discussing power. <S> RMS is, in short, the average value of the voltage. <S> This means that the Live/Hot conductor swings between +172V and -172V, give or take some tolerance. <A> I'll also add that you dont notice your light bulbs flickering because the AC voltage is changing polarity 100 times a second (i.e. 50 Hz, for my country anyways); your eyes can't track this because of the effect called persistense of vision . <S> Also, there are 3 wires in a standard outlet: Live, Neutral and GND. <S> The voltage on the LIVE cable is what creates the sine waveform we call AC, while voltage on the NEUTRAL cable may be seen as the horizontal axis about which the sine wave oscillates. <S> The GND cable provides an low-impedance path to the earth for stray current, in the event that perhaps your LIVE cable gets loose within your equipment and makes contact with the equipment's metal chassis, thereby making the scary AC voltage appear on the chassis as well. <S> Thus if you touch the chassis, your GND cable provides an alternate and, more importantly, really-low-resistance path to earth for current, compared to the relatively high resistance of your body; kind of like a 2-branch parallel circuit with way more current passing through one branch (GND cable) than the other (your body).
| You're right in thinking that current and voltage varies according to time in an alternating current circuit.
|
Where are the external oscillator pins on PIC12LF1572 I have searched the whole datasheet, but couldn't find where are the OSC1 and OSC2 pins are. I've found the CLKOUT (which is CMOS output) on RA4 and CLKIN (which is TTL input) on RA5. But I need the XTAL input/output pins. I tried connecting my 4 MHz crystal to these CLKOUT & CLKIN with two 22 pF capacitors connected to GND, but it's not working. I need to use UART on this microcontroller, that's why I need external crystal oscillators. Please suggest some solution. <Q> It only has a CLKIN pin. <S> Either use the internal oscillator, or try this crystal oscillator to CLKIN pin: <A> Much of these datasheets are cut-and-paste, as the people responsible for creating them don't feel like typing everything. <S> Since most of the data is the same as other similar micros, they just copy the test from their datasheets and paste it in the datasheet for this part. <S> It looks like the PIC12LF1572 doesn't have external crystal connections, and the text describing the crystal connections was simply copied from the datasheet of a similar part and was not removed. <S> You might look at the errata sheet for this micro, perhaps it was discovered and listed. <A> For most of the 8 pin microcontroller,there won't be any external oscillator option give(not <S> all MCU,some may have external).This that when you use 2 pins for oscillator,2 pins for power supply and 1 for reset,then you left with only 3 pins. <S> This wont be sufficient to use. <S> The CLKIN is the timer input <S> and it's not for external oscillator pin . <S> From the Architecture of this chip,I notice that the timer uses the internal clock crystal to count and output the timer sequenced output and not that the pin CLKIN is said to act as external clock. <S> If so,you need 2 pins and they gave you only one pin for CLKIN. <S> So don't confuse with timer input pin and the external clock oscillator pin. <S> There is a huge variation between those two. <S> If you want to program that PIC chip,use PIC KIT2 or something like that. <S> They also gave option for ESUART for UART type of communication. <S> Internal crystal may not be more accurate than external,but in such case,you have to rely on internal clock crystal only. <S> No other go. <S> That's how they designed. <S> We can't change the die structure of that chip to function as external oscillator pin.
| In your MCU,it seems that there is no option for external clock crystal to be connected.
|
is there any way to get current from vibration? I was wondering if you have something that vibrates , is there any way that you can make some power out of it? <Q> There is a wide range of materials that will produce electrical charges in response to mechanical stress. <S> While the voltage produced this way can be quite high (thousands of volts), overall power output is typically small. <A> Two obvious methods come to mind: Piezoelectric . <S> Something that exhibits the piezoelectric effect, like a quartz crystal, can move charges around as a function of strain. <S> Some microcphones are based on this principle, as are some electronic barbecue grill igniters. <S> In the microphone, sound wave vibrate the crystal, which produces a voltage proportional to the sound waves. <S> In the igniter, something whacks the crystal hard to make a higher but short voltage. <S> Electrodynamic . <S> The alternator in your car, the generators in a power plant, and a type of microcphone called "dynamic" all work on this principal. <S> In the case of the microphone, it is like a small speaker in reverse. <S> A diaphram is moved by the changing air pressure, which moves a coil within the magnetic field of a permanent magnet. <S> The resulting small signals (usually a millivolt or a few) are proportional to the sound. <S> I have also seen flashlights based on this principle. <S> They have a heavy permanent magnet that can slide inside a coil. <A> Yes, you can use the reverse of the principle that a speaker uses. <S> If you move a conductor (e.g. wire) through a magnetic field, a voltage is induced. <S> To induce enough voltage to be useful, a coil of wire can be wound and made to move in a magnetic field. <S> The lines of flux must radiate from the middle of the coil to the outside, so that the field lines are perpendicular to the windings. <S> An old speaker drive unit will do this job for a small amount of power. <S> You then need to arrange the mechanical setup so that the vibrating thing causes the coil to move relative to the magnet.
| You shake the flashlight to move the magnet back and forth, which causes the coil to produce electric power, which is stored in a capacitor that powers the light for a minute or a few minutes from full charge.
|
Nature of analog channels on digital/mixed oscilloscopes Can someone please help with scope terminology?Some scopes have "analog" and "digital" channels. Am I right in thinking that the "analog" channels are in no way similar to the old Tektronix 475 I used to use at work, but are sampled/interpolated etc.? In which case, why are the "digital" channels different? It's pretty clear that none of the modern scopes have CRTs. Is it just that the digital channels are similar to logic probes and resolve to zero and one? <Q> Analogue channels For sampling analogue waveforms, even digital waveforms if you want. <S> The signal is passed through an ADC to convert it to a quantized value which is displayed on screen Digital Channels <S> These are used for logic analysis. <S> They are not passed through an ADC (well they may be <S> but anyway), but are rather fed through an analogue comparator with some reference level producing a low or a high. <S> These are then plotted on screen. <S> Why Both? <S> Analogue channels are expensive, especially if they are high sampling rate. <S> You need an ADC with enough bandwidth and then the raw processing power to display the signals. <S> However they are also very useful as you can see the full signal as a representation of voltage vs time. <S> You can even do math functions like FFT. <S> Digital channels are cheap. <S> Analogue comparator hardware is easy to implement, and because they are only 1 bit (high or low), the processing power required is much less. <S> However you can't see what the signal looks like, just whether it is above or below a threshold. <S> Even still, they are very useful for analyzing something like a 16 channel data bus. <S> For example a 16 analogue channel scope would be hellishly expensive compared to one with 16 digital channels, and if you are only interested in the digital value of a signal, not what the voltage waveform looks like, then digital channels are a much simpler way of measuring it. <A> Digital channels are connected to a comparator which will tell you if the channel is higher or lower than your reference voltage. <S> Which is cheaper? <S> The fast ADC's run in the hundreds to thousands of dollars (and you may need to parallel them if you want to sample faster). <S> Comparators are cheap - tens of dollars and then a dac to set the voltage your comparing. <A> You have it right. <S> The analog channels feed an attenuation stage followed by an analog to digital converter and its associated memory for storing the sample record. <S> Commonly now called an MSO (mixed signal oscilloscope) <S> such models can typically include 16 logic channels that record just 1 bit of information on each digital channel for every time sample. <S> The digital logic channels are like a logic timing analyzer that is correlated to the same time base as the analog channels. <S> Visually you see analog waveforms with some shape and square waveform shape for the digital channels, all time aligned.
| In short, analog channels are connected to a analog to digital converter.
|
Shorting probe tip to ground What is the effect of connecting the tip of an oscilloscope probe to a ground lead? Here is one of the few links that I've found that shows the set-up: The Shorted Scope Probe . What are the possible uses of such set-up and what is the cause for the behaviour one might observe when shorting the probe (reduced susceptibility to environment noise, etc.)? <Q> I always do this when measuring any fast signals or when the circuit is noisy. <S> Putting the tip to the ground clip should give you zero volts to the scope, but often it doesn't. <S> That is because the potential at the ground point of the scope can be moving relative to earth (or the local reference point of the supply feeding the scope). <S> Even if your circuit is "floating" there will be capacitance to ground. <S> As rapid transient occur at the ground clip point, currents will flow in the probe ground wire. <S> This will in turn generate voltage transients between the ground clip and the actual scope ground. <S> These can be measured by placing the tip onto the ground clip. <S> Any waveform that you observe when doing this will be superimposed on the real signal that you are trying to measure when you connect the tip to some point varying with respect to the ground clip. <S> If you see high speed transients when using a scope probe, try this test to check if they are due to this affect. <S> This also applies to differential probes, connect the +ve probe to the same point as the -ve one to check that the differential probe is rejecting all the common mode signal. <A> By forming a loop with the ground lead, you form an antenna. <S> This can be useful for observing EMI issues with a circuit, or for triggering on an EMI spike. <S> I have used a scope probe connected as shown to trigger on an ESD test pulse (connecting directly to the DUT is risky, as the ESD could damage the scope). <A> What Doug Smith wrote is accurate and complete.
| A simplified answer is it makes a loop antenna for "sniffing" electromagnetic fields. Additionally, you can use the probe to find an area of a circuit that that is radiating excessively (set scope to show FFT, wave the probe around over the circuit).
|
Blinking LED with only 1 capacitor and 1 resistor wanted to ask if it's possible to make a blinking led using only a capacitor and a resistor, and using a normal 1.5v AA battery as a power supply, like the image, *pd: knowing how my teacher is, it wouldn't surprise me if it's not possible. <Q> it is reverse biased. <S> So the circuit does nothing (the capacitor charges to ~1.5V <S> and that's that). <S> Battery life should be excellent, however. <A> Yes. <S> But you will need to remove and reinsert the battery for every blink. <S> This is a trick answer to a trick question. <S> The capacitor will provide fading as it discharges, Depending on its value, but it may be too quick for human sight to see. <A> It is not possible with a normal LED. <S> There are, however, blinking LEDs that look just like normal ones but have a blinking circuit integrated. <S> They need no other components, just a power supply, to blink. <S> E.g. here is a datasheet . <A> The circuit diagram is horribly confused. <S> The point of this puzzle presumably is that an LED has a voltage drop of 1.6V minimum. <S> So you cannot light it with a 1.5V battery alone. <S> Now the arrow drawn at the image of the battery presumably means not the direction of the current (which would be pretty pointless given the polarity of the LED) but rather means "please rotate the battery between its connectors". <S> So the idea is to create some pseudo-AC voltage. <S> One phase of the voltage is used to charge the capacitor, and the next phase puts the capacitor in series with resistor and battery in order to light the LED. <S> This circuit will not work for that purpose <S> and I don't see how one can get by without adding more diodes or using a more complex commutator on the capacitor rather than the battery. <S> However, it may also be that this is intended to be a baffle-the-student device. <S> In that case, either the LED is a blinking LED to start with and/or the battery is not actually a battery but rather <S> a pulse generator and a button battery stuffed into an AA battery housing. <S> Since the circuit diagram for no good reason at all supplants <S> a picture of the device rather than its circuit diagram, presumably out of some perverse sense of accuracy <S> , I consider this option the more likely one. <A> you need at least 3V to light up most of LED. <S> here is good example of LED blinking with capacitor, resistor and transistor : <S> http://blog.jongallant.com/2015/01/simple-blinking-led.html
| Not only is it not possible, but the LED won't even light up-
|
OpAmp: inverting and non-inverting amplifier both amplify the signal, how to know which one to use? Both the inverting amplifier and non-inverting amplifier use negative feedback. Both provide gain. But one inverts the signal while the other does not. How to know which one to use? Are there applications where only one of the two can be used (provides both positive and negative supplies exist)? Is it true that single supply op amp can only create non-inverting amplifier? <Q> There are a couple reasons (at least) for choosing a particular configuration: <S> If you need a high input impedance, then you are forced into a non-inverting configuration. <S> This is commonly required in a buffering situation. <S> An inverting configuration has an input impedance equal to the input resistor which may load the source circuit. <S> If you need a summing amplifier, then inverting is the way to go as the inverting input is the summing junction. <S> Is it true that single supply op amp can only create non-inverting amplifier? <S> No. <S> With a DC offset (on the non-inverting input) you can have an inverting configuration although the input signal will need to be ac coupled under most circumstances. <A> This is true - in particular - for active filters and harmonic oscillators. <S> Examples to (a): Sallen-Key-filter stages; WIEN type oscillators. <S> Examples to (b): Multi-feedback filterstages (MFB); Phase-shift oscillators. <A> You must always connect both input terminals of an opamp to thought-out and <S> considered points. <S> What you connect them to determines what function the opamp will provide. <S> If you connect +ve to a ground, and -ve via a feedback impedance to the output terminal, you create a 'transimepdance amplifier'. <S> Any current you now push into the -ve input must also be balanced by a current from the output terminal through the impedance. <S> Use a feedback resistor to convert current to volts. <S> Use a feedback capacitor to create an integrator. <S> The gain will be inverting. <S> If you connect your input voltage to +ve, and the -ve to a fraction of the output voltage (create a fraction with a voltage divider to ground, usually resistors, but you could use other impedances or even a transformer), you create a non-inverting amplifier, where the gain is the reciprocal of the feedback voltage divider. <S> You can do more complicated things as well, but the two above are the basics.
| There are some specific applications which require (a) non-inverting or (b) inverting gain stages.
|
What does the resistor do when the second switch is closed? When the first switch is closed, the capacitor charges to 5V. When the second switch closes, capacitor discharges and Vo will rise upto 0.25V, I calculated. However, my question is, when switch 2 is then opened and switch one is closed, resistor is open. What happens to the 0.25V across it? how does it drop off? suddenly or gradually? why? Thanks in advance. <Q> Since this is clearly a homework question, I won't provide a complete answer, but rather some hints. <S> You are currently way off track. <S> Pay attention to the polarity of the voltage across the capacitor. <S> It cannot change when one set of switches opens and the other closes. <S> Keep in mind that when the second set of switches is closed, the voltage across the resistor is the same as the voltage across the capacitor. <S> How much current is flowing, and how does it change with time? <S> A more interesting question: <S> What happens if you connect a second capacitor, say, 10 nF, in parallel with the resistor? <S> Here's a simulatable copy of the circuit: <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Run the simulation to get a feel for what's happening qualitatively, and this should give you some insight into what you're doing wrong with the equations. <S> Try it with SW5 both open and closed. <A> 0.25 V doesn't appear at output anytime in this circuit ,not for the timescale provided .(I am getting a time constant of 10 microseconds).I suggest you draw the circuits corresponding to the switches closed and open separately. <S> First draw the circuit for the first 0.5 microseconds. <S> What does it look like?And when you go to the second circuit which is in effect from 0.5-1 microseconds what changes?The approximation provided is a helpful hint ,not just for calculation but for the nature of the problem(the second circuit mostly of all).As far as the value of the current across the resistor is concerned it can change suddenly(provided <S> the resistor is ideal,no reactive elements).If you had a simple Resistor connected to a source and <S> the voltage were in the form of periodic pulses(A square wave for a example ,or any signal that is zero for a finite time <S> and this is suppose WLOG periodic.),what waveform of current do you expect through the circuit?There is no scope for a transient in the resistor here as has been pointed out by Vicente Cunha. <A> Once switch 2 opens, the resistor is no longer connected to the capacitor and you can safely expect an immediate voltage step from 0.25V to 0V across the resistor. <A> When the switches controlled by phi1 close the capacitor gets charged to 5V. <S> Since there is no series resistor this happens instantaneously. <S> The left terminal of the capacitor is now at +5V, the right terminal at 0V. <S> The output voltage is 0V since the resistor is disconnected and there is no current flowing through it. <S> Hence the voltage drop across the resistor is zero. <S> When the switches controlled by phi2 close the left terminal of the capacitor gets connected to 0V and right terminal to the resistor. <S> At the beginning of phi2 the voltage across the capacitor (from left to right) is 5V. <S> For this reason the right terminal is now at -5V. <S> This voltage also appears across the resistor, so at the start of phi2 we have -5V at the output. <S> During phi2 the resistor discharges the capacitor. <S> Phi2 is only 500us, therefore the capacitor is only discharged to 1-t/(tau) ~ 95% or (-4.75V) at the end of phi2. <S> This happens over and over again since with phi1 the capacitor gets charged again to 5V and the voltage across the resistor drops immediately to zero as the switch interrupts the current flow.
| A resistor does not "store" energy under any form (a resistor has no reactance ), only dissipates what it is currently connected to.
|
Why does a UPS need an isolation transformer? Why would we need isolation transformers before and/or after for a UPS system? What are we trying to protect, and from what? I have read that it has to do with grounding and neutral but I didn't understand. This is 100KVA UPS. The inputs are 3 phase, neutral, and ground, coming from the service panel which has the neutral connected to the ground inside the panel. The output 3 phase, neutral and a ground while only the 3phase and ground are connected to the load (no neutral is connected to the load). When the UPS-company-man saw the installation he said that we must use a isolation transformer before the UPS. Here is a simple schematic of the this configuration : simulate this circuit – Schematic created using CircuitLab <Q> Most high-power installations require an isolation transformer. <S> Every variable frequency drive manual I've ever seen requires the same thing. <S> So it's not a UPS-specific requirement. <S> Limiting the fault current is particularly important, because fuses and breakers are only rated for some maximum current they are able to interrupt. <S> And that, in turn, gets listed in the product's UL file. <S> (I'm assuming this UPS is UL listed.) <S> So it's not necessarily that the UPS won't work without the transformer. <S> It's more that if something goes horribly wrong, they can't guarantee it won't catch fire. <S> I found this resource that explains more about drive isolation transformers, which is pretty consistent with the above: <S> http://www.eecoonline.com/drive-isolation-transformer/ <S> If the selected transformer has a Wye configured secondary, then a secondary ground can be gained with the installation of the isolation transformer. <S> This ground is isolated from the primary input and provides a couple of distinct benefits: <S> Grounding prevents the transfer of common-mode noise and transients, both from the primary source to the motor drive, and from the drive to the power system. <S> This can reduce "bearing currents" that often cause fluting. <S> Introducing a grounded, drive isolation transformer localizes the high-frequency induced ground currents and prevents them from extending upstream of the transformer, minimizing "noise" and related problems often associated with drives. <S> Consider an isolation transformer when power quality and fault currents are the primary consideration. <S> Another optional benefit of isolation transformers is that of electrostatic shielding. <S> This provides a shield between the primary and secondary winding, which can provide in the range of 40-60 dB of common mode noise reduction. <S> What you're talking about may not be a VFD, but many of the same concerns apply to a UPS or any other switching power supply. <A> If you are converting AC mains voltages to 12V DC for the battery, the most efficient way to do this is via a transformer <S> and you get the added benefit of the transformer giving you isolation thus, if you touch a battery terminal (say during maintenance) you don't necessarily get electrocuted. <S> Stepping up a sinewave from several volts peak to peak to AC line voltages is also done quite effectively using a transformer. <A> What is the earthing system being installed?TT/TN? <S> if TT, then you need the isolating transformer since the neutral is opened during a fault on the supply side. <S> In such a case, since the UPS still has power, you need to give the load the neutral reference, thus the need for an isolating transformer. <S> In a TN system, the neutral is not opened, thus you do not need the isolating transformer. <A> This is probably due to the fact that output voltage is refferenced to the ground in the star connection Y. An AC/DC to DC/AC converter, like VFD, the bridge output voltage has no reference to neutral.
| In general, the isolation transformer limits your available fault current, and keeps electrical disturbances generated by your load from propagating quite so easily through your entire facility.
|
Braking a small, high-speed DC motor I am currently having an issue with precision control of small brushed DC gearmotors (130 size) being used as drive motors on an autonomous robot, but this question can be applied to small, high-speed DC motors in general. On my robot, I am driving the motors with an L293D-based dual H-bridge controller, controlled by a microprocessor. I have found that simply setting both of the microcontroller outputs connected to the H-bridge low will not stop the motor quickly enough for the robot to immediately stop, resulting in imprecise turning, even when running the motors at the lowest speed possible without stalling. I decided to try an experiment with braking several DC motors (RF300, RF370, and 130 size) with and without a 2.5-ounce flywheel on the output shaft. I connected both of the motors to 5 volt power, allowed them to reach full speed, and then disconnected power and shorted the leads on each motor using a DPDT switch, and compared the time it took for them to stop with and without shorting the leads. It seems that the stopping times for the motors are relatively the same whether or not the leads are shorted. The motors with the flywheel attached took longer to come to a stop, as expected. The same results were obtained by running the motors at 12 volts. Is it actually possible to brake small motors? <Q> When the motor is spinning it generates a voltage proportional to its rotational speed (almost equal to the supply voltage when running free). <S> Then when you apply a short the current is determined by that voltage and the motor's internal resistance. <S> Torque is proportional to current, so initially you get a braking force equal to the stall torque. <S> However as the motor slows down it produces less voltage, so the current and torque reduces (down to zero when it stops). <S> If the 'short' is not a low resistance compared to the motor's internal resistance then it will have even less braking force. <S> Any inertia in the drive chain will make it run on past the point where you try to stop. <S> A motor in a gearbox has a lot of inertia due to the high rotational speed of the armature and first gear stages. <S> It will never stop instantly, just like it won't go from stationary to full speed instantly when powered up. <S> Motors such as the RF300 <S> and RF370 typically have high internal resistance and low torque, relying on the gearbox to provide sufficient output torque. <S> They also have heavy iron-cored armatures which increase inertia. <S> Unfortunately good coreless motors tend to be expensive, and often require matching (expensive!) <S> gearboxes. <S> You can stop faster by applying reverse voltage, but be careful because that can cause the transistor bridge to 'shoot-through' if you don't stop and wait for the inductive back-emf to die down before reversing. <S> Also the peak current will be twice as high as normal. <S> Even with reverse voltage applied it will take some time to stop. <S> To compensate for this you must start braking the motor before the robot gets to the position you want. <S> How much before depends on the amount of inertia in the system, which may vary depending on what the robot is doing. <A> I can report that braking by shorting the motor DOES reduce stopping distance somewhat. <S> Use a relay to engage power through the powered-closed terminals and short the motor through the powered open terminals - Thus you go from powered to shorted in just the time it takes the relay arm to switch positions - not long! <S> I had been hoping for a more immediate stop than I got. <S> Different application but same requirement for a very abrupt stop. <S> How is it achieved in some cordless drills? <S> In these it is very effective and abrupt. <A> Shorting motor terminals absolutely does slow down the motor, that's how EM brakes work. <S> However, electric braking is inefficient at low speed, that's why all electric vehicles have conventional brakes in addition to electric. <S> Adding a conventional brake could also be an option for you. <S> If your motors are running at slow speeds (hundreds RPM or less), consider using faster motors with a gearbox. <S> This will increase the efficiency of EM braking by the factor your gearbox provides. <S> In the end, if you want to have pure position control, you should use stepping motors. <S> If you're using regular motors, you don't directly control the position, only the speed, and your algorithm should take that into account. <S> E.g. you could decide on a trajectory, calculate the required speed as a function of time, and then try to run your motor at that speed, adding correction from position error.
| Swapping out the motor for a more powerful coreless type with low internal resistance would improve the braking speed.
|
Use a microwave motor to power LEDs I have an AC motor that came from a microwave turntable on the back it says 120v 2w 6rpm. I would like to use it as means to generate some electricity. I have a full wave bridge rectifier to convert it to DC. What is the simplest means to convert it to an usable voltage? A small wall transformer? Any efficient leds to match the output once i step it down? <Q> I've used one of those motors as a generator for one of my pet projects. <S> They can provide a decent voltage at low RPMs, however these are AC synchronous machines which run at a speed much higher than 6RPM (determined by its physical construction, usually 1500RPM) <S> so there is a gearbox in there with a high gearing ratio, which will require a lot of torque on the output shaft to generate anything useful... <S> Since they're made out of plastic, you might damage them; so this needs to be tested. <S> I wouldn't expect a high lifetime from one of these things even if it works. <S> Anyway, for your actual problem, it depends on how you are inputting your mechanical energy: can it be considered to be turning your generator at a constant speed? <S> Then you could get away with using a resistor: since your LEDs are not a variable load, you can calculate a resistance value that will work. <S> However, the mechanical energy required will be increased for the same load, since most of it will be lost in the heating of the resistor. <S> If the source is variable, for example if it's hand-cranked, you need to use a voltage regulator to absorb the voltage variations and produce a solid constant voltage. <S> Either way, the ripple of a single phase AC waveform once full-wave rectified is the peak voltage of the waveform (i.e. it drops right down to 0V every 20ms), so you'll need to add a capacitor to hold the voltage above the minimum input voltage of the voltage regulator if you're using one, or above whichever value will make your LEDs too dim if you are using a resistor. <S> OR you consider 100Hz (twice mains frequency, because of the full bridge rectifier) is enough to take advantage of the retinal persistance, and you design the resistor for the average value, making sure the peak voltage will not damage your LEDs because of the increased current. <S> This way, no need for a capacitor. <S> Connecting a wall wart directly to the motor is similar to the voltage regulator approach, so there will be a speed under which your output will drop. <S> Bottom line: test it! <A> The simplest way to do this is a resistor. <S> The LEDs need one anyway to limit current flow. <S> I'm not sure how many volts your motor will produce but cut of 1.4V of the output due to the silicon diodes in your rectifier and change the resistor accordingly. <S> You might want to add a capacitor <S> (sorry i cant give values, I don't know the current or voltage) to reduce the effect of voltage spikes/ <S> dips (no one likes flickering LEDs). <S> As for the LEDs, most will work if your trying just to power one, but if your trying to use several of them, you may need to look into that more (sorry for lack of specific instruction I will need more information to give that). <A> For your first attempt to make a small generator demonstration, the easiest and least expensive motor to use as a generator would be a small battery operated motor. <S> The type of motor used in inexpensive battery-operated toys is a permanent-magnet DC motor with brushes. <S> It will generate DC by simply turning the shaft. <S> It will probably not be very difficult to turn the shaft fast enough to light an LED. <S> A toy that is no longer useful because the plastic parts are broken is likely to contain a useable motor.
| A wall transformer would also work but is also far more expensive than a resistor, and to power led a resistor is good enough.
|
Power supply in parallel connection test I have 2 power supplies in parallel. Can I detect if they both are connected by only using the outputs and a multimeter. The power supplies have 24V 10A each. This is what I figured: Connect an electrical load that demands more than 10A of current. If the voltage drops of cuts off only one power supply is connected. Can this work and would it harm any device? This test will be executed 2 maybe 3 times. Thanks. <Q> With a real 10A supply you have no guarantee at what exact current the supply will cut off. <S> Some supplies may be designed to supply brief surges well in excess of the maximum continuous current. <S> If this is a homework problem, consider that real wires are not zero resistance and even cheap voltmeters can detect typically +/-50uV <S> DC on the 200mV ( <S> +/-199.9mV)scale. <S> AWG 16 wire has a resistance of about 4m\$\Omega\$ per foot. <S> Calculate what the minimum length of a sensible gauge of wire would be required to present a detectable voltage drop at the operating current using Ohm's law. <A> When you say you are interested in knowing if the supplies are 'connected' I'm interpreting that as knowing if they are supplying current to the load. <S> If that's the case, you can insert a current shunt after each supply and sense the current from each supply. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Variations of the same idea. <S> Insert D1 and D2 from your power supplies to the common output. <S> Wire an LED in reverse parallel with each and series resistor as shown on the top PSU. <S> If not*, then rewire as shown in the lower example. <S> * <S> The upper circuit might not work if there is no leakage path back through the PSU. <S> The lower circuit provides a path to ground <S> but if there's also a path through the PSU the LED may blow due to over-current. <S> A combination of the two with two 2.4k resistors might be the best bet. <S> For remote monitoring replace the LEDs with opto-isolators, etc.
| Power up one of the PSUs and check if the other LED lights.
|
LED as power generator As many of you probably know, a normal light emitting diode, while very handy as a cheap and ubiquitous indicator, can double as a power generator. The mechanism is the same that is exploited in photovoltaic cells, aka solar panels. When an LED is exposed to light it produces a current flowing from anode to cathode. This current can be used to directly power a device, or to charge a capacitor so that a periodic load can use the stored charge all at once, when needed. To give you a better idea of the values involved, the short circuit current ranges from tens of nanoamps up to a few microamps, while the open circuit voltage is somewhat less than the standard forward voltage of the LED. I am currently in the process of choosing a range of LEDs to test them and see if they are suitable for my application, but I am kinda stuck, mainly because using a led to power something is convenient only money wise, while a photovoltaic cell or even a photodiode is a better choice under many other aspects. No manufacturer that I have seen list the photogeneration current in the datasheet, and this seems fair enough to me, but since I want to avoid testing thousand of LEDs I would like to buy a selected range of them, so I need to better understand the underlying mechanism that leads to photogeneration. Let's just write down the diode equation:$$I_D = I_s(e^{\frac{V_D}{V_t} - 1})-I_G$$ simulate this circuit – Schematic created using CircuitLab Where \$I_s=J_s\cdot A\$ is technology dependent, and die area dependent. \$I_G\$ is the generation current, and is the parameter I am interested in maximizing . Here are some things I have thought of: LED color since the LED can absorb a lightbeam only if the energy it carries is greater than the gap, choosing LED with low energy (i.e. low frequency) gap is a must, to be able to absorb a wider portion of the spectrum. This lead me to choose red or infrared LEDs. max current max forward current is proportional to die area, and power dissipation capabilities. Since photogenerated current is proportional to area, choosing an high current LED seem wise to me. forward voltage this is somewhat related to the open circuit voltage and is not currently an issue for me, and I believe it has no relationship with photogenerated current. reverse current I am not sure this has much to do with photogenerated current, but the bigger the reverse current, the bigger the area, which is a good thing. breakdown voltage I do not think this has a relationship with photogeneration. My question finally is: Do you agree with my analysis, and do you think I am missing something? or better What are the parameters to look at when searching for a photovoltaic panel in the LED section of a supplier? <Q> LED color -- I agree here; LEDs with lower-energy optical emission should have an effectively wider 'absorption band' in the visible spectrum. <S> reverse current <S> -- I think this could be problematic. <S> As this is a 'porosity problem' with the underlying diode, I see it presenting a likely loss-path for some/all of your photogenerated current. <S> I would (short of contrary experimental data) look for LEDs with a lower leakage, proportional to forward current. <S> One item I didn't notice in your list, but think it may prove to be an important factor: Conversion efficiency -- <S> In my experience with using other components 'backwards,' a component that functions more efficiently when electrically powered (as designed) is nearly always more efficient when electrically generating. <S> Thus, I'd highly recommend using LEDs with proportionally higher light output/electrical power efficiency ('color temperature' may not apply here, due to the LED color argument). <A> I believe you are missing something - collector area. <S> LEDs are made with very small chip dimensions, something like a millimeter on a side. <S> This means that when generating power it intercepts only a very small amount of optical power for "reasonable" light intensities. <S> Furthermore, although I can't prove it, I suspect that LEDs will only respond to light within its emission band, which will severely reduce the efficiency of the LED as a power generation device when used with a broadband source such as the sun or ambient light. <S> You can test this easily enough - try illuminating an LED with an LED of a different color. <A> You should google Forrest Mims and LED as detector. <S> Here's my first hit . <S> Forrest did this back in the 80's(?) <S> And I think he's still using LED's for their spectral selectivity. <A> As my previous answer is announced to be deleted, what I can say is what I know and not speculating beyond. <S> If I have no knowledge of the chemistry of green LEDs that makes them sensitive to light, am sorry. <S> Am exposing only what I do know. <S> Green LEDs are the ones that have the best response as photo detectors/generators. <S> I tested and demonstrated to my employer, manufacturer of very high level audio processing equipment, that green LED indicators on the front panel were inducing spikes back into the circuitry in events as photographic flashes. <S> Their output is very modest, but do generate better than other colors. <S> The web should also disclose the behavior mostly in heliostat sun tracking circuits, and I did build one myself years ago to kill mold in my north wall. <A> Color (and forward voltage) will have an impact that you have not accounted for - as forward voltage varies with color, so the power you get for a given current varies with color/forward voltage. <A> Ignore the naysayers Vlad - if you are up to it, there's a great practical research project here, that you could dive into. <S> I've used this in the past to directly drive fet gates, and also as a data-input for configuration. <S> Its an idea that is really timely now: nanopower IC's + big area/ <S> big array leds mean that they could be viable energy sources. <S> We need some research data on it. <S> There are plenty of theories, no data. <S> You might want to try led-filaments made for light bulbs. <S> It is not directly answering your question, but they are a standard production part with ~20 led die in series. <S> On aliexpress, there are white and red versions available, and a couple of different lengths. <S> There are also big COB arrays of leds, as well as 5W leds that seem to have 4 big die in one package. <S> All of these can make higher voltages. <S> Some vendors boast that they use larger die than competitors, presumably these would be preferable. <S> White leds are using blue die, and I expect that the phosphor coating is down converting light out of the wavelength range the led can convert. <S> Cold white leds do less conversion. <S> So cold white and red are likely to work best. <S> Open questions: <S> Energy under strong sunlight energy under indoor light esp led light. <S> Warm vs cold white power output Effect of temperature. <S> differences between led technologies (gan vs algaas) and wavelength relative efficiency of big vs small die. <S> (a die that is 0.25mm might have much lower proportion of active area than a 1mm die aging <S> (a standard failure mode for crap leds is they develop bypassing resistance across the die.
| Green LEDs are also used in heliostats for sun light tracking/sensing.
|
Calculating the capacitor values to control ceiling fan speed I have an old ceiling fan motor that runs with a 1.5µF run capacitor, at what I believe is, its full intended speed. With the help of some folks here at StackExchange I've wired everything up as in the image below, also refer to the schematic further down this question. The motor seems to be running well. The next step is to add a 4 way rotary switch that selects between off and 3 different speed settings. I need to figure out the capacitor values I can use in C3 and C4 in the schematic below to achieve the slightly slower speeds for speed settings 1 and 2, with 3 running at full speed. http://www.schematics.com/project/ceiling-fan-speed-control-27511/ I do believe that the capacitors need to be in parallel for the capacitance to add up, and slow the motor down, please do correct me if I'm wrong. As far as I can understand the capacitance shifts the phases apart further in the two coils. The simplest approach might be to go and buy some 1µF to 1.5µF caps and play around with different configurations. I already know I need a 1.5µF to get and keep the motor running. Is it safe to say I can just add another +/-1µF/1.5µF in parallel for my 1st speed setting, and another 1µF for the 2nd setting to slow the motor down? Thus, I have the following configurations: Speed = 1 : 1.5µF Speed = 2 : 1.5µF + (C2)1µF = 2.5µF Speed = 3 : 1.5µF + (C3)2µF = 3.5µF If this bit of information helps, our supply is 220V at 50Hz, and the motor has, what appears to be 14 coils, according to my counting through the holes in the motor casing. <Q> The circuit I believe you're looking for is something like this: (please excuse the odd symbols for the switch & motor ...) <S> simulate this circuit – <S> Schematic created using CircuitLab <S> With the switch in the Low seting, only C1 is connected in the circuit. <S> When the switch is set to Medium or High, either C2 or C3 will be connected in parallel with C1, giving you a larger capacitance which (I believe ...) will produce a faster fan speed. <S> It would not be uncommon for the capacitance value for the Low speed setting to be low enough that the motor won't start spinning by itself. <S> Ceiling fan speed control switches are usually wired such that the switching sequence runs Off - High - medium - Low - Off, so that the fan starts up with the full-speed capacitance to get it going. <S> You'll probably need to do a bit of experimenting with capacitor values, but a rough guess would be to choose a full-speed total capacitance of about 10x the value which just barely allows it to start. <A> Full marks for persistence on this one, Josef. simulate this circuit – Schematic created using CircuitLab Figure 1 and 2 - depending on switch availability. <S> I think you'll find that the more capacitance you add the faster the motor will run. <S> Due to limitations in the schematic editor I've drawn the contacts of the one four-position switch as three separate contacts. <S> For Figure 1 the switch sequence would be: SW1 SW2 SW3 <S> SpeedOff <S> Off <S> Off OffOn <S> Off <S> Off <S> LowOff <S> On Off MediumOff <S> Off <S> On High <S> The original device probably had a fancy contact arrangement like this: Posn SWA <S> SWB <S> Speed0 <S> Off <S> Off <S> Off1 <S> On <S> On High <-- best starting torque on switch-on.2 <S> Off <S> On Medium3 <S> On <S> Off <S> Low <S> As far as I can understand the capacitance shifts the phases apart further in the two coils. <S> Not quite right. <S> The phase shift is primarily required to determine direction of rotation (as covered in your original question). <S> This is an induction motor and it rotates by currents induced in the rotor interacting with the rotating field. <S> The rotor doesn't quite keep up with the rotating field in full speed mode and the smaller the capacitor the more slip there is. <S> Reduce the capacitor size enough and the motor won't start reliably. <S> Borrow some capacitors from your local washing machine repair man. <A> More capacitance increases both the current and the phase shift of the auxiliary winding. <S> Both the increased phase shift and the increased current allow the motor to produce more torque (make the motor stronger). <S> With no fan blades attached, there is no load connected to the motor, so it will start and operate at nearly full speed with very little capacitance connected. <S> It will be difficult to see any speed change without any blades attached. <S> Reducing the capacitance makes the motor weaker, allowing the load to slow it down. <S> The usual switch arrangement is to use a 4 position switch that has an off position and three speed connections as shown below. <S> The switch connects first both capacitors for high speed, then just the larger one for medium speed then the smaller one for low speed. <S> If you use capacitor values that are too high, the auxiliary winding may draw too much current and overheat. <A> "when you increase the capacitance, the voltage across the capacitor decreases but that across the fan motor increases. <S> Accordingly, the speed of the fan increases. <S> However, since there is no power loss in the capacitors, there is no heat generated, and consequently, no extra expense.
| In other words, you need to increase the capacitor value to increase the fan speed.
|
Portable 5v power supply to duplicate wall wart I've got a wifi device that works off of a 5v 2a wall wart. I need to walk around with it to get some signal strength ratings, so I am making it a portable power supply. However, the device won't boot with anything I've tried except for the wall wart, and it is baffling me. The wall wart uses a 3.5mm/1.3mm power jack (reads 5.3V open), and I have a USB -> 3.5mm/1.3mm cord I am using with my attempts to power the device. Here is what I've tried: Using a usb power bank rated for 5v/2A output. Using various batteries (up to a 12v SLA to make sure power or amps wasn't the issue) into two separate, known good, buck converter modules that brought the voltage to 5v, both rated for >3amps. The above with/without a large decoupling capacitor attached to handle any startup current. Here is what I see: Wall wart: Works fine, all LEDs on and steady. Everything else: Does not initialize. Network LED blinking rapidly. (Which indicates a failure to initialize.) Another display led appearing to flicker at ~5-10Hz, like it is briefly losing power. Ammeter never shows more than ~200ma draw. Here is where it get's weird: I built a test point just prior to the device to monitor the voltage via oscilloscope. I had assumed from the flickering (above) that my supply was dropping below 5V intermittently. However, the scope proved that completely wrong. The scope data (below) boggles me (left side is the wall-wart, the right side is my portable PSU (12V SLA -->Buck Converter --> 5v output). (FWIW, both supplies were showing as ~5.2V on a DMM. The portable has a ripple of +/- .1V. The wall wart swings so wildly that it occasionally is negative. If I lower the sampling rate, the spikes get lower in magnitude, but are always way larger than anything on my portable supply.) So the working supply has terrible voltage regulation. The supply far better regulation is the one that doesn't work. What would cause this? What can I try to make my supply work? <Q> Ok, that 120hz voltage wave means a 'full-wave' rectifier (with no effective capacitor) is being used. <S> Most likely there is a capacitor inside the device that's actually storing power at the max peak voltage of that waveform. <S> The device is then (likely) feeding a resistive/linear Vreg from that elevated voltage. <S> That Vreg is likely dropping your 'real' 5VDC power supply too low to run the circuit's electronics. <S> DANGEROUS ADVICE: <S> You may have to carefully <S> raise the output voltage of your power supply in order to compensate for the drop. <S> Unfortunately, without opening the wifi device & doing at least enough reverse-engineering to figure out what Vmax your device is storing pre-regulator (and preferrably finding the output voltage after it, too) <S> I can't really tell you what voltage to try, or exactly how unsafe any specific voltage would be for your device. <A> Likely what is happening is that the Wifi device is drawing more current than 2amps in some cases, and then feeding current back to Vreg in others. <S> Notice the ripple frequency on both supplies seems consistent. <S> I'm assuming your wall wart is not the switching type; that would explain why it's responding so differently from your portable supply. <S> To confirm this you might check the open circuit voltage of the wall wart to see what it says (if it's higher than the load voltage <S> then it's an unregulated xfmr supply). <S> To solve your problem you likely need to emulate the wild voltage swings on your portable supply, or more specifically the ability to handle them. <S> I would try putting a good size capacitor on the output of the portable supply. <S> That will provide a source and sink for whatever the device needs. <S> If you want to check what is happening current-wise, put a sense resistor on the negative line on your device and put the scope on that. <S> That will allow you to see the changes in current draw. <A> I don't know why I couldn't spot voltage drops on my oscilloscope, but I assume it was not happening often enough to capture it in my traces. <S> However, when I took a power connector with nothing but 30mm of lead wires and hooked it directly to my bench PSU +5V port, the camera worked as expected. <S> Of course, this brings up my next question of: How can I get 5v 2A from a 5V 2A usb charger? <S> My guess is that cable must do/communicate something to enable current beyond 500ma (USB spec), and my power plug wasn't doing it. <S> However, that is a very different question, and I will post it separately.
| The issue appears to be that USB power ports rated for 2A won't provide the 2A of current the device needs, or the USB cable I used was lossy enough to keep the 2A from being delivered.
|
LTSpice power supply simulation: what is wrong with it? I have simulated the LM723 based regulator circuit in LTSpice And after running it I got 16A currents (blue/green) on diodes in rectifier. The max current I supposed to get here was 3.3A. Please tell me what is wrong? I have tried to use different MUR860 models and it did not helped. <Q> Add some series resistance to that 10mF capacitor. <S> Add some series resistance to the voltage source. <S> In the real world that voltage source will be a transformer <S> and it's secondary winding will have some series resistance. <S> I'm assuming you're using proper models for the diodes so they should already have some series resistance. <S> Think about what will limit that current in the real world: the series resistances of all the components through which that current flows. <S> In a simulator it is easy to get 10 kA of current, in the real world it is not that easy. <A> It looks like you're trying to provide about 15 V to a 6 ohm load. <S> Unless I misunderstand your schematic... <S> So that's 2.5 A. <S> Now consider that the diodes only turn on and pull current from the AC source about 1/5 of the time (only when the 23 V sin goes above the 20 V or whatever rectified voltage <S> you're getting). <S> In order to average 2.5 A (plus whatever is sloshed in the the parallel caps) at 20% duty, you'll need to average about 12.5 A during that 20% of the time. <S> So, a max of 16 A doesn't seem unreasonable to me. <A> There are a few problems with this schematic 1) <S> Mains power is not infinite, and neither is the current from a transformer. <S> Your transformer is going to have a lag on power that it can deliver, you should probably simulate this. <S> Another thing to watch out for is transformer saturation. <S> (unless your not getting power from AC mains) 2) <S> As the other answers say, you have a huge capacitor, is throwing more capacitance at the problem going to be a good solution? <S> If the current is too high, then you need to change the design, not the parameters of the design. <S> At these current levels you should probably use a DC to DC instead of a vreg unless price is an important consideration. <S> You are going to burn up lots of power. <S> Its better to put smaller amounts of current at a higher voltage through the rectifier You can get cheap DC to DC regulators that are 780X drop in compatible that will handle 1 amp, you can parallel them if you need more current. <S> If that doesn't work then go find a DC to DC IC. <S> Have you considered a AC to DC power supply such as a "wall wart"? <S> People make these things for less than 20$. <A> I'm, not sure about the modeling <S> but I've used the 723 a lot and found that if you've got the voltage headroom it's good to have a few transistors in Darlington configuration between the 723's Vout and the base of the final pass transistor. <S> If you look at the schematic of the 723 you'll see that there's already one inside the chip, just add a couple more. <S> It improves the active filtering and the regulation. <S> I built a 12 volt 8 amp power supply once <S> and I was able to get the load regulation to better than 1 mv full load to no load using about 3 driver transistors. <S> Think current gain. <S> Could be a problem with the spice model you're using too, I stumbled on this trying to find a spice model for a 723.
| You are using an ideal voltage source, You may want to add some inductance and resistance to simulate wires.
|
Finding maximum source impedance for A/D converter (SAM3X8E ARM Cortex-M3) I would like to find out what is maximum recommended source impedance for A/D converter on Atmel SAM3X8E ARM Cortex-M3 microcontroller. I tried to follow the example of this excellent answer , which also explained the maximum recommended source impedance for Atmel AVR 328P MCU (being < 10k). There are even quotes from datasheet in the linked topic, giving this answer specifically. Therefore I also checked the Atmel SAM3X datasheet , hoping to find this information. But I had no luck spotting the answer from page 1317 onwards, which deal with ADC. I might add that I intend to use 12 bit resolution capability of the ADC. How should I be searching for this information and where to find it? <Q> There are charts on pages 1408 and 1409 of that datasheet which give ADC max. <S> source impedances vs ADC frequencies. <S> According to that chart, the 'worst case' acceptable source impedance is 353Kohm for 10-bit resolution @ 1MHz frequency. <A> With many ADCs, the maximum source impedance is ultimately dominated by pin leakage current , in particular those embedded in microcontrollers when multiplexed with digital <S> I/O functions. <S> This is due to a number of causes, but always exists. <S> Charge redistribution devices are a bit more complex. <S> This has nothing to do with the time taken to charge the sample capacitor (which determines the maximum source resistance vs. sample rate) <S> On page 1380 of the data sheet we find that Vdd powered pins have a worst case low input leakage of 30nA when the pin is at 0V; as this Is the higher of the leakage currents, I will use this value to figure out the maximum source impedance. <S> To prevent greater than 1% error, we must drive the pin with at least 100 times the leakage (3 microamps), so at midrange <S> (1.65V if you are converting across 3.3V) we get 550kohm, which lines up well with the maximum sample rate vs. source impedance from the previous answer. <S> Note that it is common to drive an ADC with a very low impedance source with a device designed for the task to ensure input leakage is not an issue. <S> This is an estimate, of course, but it seems reasonably accurate. <A> Per your first reference, Cs/h is charged through a 1..100k resistor <S> What you need is the output impedance of your driving circuit to be able to drive the ADC input fast enough that the reading is not skewed by the slow charging of the sense cap. <S> So what you are looking for is an output impedance of your drive circuit << 1Kohm (for fast sampling cases) or << 100k (for slow sampling cases). <S> In practice I like this to be as small as possible and drive almost everything that is a time varying signal using an OPAMP on the input to the ADC. <S> Power lines and other slow varying or low impedance inputs I would limit to be < 1/3 of the expected input resistance imposed by the sampling time. <S> In many cases, I sample the same pin twice and disregard the first reading which is skewed by the input in the penultimate multiplexer setting.
| If I wanted 0.1% error or less, I would keep the source impedance below 50k.
|
What does (PNP) BJT with shorted C-E do? I was browsing through the TI datasheet for an LM78L05 and noticed this application schematic: Note how Q2 has its collector and emitter shorted. I can't say I've ever seen that before and search didn't turn up anything. What role would Q2 play in that configuration? I kind of suspect a diode, but can't figure out why a plain old diode wouldn't work better and be a lot cheaper. The 2N4033 datasheet describes it as a General Purpose PNP Silicon Planar RF transistor. <Q> From the 1980 National Semiconductor Linear Regulator Handbook , section 7.1.3 has a High Current Regulator with Short Circuit Limit During Output Shorts , in an identical layout, but with Q2 being a simple Diode D. <S> This current boost circuit takes advantage of the internal current limiting characteristics of the regulator to provide short-circuit current protection for the booster as well. <S> The regulator and \$Q1\$ share load current in the ratio set between \$R2\$ and \$R1\$ if \$V_d = <S> V_{be}(Q1)\$ <S> \$I1 = \dfrac{R2}{R1} <S> \cdot <S> I_{REG}\$ <S> During output shorts \$I1(sc) = <S> \dfrac{R2}{R1} <S> \cdot <S> I_{REG}(sc)\$ <S> If the regulator and \$Q1\$ have the same thermal resistance <S> \$0jC\$ and the pass transistor heat sink has <S> \$R2/R1\$ times the capacity of the regulator heat sink, the thermal protection (shutdown) of the regulator will also be extended to \$Q1\$ . <S> Some suggested transistors are listed below. <S> The minimum input-to-output voltage differential of the regulator circuit is increased by a diode drop plus the Vr1 drop. <S> Considering the identical layout, and NatSemi being the source of the layouts, the shorted Q2 PNP C-E will act the same. <S> As @Robherc suggests, it's likely used as a matched pair, to provided some performance gain compared to a random diode which would have a much different performance. <S> Unmatched, I suspect the different IV curves can lead to over or under current conditions, or too much cycling/oscillation. <S> Of course, given that the application note suggests a diode, that's probably not the case. <S> It could just be omitted, if short circuit protection is not needed. <A> I think they goofed. <S> Collector shorted to base <S> is more common, more logical, and probably more accurate and more reliable. <S> If you disconnect their collector from emitter and connect it to base, you get a current mirror or current multiplier. <S> Google "current mirror". <S> (On this topic, ignore the Wikipedia article.) <S> You will see schematics of variations using two BJTs: two NPNs on the 0V or -V rail, or two PNPs at the +V rail. <S> (But not many give practical applications like this power booster.) <S> The scaling factor is decided by the ratio of the two emitter resistors. <S> But the accuracy of the scaling is controlled by the V BE match. <S> For the best V BE match, the transistors should be the same type, and their temperatures should be kept close, by mounting them on the same heat sink (even though Q1 has very little dissipation). <S> Of course a plain diode works, but the match is not as good. <S> Putting the plain diode on the heat sink with the transistor might be an improvement. <S> Re-drawing their circuit makes it more obvious what is going on. <S> Q2 & R2 reduce the input voltage to the regulator, in order to measure the current it is pulling (most of which goes to the load). <S> Q1 & R1 route <S> 4 times the Q2 current around the regulator to the load. <S> The regulator still regulates +5V on the load, even though 80% of the current is delivered via Q1. <S> (R3 is more subtle. <S> It reduces Q1's share of the load current when load current is small. <S> The regulator also sends some current to ground. <S> Without R3, the current mirror multiplies that current too, which would cause output voltage to exceed +5V, a disaster. <S> With this deliberate imbalance, one could argue that the precision of the V BE match is not as important, so a matching transistor at Q2 is not as important, so diode or wrongly connected <S> transistor is not a problem.) <S> simulate this circuit – <S> Schematic created using CircuitLab <A> My guess is that they're using the C-E shorted transistor to compensate/balance the B-E offset voltage of Q1. <S> While a diode could technically accomplish the same function, using a matched transistor should give a more similar response. <A> A transistor is kind of like two diodes paralleled when you short the C and E together. <S> I have heard of using NPN's as diodes with just the NP (but why do that when you can get a diode? <S> I think I remember trying this when I was a kid experimenting with electronics. <S> I have never used them in the configuration of the question schematic. <S> In this configuration they almost have the same IV curve, but the NPN doesn't work the same as a diode when in the negative sweep like two back to back diodes would. <S> Notice <S> all the nodes have the same curve except 2 and 4. <S> I can't speak for the real world configuration as I haven't actually used a transistor like this <S> but it did almost what I thought it would. <S> simulate this circuit – <S> Schematic created using CircuitLab
| This short circuit protection is added because of the use of an external pass transistor prevents the internal short circuit protection from working.
|
Smoothing load cell readings with a capacitor I'm interfacing a load cell using a HX711 ADC to read its results into a microcontroller. Many of the code samples take numerous readings (about 10) and average the result, but I was wondering if the readings could be improved by simply adding a capacitor across the load cell's sense leads to form a low-pass filter? Then I could take a single sample and use less energy. Is this a worthwhile endeavour? Would a ceramic capacitor be too small, or would a bipolar electrolytic have too much leakage and affect the results? <Q> Is this a worthwhile endeavour? <S> You may be missing the whole point here.... <S> There is a subject matter called dithering and it's useful when sampling a noisy signal. <S> It gives you more ADC resolution. <S> Each 4 samples taken and added gives you a resolution increase of 1 bit. <S> Decibel increase in resolution = 10log(oversampling rate) and if the oversampling rate is 4 then the resolution increase is 6 dB. <S> On the other hand smoothing a really noisy signal is a good idea <S> but, if you are trying to get resolution increases by over sampling then don't over-smooth the signal <S> or you won't be able to make dithering work. <S> Consider a 1 bit ADC (a comparator) <S> then consider the comparators output when the signal is noisy: <S> - Here's another example: - <A> Note that in the HX711 spec sheet (page 6) there is even a reference schematic/PCB that shows an RC network on the sense lines, it includes a 0.1uf directly across the sense pin inputs. <S> If used the capacitor should be a non-polarized low leakage type (for e.g. Poly type), as any leakage across this capacitor could cause some amount of error. <S> A high quality ceramic type may work well if you don't really need the highest performance. <S> A higher value capacitor could help but at a certain point your response time to load changes will suffer. <S> https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf <S> It would still be a good idea to do some averaging of multiple conversions as there can also be noise coming from the rest of the system. <A> be aware that some HX711 board have too cheap low 0.1µf capacitor thus adding lot of noise.prefere one with bigger 10µf capacitor mounted.
| Adding a capacitor across the sense lines can help reduce noise and smooth the signal.
|
Statistical accuracy of multiple resistors in series or parallel I'm having a senior moment and would appreciate clarity. I'm working on an inverting amplifier design where I need to add low-pass filtering and a voltage clamp. Without the filtering and clamp, the op-amp configuration would simply be a feedback resistor from output to (-) input and the input resistor from signal source to (-) input. Worst case error is the sum of the resistor tolerances but statistical averaging usually gives better results than worst case. The figure that I've used in the past is the inverse of the square-root of the number of components (about 0.7% if using 1% resistors). Now I'm going to split the input resistor into two equal-value resistors, half the value of the original single resistor. Intuition says that the statistical average error now decreases slightly to the inverse of square-root (3) or about 0.58% if using 1% resistors. Am I out to lunch or is this a reasonable assumption to make? Note: the worst case error is still 2% in both cases. Worst case error is what I use when I'm calculating my total error, statistical average is the number I use when estimating the typical error. simulate this circuit – Schematic created using CircuitLab <Q> This is a great idea, but if you know anything about statistics when calculating the mean you need to know what your statistical distribution is. <S> Resistor values do not always fit into a normally or uniform distribution. <S> This will make a difference when your calculating the average because you could have a bias. <S> In layman's terms if you have an 1% error and you sample 10000 parts of a batch of 100 Ohm resistors, you might measure the value of the average to be 100 or you might measure it to be 100.3. <S> (where going to assume that the distribution we picked is a good representation of the entire sample size for simplicity sake) <S> The reason why is because manufacturers don't always guarantee the bias or the distribution. <S> It would be a problem for you because if your desire is to average two values to get a better value, a bias would not help you get closer to the average value. <S> You may be able to find a manufacturer that will have a histogram of resistor values <S> (I think I've seen them in the past), but you are at the mercy of the manufacturer. <S> You could also check the histogram yourself and some people have done that . <A> Monte Carlo simulation or the mathematical calculation of probabilities gives better results than worst case analysis <S> , in fact there are very good arguments against using worst case in mass production design. <S> You do need to consider a few issues though. <S> When combining variances, which is where the root of the sum of squares comes from, you are making the assumptions that the variations in the individual numbers are random and uncorrelated. <S> In this case it is likely that your 2 resistors of the same value will be from the sane batch. <S> To be on the conservative side, I would treat them as 1 resistor, as this gives the wider spread. <S> If they were 2 resistors in a potential divider then I would assume they were uncorrelated, as in that case correlation would make the error smaller. <S> You should also consider life time drift and temperature coefficient for the resistors. <S> These effects result from different mechanisms so you can reasonably assume that the contribution from each effect is uncorrelated with the others. <S> For this reason you can take the root of sum of squares for each effect (initial tolerance, temperature coefficient and life drift) within a device. <A> I have usually followed the "random walk" (described at a certain Scottish university in terms of the progress of a drunken man!) <S> so I would note that the RMS sum of two 1% errors is neither 0.7% nor 2% but 1.4% <S> That is, there is a slow sqrt(N) growth in error with increasing number N of uncorrelated error sources, not a reduction in error. <S> Note <S> this is the opposite of the statistical process you describe, which I think you are applying incorrectly : if you applied increasing numbers N of components to the same error source - e.g. forming a precision resistor from N resistors in series or parallel - you would reduce the error by sqrt(N). <S> More careful reading of the question : the specific case of splitting the input resistor into two series components falls into the latter case, so the input resistor could be modelled as a 0.7% error source (but see Oleg's answer : the errors are probably correlated). <S> However the amplifier's gain is still subject to the sum of two independent error sources R1,R2 or (R3+R4), R5. <A> The spread of values is rarely random these days. <S> If you pick a 10K pcs tape of 5% resistors say and measure each one you'll find that none ever falls within 1% of nominal value. <S> If manufacturer also offers 2% resistors (less often) the 5% ones will never be within 2%. <S> Also, oftentimes the difference will be on one side, i.e., the actual values are all smaller (or larger) than nominal within a single tape. <A> I believe you are thinking of the way gaussian distributions combine (or something similar) <S> In this case you can see the mean would then be completely unchanged. <S> But the variance does something quite interesting. <S> After combining the two gaussians (Which by the Central Limit Theorem is a reasonable assumption to make with a LARGE sample size) you reduce your variance by a factor of 2 (when var(A) = var(B)). <S> But as many others have stated we don't know the exact distribution and there is often a bias in resistors. <S> You may see some reduction in the error, but if all the resistors are biased, you don't move closer to the nominal value, you actually just move closer to the bias. <S> heres <S> a nice link with math for more than one Resistor, <S> but he seems to arrive at the same conclusion <A> Actually I don't think resistor tolerance refers to a statistical value. <S> Tolerance refers to the E-series resistor scale. <S> (see Wikipedia)For example, for 1% resistors (E96), there are 96 values in each decade. <S> For example two close values are 2.00K <S> and 2.05K.If we need a nominal value in this range, such as 2.03K, the E scale says there won't be more than 1% error if we choose the nearest available value. <S> In this case we choose 2.05K giving an error of (2.05-2.03)/2.03=.98% Randomness of the resistor values would add even more uncertainty of course, but I don't know if manufacturers publish mean-squared error data needed for Monte Carlo methods
| If the resistors are from the same batch, they should have the same mean and variance.
|
Increase voltage from 5 to 12V to deactivate a display I'm developing a timer based on this project: Digital Stop Watch with ATmega8 by Avinash Gupta (I cant put the link, because my reputation is too low) Original schematic: At first, I made the same schematic (as in the image) with 13mm x19mm and 5V displays and it works fine. The displays work perfectly. Then I change the displays by larger 12V display (something like 5cm x 10 cm). Now, I have a problem: the segments of the display dont turn off at all. I supply the display with 12V throught BC558 transistor and when I want to show a number: 1, for example, the others segments of the display dont turn off, them only dim a little bit. Later I tried many ideas about the origin of the problem we saw that the problem is this (or we think so): the digital signal from the microcontroller is 0V (to turn on the segment) or 5V (to turn off the segment). The low voltage works fine to turn on the segment because the voltage throught the led is 12V (bigger than threshold voltage), but the high voltage dont woks to turn off because the voltage trought the led is 7 (12V from the transistor - 5V from the micro) and this voltage can turn on the segment (a little dim). So we try to increase the voltage from the pin of the micro using a common emitter transistor (emitter to 10k resistor to ground, base to the micro pin and collector to 12V) and a lot of other configurations, even with an op amp in compare mode. All this in order to increase the voltage of the digital signal to 12V. But all this doesnt works. After this, I see that that exist two reason for this problem: 1) The 5V from the Port C in the base of the PNP transistor is too low to turn off at all this transistor, when I want deactive the display. So I need increase the voltage in the base of this transistor to 12V in order to turn completly off the transistor. When I have 0V from the Port C all works fine with this transistor, because turn on perfectly. 2) Similarly, in the Port D, when I have 0V all works fine, because the voltage throught the display is 12V, enough to turn completly on this. But when I have 5V in the Port D, the voltage throught the display is near to 7V and is not low enough to turn off the display. Thats the reason why when I tried to level shifting only in the Port D of the micro doesnt works. I need to do both two level shifting in Port C and Port D.Then, I assembly this circuit: , but this circuit doesnt works. I dont have idea whats happen. Just seems like if the display segments turn on almost all time and turn off when they want. Excuse me for the large explanation. Now, can someone help me to know how can I solve this problem? <Q> So what you need is a level shifter. <S> PD1 through PD7 need to swing from low (0 volts) to hi (+12V) <S> One way might be to use an inverting transistor (PD1 out to 10K resistor to base, emitter to GND, collector to R11) AND in the code, to invert all your logic outputs, that is assuming you can reprogram it. <S> If you can't fix the code, then you need 2 inverters. <S> so that when the output goes hi, there is only 2 volts to drive the led. <S> Or even simpler add Just one zener in series with your 12V supply before the BC558 transistors. <S> Your display might be a little dimmer, but will cut off more effectively. <S> You can bring the brightness back up by lowering the value of R5 thru R11. <A> Your assumption is correct. <S> The 5V base voltage is too low to turn the PNP off, with a collector at 12V. <S> In that case, a simple npn transistor, in common collector setup can be used to turn the pnp on and off at 12V. <S> simulate this circuit – <S> Schematic created using CircuitLab Resistor values should be adjusted for your transistors hfe value. <S> The npn can be any common small signal transistor. <S> Logic is inverted, so change your code accordingly. <A> MCU have protection diodes on every pin, so it sinks current if the voltage is higher than MCU voltage. <S> I understood your MCU works on 5V, so when you switched voltage for display to 12V, your BC558 transistors always have base current (because pin voltage cannot go higher than 5V). <S> This causes current emitter-collector which goes trough display...
| Another method might be to add a 5V zener in series between the microcontroller output and the current limiting resistors (R5 thru R11)
|
Is frequency of direct current 0? Im confused with this fact. In books I've seen that when DC current is passed in LCR circuit it behaves as purely resistive circuit.And the impedance in LCR is given by $$Z=\sqrt{R^2+(\omega L-1/\omega C)^2}$$ So if ω (frequency) is taken as 0 $$\frac{1}{\omega C}$$ term becomes infinity then the impedance should also be infinite. Then no current should flow through circuit. Please help me clear this confusion. <Q> I domwonder, however, what application are you considering which would involve an RLC network & DC current? <A> An uncharged capacitor looks like a short circuit, so Instantaneous current will be high at first <S> then taper off as it charges. <S> but in series with an inductor and a resistor, this changes. <S> I think if DC is applied current will oscillate and dampen to zero. <S> The only time an LCR circuit is purely resistive is at it's resonant frequency. <S> A DC current will not pass, once the oscillations have dampened. <S> All of this assumes a series LCR circuit. <S> In a parallel circuit, the inductor will pass DC after a short rise time. <A> First, to answer the topic question, the frequency of DC is indeed 0. <S> As for the rest, we can simulate it to see the transient response (see Flash's answer). <S> The response will vary based on the values of R, L, and C. <A> Your equation gives the steady state frequency response of a series LCR circuit. <S> Steady state means that all the transients have decayed to zero; it does not consider the initial period when the sine wave is first applied and the capacitor and inductor are sorting out their balance condition. <S> 'DC' does mean zero frequency and in this case, when the transient has disappeared, the capacitor has infinite reactance and looks like an open circuit. <S> Also, at DC, the inductor has zero reactance and presents as a short circuit. <A> I notice you have multiple answers, and for each one you've asked again 'Is it okay to consider that when DC is passed through LCR circuit V=IR where R is the resitance of the resistor and I is the current.' <S> The reason you haven't got that question answered is that you haven't supplied a circuit diagram of the RLC circuit you mean, despite being asked for that in comments to your question. <S> Consider the following 3 RLC circuits simulate this circuit – Schematic created using CircuitLab <S> They all have different assymptotic behaviour at \$\omega\$=0. <S> Circuit 1, which matches the equation you have put in your question, goes to infinite impedance at \$\omega\$=0, because of the capacitor term you correctly identified. <S> Interestingly, it also goes to infinite impedance at \$\omega\$=\$\infty\$. <S> It goes to impedance R at the LC resonance, when the L and C terms cancel each other out. <S> Circuit 2 has a different impedance equation, because it's a different topology. <S> That goes to infinity at the LC resonance. <S> At zero and infinity frequency, either the L or C is a short circuit, and then, indeed, the DC current passed through the LCR circuit V=IR where R is the resistance of the resistor <S> and I is the current . <S> Circuit 3 is an all parallel arrangement, which has a yet different impedance equation. <S> This goes to R at the LC resonance frequency, and to zero at either zero or infinite frequency.
| Yes, a capacitor will always present an open circuit (infinite resistance/reactance) to a dc current.
|
Are there 4 position switches that control power to a circuit and provide state? I'm trying to find a 4 position switch to use with an arduino project. The first position would be off, as in no power to the arduino. Positions 2,3,4 would all provide power to the arduino and I need to be able to tell which position the switch is in. Think of OFF-LOW-MED-HIGH What sort of switch would accomplish this, and how would I wire the power and the pins to the digital pins on the arduino? <Q> You can use a DP4T (dual-pole, quadruple-throw) slide switch, like this one: <S> http://www.digikey.com/product-detail/en/SS-24E06-TG%205%20(P)/CKN10394-ND/2747191 Since the two sides are independent, you can use one of them for power and the other for the signal to your Arduino. <S> On the signal side, you'd wire the common to ground and the other terminals to inputs of the Arduino. <S> (Don't forget pull-up resistors.) <S> The switch I linked to has the nice feature that it is make-before-break (MBB), according to the Digi-Key listing, so the Arduino won't lose power while the switch is being slid. <S> If you actually have three separate power supplies, you don't want this, as two of the supplies will be briefly shorted together when you slide the switch. <S> Instead, use a break-before-make (BBM) switch, and add a capacitor large enough to power the Arduino for the few milliseconds while the switch is sliding. <A> A 4 position 2 pole (2P4T) <S> rotary switch may work best. <S> (Some multiple pole slide switches may require a more complex connection.) <S> One such rotary switch can be seen here on an ebay link: http://www.ebay.com/itm/8Pcs-6mm-Knurled-Shaft-10Pin-Rotary-Switch-Potentiometer-2-Pole-4-Position-2P4T-/231228428440 <S> There are similar switches in many shapes and sizes, just remember the 2P4T type. <S> (It may also be listed as a DP4T.) <S> As you can see on a close up view there are two pins that are closer to the bottom center, these would be the common pins. <S> One of these common pins would go to your Arduino power input, then the nearest 4 other pins would be your power inputs (off, low, medium, high). <S> As you rotate the switch each of the 4 input pins will be connected to the common pin. <S> If you want a digital position indication you would use the other half of the switch (the other pole) with the common pin grounded and the other pins going to the Arduino digital inputs. <S> Since the second pole section of the switch follows the first your Arduino digital inputs can detect a low on one of the pins and determine the position of the switch. <S> Note that you would only really need to connect 3 of the outer pins since in the off position nothing is working. <S> The digital inputs to Arduino can be selected as needed, just remember that when coding you need to enable a pull-up on the input pin to read an incoming low signal. <S> See the schematic representation below. <S> simulate this circuit – <S> Schematic created using CircuitLab <A> Just wanted to post my final solution. <S> I bought these DP4T, 4 position slide switches from DigiKey. <S> There are two sides, which I will call <S> the A and B side. <S> For both sides, pin 3 is the common pin. <S> Take a look at side <S> A below. <S> Power comes into pin 3, and 2, 4, 5 are all shorted together (soldered, and underneath the shrink wrap, with a single wire coming out. <S> So position 1, which has no connection won't provide any power. <S> Positions 2, 3, 4 all connect pins 2, 4, 5 with the common pin and thus provides power. <S> This switch is designed to that there is no loss of power when moving from 2-3, 3-4, etc. <S> Now let's look at side B which provides the various states, which I will call Low , Med , and High . <S> This is pretty simple. <S> Pins 2-5 each have a colored wire soldered to it. <S> Pin 1 doesn't, because that is the Off state, but theoretically you could use that for a fourth state. <S> I'm using this in an arduino, <S> so pin 3, which is the common pin goes to ground and pins 2, 4, 5 <S> each go to a digital input pin on the arduino, e.g 10, 11, 12. <S> When the switch is in position 2, ground is connected to pin 10 on the arduino <S> and I will be able to read a HIGH state. <S> Pins 11 and 12 aren't connected to ground so they will read a LOW state. <S> Moving the slide to positions 3 and 4 will produce a similar result for pins 11 and 12.
| On the power side, you'd wire the common (middle terminal) of the switch to the Vcc of the Arduino and three of the four other terminals to the power supply.
|
How to filter hum from transformer for audio rectifier i´ve just build a prototype speaker from a TDA7293 ( http://www.ebay.de/itm/TDA7293-85W-100W-Mono-Audio-AMP-Amplifier-Board-AC12-50V-Update-vision-TDA7294-/201478109342 ), the circuit is quite straightforward. To avoid the noise of a switching power supply, i bought a toroidal transformer. While the music sounds astonishing good, in the quiet parts, or when there is no music, the system is humming in a quiet way but it is loud enough to be heard. I think, it is the 50hz. So, how to filter the hum, since it originates from the toroidal transformer? But the transformer is giving AC, so i can´t filter it away. Does someone know, if this is a drawback of there cheap china rectifier? Should i buy a better one? And if yes, which one? Or is there a possibility to filter the hum? (I appended a photo of my prototype) Ok, can´t attach a photo to a comment, (a little confusing because it seems, if i rather should edit my question than to add another answer), so i attach a new photo, i´ve already answered a question to stephen, maybe it is now all upside down...) Hmm, it seems, if my comment were not added, so i type it here again. I´ve changed the setup but i can´t attach more than 1 photo (under 10 points), so i attached only the screenshot. I rearranged the setup, soldered most of the connection, but the hum is still there if i connect something to the input. I´ve feed some frequencies with a signal generator, and it is a little curious, the input signal seems to have more noise than the output. The hum is still there, but the music is rather good, if i can judge it on 30 year old blaupunkt car speaker chassis... <Q> The toroidal type mains transformers do not have a lot of magnetic leakage. <S> The hum you hear is more likely at 100Hz. <S> The hum that remains with no input connected can be reduced by increasing the filter capacitor but adding a proper voltage regulator (linear or switched mode) would help more. <S> The hum when CD player connected is probably due to differential ground noise from the two separate mains supply points, sometimes if you can use a common power-supply ground you can reduce it sometimes this is NOT possible (such as when analogue and power grounds are not tied together in the devices). <A> Your hum must be at 100 hertz, not 50 Hertz. <S> Its nothing wrong with your transformer or rectifier. <S> If anything is seriously wrong with any of those, you will hear the hum louder. <S> Do some studies on star grounding, ground loop and ground current in amplifier circuits. <S> You can solve your problem simply by shifting the ground point. <A> The humming is caused by a ground loop or a poor connection of grounding system of the board. <S> Also, try to increase the value of your filter capacitor in your power supply. <S> You can achieve more filter capacitance by placing extra electrolytics in parallel with your existing ones .If <S> you keep your scope probe on and the hum is indeed power supply based you will see a volt reduction that is in proportion to total system capacitance .The <S> larger C will make your amp sound better at high power so it is worth doing even if it does not cure the hum.
| Your problem is improper grounding.
|
Common practice for creating software switchable power rails I have created a circuit which has a HackHD camera attached to it. To turn on and off the video, you drive a pin to ground for a fraction of a section. The GPIO pin fluctuates on boot, which triggers the camera into an unknown state. I'd like to prevent the camera from coming on till the system is ready (which could be many hours later). My solution so far has been to create a power rail I can turn on and off to control if power is reaching my attached sensors (such as the camera). Is there a common way to create this, or should I just use some Half-H Bridge drivers to turn on and off the power when I want? I was considering using the SN754410 HBridge chip. https://www.sparkfun.com/datasheets/IC/SN754410.pdf All thoughts are welcome. Cheers, Gregg <Q> You don't need a bridge circuit, just a single pass element between the power supply and the device. <S> This is usually a P channel FET if the supply voltage is 12 V or more. <S> That allows turning on the device by driving the FET gate 12 V below the power rail. <S> If the power voltage is enough for the full gate voltage to turn on the FET well, but less than the maximum allowed gate voltage, then this is as easy as a low side NPN pulling the gate low to turn the device on, and a resistor pulling the gate high to turn the device off. <S> Turning off doesn't need to be fast, so the resistor can be fairly high, like 10 kΩ, to avoid taking significant current when on. <S> If the power to the device is coming from a buck supply, then you only need to shut down the buck converter. <S> Added <S> You now say that the power you want to switch is 5 V and that the control signal is 3.3 V. <S> This can be done with a "logic level" P channel FET. <S> Those turn on fully with 5 V or so gate drive. <S> Have the 3.3 V signal turn on a low side NPN. <S> That pulls the gate down, with a resistor pulling it up otherwise. <S> You also mention that this 5 V is regulated down from a 7 V or so battery. <S> This is exactly the case I was talking about where you get a buck converter that includes a shutdown input. <S> Many do. <S> At these low voltages, check out the offerings from Microchip. <S> Of course the usual suspects like TI and ST will have parts too. <S> Surely something suitable comes with a shutdown input. <A> Both the Beaglebone Black and Parallax Propeller use 3.3v logic and can not tolerate 5v on their GPIO pins. <S> So you need to use both a an N-channel and P-channel MOSFET: <S> R1 is there to insure the MOSFET is on when the N-channel MOSFET is off. <S> Because of the inverting nature of the N-channel MOSFET, a 0 on the output of the microcontroller turns on the load, and 1 turns it off. <S> Adding a pull-up (R2) to 3.3v on the output of the microcontroller keeps the load off when the circuit first comes up. <S> You will want to configure the microcontroller's output pin as open-drain. <S> Note there are no resistors in the gate circuits of the FETs, this is because they are voltage-driven devices unlike BJT's whose bases are current-driven. <S> The DMP2035U has a typical Rds(on) of 23 mΩ and can handle 2.9A continuous, and dissipate 0.8W. <A> Adding a power switch has lots of benefits, especially when you consider that you only need to power the camera when you need to and so save power. <S> If that is not important then the simplest solution is to try to stop the GPIO pin from fluctuating during boot. <S> This is quite a common thing, and we would usually call it a "floating" input. <S> From what you have said you should pull the pin to a positive supply rail with a 100k Ohm resistor. <S> It is important that you use the correct positive rail. <S> If you post details of the processor we can give further advice. <A> A P-Channel FET is a simpler solution than an H bridge, depending on your power requirements. <S> A supply voltage supervisor (MAX809 and similar) is a better solution to your problem.
| Some buck converter chips have a shutdown input that you could use directly. The best solution is to pull the pin to a known state on power up using a high value resistor. You didn't say what processor or module you are using so it is difficult to give a definite recommendation, but you probably need to use the same supply that powers the GPIO pin of the processor.
|
Will a capacitor do the trick? Today power went down in my house and although my computer is hooked on a very powerful UPS AKA backup power soure, it shut down as soon as the power was off and started back up seconds later. The reason was that the inverter in the UPS didnt start fast enough to supply power so this few milisecond delay was enough to turn it off. Although i am not very experienced with electronics, i happend to have a chunky 1.14μF 2100kv 50-60hz capacitor laying arround and i thought that i could possibly hook it up between the UPS and the computer just to fill in this slight gap. Below is a picture of the capacitor: Unfortunately i cant calculate the power drawn by the UPS since it varies depending on the usage. (its quite a powerful machine) My question -or more specifically- my questions are: 1. Will it serve its purpose? 2. Is it safe if done properly? And another question not closely related to this thread, How can i calculate how long a capacitor can provide power for given the voltage and current drawn? Thanks in advance. <Q> No. <S> Capacitors are for DC. <S> Wall power is AC. <A> The above commenters are correct. <S> Either your UPS is poorly performing or defective, or your CPU power supply is insufficient, or old (Have you sutffed new boards into an old case?) <S> as it's internal energy storage (caps) are not up to the task. <S> Whatever you do, DON'T try to insert that capacitor into your system! <A> Even if you somehow could, 1.14uF is orders of magnitude too small. <S> Even at the full rated voltage, you'd be lucky to get a fraction of a millisecond out of it. <S> The others are right. <S> Either your UPS or your PC's power supply is defective. <S> You can test the UPS on another computer to find out which one it is. <S> Switch off a power strip or flip a breaker to simulate a power loss. <A> 99.9% you need new batteries in your UPS. <S> UPSes almost all kill batteries on a regular basis via poor charging regimens, the nature of the use (trickle charge for months, go for 20 minutes or so, recharge as fast as possible, trickle charge for months) and excess heat. <S> Thus, they go from "keeping your electronics connected to them up" to "taking the electronics connected to them down on the slightest blip." <S> If the batteries last 3 years it's darn near a miracle. <S> Beware of overpriced replacements that cost more than a new UPS... <S> Also beware of trusting any self-test regimen they may claim to have. <S> Shutting down the attached device, connecting a test load, and power-failing them to see how long they run the test load is the only way to know for sure (without risking an unexpected shutdown of the attached device.) <S> EDIT: If you are saying that the UPS started up on its batteries seconds after the outage started, it's defective junk and new batteries won't help that. <A> Assuming AC current at 120V 50Hz <S> Will it serve its purpose? <S> kind of yes, <S> but it will be very very shorter period of time 1/100 of second as capacitor will charge only with one positive or negative cycle of AC current. <S> 1.14 microF at 1V capacitor will store only 0.000001139mA per second <S> 1.14 microF at 120V capacitor will store only 0.00013668mA per second As charge is store very sort period of time(1/100 second) <S> Electricity provide by capacitor to computer = 0.00013668 <S> * 100 = 0.013668mA only for 1/100th of second. <S> Is it safe if done properly? <S> kind of yes <S> but still it will not work, if 1000 microfarad used you can get 12A but only for 10ms. <S> How can i calculate how long a capacitor can provide power for given the voltage and current drawn? <S> C = <S> Q/V <S> Q = <S> 0.00000114 <S> *120 <S> = 0.0001368 <S> I= <S> Q/t <S> (100th of 1 second t=1/100) <S> I= 0.0001368 <S> *100 <S> = 0.013668mA <S> Source: <S> https://www.quora.com/How-do-I-convert-from-farads-to-ampere-hours <S> http://www.convertunits.com/from/microfarad/to/ampere+second/volt <A> The answer is NO. <S> It won't work. <S> Some ups will kick in only when the supply voltage drop low enough. <S> For instance, in 240V system its normal for an ups ignore the voltage drop up to 220V. <S> The value of this margin may not be universally true but such tolerance is always exist. <S> Your computer might be more sensitive to voltage drop. <S> For instance it may go blank at 230V while your ups stays dumb without doing anything. <S> Your entire setup must be tested for slow brownout (not quick blackout) to find out what happens. <S> The most frequent power supply problem is voltage sag or brownout. <S> Unfortunately most ups are not designed so cater this. <S> You may need to read about DySC equipment to learn more about this real world problem.
| The capacitor might be rated for exposure to AC, but you can't "store" AC power in a capacitor.
|
Passing greater of 2 voltages using 5V signal I need to output the larger of two voltages (Va, Vb) (both of which could be in a range 0-30V), but drive the circuit using a 5V supply. A simple solution (using op-amps, FETs) is needed.I have looked at solutions using just an op-amp in comparator configuration, or an op-amp driving 2 MOSFETs, but since my Va, Vb could be smaller or greater than 5V, MOSFET switching does not seem to be an option (atleast with a trivial circuit). <Q> Perhaps I'm missing something in your requirements, but something as simple as this would work for DC voltages depending on the current levels needed: simulate this circuit – <S> Schematic created using CircuitLab <S> Granted there would be a small voltage drop across the diode, but if you used a power Schottky diode that would only be ~500mV for high current loads, but could be as low as ~100mV for low current signals. <S> Basically if \$V_1 > V_2\$ , then \$D2\$ will be reverse biased and \$D1\$ will conduct making \$V_{out} \approx V_1\$ . <S> The opposite will be true if \$V_2 <S> > V_1\$ <S> which would make \$V_{out} <S> \approx V_2\$ . <S> It is worth being aware that you need to pay attention to the reverse leakage current of the diodes you are using. <S> Diodes are not ideal, and will conduct a small current under reverse bias. <S> You can work out how much this voltage will be by treating the reverse biased diode as a current source based on the reverse current specification from the diode datasheet. <A> simulate this circuit – Schematic created using CircuitLab Figure 1. <S> Precision max voltage detector. <S> Figure 1 shows a pair of precision rectifiers. <S> The highest input voltage will appear on the output. <S> Notes <S> R1 loads the circuit a little to forward bias the diodes. <S> If there is another load it may be omitted. <S> You may need a separate power-supply for the op-amps with output voltage > maximum input voltage. <S> Choose rail-to-rail op-amps <S> if you need to get close to V+ or 0 V. <S> The op-amp with lower input voltage will see a high voltage on its inverting input. <S> This will drive the output hard to negative. <S> There may be some recovery time from this condition that might affect circuit response time when the voltages change. <A> This seems to work. <S> I scale the 0-30V inputs down to the 0-5V range, feed them into an op amp configured as a comparator, and then use the output to drive a relay that selects one or the other. <S> I'm sure there's a lot of nuance that I'm missing here <S> (e.g., the op amp probably can't accept the full 0-5V range of inputs, so you should actually scale to maybe 1-4V or whatever is within the capabilities of your part) but it gives the correct results in the simulator at least. <S> Link to the circuit in CL: https://www.circuitlab.com/circuit/xd8mbe/5v-a-b-selector/
| If the source driving your input is very high impedance compared to the reverse leakage of the diode, you will find that a voltage will appear at the input as the current is driven back through the diode. Op-amps will need to be rated for that voltage.
|
Is there any real world difference in upgrading TL071 to OPA314? I have a DIY made guitar amp in which there is a TL071 preamp section. I read various opinions about how upgrading op amp improves that sound and how it doesn't do anything really... I'm quite confused - would upgrading TL071 to OPA134 make a distinctive difference in sound and quality? And if not is there any other advantages in upgrading? And what other op amps would you recommend that would be a 'direct' replacement for TL071 instead of OPA134 (I don't plan to spend big so it should be on the cheap (up to 3-4$).Another thing which I could not find myself is whether a 'better' op amp improve the output level? Bigger output really wouldn't hurt for my little amp - there would be lots of more headroom for various instruments :) I think I should mention that two inputs goes to the preamp (connected by two resistors). <Q> Chances are low that you will notice any affect by changing the opamp, assuming the two are even compatible in the first place. <S> You didn't provide links to datasheets, so I haven't checked. <S> A TL07x opamp, when used properly, can make a nice audio amplifier. <S> It can also make a mess, as can any opamp, when used improperly. <S> Gain is a function of the circuit around the opamp, and output voltage swing largely a function of the circuit. <S> The TL07x series do have rather high power rail headroom requirements, but presumably that was taken into account in the design of the circuit. <S> In general, just replacing a part in a competently designed circuit with something that supposedly has higher specs is not a good idea. <S> You don't know what the design considerations were, and don't know exactly how the part is used. <S> If you don't understand a circuit, don't mess with it. <A> Hah, the OPA134 is one of my fav. <S> Fet opamps. <S> It has some "better" spec's than the TL071 . <S> Whether these "better" specs will make a difference in your circuit will depend on the circuit. <S> It's also entirely possible that the higher BW (for instance) will make your circuit oscillate.. ( <S> which would be worse : <S> ^) <S> 1.) <S> less noise 2.) <S> higher unity gain BW and slew rate. <S> 3.) <S> more current (maybe I could not find the max current spec on the TL071.) <A> Well as silly as it may seem. <S> I tried replacing, just for the sake of experimentation. <S> And, well.. <S> It affected the sound - <S> it was not much but it didn't seem so harsh and sounded more balanced. <S> Perhaps it depends on the circuit. <S> One thing that it did solve is helped a lot with distortion (much less when driven with a hot signal) and impedance mismatch seems to work better with this op-amp. <S> Is it worth it? <S> Probably not, unless you are designing high-end amplifier or need those values, balance and reliability.
| The opamp, unless it's really bad, should have little effect on "sound quality", whatever that actually is anyway.
|
Purpose of capacitor for MCU reset pin I know why we need a pull-up resistor on the reset lines, but what is the reason for a capacitor parallel to the reset button? I saw it on Texas Instrument's schematic for MSP430F5529 launchpad. <Q> It is for "debouncing" of the pushbutton. <S> Virtually all pushbuttons, when pressed, do not make a single clean contact, but instead make several repeated contacts within a period of 10-50 ms. <S> This would cause the microcontroller to begin to reset several times on each pushbutton press. <S> The capacitor suppresses this. <S> For more information on debouncing, see this article . <A> For a controlled signal on the line. <S> Many MCUs have reset timing that must be enforced and the capacitor is a cheap alternative to e.g. a supervisor IC. <A> This implementation is not very clean, because on power off the capacitor will remain charged, applying voltage on reset pin. <S> Which nowadays is not a problem, the clamping diode will discharge it. <S> But once it could damage the input.
| The capacitor provides certain reset time, which is normally required to ensure all registers are cleared.
|
Drive multiple LEDs ON together using PIC Microcontroller I am using a PIC18F2420 microcontroller (I can change if required). The task is to drive up to 20 Power level indicator LEDs along with a few other LED indicator & switches using PIC. I can imagine connecting the anode of all 20 LEDs to the rail (~ 30V) and connecting cathode of each LED to a PIC I/O pin. But this would mean 20 I/O pins reserved just for this - waste of many I/Os. External I/O expander would add cost and only gives 8 more I/Os with ICs like MCP23008. Cost and PCB real estate is important consideration..With Charliplexing LEDs, I can only turn ON 1 LED ON at a time. I don't want to drive them at duty cycle with reduced brightness.. How can I drive up to all 20 LEDs ON together with best usage of the PIC I/O pins? Do I really need a controller with so many pins that I have to assign 1 pin for each LED only? LEDs connection scheme drawing would be helpful to understand.. I don't want to turn all 20 LEDs on/off at the same time as a group..These LEDs are level indicators and as per the user input, I need to turn each next level indicator LED ON by keeping all lower level indicators ON as well, as level is increased by user and turn off each highest level LED off one at a time, as level is decreased by the user.. <Q> It appears that you are creating something like an audio VU meter. <S> The easiest way to do this would be to create a PWM signal, filter it and send it out to an LM3914 dot/bar display driver. <S> These drive ten LEDs each and can be cascaded to driver as many as required. <A> IF you are wanting to control all 30 LED's individually... <S> Shift registers allow you to switch a larger number of pins with only a small number of input pins by serializing data into the chip and outputting it to the number of pins that are on the device in parallel. <S> There are many tutorials on this, just search around for shift registers. <S> The nice thing about shift registers is that you can daisy-chain them together to use only a few output pins to control a large number of them, with the tradeoff of how quickly you can update the outputs. <S> What voltage and current are you wanting to run the LED's at? <S> This will limit whether or not you can run the LED's from any conventional shift register. <S> You may need to use the shift register to drive a MOSFET if you are wanting to control large LED's. <S> Here's a link to a common high current sinking shift register: https://www.adafruit.com/products/457 <A> I think you are three choices: (1)The direct LED controlling, using a larger PIC eg the 18f4620 <S> (having 35 I/O pins). <S> There are superbright LEDs, these lit well with 2-3 mA also. <S> (2)Same as above but use a small and cheap transistor as emitter-follower for each LED, and normal (even high-power) LEDs. <S> (3)As 'Korozjin' wrote above, use shift registers. <S> The TPIC6B595 is very good, but the much cheaper HC595 is also enough (able to sink/source max 8-9 mA/pin at a time). <A> <A> PMIC led driver chip that talk over I2C . <S> 24+ <S> channels are easily and commonly available :)
| If your LEDs are all to be controlled as a group - all switched on and off simultaneously - you only need to use one output from the microcontroller, but will likely need a driver transistor to handle the total LED current. Use a shift register with a high current capability (if you need it).
|
Use ancient Altera MAX II board in modern environment Years ago (in 2004) my university got an Altera MAX-II devboard , but nobody used it. Now it's me who must teach students FPGA programming, but I still cannot get the board programmed. I faced the following issues, in order: The board comes with ByteBlaster LPT programmer, but I have no LPT on my laptop. Is there a way I can make USB Blaster working with this board? Okay, I found a computer with LPT, and installed modern Quartuas II 14.1 software on it. I was able to examine firmware from FPGA using ByteBlaster cable, but not to program it. Unfortunately, 14.1 supports EMP1270F256C5 chip only while my board has EMP1270F256C5 ES (that stands for "engineering sample" which is kind of beta-version of the production chip); POF files for these chips are incompatible. Can I somehow install support for my old chip in modern Quartus? <Q> Unfortunately no. <S> There is no way to modify Quartus to work with an unsupported device. <S> Alternatively, and probably more sensibly, you could upgrade to a more modern device. <S> There are for example many Cyclone V based dev kits that are pretty cheap, though I'll let you search for something. <A> Contact Altera for help, you need a very old version of their software. <S> Also Altera have asked the universities to stick at version 13 and not upgrade to 14. <S> Version 13 still has a simple waveform based simulator which is (very) good for teaching. <S> It avoids having to jump in to use VHDL testbenches. <A> For anyone still searching for the answer, it appears it is as simple as editing the .qsf file and recompiling as noted here: https://forums.intel.com/s/question/0D50P00003yyGVrSAM/max-ii-dev-kit-programming?language=en_US <S> It boils down to changing the .qsf file entry: set_global_assignment -name <S> DEVICE <S> EPM1270F256C5 to <S> set_global_assignment -name DEVICE <S> EPM1270F256C5ES <S> It appears to work fine even in Quartus 18 under Windows 10. <S> Hope <S> this helps someone!
| You'd have to find an older version of Quartus which supports the device and use that. If you are trying to teach FPGA based stuff, using an ancient device, especially one which is an engineering sample, is possibly not the best course of action - you'd spend more time battling bugs and glitches in the tools (if you can even get them set up) than you would teaching.
|
Why does the cathode heat up more than the anode in an electric arc? I have recently built a flyback transformer driver with a 555 timer, and have been drawing electric arcs. But I noticed that the cathode electrode(the HV pin on the transformer) heats up a lot more than the anode(the HV cable on top of the transformer). I noticed this because if I use thin cables as electrodes, the cathode starts melting and getting red hot a lot faster than the other electrode. My question is why does this happen. Thanks <Q> In an electric arc, electrons are being stripped from their atoms in the air & fired with high energy towards the anode . <S> Some of the electrons are fired from the cathode directly, and others are stripped from air atoms, but eventually, if the plasma is sustaining, they end up striking the anode . <S> Meanwhile, the much larger & denser necleii of the electron-stripped atoms are not drawn through the arc with as much speed, any many end up dissipating into the surrounding gas, rather than impacting the cathode . <S> Due to this imbalance in the impacts of energetic particles, the vast majority of arc-caused heating to the electrodes occurs on the anode . <S> For more explanation, here is a detailed and informative article from lincolnelectric.com, explaining some of the various properties & arrangements of this tranferrance which are exploited in the verious metal arc-welding processes. <A> This in turn relates to their size and geometry, their material, the working gas , and to some extent the orientation of the discharge in space (because of convection). <S> But if the cathode and anode are the same size and shape, made of the same material, and placed in the same relative orientation, then it is due mainly to ion impacts. <S> The electric field is not uniform within a discharge. <S> Most of the potential is dropped close to the cathode, in the so-called sheath. <S> This causes the ions to be accelerated into the cathode, while the electrons are not (to the same extent) accelerated into the anode: (source: egloos.com ) <S> (This picture is for a glow discharge. <S> The relationship is the same in an arc, although the falls are smaller in size and not as large in magnitude. <S> This paper estimates them to be 14V and 4.5V for the cathode and anode respectively, for an air arc between Ag electrodes.) <S> Not only are the ions accelerated into the cathode, but electrons from the cathode are strongly accelerated into the discharge near to the cathode. <S> This leads to a high power dissipation, and some interesting physics , in this region. <S> The arc simply cannot exist without it! <S> In any case, this volume of extremely hot gas also heats the cathode indirectly. <S> There is no comparable structure next to the anode, and indeed, the heavy-particle temperatures can be seen (in the paper) to be much lower there. <A> You should upload the photo of the arrangement. <S> It depends on the shape of the electrodes, if they are plates, needles, combination of them. <S> Possible phenomena that you observe is the corona discharge, where the current is flowing without being seen like a discharge, you should test in a dark to see the blue glow. <S> Your electrode can be heated because of high current density at the tip of electrode, while the anode could have different geometry, so a pic can say as many words.
| As noted by Marko Buršič in his answer , it depends very strongly on the current density at the electrodes as to which of them will be hotter.
|
Dead time in Synchronous Buck converter During dead time of any DC-DC converter both the switches are turned off to avoid any shoot-through current. But in a synchronous Buck converter that would mean sudden zero current through inductor. Wouldn't that cause any problem? <Q> After the dead-time the FET is turned on bypassing the conducting diode. <S> With this action you can reduce the losses since the voltage across the FET will be much lower than the forward voltage of the diode. <S> All in all, Synchronous Buck is all about reducing the forward losses on the Buck diode. <S> There is no change on the operation states of the converter itself. <S> It will work in CCM, BCM and DCM given that you have the right dead-time. <A> Any inductor current is carried somewhere, for a while. <S> There are various mechanisms to avoid this becoming a problem. <S> In an asynchronous buck with a switch+diode (I know you asked about synchronous, but let's start with one that you think should be OK, and show that it is less OK than you thought), the freewheel diode picks up the current, eventually. <S> It can't do that instantaneously, as the inductance of the finite-length wires between the switch device and it is non-zero. <S> This current first goes to charge 'unwanted' capacitances in the devices. <S> In the event that the voltage on the switching transistor rises above its breakdown voltage, it will avalanche. <S> Most switching devices have a 'maximum repetitive avalanche energy' specification, to cope with just this problem. <S> Eventually, the high voltage across the wiring inductance causes the current to slew from the switch to the diode, and peace is restored. <S> In a high current design, great care is taken to minimise the switch/diode transfer inductance. <S> This doesn't necessarily mean the inductance to each individually needs to be low, but it does mean they should be well coupled, so fat and close together. <S> How fast the current has to transfer <S> is governed by the fall time of the switching FET. <S> Adding a sniff of series resistance (a few ohms to the low 10s of ohms) is often used between gate driver and gate to increase the switching time a little. <S> This is especially effective during switching as it limits the rate that the Miller capacitance charges, thus controlling the rate of voltage rise on the drain. <S> While this increases dissipation in the off-going channel, it reduces transient overshoot which may improve EMI and other general behaviour. <S> So now you know what can happen in a an asynch converter, dead time does not seem so scary. <S> First, the voltage rises on the off-going transistor, and it may avalanche. <S> Second, current gets transferred into the rectifier device. <S> Initially it's off, so it's first carried by the body diode. <S> Eventually the channel comes on, which then takes up conduction. <S> If the wiring inductances or the current is so large that the switching transient exceeds the switch device's safe avalanche specification, then it's possible to use snubber components, typically a capacitor and resistor in series. <S> These are best avoided if possible as they waste energy. <A> No, because you must start the dead-time at the time where the inductor current becomes zero. <S> This means the inductor is discharged. <S> This means you loose no energy.
| There is no problem since during the dead-time the current will flow trough the body diode of the FET discharging the inductor, very similar as a non synchronous buck. You cannot suddenly make the inductor current zero, the inductor will resist that by making the voltage such that the current will flow anyway (and your transistors might be damaged then).
|
Running 3.3V MCU from LIR2032 Lithium-ion button cell Background I wish to power my circuit with a Lithium-ion battery LIR2032 (around 40 mAh capacity). These batteries have a voltage that goes from 4.2V to 3V typically during their discharge cycle. My circuit (running at 3.3V) has a maximum current requirement of around 20mA -- although I should state that this is only the peak draw occurring in less than 0.1% of the time; the circuit draws below 1uA the remaining 99.9% of the time. It will be a sensor node which every 30s wakes up and emits data using nRF24. Question What would be the best way to efficiently convert the (changing) output voltage of a Lithium-ion battery to less than 3.6V which is required for the MCU? Efficiency is very important here, because of very limited capacity of the battery.Also I have no problem with varying voltage because the circuit can work with 3.0 or less, so it does not have to be precise 3.3V or similar, just need to be below 3.6 at all times. EDIT: I come to an idea, I can find MCU which is capable up to 5.5V (so it can work directly from battery). So only for nRF24 module lower voltage is required. Please look at schematic. What do you think?The idea here is to turn on transistor only when required (transmitting). And even base current is used so only losses are in transistor (for voltage dividing). simulate this circuit – Schematic created using CircuitLab <Q> Under most circumstances, efficiency might imply a switchmode regulator, but the lowest quiescent current available is about 3µA or so, as with this regulator . <S> As that is quite a deal more than your circuit uses for most of its life, an ultralow Iq linear LDO regulator may be better suited to this application as current from the battery is the key here for long life. <S> The lowest Iq regulator I have found <S> (I have some products in an energy harvesting application) <S> is the TPS783 , with a headline 500nA quiescent current. <S> There are other options, such as the NCP4681 with 1µA quiescent current. <S> I am sure there are others out there, but <S> 500nA for a regulator is extremely impressive. <S> If you set V(reg) to 3V (the nominal minimum for most 3.3V devices), then you should have a battery useable to <3.2V <A> You might be able to get away without any voltage regulation at all. <S> I'm successfully running an Atmel ATmega328 with a nRF24L01+ transceiver straight of a 2032 cell. <S> The mega328 and nRF24 don't really seem to care about the voltage. <S> What was really important in my setup were the decoupling caps directly on the nRF24L01+ module. <S> As soon as I soldered 100n ceramic caps onto the VCC and GND pins of my RF transceivers, everything worked fine. <S> Also: with many MCUs this setup allows you to measure your own battery voltage which (for a remote sensor node) might be very nice to have. <A> Just recently read an app note that targets your same circumstances. <S> Using power solutions to extend battery life in MSP430 applications <S> By TI's Michael Day. <S> While it uses the MSP430 as its target, the same applies to any MCU. <S> Depending on the MCU's Current vs Voltage, and Voltage vs Clock Speed, using a low Iq LDO will be much better than powering the MCU directly off the battery. <S> The example uses 2x AA, and a TPS780xx regulator with 0.5µA <S> IQ, at 90% efficiency. <S> The active mode current difference is ~175µA. <S> The lower the clock speed and input voltage, the lower the current used is. <S> In this second example, System 1, with the MSP430 powered directly from the batteries, operated for 223 hours before shutting down . <S> System 2, which used a TPS780xx to drop the MSP430 operating voltage to 2.2 V, operated for 298 hours before shutting down . <S> The addition of the TPS780xx LDO, which operates at 90% efficiency with these operating conditions, extended battery life by 30%. <S> Later on, it even compares the Low Power Mode/Sleep currents: <S> In low-power mode 3 (LPM3), the MSP430FG4618’s operating currents at inputs of 3.3 V and 2.2 V are 2.13 μA and 1.3 μA, respectively. <S> With the TPS780xx’s 0.5-μA quiescent current added, the battery currents are 2.63 μA and 1.8 μA, respectively. <S> DVS reduces battery current by 26% under these conditions . <S> This reduction of LPM3 battery current is critical for systems that spend a significant amount of time in sleep mode. <A> You want to use LIR2032 because you want to charge it from a solar cell. <S> The easiest solution would be just not to charge it over 3.6V. Place a zener diode across the battery. <S> Internal resistance of a small solar cell should be enough to limit the current flowing through the zener diode.
| While specifics are important, using a low Iq LDO, and targeting the lowest voltage your MCU and the radio can use, you'll cut down on the current required compared to straight off the battery. As you intend to use some solar energy, an Energy harvesting solution might be the way to go.
|
Wiring of a USB Y-Connector Recently I bought an LG External DVD Writer that is TV compatible. But after a couple of times it stopped working on my Sony LED TV. It would start spinning, but stop after two seconds. This would go on and on. I assumed that it wasn't receiving enough power from the TV USB port (the DVD writer was rated to 1.6A). So I made a simple USB Y-connector where I took two male USB plugs and one female. Connected the red and black of the female to one of the male USB and the green and yellow alone to the second male USB plug. I connected the data Male USB to my PC and plugged in the power male USB to a USB power adapter rated to 2.1A. Finally I plugged in a USB thumb drive to the female USB plug to test it out. But there doesn't seem to be any activity. Is there something wrong with the wiring itself or simply because there is an improper connection made. <Q> If I understood your question correctly, you left the original plugs black wire completely disconnected from the player. <S> By doing this, you severed the ground connection between the player and TV. <S> If your PC and TV had different ground potentials (they almost certainly have due to wire inductance and power supply filter capacitors), the signal wires were subjected to excessive voltages and currents. <S> It is possible that you killed both the DVD players and TVs USB ports. <A> If I recall correctly from some USB work I was doing a couple of years ago... <S> Part of the USB protocol allows USB host devices to detect plug-in events on the USB power wires as a signal to begin link negotiation with a newly attached client device; thus allowing a sort of 'power-save,' or 'ignore' feature on a host with no attached clients. <S> Based on that, and the VERY IMPORTANT point made in @jms' answer, might I suggest the following modification to your cable: <S> As a rather basic power-boost 'Y' cable, this should work; but be sure to label <S> the "power only" male connector to save yourself a lot of frustration in the future. <A> USB signals are not limited to D+ and D- lines (the spec mandates those to be White and Green wires, your cable doesn't seem to fully complain). <S> Detection of a new device, as well as negotiation of protocol version is done by setting specific voltage levels on D+ to ground and D- to ground. <S> If you do, USB spec guarantees that voltage on D+ and D- will never rise above that level, causing damage. <S> On the other end, you'll short two +5V regulators together (the one in your TV and your external adapter), which will create parasite currents between them.
| So you absolutely need to keep the black wire (hopefully it's the ground, but impossible to tell for sure) between the disk and the TV. Whenever you want to connect the +5V line to all three terminals is up to you. It's hard to tell which option is best, in fact, USB spec prohibits Y-cables straight away because they can't be implemented properly.
|
How to test if my circuit is affected by noise? I have a PCB I designed for a project and I'm testing it. In general, it has some analog channels and a MCU to handle all the logic and the communications. I used an isolated DC-DC converter since this will be connected to a rather noisy power supply. Anyway, I have left it connected working and communicating to the PC for long periods of time to test its stability and sometimes it can work for days and sometimes it stops working. It's being difficult for me to see what's going on because is more the time that it works correctly than the times it just stops working. I think that external EM noise could be the problem (nearby radios, motors, other switching supplies, etc) but I'm not sure. My specific question is: What can I use to generate high amounts of noise and test my device to see if it can survive? I thought of just putting a radio antenna near to it and hit the transmit button but I'm not sure if this would be as bad as possible. I need a way of generating some serious noise, the more the better. UPDATE: Also I'm using galvanically isolated RS2232 IC from maxim and galvanically isolated SPI IC to comunicate with the ADCs (since I'm not using the MCU ADC) and I have 4 layer PCB with 4 different isolated power and ground planes (one for each stage) without slots or current return interruptions. The only common ground points I have is at the voltage regulators because nevertheless I have separated LDOs for every stage (4 in total), they all have to have a common ground point at the main supply. I'm still not completely sure if I'm completely noise-free. As per the comments before I think the may be a coding issue but I still want to noise-test the system to be completely sure is not a hardware issue. Any suggestions? Thanks!! <Q> Hook it up to a signal generator and inject different levels of noise until you find the failure point. <S> Then you know exactly what it can tolerate. <S> This works better with an arbitrary waveform generator or one of many devices that can input specific noise types/levels. <S> I say sig gen though because they're cheap. <A> What can I use to generate high amounts of noise and test my device to <S> see if it can survive? <S> I've used one successfully to narrow down areas of susceptibility on a PCB, fixed them to add resiliance and then ultimately tested in an EMC lab with just one failure that was easily fixed in the lab. <S> I've also used an ignition spark generator with the spark plug lead as the emitter of energy. <S> It was run from a car battery. <S> This pretty much generated good old fashioned broadband EMI for hours and hours. <S> To make it simple I wired up a relay so that it self-oscillated by breaking it's own feed to the coil. <S> I used a capacitor across the coil so it was going at maybe 10 pulses per second or less. <S> Feed the on/off contact voltage to an ignition coil but don't forget the condenser to keep the relay contact from wearing out too quickly. <S> I made vast improvements to a system on the cheap using this method and apart from one lab modification to achieve 10V/m compliance it passed H field testing at 100A/m completely. <A> First suspects for malfunctions due to noise are inside! <S> Assuming you have some kind of Data acquisition system interfaced to PC (via USB / UART), here are some possibilities. <S> With MCU, ADCs, amps, powersupply and any additional logic on a single board, the malfunction may be due to something called "Ground Return Noise". <S> Ground return noise seriously effects digital inputs of FPGAs, logic ICs, MCUs etc. <S> Isolating the analog section, power supply section and digital sections with independent grounds will reduce this problem. <S> Isolate them using a series inductors and parallel capacitors. <S> Basically forming a low-pass filter sections. <S> One can refine it by a T or Pi section. <S> One may want to cascade them based on the severity. <S> Also because the equipment is interfaced to laptop/pc which, pronounces more ground return noise. <S> If that laptop/pc is connected to mains power then the noise level is even higher. <S> One can use a Ferrite-bead on the USB/UART cable to suppress high-frequency power-supply noise. <S> If these two don't reduce the noise, try shielding the analog section and power supply sections. <S> They won't receive or contribute noise. <S> (As long as circuitry inside is not certain type RF circuit) <S> However if you want to strictly find the problem is due to noise susceptibility from 'outside', keep a cell-phone nearby that device and give a ring from another phone! <S> Also if the earlier earlier mentioned problems are addressed, this cell-phone noise can validate the immunity to some level!
| An ESD spark generator is a pretty good device for upsetting electronics that are a bit suceptible to EMI.
|
Definition of terms for a Synchronous Current-mode Buck Regulator? I was reading the datasheet of MP1482 chip which is buck regulator,I have read some of terms in the datasheet I did not understand could any one explain it in simple world. The MP1482 is a monolithic synchronous buck regulator What is a Synchronous regulator? Are there asynchronous regulators? The MP1482 is a synchronous rectified, current-mode What is a current-mode regulator? Are there voltage-mode regulators? <Q> You haven't supplied a link to the datasheet, so I'll only answer in general. <S> Synchronous is a common term in switching power supplies, and is short for synchronous rectification . <S> In a basic buck switcher, there is a diode from ground to the input of the inductor. <S> That works, but adds a diode drop of extra voltage across the inductor to "discharge" it more quickly than the output voltage requires. <S> The synchronous trick is to add a FET across the diode, and turn the FET on when you know the diode is supposed to conduct. <S> That decreases the voltage drop, making the whole converter more efficient. <S> The downside is that things go bad fast if this FET is ever turned on when the diode would not otherwise conduct. <S> This is why synchronous rectification is something you have to wake up to design, unless you just buy a chip with it already incorporated. <S> Current mode is the name for one of the various possible control schemes of a switching power supply. <S> This is mostly irrelevant to you when just buying a chip. <S> There is a controller in the chip that tweaks something to maintain the output voltage at the desired level as the load changes. <S> In a switcher, there are various things that can be tweaked, like the pulse width, pulse frequency, and others. <S> Current mode control is a particular scheme that decides to end each pulse when the inductor current has built up to a specific level. <S> This reference level is what the controller tweaks in order to keep the output voltage at the desired value. <S> As with all control schemes, this has advantages and disadvantages. <S> Current mode control simplifies the compenstation network, but that requires too much math to explain in this answer. <A> In terms of rectifiers, synchronous rectification means that the diode (which turns on and off as needed by the external voltage) is replaced by an electronically controlled switch, usually a MOSFET. <S> The MOSFET is controlled by a signal that needs to be synchronous to the AC voltage for the rectifier to operate correctly. <S> The advantage is lower loss by avoiding the diode drop. <S> In a buck regulator, the flyback diode between ground and the coil is replaced by a MOSFET in synchronous circuits. <S> Current mode means that the regulation of the output is obtained by controlling the peak coil current. <S> Monitoring the momentary output voltage could be called a voltage mode converter, but such designs are uncommon. <S> Also one could omit current measurement and directly control the duty cycle. <S> Current-mode converters handle the transition from continuous operation to intermittent operation (in low load scenarios) better than duty-cycle controlled converters. <S> Also current mode converters turn off the switch quickly if the coil saturates, as this causes a quick rise of the current. <S> Timing based converters need to be explicitly designed to prevent saturation, and most likely need margin. <A> The differences between all four have to do with the regulator's internal layout, and design choices. <S> Synchronous and Asynchronous refer to two specific layouts regarding the input. <S> Voltage-mode and Current-mode refer to the layouts and regulation sensing parts of the design. <S> Two good app notes for this are Synchronous vs. Aynchronous Buck Regulators and <S> Switching Power Supply Topology Voltage Mode vs. Current Mode
| The term asynchronous converter is uncommon, you would typically call them non-synchronous converters.
|
High accuracy wireless triangulation in a small space? the question pretty much states the basic idea, but here is my use-case; tabletop war-gaming. Optimally I would like to be able to tag each of my “play pieces” with some sort of tag, place a few sensors around the perimeter of the play space, and have a device running an application that would be able to tell how far such and such tag/unit is from any other in the play area. As such: Such a system would need to be able to differentiate different ‘tags’, or if tags aren’t used, some method of doing so Have millimeter or better accuracy, and scope over a variable play area approx. 5 to 10 feet cubed. Be able to ‘refresh’ in a reasonable amount of time. (every few seconds is good enough) Optionally Some sort of powerless tag if its workable (so I don’t have to worry about switching batteries on hundreds of small figures) As many ‘store bought’ components as possible. (and hence, hopefully reasonably affordable and with a minimum of home made parts) I’m a software guy, so once something gets to the point where there are raw numbers coming into a computer I'm good. The figures just need to be found/tracked in the play-space accurately, and the computer can crunch the numbers to determine distances. As far as electronics, I’m having a hard time finding (see edit below) or even thinking of how to put this system together. I have looked at rfid tags, and they seem good for storing information, but not so good at triangulating distances. Any help or advice would be appreciated, but for this question; What hardware/technology/setup can possibly (and hopefully nicely) fulfill the above requirements? Is there such a thing? EDIT (plausibility) I did some more searching and found; http://lunantech.blogspot.com/ The videos seem to demonstrate that this is possible? This gentleman seems to have achieved an effect similar to what I'm looking for. (I'm just not sure how, is this applicable?) Likewise, the Soloshot device tracking a 'tag': https://www.youtube.com/watch?v=ApqQW5Nx1qI <Q> Cameras, as many as you can get, and tons of image processing. <S> Stick fluorescent stickers on your mini figures, or better yet, paint them with distinct fluorescent colors and you can get 1cm accuracy. <S> Any radio below 30GHz will not give you the required accuracy due to the wavelength limit. <A> I'd consider using at least two HD webcams, looking from outside the table, across and down onto it, at more or less orthogonal directions. <S> Run the cams into something running a suitable vision analysis library, OpenCV would work well, running from your favourite language, it will run under C, Python, Perl, many things. <S> This will allow you to triangulate pieces in 3 dimensions. <S> An alternative could be a single camera looking down, for 2D positioning. <S> Tagging the pieces? <S> If they are visually distinct, and the lighting affords sufficient contrast, then there's no need to tag. <S> Otherwise, perhaps a small vertical round rod, say wood dowel, so identical look from any direction, with bar-coded bands, for the 2 camera solution. <S> An alternative for the single top camera would be a flat disc on the head, permitting a QR-like pattern, potentially more compact than the rod. <S> With just black and white, you would have max contrast, but need at least log2(number of pieces) bands. <S> With more colours, you can get more bits per band, so with the spectrum, black and white, 8 colours is 3 bits per band. <S> The Higher the Def of the camera, the smaller the tag's features can be. <S> The camera does not need to be in a calibrated position, if the table top includes a couple of calibration target. <S> When you get the recognition system working, you could add a projector, to throw hints or scenes onto the table. <S> Hey, have I just designed and given away a viable product? <A> There's lots of ways to approach this all with different pros and cons. <S> 3D imaging will give you everything you've asked for <S> but you'll need excellent lighting (and line of sight), and some pretty impressive hardware and software to go with it. <S> You never mentioned what the refresh rate or size of the pieces needs to be <S> so I'm going to make a number of assumptions along the way. <S> Doppler-effect triangulation with radio waves is going to be pretty much near impossible. <S> I'm not saying it's impossible <S> but given your DIY criteria just don't go down this path. <S> An IR camera with each piece emitting a unique pulse would be cheap and would be battery energy efficient, but it will be very hard to get 3D. <S> I did a project like this once for triangulation in a building. <S> We opted for signal strength as it changes significantly over small distances. <S> The problem with this approach is that it fluctuates while the tag is static, and is easily influenced by surroundings. <S> Compare the bearing with other stations to triangulate a position. <S> If each game piece is transmitting a unique id, then the software requirements would be limited. <S> Here's a quick sketch. <S> The biggest problem you're going to face other than technical feasibility, is how to power each game piece. <S> RFID and other 'powerless' options are going make something challenging even more so, or impossible. <S> You're either going to need large batteries relative to consumption, a low refresh rate to minimize battery needs (ie one location per second instead of hundreds), or small solar panels (ie solar calculator) to slowly build up enough charge to chirp a position. <S> Lastly, since you're a software guy, you're going to want to find a hardware guy to work with. <S> If you can't find one then be prepared to do a lot of reading and learning. <S> What you're trying to accomplish is not easy no matter who you are. <S> I hope your succeed though because it would be pretty cool. <A> Use RFID radar . <S> Not sure what the resolution is these days. <S> I think they use two antennas for phase sensing to determine the direction and a third antenna for position.
| Triangulation with ultrasonic is feasible but parts are not tiny (if that's the size you're going for) and there will be a much larger power requirement than with radio. I think the solution here is to use 2 or more receivers at each detection station, then use the difference between the 2 to get a bearing.
|
Analog to Digital convertor using capacitor I found out that I can use a capacitor in order to get the data from an analog sensor in a digital manner(Connecting the analog sensor to the GPIO of a Raspberry Pi). I have a 1μF polarised capacitor. Is it suitable? How should I connect it in order to work? The sensor I'm talking about is the below push sensor. Is it ok to connect GND to GND, VCC to 3.3V Power and the capacitor with the positive branch to OUT and with negative to the GPIO pin? Here is the datasheet of the sensor: http://www.robofun.ro/docs/2010-10-26-DataSheet-FSR400-Layout2.pdf Thank you! <Q> Use two GPIO pins, alternate between input and output mode <S> Steps: <S> Discharge the capacitor <S> Charge one known resistor <S> Discharge capacitor Charge the UNKNOWN resistor (the sensor) <S> http://www.doctormonk.com/2013/12/analog-sensors-without-analog-inputs-on.html Use GPIO as input mode to detect the charge up reaching theshold (about mid point voltage) <S> This technique allow simple low cost MCU without build in ADC to read analogue sensor (variable resistance depending on sensed quality), including temperature (thermistor), humidity, light (CdS), force, etc. <S> Good absolute accuracy <S> if the known resistor is high accuracy. <S> Tolerance of capacitor is cancel out. <S> Widely used in consumer electronics device. <S> Have excellent resolution, can be up to 16 to 20 bits or so. <S> Typical conversion time in range of 100ms. <S> Faster conversion can be traded with smaller resolution. <S> Can use MCU hardware timer. <S> Raspberry Pi (vs Arduino) has no build in ADC and this technique is often used. <S> One pin version, lower absolute accuracy as affected by capacitor tolerance. <S> http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/ <S> Also, three pin version, use one pin for sensing (input mode) and quick discharge (output), for quicker conversion time. <A> This is a force sensing resistor. <S> Essentially you will have two R-C circuits using a known value precision resistor and your sensor and the same capacitor. <S> Since capacitance can vary over time and temperature, you will use the precision resistor to cancel out this variation. <S> I don't have time to draw a diagram, but the premise is that one end of each resistance is connected to an output pin, the junction of the other end of the resistances and the capacitor is on an input pin, and the other leg of the capacitor is grounded. <S> Now, discharge the capacitor and then begin to charge it through the known, fixed resistor. <S> Time how long it takes until you read HIGH at the capacitor input. <S> Discharge it again, and this time charge it through the sensor resistance and time how long it takes to read a HIGH. <S> The ratio of the times is the ratio of the resistances. <S> There are improvements that can be made, but this is a basic single-slope A/D converter method. <S> HTH <A> It can be done. <S> Just put the capacitor instead of the 10k resistor in the picture. <S> Make sure to connect negative wire of the cap to ground. <S> The way it works is simple. <S> Push sensor is just a resistor, and its resistance drops when you push it. <S> If the resistance iz high (1 Megaohm) it will take about 1 second to charge the cap to around 2V <S> (Raspberry Pi high input voltage). <S> Datasheet said that the resistance of a sensor is 10 Megaohm unpressed, that means 10s, more like never. <S> But, it chould drop like crazy if I read it correctly. <S> In software switch pin that you are using to output low, discharge the cap. <S> Than switch it to input ant start mesuring the time it takes to go high. <S> Use smaller cap if the resistance is still in Megaohms when you press it. <S> How much pecision do you want out of it anyway?
| You can make a capacitor-based analog to digital converter using timing differences. All that said, I would recommend first mesuring the resistance of the sensor vith a multimeter, if you have one.
|
What does the "D/V" marking on small DC motors mean? I have noticed with the large amount of optical drives and CD/DVD players I have taken apart that most of the spindle motors (RF-300, RF-310, RF-400, etc.) have the somewhat cryptic marking "D/V 5.9" on them along with the standard part number. This appears to be mainly found on spindle motors , and very rarely on the sled or eject motors. It also appears to be a fairly standard marking, as I have seen it on motors dating back to 1985. It could be the recommended voltage, although Mabuchi's information on the RF-300 says the voltage range is 1.5-6 volts and 3 volts is nominal. Some motors I have seen write "D/V" as if it were a fraction . All but 2 of the motors I have seen this on are made by Mabuchi, and on the ones that are not there is nothing after the "D/V" marking. I have been looking for an authoritative source on this for a while, and it seems there is none. Any ideas about what it means or why it seems to be found only on spindle motors? <Q> D/V most likely stands for disk varistor as Vicente Cunha suggested. <S> Not only does the Mabuchi Motor website use the term D/V in this way , 5.9V and 13.0V also match up with two of the standard threshold voltages that TDK produce ring varistors for motors in , and these photos of another brand of CD spindle motor appear to show one of them soldered next to the commutator. <S> (The black ring with solder pads around the outside. <S> Apparently it needs to be on the armature to most effectively suppress noise, hence why companies like TDK offer specially-shaped varistors for this purpose.) <A> Where I got this hunch from . <S> Disk varistors can be used as surge current protection. <S> Perhaps the Mabuchi motors you've seen come with internal disk varistors. <S> Prying one of them open should settle this. <A> I suspect it is the DC operating voltage. <S> 5.9V appears to be a standard voltage for small DC motors. <S> Example: Precision Microdrives 124-001 datasheet: https://catalog.precisionmicrodrives.com/order-parts/product/124-001-24mm-dc-motor-12mm-type <S> Although the maximum voltage for this motor is 6V, the voltage for which all of the datasheet values are true is 5.9V.
| I suspect D/V stands for "Disk Varistor". So in short, D/V 5.9 probably means that it contains a varistor with a threshold voltage of at least 5.9 volts but possibly more due to manufacturing tolerances.
|
Is Stepping Down More Efficient When Voltages are Already Closer Together? If I was to use a buck converter to step-down my input voltage would I have a greater efficiency if my voltages are close together e.g. 7.2v to 5v compared to 12v to 5v? <Q> No, not really, within limits. <S> All your voltages are low enough so that special "high voltage" techniques and parts don't need to be used. <S> With only 7.2 V in, you have to think carefully about making sure the switch can be driven to fully on. <S> That means getting a FET with low gate voltage requirements, or making a higher voltage. <S> That minimizes short pulses on either side since the duty cycle will be 50%, at least in continuous mode. <S> Another part that affects efficiency is the output voltage by itself. <S> At 5 V out, even the drop across a Schottky diode is significant. <S> Synchronous rectification is therefore important if you are trying to push efficiency. <S> All in all, I'd rather have 12 V than 7.2 V as input for a buck switcher that has to make 5 V out. <S> However, both can be used quite efficiently. <S> There is no strong preference, especially if you are using a off the shelf buck converter chip. <S> In that case, just get a chip intended for the voltage range, with the efficiency you want. <S> As Ali80 points out in his answer, this is assuming synchronous rectification, which many off the shelf chips now include. <S> If not, the diode losses dominate and the lower the input voltage the better. <S> See Ali's answer for details. <S> With synchronous rectification, there will still be some preference to higher or lower input voltage. <S> Usually this doesn't matter much, which is why I said "not really" in the first sentence. <S> If this level of detail matters to you, then you need to carefully read the datasheet for whatever part you are using, and compare datasheets carefully to decide what part to use in the first place. <A> You have three major sources of power loss in buck topology: inductor's conduction loss and switching loss mosfet switching loss and conduction loss diode switching loss and conduction loss <S> inductor's resistive loss is pretty much constant but inductor's core loss increase if we increase the input <S> voltage(although negligible compared to other losses). <S> If we increase the input voltage, mosfet swithing times increase(rise time and fall time) and hence switching losses increase in the mosfet, although it doesn't affect diode switching loss if we assume continous conduction mode. <S> so what we have left are mosfet and diode conduction losses, mosfets are generally better at conducting and have much lower losses, (that's why in some high efficiency low ouput voltage buck convertes we use mosfet instead of the output diode for rectification.) <S> so if we have to choose between mosfet and diode which to conduct more, mosfet is obviously a better choise, by increasing the input voltage we generall decrease mosfets conduction time and increase diodes conduction time <S> and that's not good for efficiency <S> either So the lower input voltage is generally better for efficiency. <S> Here are efficiency curves for TI's TPS54340: <A> When the voltages are closer together the Buck switch has a greater duty cycle and hence more conduction loss simply because it spends more time conducting. <S> When you have a big input voltage while keeping V Out the same the switching losses increase . <S> At your low input voltages the mosfet on resistance will be low and the prospective switching losses will also be low so you wont notice a big efficiency difference. <S> I have done a lot of wide range stuff which means a big buck ratio at the top end of V in .I implemented a switching loss reduction scheme to preserve the efficiency at high V in .Remember that switching losses are a function of peak voltage and peak current at turn on and turn off .Also <S> as V in increases the coil works harder because the current and hence flux ramps up faster .On <S> your application the coil should be fine . <A> Therefore no, efficiency drops when a lower input voltage is used.
| The voltage drops across the components that matter (switch and diode) are more or less constant, therefore there are fewer losses proportionally speaking (which is directly linked with efficiency) when the input voltage is higher. For a buck converter, the best is probably when the output voltage is 1/2 the input voltage.
|
Using a capacitor as a battery? I have a 95microF +5% 250v.ac c 50/60 capacitor. And I would like to use it as a battery even if it only last a couple hours. I have a charger I made for it but the cap. Drains way to fast. I was thinking about using a dimmer switch to reduce it. Or maybe even some resistors to reduce the output voltage to like 10v roughly. I was planning on heating up nichrome wire (68ohm resistance) with this cap. So I can heat the wire up without damaging my power source. <Q> Perhaps a 250 V, AC capacitor can be charged to 350 V, DC. <S> That would give you 0.5 X 95 <S> X 10 <S> ^-6 <S> X 350^2 = 5.8 Joules or 5.8 watt-seconds. <S> If you can recover 75% of that you would have 4.4 watt-seconds. <S> If you use that over two hours, you would have 4.4 / 7200 = 0.6 milliwatts. <A> TWO HOURS? <S> Your capacitor cannot store the amount energy that's required to heat up nichrome wire for even one minute. <S> Well, it might work for a second or so. <S> That's why we use batteries instead of capacitors. <S> At 250V, a 95uF capacitor stores about three joules of energy. Compare this to a single triple-A battery which stores about 1000 joules of energy. <S> Three joules? <S> That can run a three-watt heater for only one second. <S> See the problem? <S> Capacitors can't provide heating unless they're really huge. <S> How long is your nichrome? <S> If it's not tiny, then to heat it significantly <S> you probably want five or ten watts of energy flow. <S> Try using a 9v power supply to heat up 68ohms nichrome wire. <S> That gives 1.2W heating at 130mA current. <S> Barely warm. <S> If you want to burn your fingers, try using 24V power supply on your same wire. <S> A large supercapacitor the size of a soup can stores about the same energy as one alkaline C-cell. <S> The usual supercapacitor trick is to short the capacitor with extremely thin copper or steel wire. <S> The wire resistance is a fraction of one ohm. <S> The wire gets very hot, very quickly, and can even glow red. <A> As capacitor is 95microF +5% 250v.ac 50/60Hz. <S> Energy of capacitor = <S> C <S> * V^2 / 2 <S> Q= 0.000095 <S> *240 <S> ^2 <S> = 2.736 <S> J = 2.7W <S> if you provide 2.7W to nichrome for 1 second you won't feel any heat. <S> heat ? <S> specific heat of nichrome = 455 J/kg. <S> K eg. <S> 10 gram of nichrome needs around 4.55 J to bring up 1 Celsius of it <S> 's current temperature. <S> you need to try with lithium battery or acid lead battery or supercapacitor
| Yes, supercapacitors would work, but their voltage is a bit too low to use with 68 ohms.
|
Hardware for IP Camera Project I intend building a custom IP camera for home use, project goals are: Videos are stored remotely in real time (storage somewhere else in home or cloud server) Live steaming from internet Video data transferred securely over wifi (recordings include footage of inside the house) Resolution 720p@1fps Cost efficient (in terms of cost price and power consumption) I'm looking at the Raspberry PI and SMT32f4 boards, but I have not found any clear answer of its viability, and only the boards already cost more than a commercial IP camera. How do I determine the minimal hardware requirements(what hardware do I choose)? Does anyone have any experience with a similar project? I've done days of research and I'm at the point of pulling my hairs out. Any help is highly appreciated! <Q> This would typically be implemented with an ARM or MIPS application processor with a CSI interface, allowing the processor to connect directly to an image sensor. <S> The application processor would contain enough RAM and flash storage (usually SPI flash is used, though NAND or eMMC is common on higher-end units) to boot a small Linux installation. <S> The processor would be connected to an IP network using either a WiFi connection (usually using an SDIO, PCI-Express, or USB connection), or Ethernet (which is usually embedded into the application processor, sometimes requiring an external PHY interfaced over RGMII or similar). <S> Obviously, given the high cost of prototyping this type of product, you're not going to be able to build a one-off prototype cheaper than you'll be able to find a mass-produced IP camera, so if your goal is to save money, quit now while you're ahead. <S> If your goal is to learn about advanced embedded systems, this is a relatively straightforward (though also relatively tedious and unimaginative) project to tackle. <A> If your already at the point of pulling your hairs out, you are just getting started. <S> If you did this sort of thing with a microprocessor like an STM32F, it would be really difficult. <S> Implementing the hardware would be challenging, the software would worse (in my opinion). <S> even if you were a proficient programmer it could take you weeks to months. <S> Stick with the Raspi and use the camera module provided, there are numerous examples for beginners (you can google them). <S> I believe the resolution would be sufficient, it's not the best camera <S> but you could teach yourself some python <S> and it would be a good learning experience. <S> You wouldn't have to mess with the hardware either, just plug the module in. <S> One thing you might notice is more often than not, making things on your own is not cheaper than buying a ready made thing. <S> Especially if you take into consideration the cost in time it takes to make something. <S> It takes time to: Buy all the items (plus you have to pay shipping each time you buy from a different supplier) <S> Put the items together <S> Design other itmes and order them if needed (like PCB's) <S> Write the software <S> You also are penalized heavily for only making one, you don't get any discounts like a manufacturer in china that is going to make thousands of them. <S> But if you want to do it to learn something or as a hobby then by all means go for it. <S> I do this all the time. <S> I have a CNC machine, for each part I probably spend an hour more than an experienced machinist would. <S> And if I took the 3000$ that it cost to buy it (and the software) and amortized it for the cost of each part that I'd make on it, it would cost me much much more than I could get it made by a machinist or at a shop. <S> The material costs me more because I don't buy it <S> it quantity. <S> The quality of the work isn't as good because I don't do thousands of parts <S> and I don't know the best way to make one. <S> But I love doing it, and I've learned a lot. <S> And that's why I do it. <A> The lowest-cost platform is a5v11 <S> (~US$8 shipped), plus your usb webcam of choice plus usb wall wart. <S> It will look and feel like a linux machine streaming video from a webcam over tcp port. <S> Higher frame rates are possible with appropriate hardware -> <S> https://forum.openwrt.org/viewtopic.php?pid=296414#p296414 <S> Raspberry Pi running Raspbian will work out of the box too, but it's less cost effective and needs external wifi interface.
| Any Openwrt-capable hardware with USB and Wifi will work almost out of the box (you may need to build and flash custom image with mjpeg streamer), no development necessary.
|
Transformerless BUCK SMPS for 1kV->12V I have a challenge to push 500 Watts (15V) at 100 meters of telco telephone cable (0.088mm 2 , 28 AWG, 200Ohm/km, 500MOhm insulation). The only way to achieve this is by boosting the voltage up to nearly 1kV and then - back to 15V. The problem is that on the sinking side I have a very limited space (flat-hand barely fits), so cannot use any transformers. Several sources on SMPS design seem to propose isolated topologies ( is this for safety reasons? ). SMPS topology can be chosen from any type (yet, I'd prefer simplicity): Boost or Buck DCM Flyback Forward Push-Pull Half-Bridge Resonant LLC looking to this source , however, 1-3 is recommend for sub 150 Watt range. The rest are ok for 500 Watts, but all contain transformers which I cannot fit into the BUCK (not sure it that is a correct term to identify voltage down-conversion). Ripple or EMI specs are of least importance (brushless motor will be powered).Conversion efficiency, however, does matter. I'd feed a rectified and smoothed AC input into the boost converter. I'd replace diodes with kV MOSFETS and would likely introduce synchronous functionality.Inductor would probably require a careful winding to consider spark gap for the given voltages. Could you please comment if this is a very bad choice? By considering the constraints, what alternatives do I have on the BUCK-side then? And I'd simply convert it down, most likely in synchronized fashion too. <Q> Switched mode power supplies do not always use isolated topologies just for safety. <S> Even when isolation is not required a tranformer-based design might be attractive since transformers are very convenient components for power supplies, especially when high power levels are involved. <S> Your assumption that transformers must be bulky heavy things is not entirely correct. <S> Mains transformers are, because the frequency is so low that large amounts of steel are needed for preventing saturation at reasonable power levels. <S> Transformers operating at 10 kHz or more are not necessarily bigger than inductors required for handling similar power levels. <S> A 1 kV buck or boost converter is not practical, as the switching transistors would have to conduct at least 42 A when on and block 1 kV when off. <S> Applicable converter topologies would be the forward converter, the push-pull converter, and the full bridge converter, all being transformer based. <S> Designing a 12 V DC to 1 kV DC converter is relatively straightforward, but the opposite is going to be a much bigger headache as you would need transistors able to block 1 kV + any transients, not to mention that you would have to find suitable input filter capacitors, design gate drivers, consider safety etc. <S> Finally you cannot reliably use small signal cables for carrying 1 kV. <S> The isolation might be fine from milliseconds to days but it will eventually break down and short out. <A> Buck regulator also have an inductor which can get really big, so if you need some voltage stepdown technique that dont use any kind on magnetics, in this order of power, not possible. <S> about the size of the converter to get an idea look at a laptop charger, you can't really get more compact than them easily, the big ones have output powers around 120-150W. you need 500W also with higher voltage <S> so thing become worse.so dimension wise it is also not possible. <S> so either get more room or more copper! <A> Aside from the electrical problems that jms pointed out, there's also the issue of control. <S> Converting 1000V to 12V means a PWM duty cycle of 1.2%. <S> There's not much room to change the duty cycle in response to line or load transients. <S> The narrow pulse width would probably complicate the electrical problems as well. <S> Looking at this page , your 0.08mm^2 wire (~0.32mm diameter) is limited to about 226mA. <S> At 1kV, that gives you 226 watts, which is half what you need.
| Your wiring is simply not suitable for this task.
|
Place a whole lot of pads We use pads where the pad itself has no diameter (but the accompanying hole does) as break lines in our PCBs. Often those are only 3-4 and can be placed by hand. Now we have a PCB with a break line requiring more of those and closer together (12+ holes). Doing such by hand is possible but tedious. Can macro's in Altium be used to semi-automate this process? There's an overlay line present to guide the process and the lines are usually in a 90 degrees angle (so only x or y increments/decrements). <Q> You can use Altium's Paste Array feature to do this. <S> It would need to be done for each segment. <S> Start by placing a hole/pad/ <S> via at the starting point. <S> Copy this pad, then delete it (it will come back in the next step). <S> Go to Edit -> Paste Special... <S> (or E, A as a shortcut). <S> The next dialog should have a list of Paste attributes. <S> For this case, you can leave them all unchecked, then hit Paste Array ... <S> In this dialog, you have a few options. <S> Under item count, select how many copies that you want, including the copy that you deleted. <S> So if you want 10 holes, put 10 under Item Count. <S> Text Increment is for pad numbers. <S> An increment of 1 will make the numbers increase by one each time. <S> If you don't care about this, then put 0. <S> Under Array type, you want Linear. <S> Then under Linear Array, enter the X spacing and/or Y spacing. <S> Negative X values will place the copies to the left, and Negative Y values will place the copies down. <S> If you enter both, the copies will be pasted at an angle. <S> Finally, click OK and you will be given a crosshair as if you were pasting one part. <S> Click where you want the array to start and <S> the whole array will be pasted. <S> Altium has more information on these menus: <S> http://techdoc.altium.com/display/ADRR/PCB_Dlg-PasteSpecial((Paste+Special))_AD http://techdoc.altium.com/display/ADRR/PCB_Dlg-SetupPasteArray((Setup+Paste+Array))_AD <A> The easy way to do this is to set your grid spacing to the spacing you want between the holes. <S> Then place your first hole. <S> Now move the grid origin to the center of the first hole, and turn on snap to grid. <S> Now it will be quick and easy to place the remaining holes on each grid intersection to form your hole pattern. <S> If you are really making a lot of holes (more than 10), as mentioned in the comments, it can speed things up to place 4 or 5 holes, copy them, and then paste additional holes in groups until you've built your complete hole pattern. <A> If you're using a series of holes to physically break the boards apart you might ask your PCB fabricator if he is able to create score line cuts. <S> These are deep partial cuts in the material that also allow for later board separation. <S> The resulting edges from a scored line would also be much more precise. <S> To define a score line you would just need to create lines on a separate layer called Score.
| In most cases using a score line to divide parts can be less of a mess then cracking the material along holes.
|
What is the pin state during microcontroller flashing? I know that upon reset most micros put pins into high-z state. Is this state preserved during microcontroller flashing? What precautions need to be taken if you are going to reprogram microcontroller on your board with external devices powered and connected? Particularly I'm interested in STM32F4XX micros. Thanks <Q> However, even if the datasheet/app notes do not explicitly say this, look at the default values in the pin configuration registers. <S> If your Port direction register resets to 0, and 0 means input, then it is safe to conclude that all pins will be inputs until set otherwise. <S> Sometimes this information is not blatantly obvious. <S> For example, Atmel (8-bit) datasheets tend to put the reset value of a particular register in small text, next to the register diagram. <S> If you wish to learn more about the flashing/reset process, the documentation is your best bet. <S> My guess is that there exists an app note about downloading code to the microcontroller, probably geared towards setting up a production environment or developing an ICSP. <S> As for reset conditions, that is likely covered in a chapter in the datasheet for the particular model or family of the microcontroller. <A> Since you are going to use the ROM bootloader, the MCU will actually be running code. <S> It is not like JTAG that can stop the processor. <S> It is just that the code running is not yours. <S> This simply means that the chip will behave exactly as it does in normal operation, running your firmware. <S> To start the ROM bootloader you have to reset the MCU. <S> This means that all registers will be at reset values, except those the ROM firmware changes. <S> As it is obvious this factory firmware will only change the values at the registers it is needed to, so only the pins used by the bootloader will not have the reset value. <S> All other pins I would expect to have the reset value. <S> If you are using pins that are used by the bootloader for different operation then you need a hardware multiplexer. <S> If for example the bootloader uses some pins for UART communication, and the same pins are used by your application for controlling something else. <S> For the other pins, they will be in input mode. <S> This is, beacuse it is a safe state for the MCU (you cannot short any of its GPIOs), but may not be safe for your application, as these pins may be floating. <S> Always (and not only because of the bootloader), you should add pull-up or pull-down resistors to define a default state for all your outputs, while the MCU is not able to control them. <A> If I got this correctly. <S> Here are the excerpts from datasheet that seem to make a picture: During and just after reset, the alternate functions are not active and the I/O ports are configured in input floating mode. <S> The debug pins are in AF pull-up/pull-down after reset: <S> PA15: JTDI in pull-up PA14 <S> : JTCK/SWCLK in pull-down PA13: <S> JTMS/SWDAT in pull-up PB4: <S> NJTRST in pull-up PB3: <S> JTDO in floating state <S> The embedded bootloader mode is used to reprogram the Flash memory using one of thefollowing serial interfaces: <S> USART1(PA9 <S> /PA10) <S> USART3(PB10/11 and PC10/11) <S> CAN2(PB5/13) <S> USB OTG FS(PA11/12) in Device mode (DFU: device firmware upgrade) <S> So I guess except for the listed pins, state of the rest pins can be enforced by pull-ups, pull-downs.
| I think generally you could consider it a safe assumption that upon reset, all pins will be set as inputs.
|
Is draining a Li-Ion to 2.5v harmful to the battery? I am running one of my projects from two 2000mAh Lithium Ion batteries wired in parallel I decided to let the battery run until it died, just once, to see how long it would last. It lasted 25.9 hours, and when I checked the voltage on them, they had gone down to 2.5V. I've read in many places that Li-Ions should be 3.7V when full and 3.2V when empty, but I've never seen anything about 2.5V or anything lower than 3V for that matter. I have heard and seen people talk about "overdraining" a Li-Ion/Lipo, and that when it goes below 3V a microchip disconnects the battery to protect it from discharging too far. In this case, my battery still works, and it is charging right now, I don't plan to run it down that low again, but if it were to happen again, is it a big problem? Could this effect the longevity/performance of the battery? <Q> Yes, lithium batteries undergo unwanted chemical reactions when discharged below 3V, causing their internal resistance to be permanently and significantly raised. <S> Their capacity will suffer as well, meaning that they won't accept the same amount of charge anymore. <S> When such an overdischarged cell is "brought back to life", it will likely become chemically unstable, creating a risk of a short circuit developing inside the cell. <S> Even worse, assuming that you measured 2.5V at no load, your batteries have dropped even lower when they were being discharged and have subsequently rebounded to 2.5 V after the load was removed. <S> Li-ion cells have a maximum voltage of 4.2 V or less, <S> I am not sure where you got the 4.7 V figure from <S> but it's a recipe for fireworks. <S> OP has since edited the question, to <S> a still incorrect 3.7 V. 3.7 V is the nominal voltage (average voltage during a complete constant current discharge), while 4.2 V is the maximum voltage. <S> These figures will vary slightly from cell to cell. <S> I would completely discharge the cells and get rid of them, <S> 2Ah 18650s are cheap and not worth the risk of them blowing up. <A> The discharge voltage level depends on the battery chemistry. <S> The minimum discharge voltage varies between various sites, datasheets, etc. <S> but 3.0V - 2.7V is an empirical value. <S> If discharged under this voltage the battery may be permanently damaged. <S> To get the precise value of min discharge voltage, consult the datasheet of your battery. <A> And that when it goes below 3V a microchip disconnects the battery to protect it from discharging too far. <S> That's true, for batteries that have built in protection circuits. <S> Not all batteries do. <S> Most Li-Ion batteries are raw cells that do not. <S> The ones that do will be slightly longer than the raw cells. <S> There is also circuits for multiple cells, and in various variations of externally visible or not. <S> You can purchase the cells with the protection built in or purchase the circuits by themselves. <S> Not just for 18650, all form factors of Lithium cells can have them. <S> You obviously have a non-protected cell, and because you didn't add a low voltage lockout, drained it beyond the safe limits.
| Yes , depleting a rechargeable battery under certain voltage level is harmful to the battery.
|
servo not strong enough to move robotic link fully I'm currently working on a robotic arm. The servo I'm using is the MG996R. i'm trying to make the servo lift a link that weights 55 grams and 20 inches long. The servo itself is powered with a 9v to 7v LM2596 voltage regulator(i'm only using one 9v dura cell battery). however, the servo will only go from 270 degrees to 180. if i want to go from 180 degrees to 0 degrees, i will have to manually move the arm in position. The stall torque for the servo is 12kg * cm. so my question is that do i need more power or the servo is not strong enough and that i need to decrease the weight of the arm? Links for the servo i bought and a robotic arm calculator that i use to get an idea of the torque that i might need http://www.ebay.com/itm/4Pcs-MG996R-Digital-Metal-Gear-Servo-High-Torque-Upgraded-MG995-MG945-RC-Model-Y-/281830599332?hash=item419e69aaa4:g:NXcAAOSwI-BWIbDG http://www.robotshop.com/blog/en/robot-arm-torque-calculator-9712 <Q> There should be no need to ask us. <S> Use a DMM to measure the nominal 7 volts, and verify that this is correct with no load. <S> Now drive your servo into stall. <S> Is the 7 volts still good? <S> If not, measure the battery voltage. <S> Is it still about 9 volts? <S> If the battery voltage has fallen, you know that the battery will not provide the power you need. <S> If the battery is good, but the regulator output has fallen, you know that the regulator cannot provide the current required. <S> If both the battery and the regulator are working correctly, the servo is not providing enough torque. <A> Your piddly 9v battery isn't going to cut it. <S> Looking at the data sheet for your servo, the stall current is 2.5 A at an operating voltage of 6V, or 15W. <S> Assuming an ESR of ~1.5ohms on that 9V battery, and even if the regulator is 100% efficient. <S> The voltage drop alone would be 1.5 <S> *1.667 = <S> ~2.5V. <S> Which means under load, the voltage of the battery would be ~6.5V. <S> The dropout voltage of the LM2596 seems to be around the 1V-1.5V range. <S> Your regulator would have long stopped giving power. <A> Current Current Current <S> Its not always about voltage Take a good battery <S> I suggest 12v 2000 <S> mah Lithium ion Battery <S> Give it to a Voltage Regulator to reduce it to 5v or 7v depending on your requirement, Make sure the Voltage Regulator can o/p a max of <S> 1 amps current <S> Let us know if it still does not move :)
| Get a beefier battery :) http://www.electronicoscaldas.com/datasheet/MG996R_Tower-Pro.pdf
|
What's the name for a switch that opens its contacts when pressed? The title is probably already enough info. Just an example: Imagine a power button on the front of a computer that is always connected except when pressed, it disconects for a brief moment. <Q> simulate this circuit – Schematic created using CircuitLab <A> Most pushbuttons are open when left alone, and pushing them closes the electrical connection. <S> These are called normally open . <S> Normally closed pushbuttons do exist, but will be harder to find and more expensive when you do. <S> Nowadays, pushbuttons are usually just inputs to microcontrollers, so their polarity doesn't matter to their function. <S> The micro can tell whether the button is pressed or released at any time, and then take the appropriate action. <S> For example, you could use a normally open pushbutton into a micro, which can then interrupt power to something else when the button is pressed. <S> Even without a micro, you could use a relay that allows power to flow when not energized. <S> Pushing a normally open pushbutton would energize the relay, which would interrupt power. <S> This has the advantage of the power and possibly high voltage not being near the pushbutton where you have to worry about proper isolation. <S> The pushbutton also need not be rated for the full power current. <S> It only needs to handle enough voltage and current to energize the relay. <A> Such a switch is called normally closed . <S> Also, pushbutton is a better word than switch, because a switch will remain in its last positions whereas a pushbutton will return to its original position once you release it. <S> This normally closed pushbutton opens its contacts once you push it. <S> It makes a contact again once you release it. <S> The switches you consider "normal" are called normally open and make a contact once you push them.
| That's called a normally closed pushbutton .
|
High Power LED Strobe making a Whining Noise when powered by a PWM signal I am trying to control/fade a couple of High Power LEDs, these are basically 12V 18W LEDs inside a nice package . I want to use an Arduino and a N-Channel MOSFET to adjust the brightness. I tested the LEDs by directly driving them from a bench power supply and controlling the brightness by adjusting the voltage (between 0-12V) and it worked just fine. I then moved on and used the N-Channel MOSFET to control the LEDs by setting an arduino PWM-pin to the Gate-pin. I am not at all an expert but I think that should do it and it indeed works. Setting the PWM from the Arduino controls the MOSFETs Gate and adjusts the brightness but here is the strange thing that happens. The LEDs are constantly making a whining noise when I lower the PWM. Now the noise is actually not that bad but I am worried that the LEDs will eventually die out because something is certainly not right. Any idea on what I am doing wrong? Please don't suggest that I should move on to other ways of driving these LEDs as I don't have access to much electronics. <Q> That LED has a constant current source inside of it. <S> That is why it is rated for 9-32 Volts. <S> It is probably the current limiting circuitry that is making noise. <S> PWM makes pulses. <S> When you controlled the brightness with the potentiometer and the MOSFet, you could lower the voltage to below the limits that the regulator in the light could handle - it would get dimmer. <S> That would be in the range from 0 to 9Volts. <S> Above 9Volts, the brightness should pretty much remain stable - if the notes on the web site are to be trusted. <S> Using the PWM signal from the Arduino is turning the power to the light on and off completely. <S> This is often done to dim LEDs. <S> By using a fast pulse rate with very short on time, the LED is only lit for a very short time and appears dimmer - but it is still being driven with its full voltage and current. <S> I don't know what that unit has for a regulator, but it seems to have at least one inductor or maybe a capacitor. <S> These can whine when driven with a pulsed signal. <S> The short of it is that it probably won't hurt the LEDs but may destroy the current regulator. <S> That thing also seems to have been produced by some El Cheapo chinese manufacturer, so no guarantees that it will live long anyway. <S> I don't think you can (easily) fix the whining. <S> That light isn't made to be dimmed. <S> It is made to provide a constant light output over a wide range of input voltages. <S> The regulator in the light isn't made to run on voltages under 9V, and it isn't made to be pulsed. <A> According to official documentation of analogWrite() function, which you're most probably using, the frequency of the PWM signals on most arduino pins is 490 Hz. <S> This is well inside the audible range, meaning it may be transformed to sound when applied to certain components (typically inductors). <S> If the sound doesn't annoy you, it's probably fine to ignore it. <S> Otherwise, you'll have to design some sort of low-pass filter. <S> I'm having a hard time imagining how to design such filter efficiently though. <S> Another solution would be to find LEDs which make less noise. <A> In about 99.5% of cases, when you hear a PWM or SMPS controlled device "whining" it's actually a design problem of the PWM/SMPS itself, where its switching frequency was allowed to cross into the audible frequency range. <S> If you get your PWM controller to operate at >100KHz, you should eliminate any noise that you can hear. <S> For more info on the subject, here's an article where someone copied a few related posts from another SE site. <A> You need to have at least 1.5 Khz. <S> Right now its at 45 hz. <S> You need to up the freq to at least 1.5 khz
| The Whining is caused by the low frequency of the PWM signal.
|
Connect Ring.co doorbell to Loxone controller I've a ring.com doorbell which can be connected as shown in the diagram on the right. My goal would be to replace the chime in that diagram by something that can replace the push button in the left diagram. What would that "something" be? I hope the above makes some sense, I've only a basic electronics knowledge. <Q> The best solution would be to simply connect the wires connected to the pushbutton in the left diagram across the two screw terminals on the right diagram. <S> No diode is necessary. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> Because there is a diode across the terminals in the right diagram, it suggests this device is using a transistor internally instead of a direct connection to the mechanical button that the user pushes. <S> Since the diode is there to protect the transistor from damage due to driving an inductive load, it will not be necessary in your application as the microcontroller is not an inductive load. <A> Then take a 24v line from the Loxone to the Common of the relay and return from the Normally Open Contact to a Digital Input on the Miniserver. <S> When the Ring doorbell is activated, the relay should energise and you will have an electrically isolated digital input to the Loxone. <S> No worries. <A> I failed to get something working based on the above electronics. <S> To solve the issue, I've created some software that is able to poll the status of the Ring doorbell and trigger anything upon detecting a ding. <S> The code can be found on Github: https://github.com/jeroenmoors/php-ring-api
| I think it should be possible to connect the coil of a suitable relay (Ring suggest bell power supply can be from 8v to 24v) across the terminals of the chime (the same terminals where the diode shown is connected.
|
What is more accurate, thermistor's R-T table or Steinhart-Hart equation? If I want the conversion of thermistor's resistance to temperature to be as accurate as possible, should I refer to a table or use the Steinhart-Hart Equation ? I am in doubt because a table contains many reference points and thus with interpolation you should be able to get an accurate result. On the other hand, by measuring resistance at 3 different temperatures, you get an approximate relationship between R and T for the exact unit you are going to use, and not a general set of data as is the case in a datasheet provided table. On the other hand, it is still just an approximation of a very nonlinear function. If thermistor tolerance is critical in answering this, I would assume a 1% tolerance. <Q> None can be more or less accurate. <S> They are just two different methods for the same result. <S> Choose look-up tables, when you need speed, but there is plenty of flash memory. <S> Choose the equation when you do not have the memory, or you have excess of computational power. <S> Why none is more accurate than the other? <S> Because both methods need you to insert them data, so they can be as accurate as your data are. <S> If you get better data for the one method then this will be better. <S> Less data to input, that are likely provided by the manufacturer. <S> The table will be slightly more accurate, but just in theory. <S> This is because you create the table using actual measurements and not a theoretical model (that may not be absolutely perfect). <S> Keep in mind that this is very difficult to be done in an accuracy being significant better than the equation, due to measuring errors. <S> And even then the part tolerance will dominate. <S> If you need more accuracy, just do not use thermistors. <S> (Your tolerance will be even worse than 1%, because of noise, ADC tolerance etc...) <A> Usually the published tables are simply derived by evaluating the 3 or 4-parameter S-H equation at fixed points with the results rounded for presentation. <S> That's true of general purpose thermistors- <S> specialized scientific types may be individually calibrated. <S> As such, it is more accurate, especially at intermediate points, to evaluate the equation, however in practice if the interpolation is done well <S> and there are enough points the thermistor tolerance and other errors will dominate. <S> You can take the equation and create your own table- <S> for example if you have only a 10-bit ADC you only need (at most) <S> 1024 entries, which is quite reasonable even with a small micro (and <S> no interpolation at all is required). <S> This trades off memory vs calculation time and perhaps some code space (the latter is more likely to be of significance in 4 and 8-bit micros where more of the math library will be linked in). <S> Usually speed is of little to no concern with temperature calculations. <S> Consumer devices tend to use a high resolution (~13 bits) ADC and evaluate an equation. <A> It really comes downto the resources you have available. <S> This is a classic Space Time Tradeoff . <S> Do you do the calculations ahead of time to generate a lookup table, a table that takes storage Space <S> BUT is very fast to access. <S> Or do you calculate on the fly if you have the Time to spare to calculate it (MIPS availability). <S> There is a third option. <S> If you are really only interested in accurate temperarature over a small range, treat the range as linear. <S> This comes at the expense that above and below the range limits the reading looses accuracy. <S> This is suitable if you are after an over-temperature warning.
| The equation is the most easy way to get accurate results.
|
If two components on same net both require capacitor do I need to put it twice? This is a pretty simple question, I'm guessing its a not so simple answer. Basically I want to know if I have two chips on my board, and on each of their data sheets it calls for a 0.1uF capacitor to be connected to the Vdd and Vss, do I need to add two 0.1uF capacitors? what if they are far apart on the board? Also what if one calls for a 4.7uF and the other calls for a 0.1uF on VDD then what do I do? UPDATE:I feel I need to include more information to help guide the answers. I have several components all connected to either AVDD or DVDD and they all call for various capacitors, such as several needing 0.1uF, several needing a 10uF, another needing a 4.6uF and a few needing a 0.1uF and a 1uF all connected to AVDD. all within an inch or two of each other. What approach should I take? <Q> Yes. <A> There are plenty of very good bulk/bypass/decoupling capacitor answers on this site: Decoupling caps in circuit schematics difference <S> Where did the value of 0.1uF for bypass capacitors come from? <S> "two bypass/decoupling capacitors" rule? <S> For rather simple boards, I like to think of it two ways: I need bulk capacitance for power supply integrity and I need bypass capacitance for EMI/Noise/Signal Integrity, and I attack them separately. <S> Each IC will be like a (literal and figurative) island where you decouple according to datasheets and keep everything nice and tight. <S> Each IC can generate its own noise, so it should have a bypass capacitor to keep that noise within the island. <S> 0.1uF, 0.01uF, <S> etc. <S> caps keep the higher frequency stuff contained and should be dealt with first. <S> Laid out closest to the pins that need them and laid out first for the shortest distance. <S> Many times you'll see these caps called out on a datasheet and explained in detail. <S> Secondly, you can consider what you'd call "bulk" capacitance for power bus ripple. <S> These are typically your larger capacitors that will be most helpful for slower, stronger switching currents. <S> These are usually called out on datasheets for individual ICs like MCUs, opamps, etc. <S> but will also be called out on your power management ICs. <S> Those 10 uF caps you see called out (like below) <S> are more like those bulk capacitors <S> You end up with a lot of duplication of capacitors as you add more ICs to the board and as you get more savvy <S> you'll get a feel for which ones can be removed or changed safely. <S> As a starter, I would place every single capacitor recommended and see what you end up with. <S> In your case, for example, it MAY be possible to take that 4.7uF cap and change it to a 10uF cap to save a line on your BOM. <S> Or remove a few 1uF and 4.7uF caps and replace them with a lower number of 10uF or 47uF caps. <S> Steps like that should be either simulated beforehand and/or tested on the bench to see their impact. <A> Every IC should have a 0.1µF decoupling capacitor as close to it's VCC and VSS as possible. <S> Don't skimp. <S> The 4.7µF is a beefier filtering cap, and should be in addition to the 0.1µF cap. <A> In some applications, you may need to go a step further and place one capacitor per power pin. <S> The schematic would look something like this: <S> Then in the layout, you would try to place each cap as close to the particular pin as possible.
| The idea is to place these capacitors as close to the device as you can, in order to create a "local" reservoir capacitance, isolating the instantaneous current draw from loading down the rest of the PCB.
|
How do I know what power supply to use with a circuit? I've bought this tiny microcontroller called a Photon . It comes with a micro USB connector for powering the device (which I am connecting to my computer). I've read somewhere that the maximum voltage that can be applied to the pins of the device is 3.3V. I'm an electronics newbie. The Photon did not ship with a power adapter. I want to connect it to a wall socket so that it is always on. I'm thinking of using a 5V 1A iPhone adapter , but how can I be sure this will not destroy the circuit? In general, is there any way I can know what adapter is safe to use with a circuit? Here is an image of my device: <Q> The required voltage of 3.3V is generated on-board from the 5V supply. <S> The maximum voltage for the inputs is 3.3V. <S> You can find the datasheet here: <S> https://docs.particle.io/datasheets/photon-datasheet/ . <S> In general you should try to find the specification. <A> This approach will generally work for DC supplies: Does the circuit require constant current (rather than constant voltage). <S> e.g., certain LED configurations? <S> Then go to Constant Current . <S> Otherwise use <S> * Constant Voltage <S> **. <S> Constant voltage <S> What voltage does the load require? <S> What is the maximum current of the load? <S> Use a supply of the required voltage with a current rating of at least the maximum current of the load. <S> Constant current <S> What is the current required by the load? <S> What is the voltage across the load when that current is running through it? <S> Use a supply of the required current with an output voltage of at least the required voltage. <S> In your Photon case it is powered by USB which always has 5 V on the red and black wires. <S> If the chip requires 3.3 V then there must be a voltage regulator on the Photon. <S> So let's apply the Constant Voltage approach: <S> The load requires a 5 V supply. <S> The Photon will require very little current (a few mA) <S> but the loads it is controlling could be much more - let's say 20 mA per LED <S> and we have ten, so <S> 200 mA. <S> 1 <S> A (1000 mA) <S> USB chargers are readily available. <S> One of these will do fine. <A> USB is a standart. <S> It means all USB power supplies all over the world <S> must provide 5v between power and GND rails. <S> On the power specifications, you can always find that information on the datasheets. <S> Also, you can always use an adapter with a higher rated current. <S> The other way around depends on the actual needs of the product. <S> So, you can use a 1A adapter instead of a 200mA, but not the opposite, unless the product draws less than 200mA.
| This board must be using a voltage regulator to provide 3.3v to the micro-controller. The board can be powered via USB, so the 5V adapter is OK. You can also look at the schematics and the specification of the parts.
|
In any electrical equipment having single ph 230 v ac supply ,if neutral and earth wire exchanged then what will be the consequence I am handling the supply in a locomotive coach and have noticed that the neutral and earth wires have been accidentally flipped,inside the appliance(hot case) is there a problem from the safety point of view? <Q> There is a problem. <S> Generally the neutral and earth are connected at source. <S> On fixed installations (e.g., your house) this may be the local transformer or at your meter-box, depending on local regulations. <S> On your coach the generator / alternator most likely has its neutral connected to the chassis. <S> The advantage of this is that we no longer need to fuse the neutral line as a short circuit between it and chassis will not cause high current to flow. <S> On the other hand, a short from live to earth will cause a high current to flow and it will be detected when the fuse blows. <S> simulate this circuit – <S> Schematic created using CircuitLab Figure 1. <S> Properly wired system. <S> Consider what happens in a correctly wired system. <S> If the live wire falls off the load and touches the metal case a large current will flow to earth. <S> If the fuse is correctly rated it will quickly blow disconnecting the live supply. <S> An RCD / ELCB will protect against this type of fault, but that's another question . <S> The earth wire keeps the case at the same potential as the chassis. <S> simulate this circuit Figure 2. <S> Swapped N and E on LAMP2. <S> Things get much more interesting and dangerous once we start mixing up N and E. <S> In the example shown in Figure 2 all appears well to the user and even the electrician doing a voltage test. <S> simulate this circuit Figure 3. <S> Broken neutral - live equipment case. <S> Figure 3 shows one potential scenario. <S> The neutral wire has broken. <S> SW1 is on so the N wire is connected to mains through LAMP1. <S> LAMP2 is lit as it has a return path to the generator. <S> LAMP2's case is connected to the now live part of 'neutral' circuit. <S> Anyone touching LAMP2 is in danger of electrocution. <S> It's best to keep neutrals and earths properly connected. <S> See my answer to <S> Why don't we use neutral wire for to ground devices and earth wire for closing the circuit? <S> for answers to a similar question. <A> Probably nothing. <S> However, "neutral" may not be exactly at Earth potential. <S> In most wiring codes, the neutral goes back to the transformer feeding the immediate locale. <S> You take a risk doing this, as "neutral" can vary in voltage, depending on the type and number of loads present. <S> In any case, wiring the coach's ground to the neutral wire almost certainly violates electrical code. <A> High voltage wiring in ships, planes and trains using dedicated return (neutral) line. <S> Earth in technically the chassis of the vehicles. <S> Although the neutral is also connected to the chassis around the transformer location, it doesn't mean the chassis can be considered as the neutral. <S> The very important reason why this is not allowed in wiring codes is because the chassis cannot be trusted as the good conductor. <S> When the chassis is used as neutral (return line), if the return current encounter high impedances, voltage drop will occur and resultant voltage differences in the chassis will be a very serious safety hazard. <S> People accidentally exposed to this voltage may died electrocuted. <S> High current in poorly conducting joints will generate excessive heat and create fire hazard. <S> To put in general term, the answer for the question is, Don't Do It...!! <A> Of course, it's a big safety problem. <S> The earth is to protect the electric hazard if a device malfunctions, the current may not flow trough earth wire if everything is OK. <S> Now let's suppose that somehow the neutral wire is diconnected (in your specific case where the earth is connected instead the neutral) the entire case will have live on it, this of course is death dangerous.
| If the neutral shorts to the case the fault may not be detected and the current may split between the neutral and earth wires.
|
How do I store and transport microcontroller boards safely? I'm looking for a carrying case for my various electronics components, mostly various microcontroller boards (Arduino, Teensy, etc). I've seen a lot of people use plastic tool boxes, sometimes with foam inserts. Do these present a problem with ESD? Is there a particular type of plastic I should look for that has lower static buildup? <Q> After that, it doesn't matter as much what you use to protect them mechanically. <S> Any sort of plastic or cardboard box will do, but preferably one that doesn't generate a lot of static. <A> "Anti-static" bags are one thing. <S> Dave Jones made some testing ( https://www.youtube.com/watch?v=imdtXcnywb8 ). <S> Really worth watching. <S> In general the grey ones dissipate charge while the pink ones don't. <S> In the case of foam cutouts - funny enough that I've seen those in both grey-black and pink versions (the grey ones being used in high-end electronics). <S> They might be made of the same materials, but that's just a wild guess. <A> Remember that loose components are more static sensitive than assembled boards. <S> This is because the power supply protects the circuit against static. <S> I use a component box with normal plastic trays lined with conductive foam. <S> This should be fine for hobby use. <S> c-:
| Each board should be in its own static-shielding bag, preferably the metalized type (shiny gray color).
|
How to choose proper size of high power DC cable connections I can't understand how to properly calculate AWG of a cable working in DC at high current: I found several tables for AC, but I don't know if/how they can be applied to DC. My system is rated 70V/100A; I think I should use at least 16mm2, but how to be sure? Example tables: http://www.carnevale.bz/wp-content/uploads/2012/cataloghi/Cavi_Speciali/BERICACAVI/BERICACAVI2011_CaviSpeciali.pdf http://www.bericacavi.com/site/index.php?option=com_content&view=article&id=59 I read about "ampacity", but it too is applicable to AC and I can't understand if it is also useful for DC. I also can't understand on which length are awg/ampacity tables calculated: shouldn't AWG also depend on line length?!? On my specific system I have cables long at most 1 meter, and I want to be sure they don't get hot, as they are enclosed in plastic with no air cooling and they must tolerate safely 100A continuously for several minutes. <Q> An amp of DC current through a cable will generate the same# heating as an amp of AC current through a cable. <S> (# Actually slightly less. <S> The resistance of a cable at DC is less than at AC. <S> This is because there is no AC skin effect so the resistance is a few percent less.) <S> If you select a cable for DC current, using AC cable sizing guides / cable ampacities, your DC cable size will be conservative with respect to heating. <S> Note that various de-rating factors apply based on the installation environment of the cable. <S> Proximity to other cables (which produce more heat), installation in a enclosed air space (which reduces air circulation i.e. cooling air), etc. <S> In Australia, the standard AS/NZS 3008 "Selection of Cables" covers all these de-rating factors in great detail. <S> Voltage drop is calculated using Ohm's Law and the DC conductor resistance. <S> The DC cable resistance is published in all respectable cable catalogues. <S> This includes AC cable catalogues - the DC conductor resistance is still published. <S> The resistance is usually given at 20 degrees C, adjust it to your maximum operating temperature using the temperature coefficient of resistance. <S> If your cable catalogue does not mention a maximum operating temperature, it is approximately 75C for PVC insulation, 90C for XLPE, and 110C for special high-temperature cable <S> i.e. 110C-rated EPR cables. <S> Finally, for high voltage <S> DC cabling there might be special considerations <S> - normal 0.6/1kV AC power cable might not be suitable for 600V DC. <S> I seem to recall that DC puts a different kind of stress on insulation than AC does. <S> In your particular case, you are only dealing with 70 VDC <S> so I wouldn't worry about it. <A> The two things to consider with sizing cable are: 1) Self heating due to resistance. <S> Voltage drop. <S> Since you know what your max amperage is, size the cables for that. <S> Or find a table that has done this for you . <S> In the table they have already 'derated' the cables for self heating and other factors. <S> Once you have the resistance you can use P=I^2*R to find the self heating. <S> 2) Voltage drop. <S> If your application requires a certain voltage, then the voltage drop across the cable can become a problem (not in your case since the cables are so short) <S> You may have to take into account the inductance of the cables if your application requires it. <S> (which is probably negligible in your case because the wires are short). <A> Although I didn't find an official table for sizing DC cables, I found a precise explanation about the answer from @Li-aung Yip, " If you select a cable for DC current, using AC cable sizing guides / cable ampacities, your DC cable size will be conservative with respect to heating. " <S> : <S> http://www.mondini.com/system/files/documenti/Manuale%20Tecnico%202012.pdf <S> This document explains how to calculate current in DC, AC/mono and AC/3 systems: <S> DC: I = <S> P/V AC/1 <S> : I = P/(V*cosF) <S> AC/3 <S> : I = P/(V*1.73*cosF) <S> This means that, for same voltage, DC current is greater than AC/1 and AC/3 current; hence using wire sizing tables for AC current is safe also for DC systems , because cable heating is directly proportional to current carried by the cable, and the target is to prevent cable from overheating. <S> For my specific system, rated 70V/100A and enclosed into an electric scooter, I assume as applicable the table at p.22, column "posa interrata in tubo" ( <S> cables enclosed in pipe), sub-column "3 cavi unipolari" (three single-wire cables), as probably the ground thermal resistance is equal or greater than the thermal resistance of plastic case of the scooter. <S> For 100A I get a 25 mm2 section. <S> "AWG 3" is 26.7 mm2, so the final answer to my question is: Cable section required for a 70V/100A DC system is:AWG3 / 25mm2 <S> But on an electric scooter there are actually both DC and AC: DC goes from battery to controller, but controller creates an AC current which drives the motor; so, for same voltage, I think that cable size from controller to motor (three cables) can be slightly less than battery-controller cable size. <S> Unfortunately I don't currently know the frequency of the motor current and the anount of CosF. <S> How do I know which current is in use on my system? <S> My scooter is rated 5000 W, but I also "manually" calculated the current needed to maintain a 90 km/h speed on flat road; I assumed 0.8m2 frontal area and 0.8 Cd for the scooter+driver system. <S> This leads to 6000W needed ( link ) <S> .Scooter <S> uses a 60V LiFePO4 battery, with actual operating voltage between 56 and 66V <S> ; 6000W/66V gives 90A, rounded to 100A.
| Calculate the resistance from the cable length, you can use cross sectional area of the wire to estimate the resistance.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.