source stringlengths 620 29.3k | target stringlengths 12 1.24k |
|---|---|
Can a laser display numbers like an LCD 7 segment display? Possible Duplicate: Is there a way to convert a 7 segment display to be displayed by a laser beam? I am a 12 year old child with a growing interest in electronics. I want to have a laser project numbers like a 7 segment display. Is there a way to hook a 7 segment display up to a laser to have the laser display the numbers onto a flat surface? The design needs to be as compact as possible. Do you know if maybe there is an electronic converter or way that can be used to hook it up in place of the 7 segment display? Like this: Binary for the 7 segment display -> ??Mystery part described above??? -> Laser display module. I just started electronics a few days ago, I've got some grasp on the basic stuff, but I could really use some help here. I have a very limited amount of resources available and needed to ask people who know what they're doing. <Q> Laser displays, at least for entertainment, generally involve the following components: <S> Laser: This can be any of several types. <S> If you want a full-color display, often two or more lasers are employed with combining optics to achieve a white light. <S> HeNe produce red, Argon produce blue-green, etc. <S> The size of the display intended determines the size and power of laser needed. <S> I've seen small displays that use diode lasers, and large displays that use 10W lasers that require exciters and water cooling. <S> Scanner pair: A scanner pair is essentially a pair of servo motors with first-surface mirrors mounted to them. <S> One acts as a bounce mirror to control the X-axis while the other controls the Y-axis. <S> The scanner pair "aims" the beam at the desired point on the display surface. <S> Blanking: You will need a way to blank the output. <S> Imagine a "C" shape, if you draw such an arc from top to bottom, if you do not blank the output while traveling from the stop point back to the start point, you will wind up with a backward "D". <S> Blanking is therefore done to cause the light output to stop while positioning the scanner pair during periods of travel that do not involve drawing. <S> This can be done with a PCAOM or, with some lasers, actually switching them off. <S> High-power lasers cannot be switched at a high frequency, but diode lasers can. <S> Color selection: <S> A PCAOM (Poly-chromatic Acoustic Optic Modulator) is essentially a crystal that can deform its shape based on an input radio frequency. <S> Some can act as a blanking device, to bend light such that it is not aimed at the scanner pair. <S> A PCAOM takes an input of white light, and allows the output of a specific color. <S> It is essentially a variable prism. <S> Controller: <S> A computer or microcontroller is required to coordinate all of the above. <S> You need a way to orchestrate the motion of the scanner, the color or blanking of the beam, and generally at a high frequency. <S> The dimensions and viewing distance of the display surface govern these requirements. <S> There are other ways to use lasers to project images, but this is the way I am familiar with. <S> If you research these topics, I think you will find that you can focus your questions more specifically. <A> There's no need to apologise for asking any question at all, that's what the site is here for :-) <S> Okay, about the laser display - it would be possible to have a laser project numbers onto a flat surface (has been done as I'm sure you know) but not by connecting a laser to an ordinary 7 segment display, no. <S> I think what you mean is the 7-segment driver rather than the display, which is just a bunch of LEDs arranged suitably. <S> The way to do it would be to use something like a piezo controlled mirror arrangement with the laser (moves the mirrors slightly to reflect and move the laser point) and scan the display like an old CRT <S> (Cathode Ray Tube) TV does, turning on the laser at the appropriate times. <S> I think there are a couple of laser projection modules out there that do something like this to project video onto any flat surface. <S> The above would be a pretty difficult project for an experienced person, and I'm not aware of any dedicated chips that would do the job of driving the laser and whatever moves it (i.e. anything like your mystery part) <S> Microcontroller knowledge and experience with various types of digital/analogue circuitry would be necessary - although the actual concept of building a picture gradually is not so difficult, the implementation is. <S> You might want to check out POV projects ( example , example 2 ) which are a bit similar but much easier to make, plus there are kits and plenty of info available out here. <A> There are several commercial "virtual keyboards" based on this concept, such as this one from Brookstone . <S> Another example is the spinning hologram in a supermarket UPC scanner that sweeps a laser beam in a complex pattern to pick up the bar code at any angle. <S> However, each such hologram is static; to project a different image requires a different hologram. <S> To simulate a 7-segment display would require a separate hologram for each segment, or a series of holograms that contain all 7 segments for all of the digits or characters you want to display. <S> These holograms could be mounted on a spinning disk, and the laser could be strobed to select the correct images.
| Another way to project an image with a laser is to use a hologram.
|
how to build a circuit that compares two potentials? I want to build a circuit that compares two potentials, in principle, it works like so: basicly, the circuit gets 3 intputs, p1, p2 and input, and has one output, output.the potential of p1 would be, p1 and the potential of p2 would be, p2. when p1 and p2 are not equal, output's potential is 0, which means, no potential. when p1 and p2 are equal, input and output are "connected" and output's potential equals to input's potential.but if p1 and p2 are suddnly not equal (after they were equal, which means that input and output are "connected") input and output will still be connected, up until input's potential turns into 0.(if its more comfortable, i wouldn't mind adding a four'th input that would "disconnect" input and output. for example whenever it has a certain potential, input and output will be "disconnected") EDIT: Some information:input's volt is 5V. the potentials vary based on the resistance the wires go through when they connect the p1 and p2 inputs, the resistance comes from a simple photo cells. <Q> around 0.48 and 0.52 times the input voltage of the divider. <S> Then use a :2 divider to get the other input voltage at 0.5 times its value. <S> Then if the difference between the two voltages becomes larger than about 5% the output will go low. <S> You can use the output to drive a small relay through a transistor. <S> Like ThePhoton comments the comparators have to be open drain/open collector types. <A> What you ask for can't be realized. <S> There is no way to determine equal voltages, and in reality no two signals are really ever equal. <S> It is possible to detect whether they are within some voltage difference, but that wouldn't be detecting "equal". <S> As for the overall logic, there are various possible approaches. <S> The best way to solve this is to pop up two or three levels and explain the problem you actually want to solve. <S> It seems you have for some reason latched onto this solution that requires this strange box, but most likely the best solution is a different approach at the high levels. <S> In any case, you will have to specify the voltage levels, error tolerances, and speed reuired. <S> The simplest way to implement something like the box you asked for is with a microcontroller. <S> However, I can't recommend that or any other implementation without knowing how fast the system must respond, what the error tolerance on "equal" really is (if you have one, if not this can't be done). <A> For the comparison you need two comparators. <S> One that checks that p2 is at least a little more than p1 (as Wouter van Ooijen said, you need to allow a range around p1). <S> The other checks that p2 is no higher than a little more than p2. <S> Then an AND gate to see if both are true. <S> Some TI comparators will help.
| You need a window comparator like this: If R1 and R3 are equal and 10 times R2 you have reference voltages
|
Circuit amplifying a position sensitive detector I have a position sensitive detector (PSD), S3979 , which outputs a small current. I'm trying to amplify this current so that it becomes measureable. The circuit below can amplify sinus waves using a function generator, but I doesn't appear to work for the PSD. What's wrong, how can it be fixed? <Q> The cap has to go. <S> The diode needs to be reverse biased, and with the cap in place, its not. <S> Do you have the Anode going to ground, or the cathode? <S> It should be the anode. <S> Also, R1 should probably be removed. <S> Your photodiode is functioning as a current source which will generate a voltage through the feedback resistor alone. <S> R1 does nothing but generate another voltage drop which will lower the back biasing of your photodiode. <A> google yields this: On-Trak - Detector-Amplifiers <S> As I said in a comment, these are not usually used as photovoltaic diodes, but as reverse biased photo-diodes. <S> The schematic in the link above makes that pretty clear. <S> They are actually pretty cool devices, giving a signal that tracks a laser dot's (or any light dot) position by delivering the photocurrent current proportional to how close the dot is to an anode. <S> I have used them before. <S> Even with a dot that could not be resolved by eye, they give a good position by averaging the light intensity profile. <S> Although you will get a voltage on the diode when light hits it, that is not usually how they are used. <S> Check out the On-Trak schematics <S> : Almost certainly those op-amps have power rails above and below ground, though, and in your schematic your negative rail is ground, so your 1v on the <S> + input is correct. <A> In which case, eliminate C1 and return the position sensor cathode to your "analog Gnd" (junction of R3 and R4) rather than the negative supply rail. <S> This ensures the input voltage is within the valid range for the TL071. <S> It would also be a good idea to reduce noise by decoupling this "analog Gnd" with a 10uf capacitor to 0V.
| Set it up with reverse bias, and set your op-amp up for current input, as Scott Seidman said (the current amp part, not the tie anode to ground part). I suspect the AC coupling is the problem.
|
ESD sensitivity of P-channel MOSFET vs N-channel It is well documented that N-channel MOSFETs are extremely sensitive to ESD damage. I've personally killed more than one. Are P-channel MOSFETs just as sensitive? I'm thinking that, since the gate sources electrons rather than sinking them, it wouldn't be, but I don't have the background to confirm that. <Q> That's a loaded question-- <S> so here is a loaded answer. <S> Does it matter? <S> Of course it doesn't. <S> You should be treating all semiconductors with proper ESD handling procedures, and making your designs have the proper ESD protection. <S> It doesn't matter if X is more sensitive than Y-- <S> they are both sensitive, and both require proper handling procedures and proper designs. <S> Even a device that advertises as having ESD protection, or even something like discrete ESD protection diodes, should be handled as if it were sensitive to ESD. <S> Remember: ESD does different levels of damage. <S> A part can be damaged by ESD and not show any obvious signs, but then at a later date that damaged part could start failing and you won't know why. <S> Now, is there a difference in ESD sensitivity between N and P Channel MOSFETs? <S> I have no idea. <S> I do know that there is a huge variation in sensitivity between different MOSFETs of the same channel type. <S> MOSFETs from 20+ <S> years ago are much more sensitive than newer designs. <S> But even that is not a guarantee. <S> The point being, I don't think that the difference between P and N channel types is significant, given that there is already a huge variation. <S> And since you should be treating all semiconductor devices with care, it really doesn't matter even more. <A> Are P-channel MOSFETs just as sensitive? <S> I'm thinking that, since the gate sources electrons rather than sinking them, it wouldn't be <S> A key point worth mentioning is that ESD voltages come in both polarities, positive and negative. <S> So the normal function of the device (whether current is normally going "in" or "out" of the device) isn't really a factor. <S> The ESD could come along with whichever polarity is more "unusual" for any particular device. <A> An EOS (Electrical Over Stress - of which ESD is one part) event damages a device by imposing an electric field that is too high for the device. <S> That in itself may be sufficient to damage the part, but once current starts to flow from the device breaking down, heating then become the dominant effect. <S> GOX (Gate OXide) is the most sensitive aspect of a MOS type transistor but S/D's and various junctions can all be damaged, as well as contacts, wiring and interconnect. <S> If it cannot support the current. <S> However, because of the mobility differences PMOS transistors tend to be 2.5 X larger <S> that NMOS devices to match the transconductance of the devices. <S> In some cases this may help protect against an ESD event as the capacitance is also 2.5X higher and for a fixed charge transfer the generated voltage will be 40% and thus the E-Field will be 40%. <S> However, there are process specific reasons why having a larger gate area might also hurt the PMOS. <S> EOS can damage the device without any noticeable/visible effect on the device if it causes a shift in operating conditions. <S> Like if the GOX is compromised but not fully ruptured. <S> In CMOS devices the GOX breakdown is principally what limits a given process voltage of operation and this scales (mostly) linearly with GOX thickness. <S> So a finer process, means thinner GOX means lower voltage. <S> So a 90 nm process might have 2 nm thick GOX and an operating voltage of 1.1 V. <S> Which is an E-field of 500 MV/m and only the equivalent of 12 bond lengths - approx - it is amorphous. <S> I that same process the threshold voltage could be in the range of 300 mV to 500 <S> mV. <S> If you are talking discreet devices, you have no way of knowing if the processes are comparable, even from the same manufacturer. <S> ESD is a complex subject with many variables in the process and many failure mechanisms. <S> As the other answers have suggested, treat everything as ESD sensitive.
| I would guess that the variation between MOSFETs of the same channel type is much greater than the variation between N and P channel types. If PMOS and NMOS are made in the same process (mainly the GOX being the same thickness) then there is no difference between in the native sensitivity of the Gate to EOS in processes less than 0.35u.
|
Modifying an automotive 12V power outlet to disable power when car is off? Recently, on a business trip, I had a rental car. Now, in my car, all of my 12V power outlets are always on. On the rental car, some of them were always on, some of them were only on when the car was on. Is there a way that I could hack my existing 12V outlets to either have some of them only be active when the car is on, or better, add a simple toggle switch that will toggle them between running always or only when the car is on? <Q> You'll need a service manual for your car that has a complete wiring diagram. <S> Check first before you buy one, as many only have block diagrams or step-by-step electrical tests instead of full wiring diagram. <S> Next, identify the 12V outlets on the wiring diagram. <S> Outlets that are on all the time are likely connected to B+ (straight to the battery) via a 15A fuse. <S> Outlets that are on only with the key will be connected to a relay that will be on with the run/ignition (IGN) or accessory (ACC) key positions. <S> It, too, will have a 15A fuse upstream from the outlets. <S> EDIT: <S> Even if your car doesn't have switched outlets, chances are that it has something that is switched on only with <S> the key is in Accessory or Run positions. <S> This is where things become very model-specific. <S> If this is a classic car where the key switch directly controls power to the + side of the ignition coil, connect your new relay coil to that terminal. <S> In the unlikely event you can't find one, find something that is switched on and off with the key, and tap the power to that device to operate your relay. <S> I'd recommend adding a separate relay and fuse in parallel with your existing IGN/ACC relay, then running dedicated 14-12AWG wire to each DC outlet. <S> You can then install an SPDT toggle to switch between the existing (always on) and new (on with key) <S> 12V supplies, with the center switch terminal connected to the DC outlet. <S> Make sure that you use a switch that is rated for 15ADC or better. <A> I've done this to my last 3 cars. <S> All of them are Ford Escape Hybrids (2008, 2010 and 2012). <S> The for the first car <S> I was in Circuit City in late 2007 to get Bluetooth installed (the 2008 model didn't have SYNC) <S> and I asked the installer to switch the outlet. <S> He asked his boss if it was possible and said sure, for an extra $50. <S> When I got home <S> I took a look at what the guy did and it was exactly as I expected. <S> He simply took one of the leads to the outlet on the dash board and cut it. <S> Instead of the original source of the wire, he replaced it with a wire that ran to the fuse panel. <S> He wrapped it around the metal pin of the fuse so that it stayed in. <S> I did the same for my next two cars. <S> It's been very useful. <S> I was very frustrated by American cars where the outlet is always on. <S> Doing this has made driving an American car much more tolerable. <A> If your vehicle has a CAN architecture, it may be as easy as flipping a bit, assuming you have the appropriate tools. <A> Dodge trucks, just move the fuse over to the right side of that fuse slot. <S> They have like 3 pronged block there. <S> If over on left side, it's on with key. <S> On the right side, it's on all the time. <S> Thus allowing the consumer to decide & easily change the power plug (cig lighter/acc outlet)Good work ram truck <A> Check your owner's manual. <S> Most Fords (and Ford lines) and many Chrysers have a fuse block which will power it one way or the other, it's as simple as changing the position of the fuse for the lighter. <S> If it's another model, it may be as simple as "jumping" from an ignition controller circuit to the other, or vice versa. <S> You can do this easily with low power devices, don't do it if you are going to use it with the actual lighter, which pulls a low of juice to heat. <S> Otherwise, check YouTube for a couple of beginner videos on adding a lighter to your current auto.
| He stuck the end of that wire into one of the contacts for a fuse that's switched by the engine. The solution ends up being very, very dependent on the exact model of your car and the physical distribution of the outlets within the vehicle. Lots of iPhone accessories work better when the outlet is switched because it pauses the music when you turn off the car. As HikeOnPast said, it's dependent on your model. If it's a newer car, look first for an IGN or ACC relay. Be sure to have transient protection (flyback diode or snubber) on your relay coil if you do this. I previously had foreign cars that had switched outlets.
|
Altium: How do I flip/mirror components? X and Y don't work So this seem like a simple question, but I'm trying to flip components in the schematic editor. If I select a component then use the keyboard shortcut X or Y, it brings up a menu and does not slip the component as desired. Edit --> Move --> Flip... also does not work. Suggestions? Thanks Edit: I should have mentioned that I would like to flip groups of components as well as net labels. With net labels the connection point is on the bottom left, but would like to have it on the bottom right such that I can connect it to wires aligned right. <Q> You have to press X or Y <S> key <S> while you're holding the left-click mouse button pressed on the component and it will flip. <S> To be more explicit <S> : Left-click on the component you want to flip, keep the mouse button pressed (like when you want to move a component with the mouse) and press X or Y key to flip. <A> <A> Right-click component -> properties - <S> > check the "Mirror" checkbox (it's in the lower left-ish corner). <S> To invert, rotate the component 180°, and mirror it. <S> Edit: <S> Re - Mirroring a group of components and wires: Unfortunately, I have not found a way to successfuly do this either. <S> Re - Net-labels: Altium doesn't support much flexibility in the way of net-labels, and justifiably so, I think. <S> Net labels are grossly overused as it is. <A> Found that to mirror several components(at least in schlib), you must select all components, start dragging them, then hit "x". <S> Altium Designer 14.2 <A> My X and Y shortcuts weren't set and I had a fresh install. <S> Rather than reinstall you can easily edit the shortcut keys by doing the following: <S> Go to the top menu and navigate to Edit>>Move <S> hold ctrl and left <S> click the option you want to add a shortcut for. <S> In the pop up window, you can enter a key in the Shortcuts section. <S> Now you should have access to flip the component via the shortcut <S> key <S> you just set up. <S> Note: you still need to hold left click on the symbol then flip it. <A> I tried all the suggestions above to no avail. <S> But I did discover that when I clicked "View->Desktop Layouts->Default", the flip x and y started working again. <A> It seems like the op had an install problem. <S> I am a long time Altium user and one day X,Y (and even TAB) stopped working as expected. <S> Fearing a full re-install was at hand, it turned out to be enough to run the installer (Add or Remove Programs, <S> right click Alitum, uninstall) and select "Remove Preferences". <S> This fixed the inoperative X,Y, and TAB shortcuts for me.
| For me, with a group of components, tracks and copper pours selected, moving and typing "L" flips the lot to the other side.
|
Simplest Way to Connect an Arduino to Android (Wirelessly)? I want to control a simple Light on an Arduino from my Android. The Arduino I have down pat, no problem. However without using Bluetooth on my Android, whats the simplest way to actually connect it (or use some sort of app) to control an LED. I have Option A: Set up a Server on my Arduino, with a website that allows me to click on buttons or something to change lighting options. or Option B: Sending Serial Data from my Android to my Arduino Wirelessly? Which would probably be the easier option? Is option A even viable or not really? I don't really know the "hosting" capabilities of an Arduino, but if the Arduino is on the same Wi-Fi as the Android phone I'm using, it shouldn't have any issues receiving information (from clicking on buttons on the Arduino "webpage" correct?) <Q> Option A is feasible, but non-trivial. <S> Option B: Without using Bluetooth, there isn't any ready wireless radio serial output that any Android phones have, to my knowledge. <S> There is an option C , if the requirement is relatively close range, and purely for hobby experimentation: <S> Programmatically generate a ~ 19-20 KHz audio output from the Android's speaker, at maximum volume - Most adults can not hear such a frequency, but my android phones can all emit up to 22.1 KHz successfully. <S> Implement a basic electret microphone -- <S> > preamplifier --> narrow bandpass filter -- <S> > peak detector using op-amps, with the pass-band at the frequency of interest. <S> Use an Arduino ADC pin to sense signal from the above module. <S> Some simple enhancements: Use two different frequencies, such as 18 KHz and 20 KHz, pulsed alternately, and detect for such an alternating sound input at the Arduino end. <S> This will avoid spurious false-positives. <S> Use a slightly wider band and skip the peak detector, use the Arduino to sample and process the incoming audio signal to detect specific frequencies received. <S> This latter adds the flexibility of changing design frequencies or achieving more complex signaling through Dual-tone-multi-frequency (DTMF) protocols, similar to touch tone phone dialing, or Frequency Shift Keying as used in old dial-up telephone line modems. <S> There are several Android apps which use such sound signaling for various purposes. <S> Also, this slideshow proposes a similar mechanism, for transfer of data between Android phones using sound. <S> UPDATE: <S> This question about Infrared audio transmission / reception between mobile phones , brings up an interesting Option D , that of using an infrared transmitter connected to the audio out of the transmitting cellphone, and using a standard infrared sensor as a receptor on the Arduino. <S> The rest of the mechanism remains as in Option C, with the preamplifier, band-pass filter and so on. <A> Here are some resources for Option A:Webduino https://github.com/sirleech/Webduino (my recommendation) http://mpflaga.github.com/Sparkfun-MP3-Player-Shield-Arduino-Library/_web_player_8ino_source.html Option C: <S> SoftModem http://code.google.com/p/hijack-main/ http://code.google.com/p/arms22/downloads/detail?name=SoftModem-004.zip <S> The Softmodem is neat, I have gotten the shield but have not yet tried it. <S> As I then also need to write the phone APP. <S> Where I recently wrote option A.2 for Arduino Web based MP3 player. <S> In your case I would recommend A.1. <S> I have tried it out and its examples got me to do what you want real quick. <S> Being web based you don't need to worry about writing a phone app. <S> And webduino supports JSON. <S> For web pages to auto discover the available controls and such. <S> Where it used a lot of Arduino memory <S> and I could not combine it with my MP3 player as the SdCard library combined exceeded an UNO memory limit. <S> Option B, is simpler on the Arduino Side <S> But there is not alot out there on getting it connected to the phone's usb. <S> And on the Phone you could use a TTY or terminal emulator to talk to the phone. <S> Option D, not many phones have IR on them. <S> Option E, NFC (Near Field Communications) shields similar to RFID, but are bidirectional and can send/receive packets. <S> Also have the issue of only a few phones have them. <S> All the options other than A end up requiring an APP on the phone. <S> And then you have deal with Android vs iPhone. <A> Aside from Anindo's good answer (and genius sound idea) <S> Option A is viable. <S> Done all the time. <S> Or you can use a Ethernet shield to plug into an existing router. <S> Both of these require server code on the arduino to control the shield and receive the data from your Android phone or device. <S> Example: <S> Arduino Wifi Web Server <S> Pretty much drop in and go. <S> The other option is modifying your router so it is the server, connecting to your Arduino through a serial connection. <S> Last option, is having your computer act as the server, and connecting your Arduino to your computer. <S> All viable, and all routinely done.
| For complete wireless, you can go with a WIFI shield (and battery for the arduino).
|
Driving a 2V LED from a 1V8 FPGA IO pin (MOSFET vs open-drain) I would like to use one of my extra SDRAM bank pins to drive some LEDS. I was thinking about using a mosfet, but considering that I'm only looking at driving a LED, it seemed like a bit much. So what about this? If I configure the FPGA pin to be open drain, then will this work? I did do a search around here but there isn't anything about this particular configuration. LED forward voltage is 2V typ 2V5 max. Led load current is 6mA. Here is my backup MOSFET cct, but considering it's a 0.5W device, it seems like overkill for this particular application. Mosfet on threshold voltage is 0.7V typ and 1V max, ID is 1A when VDS is 1v5, so I think that the 1V8 should turn the mosfet on enough. It looks like the resistance is ~1.5ohm, so it's definitely on enough at VDS is 1V8. Which is better? Is there a reason why I should go with the mosfet, even if it's a higher-power device? <Q> The only reliable and bullet-proof method is to use the MOSFET. <S> But I cannot say the same thing for the open drain pin version. <S> Or the FPGA pin might get destroyed. <S> Or it <S> when you turn it off, it might only get dim and not turn off entirely. <S> A lot of this depends on the FPGA (which you didn't tell us what it is), the exact type of LED, and probably the phase of the moon. <S> The "signal path" that keeps the LED lit (dimly) when it should be off is: +3.3v - <S> > <S> Resistor - <S> > <S> LED -> <S> FPGA <S> Pin -> <S> ESD Protection Diode - <S> > +1.8v. <S> On the surface this seems unlikely since Vf of both the LED and the protection diode is greater than 3.3v-1.8v. <S> But you have to remember that Vf decreases as the current through the diode decreases. <S> So even in this circuit, there could be a small amount of current flowing. <S> Of course, the question then becomes, "at some small amount of current, will the diode be turned on?" <S> And that question is very dependant on the diode itself. <S> Using the MOSFET approach has none of these issues. <S> If I were designing a product, I would not take shortcuts and instead use the MOSFET approach. <A> The first option will work fine with an open drain FPGA pin, so long as the LED does not fail into a short: If this happens, the FPGA's ability to withstand 15 mA at 3.3 Volts will be the worst-case risk exposure. <S> As has been pointed out in comments, even operating the LED at 1.8 Volts with open drain should give visible output; whether that is sufficient for acceptable PWM variable intensity performance can only be determined by trying it out, and replacing the LED with a red LED (lower Vf) at worst. <A> David Kessner's answer explains why connecting directly to an FPGA pin is risky. <S> But you say the NDS331N FET seems like "overkill". <S> To me that suggests you find the part is either too costly or takes too much board area for the functionality it provides. <S> In either case, you can consider looking for a FET in a smaller package. <S> SC-70 is about 1/2 the size of the SOT-23. SC-89 is about 1/4 the size of SOT-23. <S> NTE4153N is one I found after a quick search. <S> SC-89 <S> package (or SC-70 <S> as the NTA4153N). <S> 1.1 V threshold. <S> 700 mOhm <S> Rds-on at 1.8 V gate voltage, and able to sink 100's of mA. <S> Another option, if you have multiple LEDs to drive, is to use an external open-drain buffer chip instead of individual FETs. <S> A drawback of this approach is I wasn't able to find (in a few minutes searching) <S> a part guaranteed to be able to sink 8 mA when powered with a 1.8 V supply. <S> For example, TI's SN74LVC06A specifies 4 mA sink capability at 1.65 V supply and 8 mA at 2.3 V, so you're left to infer that it's slightly overloaded by 6 mA at 1.8 V. <S> But if you can live with slightly less drive current, it's a part that can drive 6 LEDs, available in a package only 30% bigger than the SOT-23 of your FET. <A> Traditional red LEDs were about 1.7V forward. <S> Why the newer ones are about 2V <S> I'm not sure; perhaps newer semiconductor materials are cheaper/more efficient/easier to use. <S> But maybe older red LEDs are still available? <S> Farnell search options include Vf=1.6 or 1.7V - and funnily enough at 1.6V they all appear to be red - so if you aren't fussy about the colour and select one of these you should be fine. <S> You only have 0.2V to drop across the resistor, so aim for (say) 10ma@0.2V and expect some variation in brightness. <A> These look like they'll draw 10mA @ 1.8V and produce 50% of the brightness of their 20mA "rated current" http://www.farnell.com/datasheets/68768.pdf <S> I would think that would be bright enough for "debug LEDs" with only 2-4mA. <S> (A MOSFET looks like overkill for the other option - any old NPN bipolar should do the job easily.)
| I can tell you that without a doubt that the MOSFET will work. You may be able to get the LED to light using an open drain pin, but it also might turn on and stay on too.
|
Accessing individual I/O pin on MSP430 Im porting some software from Microchip PIC (using the HI-Tech C Compiler) to TI MSP430, and in the existing code they access the pins directly with something like: RA1 = 1; Is there a similar way to do this with the MSP430? Or do I have to write to the entire input/output register each time? If it is not possible has any one came up with a good equivalent? I am using Code Composer Studio v5.3 and the compiler that comes with that. <Q> ~BIT1; <S> /* Pin <S> P2.1 = 0 <S> */P2OUT <S> |= <S> BIT1; / <S> * Pin <S> P2.1 = 1 <S> */P2OUT <S> ^= BIT1; / <S> * Toggle Pin <S> P2.1 */ Be sure to include the proper header file for your specific chip that contains the port and pin ( BIT# ) defines. <A> TI Discussion board had a very informative discussion about the same thing. <S> In short, this is defined by the generic msp430.h header used in CCS (which is linked to the specific target chip msp430xxxx.h on compile). <S> It does not have support for PxOUT.BITy style assignments. <S> IAR's io430.h does have support for that, but the consensus is that msp430.h is the better header (as the msp430xxxx.h headers are written by TI employees, io430.h is written by IAR employees) <S> PxOUT <S> |= BITy style is the best way to set a single bit. <S> PxOUT &= <S> ~BITy <S> style is the best way to clear a single bit. <A> TI themselves does it like this in one of their examples for the Code Composer Studio (CCS) and IAR compilers: <S> void main(void){ <S> WDTCTL = <S> WDTPW + WDTHOLD; // <S> Stop watchdog timer P1DIR |= 0x01; // <S> Set P1.0 <S> to output direction for (;;) { volatile unsigned int i; <S> P1OUT ^= 0x01 <S> ; // <S> Toggle P1.0 using <S> exclusive-OR i = 50000 <S> ; // <S> Delay do (i--); while <S> (i != 0); }} <A> The following code is a workaround for individual pin access using Code Composer (with a little tweak can be ported on any compiler). <S> The example is a modified version of the Code Composer Basic Example Blink the LED.In <S> this example instead of writing the usual statement LED=1 to turn on the LED <S> you will write LED(HI). <S> //***************************************************************************//// <S> MSP432 main.c template - P1.0 port toggle////***************************************************************************#include " <S> msp.h"#define LO 0x00#define <S> HI <S> 0x01#define <S> BIT_0 0x01#define <S> BIT_1 0x02#define <S> BIT_2 <S> 0x04#define <S> BIT_3 <S> 0x08#define <S> BIT_4 0x10#define <S> BIT_5 0x20#define <S> BIT_6 0x40#define <S> BIT_7 0x80#define <S> LED_BIT <S> BIT_0#define LED_PORT P1OUT#define LED(x) <S> (x==HI)?(LED_PORT |= LED_BIT):(LED_PORT &= ~LED_BIT)void <S> main(void){volatile uint32_t i;WDTCTL = <S> WDTPW | WDTHOLD; // <S> Stop watchdog timer// <S> The following code toggles <S> P1.0 <S> portP1DIR |= BIT0; // <S> Configure P1.0 <S> as outputwhile(1){ //blink LED1 LED(HI); _delay_cycles(100000); LED(LO); _delay_cycles(100000);}} <A> [moderator note: This comment have arrive to this thread as a result of a merge.] <S> [author note: <S> the original question where I posted this answer stated that no code example could be found] <S> Erm <S> okay, it took me around 30 seconds to find this: TI website for MSP430F2274 Tools and Software for MSP430F2274 Example code for MSP430F22x4 <S> And finally there is a folder called C and <S> in that you find some files called msp430x22x4_p1_0x.c which contain code examples on how to use the Port 1 in C. There is even a readme to tell you which file is used for what. <S> And to make this answer not completely useless: #include <msp430.h <S> > <S> int <S> main(void){ <S> WDTCTL = <S> WDTPW + WDTHOLD; // <S> Stop watchdog timer P1DIR <S> |= <S> BIT0; // <S> Set P1.0 <S> to output direction <S> while (1) { <S> if ((BIT2 & P1IN) = <S> = <S> BIT2) <S> { <S> P1OUT |= BIT0; // <S> if P1.2 set, set P1.0 <S> } <S> else { <S> P1OUT &= ~(BIT0); // else reset <S> } }} (Heavily based on msp430x22x4_p1_01.c by A. Dannenberg / W. Goh, the complete copyright statement is too big for this answer, but is contained in the linked Code Example file) <A> The MSP430 can set or clear individual bits via the BIS or BIC <S> (BIt Set) instructions. <S> So I would certainly expect P2OUT.BIT1 = 1; to work in C (at least in mspgcc; the equivalent Ada code does) <S> procedure Blinky is LED : Boolean renames p1out_bits(0);begin -- <S> Initialise registers etc simplified out loop LED : <S> = <S> True; Delay_MS(200); LED := <S> False; Delay_MS(800); end loop;end Blinky;
| In the MSP430, accessing individual pins is commonly written using defines and bitwise operators : P2OUT &=
|
What does a two overlapping circles symbol mean in an electrical schematic/diagram? In the datasheet for a A3503 Hall Effect Sensor, I saw a circuit diagram labeled 'Functional Block Diagram', and it shows a symbol I have not seen before. It's shown here between 3 - Output and 2 - Ground. What is this supposed to represent? The full datasheet is available here <Q> Two overlapping circles represents a current source. <S> In this case, it is being used to sink a certain minimum amount of current through the output transistor, in order to keep its dynamic impedance low and improve the overall frequency response. <S> Current sources (and sinks) are commonly used in IC design, because they're actually easier to implement than high-value resistors. <S> They also give the circuit better performance in many cases, because the effective impedance of a current source is very large, which can be used to create high gain without a requirement for a lot of voltage "overhead". <S> To answer the question about high-value resistors, consider the materials that are available to the IC designer: silicon (doped to various levels) and metal (aluminum or copper). <S> The resistivity of metal is very low, so that just leaves the silicon. <S> Unfortunately, the specific resistivity of the silicon is difficult to control tightly, so it's difficult to create precision resistors. <S> In any case, it takes a significant amount of silicon area to create a resistor of more than a few kOhms in value. <S> The effective (dynamic) impedance of a current source is defined by how much the current through it changes with a change in the voltage across it, specifically R eff <S> = ΔV/ΔI. <S> It's relatively easy to build a current source whose current changes only a few parts per million with a 1-V change in voltage. <S> For example, a 1-mA source whose value only changes by 1 µA would imply an effective resistance of 1 MΩ. <S> The transistors to do this take up much less room than an actual 1-MΩ resistor in silicon would. <S> Besides which, you would have to put 1000 V across that resistor to get 1 mA through it! <A> There are different symbols used to represent a current source: <A> It could also be, more specifically, a norator . <S> I've never used this symbol before, but I saw it in a paper that mentions a nullor equivalent circuit. <S> _Dependent Current Source_ _Independent Current Source <S> _ <S> _____Norator_____
| It's the symbol of a current source .
|
What is the purpose of a resistor in the feedback path of a unity gain buffer? I often see unity-gain followers with a resistor in the feedback path. For an ideal op-amp, of course, there is no current into the input, and this resistor does nothing. What is its effect with a real op-amp, and how do I choose its value? What does R1 do in this circuit? <Q> You will rarely see a circuit with just one resistor as you show it; usually there will be another resistor (or equivalent source resistance) of the same value on the noninverting input, too. <S> Most (nonideal) opamps have a finite input resistance, and this means that a tiny current flows into or out of the input terminals. <S> This current is called "input bias current", and it varies with the voltage at the inputs. <S> Since most opamp circuits use negative feedback to keep the two inputs at the same voltage, this means that for any given voltage, the current through both inputs will be the same. <S> If the resistance at the two inputs is different, this voltage shift will be different, too, and the difference between those two shifts will appear as an additional input offset error in the operation of the circuit. <S> For this reason, an effort is made in all opamp circuits to make sure that the resistances connected to the two inputs are the same, eliminating this additional source of error. <S> Even in a unity-gain buffer, if the source resistance is 100Ω, a 100-Ω resistor will be used in the feedback path. <A> Here's an excerpt from the OP27 data sheet , showing that the answer is more involved than equalizing the impedances seen by the two inputs: <S> And another example, from the AD797 data sheet: <A> One reason the feedback resistor may be used is to match the output impedance of Vin. <S> Real Op-amps have input current bias and input current offset. <S> Take for example this representative circuit: <S> Here, I've create a more realistic model of an op-amp by adding current sources which simulate the current flowing into a real op-amp's terminals. <S> The difference between the two input currents is the offset input current. <S> The input voltage at the positive input terminal actually is: \begin{equation}Vin_{actual} = <S> Vin - I_1 <S> \cdot R_1\end{equation} <S> Through ideal op-amp action, the negative input terminal voltage is the same. <S> We can then calculate the resultant output voltage: \begin{equation}Vout = <S> Vin_{actual <S> } + I_2 \cdot <S> R_2\\Vout = <S> Vin - I_1 <S> \cdot <S> R_1 <S> + I_2 <S> \cdot R_2\\\end{equation} <S> By closely matching R1 and R2 the effect of input bias current is effectively nulled. <S> Note that this doesn't solve input offset current, though. <S> To solve both problems ensure that the resistance of R1 and R2 are both small. <S> This will solve both of the issues of input offset current and input bias current. <S> With a small enough R1 there may not be any need for an actual discrete matched R2, though you will of course get better results if there is one. <A> There are 2 kinds of op amps: voltage feedback and current feedback. <S> In current feedback, as one can guess from their name, the current driven from the output to the input through the Rf "feedback resistor" determines 1) <S> the bandwith 2) the gain when associated in a current divider with Rg "ground resistor". <S> In current feedback op amps, if there is very low feedback resistor this application note http://www.ti.com/lit/an/slva051/slva051.pdf <S> says that the op amp will oscillate. <S> Choosing a high value will decrease bandwith. <S> In fact there are so many different types of op amps nowadays that the simple model of infinite impedance inputs <S> implicating Vin+ = <S> Vin- is far from true in many cases. <S> Many op amps have low input impedance values, others have very high impedance on +In and very low on -In. <S> VHF op amps are all current feedback and very touchy to implement, like the LMH6703
| The current through each input flows through whatever resistance is connected to that input, and this introduces a voltage shift at the input.
|
Why only 500VAC rating for this Y-capacitor? I’ve been looking through a reference designs for an off-line flyback converters ( this one by Texas Instruments and this one by Linear Technology ). Both of them have a Y-capacitor between primary and secondary for EMI suppression. Like this, for example: from Fig.2 here So far, so good. Common UL standards (UL8750, UL1310) require dielectric strength between primary and secondary of 1kVAC plus twice AC line voltage. That adds up-to about 1.5kVAC. In these reference designs, the Y-capacitors in question are rated for 500VAC ( datasheet ) and 250VAC ( datasheet ). Doesn’t this undermine the UL requirement for the dielectric strength between primary and secondary? One of these capacitors has this paragraph in the datasheet: Dielectric strength between leads Component test: 4000 VAC, 50 Hz, 2 s As repeated test admissible only once with: 3600 VAC, 50 Hz, 2 s Random sampling test (destructive test): 4000 VAC, 50 Hz, 60 s Much higher voltage ratings. Does that take care of dielectric strength required by UL standards? Interestingly, I also couldn’t find Y-capacitors with 1.5kVAC to 2kVAC rating (on DigiKey and Mouser). <Q> Usually the working voltage between primary and secondary is on the order of a few hundred volts when you're dealing with mains-powered (100-240VAC) equipment. <S> A 500VAC-rated UL recognized cap bridging primary-to-secondary is certainly suitable for this application. <S> 250VAC may be a little on the low side. <S> Don't expect that just because there's a cap in a reference design publication, the design has ever been evaluated for safety compliance. <S> Quite often, they're not, and the onus is on you to make the design 'safe'. <S> (Much more common configurations that I've seen are two 250VAC Y-caps in series, or a 250VAC Y-cap in series with a 1kV ceramic.) <S> UL will care about the part not exceeding its working voltage rating under normal conditions in the application. <S> The dielectric strength test is always much higher than the working voltage rating to account for those 'little things' that can happen in the real world like component failures, lightning strikes, surges, etc. <S> - it doesn't mean that you can and should use a 250VAC cap where the working voltage is 350VAC, for example, even if the part will never fail due to its high dielectric withstand rating. <A> Have a look at Table 2 in the link, I believe you can find <S> a Y2 capacitor suitable.(A point of pain is that some times the manufactureres datasheets don't always match the UL ratings for components..) <S> Reference designs are to get you started, but if your market requirements are different it is up to the designer to find the suitable component. <S> FOWX2.GuideInfo <S> Across-the-line Capacitors, Antenna-coupling Components, Line-bypass Components and Fixed Capacitors for Use in Electronic Equipment <S> Edit2 <S> Following a preference from Dave at www.eevblog.com for Panasonic caps in some video of his... <S> I had a look at <S> Panasonic (E62674) Y2 Edit 2 <S> My understanding is the withstand voltage has been taken care of. <A> If a 2nF capacitor has a working voltage of 500V, that means its voltage rise by roughly one volt for every two nanocoulombs, until it reaches 500 volts. <S> Applying voltages higher than that won't destroy the part, but might not hold as much charge at higher voltages. <S> With some caps, the amount of charge that's let in will decrease with voltage; with others, the amount of charge let in may increase, but that increase would be offset by an increase in the amount of charge/energy lost as heat. <S> Further, RF-suppression caps are often sufficiently small that even if they were to waste a significant fraction of the energy that goes into them, the amount of energy in question is too small to pose any significant danger of overheating.
| For purposes such as RF suppression, it may not really matter if the capacitor momentarily accepts less charge than it should during a high-voltage spike on the line, if the capacitor resumes normal operation as soon as the spike is gone. I believe if the UL site quotes a voltage for a component, this is the working voltage it is rated for.
|
Requirement for more ADC inputs than micrcontroller has available I have a requirement to read an analogue value from 20 sources. I am using a PIC microcontroller that has 11 available ADC inputs. I have a number spare IO ports, I am thinking of using an analogue multiplexer/demultiplexer 74HC4051; 74HCT4051 they cost 55p each. What are people experiences with these devices? Would you just add an additional PIC and not bother with the additional logic? edited to make it a little more clear.I am trying to read the values from a large group of potentiometers inside rc servos. I will take readings from all of the pots maybe once a second. <Q> To read a pot, you don't need an ADC. <S> All you need is a capacitor and a timer. <S> Here's one way you might do it: <S> Begin with the input low. <S> Leave it this way for several RC time constants so all the capacitors discharge. <S> Now bring the input high and start a timer. <S> Configure your microcontroller to interrupt on input change. <S> As each capacitior charges and crosses the high threshold of your inputs, you get an interrupt. <S> Read the timer. <S> The number corresponds to how long the capacitor takes to charge, which is a function of the RC time constant of R1*C1, and since you know C1, you can calculate R1. <S> When all the inputs have changed, bring the input low. <S> Repeat. <S> There are hundreds of variations on this. <S> You might put a buffer at the input if your microcontroller can't source enough current to charge all the capacitiors. <S> You might time charging and discharging the capacitiors to double your sample rate. <S> There are many other ways you might connect the capacitiors. <A> Given the slow sample rate I would look at I2C or SPI <S> (serial) ADC chips with multiple channels, that way you only need 2 or 3 wires to read lots of ADC's, and can chain/expand the design. <S> Analogue switches <S> / multiplexers may introduce inaccuracies. <A> In my company, we use this multiplexer to bring slow-moving analog signals to a PSoC1 device with limited ADC input channels with great success. <S> Also be sure to allow some settling time after changing the mux setting.
| My advice is to make sure none of the analog inputs can exceed the supply voltage to the mux or 'weird things' may happen.
|
Paper in oil (PIO) capacitors: what is special? Many audio circuits use PIO capacitors. What are the electrical Characteristics of PIO caps that make them special (i.e. justify the cost)? Which parts of an amplifier circuit benefit most from the use of PIO caps? <Q> Oil submersion has been commonly used for high voltage applications such as power engineering, for capacitors as well as circuit breakers / relays up until the late 70s, and is still used today, albeit rarely, apparently. <S> In specific high or low pressure deployments, oils were preferred due to being less compressible (almost not at all) compared to air. <S> Compression or rarefaction would unpredictably change the distance between, and thus capacitance between, the electrodes. <S> Vintage audio amplifiers were vacuum-tube based, and often operated at high voltages, thus justifying the use of such high voltage friendly components. <S> However, modern semiconductor based amplifiers work at (typically) much lower voltages, thus ought not have any strong engineering justification for continuing to use oil-filled capacitors. <S> There's no accounting for the spiritual beliefs of audiophiles, though. <S> Footnote:Oil was later largely replaced in circuit breakers by SF6 gas, which is not flammable, hence eliminating the safety hazard of oil. <S> Vacuum based circuit breakers are also now in use in high voltage deployments. <S> These two options do not appear to be prevalent in capacitors, though. <A> As a professional engineer and amateur musician, I was intrigued by this question. <S> All I could find on the subject can be summed-up from here ... <S> Many electronic experts will tell you that there is no scientific explanation of why paper in oil capacitors will give you better Tone when used in a guitar circuit. <S> But it is a well known fact in the guitar community <S> that paper in oil will be warmer, smoother and have more "Sparkle" than ceramic disc, mylar or polypropylene capacitors. <S> The original Bumble Bees and Black Beauties were paper in oil and thought of by many to be the "Holy Grail" of Tone as far as capacitors go. <S> And from here ... <S> Paper in oil (or PIO) caps are just one variety of capacitor. <S> Others are made out of mylar, ceramic, etc. <S> PIO caps were used in the Les Pauls of the 50's and many appreciate their tonal qualities over more modern capacitors. <S> The effect of any capacitor on frequency response & transient response will depend on other impedances in the circuit in which they are fitted so a capacitor can have no 'sound' as such. <S> But we are straying into highly subjective (and some might say religious) territory here and fortunately, since I am not a guitarist <S> I am quite unqualified to comment further ... <A> It's the same reason people will build a hi-fi amplifier on an 80 pound slab of granite, avoid op-amps in their designs, or use only 00 gauge pure gold speaker cables: they aren't proper engineers, and they are prone to taking a slice of truth, taking it to excess, and ignoring everything else. <S> When you read: be warmer, smoother and have more "Sparkle" or thought of by many to be the "Holy Grail" that really means: some people think they are neat, for no particular reason at all. <A> If you are restoring - or recreating - a historically important amplifier, such as a 1940's Leak TL12 hi-fidelity amplifier or a Vox AC-30 guitar amplifier, it's important to use the correct parts or the closest modern alternatives you can. <S> At one time, the best and most reliable high voltage capacitors were paper-in-oil. <S> So the original designers used them because there was no good alternative. <S> (I find they tend to go leaky after 40 years or so) <A> This guy actually took measurements and put up some Lissajous, so at least we can see some data. <S> I see a bunch of straight lines, but he says the paper/oil was "cleanest", but I see a bunch of straight lines (with some notable exceptions). <A> There might be some odd acoustic behavior as the foils of the capacitor will experience some force from the voltage across them, with different resulting effects for paper, mylar, etc. <S> Way back when, I had some oil filled glass body capacitors from a high voltage unit of an old oscilloscope. <S> They were rated for 40 KV or some such. <S> But when I put 60Hz ac across them (probably straight from the power line. <S> It was a long time ago), they blew up. <S> Go figure. <S> I imagine they could not take the 60 Hz vibration.
| The benefits cited by the previous generation of engineers include: Suppression of arcing to a higher voltage than air Improved cooling of local heat spots due to circulation of the fluid Improved insulation between the contact electrodes, having a higher dielectric constant than air Elimination of bubbles within the paper or film, or between electrodes, thus avoiding sporadic arcing and variation in characteristics
|
0-10 second on-time with a potentiometer I would like to make a simple circuit, where the a potentiometer controls a 0 - 10 second on-time. If the potentiometer is set to min, the on time should be 0 seconds. If the potentiometer is maxed out the circuit should be on 10 seconds. I was thinking of using an Arduino, but that would be overkill for such an application. And too expensive as well. Maybe a 555 timer would be an option? All help is appreciated! Notes: Circuit must be 5V or 12V DC The object to turn on is a 12V car lightbulb. (some advice about a relay?) Has to be cheaper than using an Arduino <Q> The NE555 datasheet provides you with circuits in section "Application Information". <S> Monostable operation <S> When you want the device to go on for 10s and then turn off, use the monostable operation: <S> In the datasheets you can find graphs how the pulse width (your 10s) depends on \$R_A\$ and the capacitor on pin 6. <S> For a 10s you can use \$R_A = 1\text{M}\Omega\$ and the capacitor \$10\mu{}\text{F}\$ (see figure 11 of the datasheet). <S> Decreasing the resistance will shorten the pulse width, so with a 1M potentiometer you'll be all settled. <S> \$R_L\$ is just a pull-up. <S> Astable operation <S> When you want the device to toggle all the time, you can use the astable operation: <S> The frequency (you want 0.1Hz - unlimited) can be adjusted with \$R_A + 2R_B\$ and the capacitor at pin 6, again. <S> For a 0.1Hz operation you can use \$R_A + 2R_B = 1\text{M}\Omega\$ and a capacitance of \$10\mu\text{F}\$ <S> (see figure 14 of the datasheet). <S> Adjusting \$R_A + 2R_B\$ to zero will increase the frequency and thereby shorten the pulse width. <S> You of course will only make one resistor a potentiometer. <S> The other has to be that small that when that's the total resistance (it's the minimum) <S> the frequency is as high as you want it to be. <S> Again, \$R_L\$ is just a pull-up. <S> Linking to the light bulb <S> The NE555 can run a relay directly, as is explained here : <S> As you can see, you can sink and source the current for the relay coil (thus you can choose if the relay should be on or off when the 555 is on or off). <S> In both cases, you'll need a flyback diode to eliminate the sudden voltage spike over the coil when the relay switches. <S> Combining the monostable operation circuit with your needs and the relay circuit: <A> I'd probably use a PIC 10F220. <S> That has a 8 bit A/D, so you can connect the pot directly to the A/D input pin. <S> It can look at the pot value and do the timing based on that. <S> The result is a lot less parts and complications compared to a evil 666 timer. <S> The only parts would be the PIC, bypass cap, and the pot. <S> The power supply and whatever the digital output drives would be the same as with the ye olde phashioned analog timer. <A> 555 is the great component in electronics, it is used to trigger most of the devices. <S> We can use it in Monostable mode to set timer. <S> Time can be set by changing value of resistor R1 (between PIN 8 and 7) and capacitor C1 (between PIN 6 and ground). <S> You can use potentiometer in place of resistor R1 to change the time on board itself. <S> Here is one example of time triggering: 1 minute Timer using 555 IC <S> As far as Relay is concern, you may find some circuit on above site to trigger the Relay. <S> Although its easy to trigger Relay using 555 IC, and control the AC appliances.
| yes, ON and OFF time can be easily set using the 555 IC.
|
LM7805C alternative to produce less heat I'm currently using LM7805 for circuit which requires 5V for MCU/misc ICs and draws 100-300mA current. Input voltage is 12V from car socket. I don't use heat sink due to space constraints(neither I want to lay down on PCB). Voltage regulator is producing too much heat I understand it's due to power dissipation of 12V to 5V . The question is how can I get this 5V with minimal overheating? Maybe some other common voltage regulator or other technique? <Q> Cost will be higher and ripple will be higher, but power loss will be much better. <S> The Murata part runs close to $10 in distribution. <S> As Anindo points out in his comment, if you can afford a board layout change you can switching regulator modules with similar performance at considerably lower prices. <A> However, you can share this heat across two regulators connected in cascade: <S> Use an LM7809 to produce a 9V regulated output; and then feed this signal to the input of LM7805 . <S> 7809 will drop about 3V and 7805 about 5V, as opposed to a single 7805 burning 7V. <A> Minimal heat DC to DC conversion is done with switching regulators. <S> These work by pulsing current into a coil which generates a voltage. <S> The voltage is controlled via feedback, like in the linear regulator. <S> Because inductance generates the output voltage, and because the device which energizes the coil switches on and off (never in between), there is very little heat dissipation. <S> If you have to do with what you have (the existing PCB), what you can do is help the 7805. <S> Firstly, add a heat sink. <S> Find the space! <S> There is really no excuse. <S> Next, if that is not enough, try dropping the incoming voltage upstream from the circuit. <S> You can drop some volts using a suitably valued resistor (which has to be selected with regard to the current, and also have an adequate dissipation rating) or perhaps a Zener diode. <S> This voltage-dropping element will dissipate some of the heat, so that the 7805 then has to dissipate less of it. <S> (Do not drop the voltage too far: the 7805 requires some dropout to operate properly.) <S> The consequence of letting the 7805 get hot is that it will limit current to protect itself from getting any hotter. <S> When it limits current, your device will malfunction. <A> By outsourcing the voltage conversion to a car usb charger, you no longer need to worry about pcb space or heat buildup in your device. <S> You can get a small cigarette lighter sized plug for a dollar on ebay, five dollars in retail stores. <S> A dollar store usb cable, either with a usb adaptor on your board, or just spliced, would plug into the charger without modification. <S> And it would provide a pretty stable 5v from a switching regulator (Unless you get a super cheap knockoff). <S> The other option would be using diodes to drop the incoming voltage prior to the LM7805C. <S> But the simplest thing is the usb charger.
| If you can throw money at the problem, Murata has a switching regulator that is meant as a drop-in replacement for 7805. The practical choice would be to ditch the LM7805C AND the dummy car socket adapter, for a usb charger . If you stick with linear regulators, the excess voltage (7V in this case) will have to be dissipated somewhere; I don't think there's any way to escape this.
|
Wire broke off and stuck in a header I'm working with an Arduino, and one of the stripped portions of the wire broke off at some point and managed to get pretty wedged into the 5V pin slot. Obviously, this wouldn't matter as much for a GPIO pin, but I sort of need to use the +5V port. Tweezers are out of the question; I've tried both non and slanted-tip. Currently a needle is the only thing that will really fit in, but i just end up pushing the wire around more. Tried using a very small magnet, but it isn't neodymium so likely isn't powerful enough. Here is a picture of the microcontroller with the wire stuck. The wire is not above the header itself, it's entirely pushed into the header: Update: Got the wire out by using a combination of techniques. I did not have access to tweezers that were small enough to get in, but I do have a nice soldering station in the lab. Since the piece of wire was so small (see picture), with one of my instructors, chipped at the header a bit with a pair of cutters and then used a wire and some tin to carefully attach the wires together. If I needed the header to be intact, the best bet would have been tweezers or just putting a new header on, but I don't care if there is a very slight cosmetic flaw on the 1 port on the Arduino. Picture of the stuck wire segment still soldered to the extraction wire: <Q> Generously tin a piece of wire <S> Insert the wire into the socket with the stuck pin Reflow the solder to join the pin to the wire <S> Use the wire to extract the pin. <S> Be careful not to solder the pin into the socket! <A> $0.02 worth <S> The metal part of the female connector (in which the wire is stuck) looks like a tuning fork. <S> You don't see the fork, because it's surrounded by the black plastic. <S> Try to make a hole in the plastic on the side of the connector. <S> Perhaps, you could make the hole with a hot nail or a dremmel. <S> The hole should be near the bottom end of the broken wire. <S> Try to push the broken wire with a needle through the hole. <S> Alternatively, remove plastic from the top of the cavity with a Dremel tool. <S> Eventually, enough of the broken wire sticks out and you might be able to grab it. <S> Carefully. <S> Be prepared to de-solder and replace the whole connector. <S> If it comes to that, you can cut the connector apart, which will make de-soldering easier. <A> My best luck with removing broken wires from breadboards and headers of this nature is to just use the tip of a jeweler's screwdriver, or the tip of one of the ends of my pair of diagonal cutters to just drag the wire out. <S> You may nick up the header's plastic a little bit, but it is definitely easier to do this before you replace the header in case you can get the wire out. <A> You will notice that that the header body is actually easily removed if you pry gently at one end, then the other. <S> Rock the body away from the board. <S> Flush-cutting wire cutters work well for this if you have decent access to the ends of the header body. <S> The tapered wedge formed by the cutting edges allows the cutter to get under the plastic easily. <S> Note that you hold the cutters closed just enough to grab onto the plastic. <S> This technique is far less damaging than some of other techniques mentioned here. <S> It works so well because the header pins are simply pushed into the plastic body. <S> As a result, it is trivial to remove the plastic body while leaving the pins soldered to the PC board, then pushing the header body back onto the pins. <A> Since you can get a needle in next to it, I would try a very small amount of super glue on the needle. <S> Put it in, let is sit for a long time, and then you may be able to get it to come out. <S> I'd also consider abrading away the plastic top of the header with a dremel and an diamond disk so that I could get down to the broken wire. <A> This happened to me today, I was using a wire from the cat-5 cable as I could not find any place to buy single core 22 gauge wires here. <S> I might had damaged the wire core while stripping it with a cutter. <S> It just broke off and got stuck inside the GND pin on my Arduino Uno. <S> First thing I did was google, which took me to several pages, including this one. <S> I didn't think using super glue was a good idea, as there was a good change of making the problem worse in <S> case the glue travels down the wire that's stuck. <S> Then I remembered that I had this long pin-like thing with a slightly bent tip <S> ( I had accidentally dropped it on the ground, pointy side down ). <S> I don't know what this long needle like thing is called, but it had a fine and sharp tip but a broader body that you can grip onto. <S> This makes positioning the 'bent' pin to 'dig' out the wire that's stuck inside a hell lot easier. <S> At least in my case. <A> I used a dental pick to nudge the wire up about an 1/16 of inch and then used needle nose pliers to pull the wire out. <S> It took some time to nudge the wire up but eventually worked. <A> Knocking the header onto something solid like the edge of a table can also work. <S> Face the header with the wire in it downwards and hit the edge of the table so that the connection with the stuck wire is hanging just over the edge. <S> Don't hit it so hard that you break the board but as much as you feel is safe. <S> It might not seem like the wire, that is normally stuck in tightly, will respond to a few (/quite a few) good knocks but it has worked for me beautifully in the past (and just this second... <S> ).The idea behind it is that you are creating very high G forces for a fraction of a second ( <S> ~100g) and the wire moves small amounts each time until it finally comes free (or out enough for you to grab it). <A> I use the smallest drill that I have (#60) in a pin vise and very carefully twist the vise and bit into the header hole along side the broken pin. <S> When it feels like the drill has bit into something solid (not plastic), I carefully pull the vise and drill bit up out of the hole and the broken pin usually comes along. <S> A #60 drill bit is easily broken off in the hole, so be gentle.
| My standard technique for removing a broken pin or wire from that style of header is to simply pry the plastic body of the header off of the pins. You don't want to use enough force to risk damaging the pin when the header body slides up. The fork should be in-plane with the connector. Got to admit it did tempt me a bit though.
|
Freetronics LCD pins all used up I am new to electronics and recently bought Freetronics Arduino experiment kit with the Freetronic LCD shield with keypad. I have installed the LCD shield and now I realize I no longer have any pins to plug in my existing wire to breadboard and LED. Is there anyway out? <Q> The FreeTronics LCD + Keypad Shield is documented to use only D4-D9 for LCD control, any one of { D2, D3, D10, A1, A2, A3, A4, A5 } for the backlight, and A0 for the 4 buttons. <S> This should leave sufficient unused pins for your breadboard and LED needs. <S> Perhaps your concern is the physical connection of the shield to all the pins of the Arduino: That is how typical Arduino shields are designed. <S> Some ship with "stackable" header pins, so another shield can be stacked atop or beneath this shield. <S> Of course, with a display shield, stacking another shield on top of it makes little sense. <S> Hence they wouldn't provide stackable headers in this case. <S> So your way out is to use any of the GPIO pins other than the ones listed at the top of this answer, for your purposes. <S> The shield doesn't use them, you can just tap them as needed. <S> For accessing those pins, you can either solder wires to the underside of the arduino, or use gripping test probes on individual pins, between the arduino and the shield, such as these probes below. <S> From this eBay listing <A> Quote from the LCD shield description: The buttons provide "left", "right", "up", "down", and "select" while using just one analog input. <S> That leaves the other analog inputs free for you to use in your projects. <S> Hence there are pins still unused, but the LCD shield provides no stacked headers to put your wires in. <S> Design mistake. <S> cut the unused LCD shield pins, so you can put wires in the underlying connector and still plug the LCD shield in. <S> put a prototype shield with stackable headers inbeteween, and solder wires (or connectors) to that shield. <S> None of these solutions is very elegant. <S> Blame the LCD shield design. <A> That shield was not made with regards to expansion. <S> A LCD is normally on the top, so it wasn't designed with stacking headers. <S> You will need a shield that allows you to pass through, like a stacking breadboard shield (Two sets of headers so you can use the breadboard and put another shield on top), or a breakout shield (Adafruit has one that has a prototype area, stacking headers, and screw terminals). <S> The other options are (in order of ease): Wrapping a wire around the headers on the lcd shield, before you plug it in. <S> Using the kit's Male to Male jumper wires to connect from the Arduino to the breadboard, and then use some Male to Female wires to connect from the Arduino to the LCD Shield. <S> (This prevents stacking, but you get to use both with minimal cost) <S> Cut the unused pins off the LCD Shield . <S> Stick plain wire (not the solderless jumper wire, it has hard plastic at the ends that can't bend) into the Arduino before you plug in the LCD Shield. <S> Since the wire can bend at a 90° angle easily, it just bends out of the way. <S> Soldering wires to the top side of the lcd shield's header pins. <S> Replacing the lcd shield's headers with stacking headers.
| You could solder a header to the analog pins of your LCD shield.
|
What would a voltage between 0 & 1 do to a AND-gate IC? If I have a 7400 chip with an AND-gate (0 = 0V & 1 = 5V) would it be seen as 0 or 1 if the input is at 2V and also 4V? <Q> The datasheet for the IC will define "threshold" voltages. <S> Below the lower threshold (e.g. 1V) will be treated as zero; above the higher threshold (e.g. 2V) will be treated as 1. <S> Normally there will be a small gray area in the middle between the thresholds. <S> "Schmitt trigger" inputs can be used if you want to quantify a signal that is wandering about; these will stay at 0 or 1 until the input is almost at the other end of the voltage scale, then flip over and stick there. <A> At 2v and 4v, both would register as a logic High. <S> Specs for an average 7400 series chip: VIH = <S> HIGH Level Input Voltage: <S> 2V Min VIL = <S> LOW Level Input Voltage: <S> 0.8V <S> Max Allcircuit tutorial shows: <S> If a voltage signal ranging between 0.8 volts and 2 volts were to be sent into the input of a TTL gate, there would be no certain response from the gate. <S> Such a signal would be considered uncertain, and no logic gate manufacturer would guarantee how their gate circuit would interpret such a signal. <S> Fairchild Semi's datasheet shows both a typical and a guaranteed limits. <S> Interestingly, a "Typical" voltage of 1.5v could register as either a Logic HIGH or Logic LOW, showing how unstable this threshold region is (and that 1.5v is the typical cross over voltage, when the chip is running at 3v power). <S> Note: All outputs loaded; thresholds on input associated with output under test. <A> Have a look into the datasheet, for instance here: <S> http://pdf1.alldatasheet.com/datasheet-pdf/view/27345/TI/SN7400.html <S> According to this datasheet 2V is the minimum voltage for the high level, so you can be sure that 4V represents a high level. <S> For 2V I'm not that sure. <S> Only one line below the datasheet says, 0.8V is the maximum voltage for a low level. <S> So, I would say, as level of 2V should be avoided. <S> If 2V levels are a common situation in your scenario, I would propose to either using a comparator and define the high and low levels on your own or a Schmitt-Trigger (7414) at the beginning of your signal flow.
| Depending on the IC's construction (TTL or CMOS), it may turn on both the "0" and "1" output transistors, resulting in high power dissipation and possible damage.
|
Need recommendation for a first hot air station I have a pretty nice soldering station, but now that I am finding the need to work with non-DIP type packages unpreventable, I am beginning to think that purchasing a hot air station would be a good idea. I know shopping questions are not allowed (though links to recommended products would be appreciated), but what I really want to know about is the kind of specifications that I should be looking for when searching for an appropriate station. I won't be using the hot air station too much (maybe once a month), mostly to solder SMD components. I have some QFN chips which I would like to solder as well. Any recommendations/tips? <Q> This allows you to use the gun for heat shrink. <S> A max temperature of at least ~350C, though higher is better (within reason, of course). <S> I think most low-end hot-air rework stations are spec'd at ~450-550C max, but don't quote me on this. <S> have the ability to change out nozzles, in particular smaller nozzles for focusing the air stream and larger nozzles if you need to soak a region (say a large BGA package or a packages with large exposed pad heat sinks). <S> Some temperature regulation. <S> It doesn't have to be too precise since it's dependant on air flow and distance of gun from the target, but I would imagine better than 10C accuracy is good. <S> You can probably even get away with less accurate temperatures. <S> Adjustable air speed. <S> It's no good if your gun blows all your small SMD parts away, or doesn't have the oomph to transfer enough hot air to the target. <S> Other bonus features: A. <S> "Auto-shutdown" which will automatically powerdown the unit if you place the gun back into the holder. <S> B. <S> Some units have a cooldown before shutdown feature which will turn the heater element off but leave the fan on until the temperature drops below a certain temperature. <S> I believe the theory is that this will extend the life of the heating element. <S> You can check out Dave Jone's EEVlog <S> #167 for a review of the Atten 858D+. <S> He explains the basics of what a usable gun should have. <A> I have a Yihua 899D+ rework station here bought from eBay. <S> It's cheap (< £100 IIRC) and performs very well. <S> Mine came with a spare element for the iron and hot air gun, and a selection of nozzles/tips too. <S> The iron is compatible with standard Hakko tips, so you can easily get cheap, reasonable quality replacements. <S> I prefer it to the 2 other Maplin stations I have. <S> I think they also do a hot-air only version (I know Atten do - see EEVBlog for a review of an Atten 858D) <A> No recommendations on a hot air station but Schmartboard has some great QFN to DIP boards. <S> Here is a video demonstrating how to solder to them. <S> They have a groove for the chip to sit in while soldering and grooves for each pin so you can run your soldering iron up through each one. <S> I prefer to add some flux and solder and run my iron over each side (solder just falls in to place). <S> They also have a hole in the bottom so that you can solder to the pad on the bottom if it has one. <S> I have a few and they work fine. <A> I have this one and for 80 bucks it works great. <S> I don't agree w/ Kit, you will use hot air a lot working with SMT.
| A few basic things I would like a hot-air rework station to have: A min temperature range of ~100C.
|
Are "fixed voltage" LDOs adjustable too? I have a quick question...I have purchased a 5VDC fixed voltage LDO. P/N: MC7805CT-BPI was wondering if I can still use a voltage divider to set the output to a higher voltage. If yes... does this mean that virtually ALL LDOs are adjustable? <Q> You can adjust a fixed regulator, but only higher than it's nominal voltage. <S> For example if you have a 5V regulator, you can only adjust it to > 5V (assuming no negative voltage used) A fixed regulator is just like an adjustable one but with the divider resistors internal to set the voltage. <S> The LM7805 datasheet has an example of raising the output voltage: Any standard linear regulator (by this <S> I mean those that use the most common 78xx type topology - there are others that don't, and have e.g. voltage set using only 1 resistor) <S> is adjustable by altering the reference pin voltage level in some way (yours included - <S> it's just a "copy" of the LM7805, so you can use these kind of circuits - see figure 12 in the MC7805 datasheet ). <S> For example, you can also drive it directly with an opamp: <A> Oli answered the first part of the question pretty well. <S> Coming to your second question <S> If yes... does this mean that virtually ALL LDOs are adjustable? <S> All LDOs may not be adjustable. <S> Read the datasheet of your LDO to verify if that one is adjustable. <A> Actually, yes, the MC7805 is adjustable. <S> Your part has a very sparse datasheet , but that is okay since it's a very generic part. <S> It is part of the 7800 series linear regulators, which is duplicated by many manufacturers. <S> OnSemi's version of the standard 7805 Linear Regulator has a very detailed datasheet . <S> It's schematic diagram even has the RSense pin internally, though they do not show how it is connected. <S> It varies somewhat from Micro Commercial's schematic, but in practical application, they are the same. <S> First, it is not a LDO. <S> It requires at least 2 volts to produce the correct output voltage. <S> OnSemi does not consider it a LDO. <S> Most LDOs would have a 1v or smaller dropout. <S> Second, the identical part from OnSemi states (in the datasheet and product page ): <S> Although designed primarily as a fixed voltage regulator, these devices can be used with external components to obtain adjustable voltages and currents . <S> Mainly Figure 10- Adjustable Output Regulator, which has a diagram of how to connect a op amp to make it Adjustable: <S> The addition of an operational amplifier allows adjustment to higher or intermediate values while retaining regulation characteristics. <S> The minimum voltage obtainable with this arrangement is 2.0 V greater than the regulator voltage. <S> These instructions are also seen in other manufacturer's datasheets. <S> Since most manufacturers enjoy producing the same part with no major change in <S> it's schematic, that gives a wide variety of sources to choose from.
| Finally, not all Linear Regulators or LDOs are adjustable, but those based on the 7800 series are.
|
Suggestion to electrically disable a Faraday Cage My plan is to ultimately develop an Autonomous Faraday Cage. The project seems very straight forward; however, I am unsure on how to effectively control the cage (turn on and off). I have constructed a prototype Faraday Cage at home. From my research on these cages, my first theory was that an un-grounded cage with no external charge should not block the electromagnetic waves emitting from a cell phone. However, placing the phone in the cage, I observed that the cell phone still lost its network capabilities. Google has provided no suggestions on how to disable the qualities of a Faraday Cage electrically. Obviously, I could arrange a method where the cage opens, allowing the phone to reconnect to the network and Bluetooth. I don't see this as ideal however since my design would involve moving parts (a final design I plan on completing thousands of iterations). Are there suggestions on how to electrically disable the Faraday Cage? Extra Note: As I wrote this, I just thought about grounding the inside and outside of the Cage. From my understanding, a Faraday Cage works by creating its own electromagnetic field which cancels external and internal Electromagnetic waves. My reasoning on grounding the inside and outside is that if there is no charge to create the electromagnetic field, then the electromagnetic waves could escape the cage. Is this a reasonable theory? TL;DR: How may I electrically disable a Faraday Cage? <Q> The following is just a guess. <S> I could be completely wrong. <S> You can't disable a cage, but you might be able to make a switchable "leak" in the cage. <S> Imagine this, you have a cage with two antennas. <S> One antenna on the inside, one on the outside. <S> The two antennas are connected with a wire. <S> Where the wire goes through the wall of the cage you place a switch (or relay, or whatever). <S> If the hole in the cage is smaller than 1/4th wavelength, and the switch effectively prevents the signal from penetrating the cage, then you might just have something. <S> You might need to do some fancy shielding around the hole and switch, to prevent leakage when the switch is off. <S> You might also consider connecting one or both antennas to the wall of the cage when the switch is "off". <S> It probably won't ever be perfect, but it might do what you want. <S> Unless you are a forigen spy, intent on disabling our security in sensitive military complexes. <S> Then it won't work. <S> For that you need to know the secret combination, which is 1234 by the way. <A> Your analysis of the cage is not right: it doesn't generate its own field, it acts as an antenna or inductor, absorbing all the emitted RF energy. <S> The energy is dissipated as an eddy current within the cage. <S> So far as I know you can't electrically disable a Faraday cage. <A> Put a window in your cage, for the signal to get through. <S> Test that, to be sure you get signal through the window. <S> Now string two meshes of wire over the window, one up and down, one back and forth. <S> Keep the meshes insulated from each other. <S> Test that. <S> You want the signal to still get through. <S> Now put diodes across each cross point. <S> There will be a lot of diodes. <S> To close the window, forward bias the diodes. <S> To open the window, reverse bias the diodes. <S> Too crazy? <S> Then just put an antenna outside, connect to antenna inside, and again the diode switch across the antenna wires going into the cage. <S> Remember to ground the outer shell of the co-ax antenna wire to the cage where it goes in. <S> Or use SMA bulkhead connectors to get the line into the cage. <S> Totally untested, of course. <S> But a forward biased diode is a pretty handy way of switching off an RF signal. <S> You may have to reverse bias the diode (to reduce its capacitance) to get it fully open, though. <S> I've only every used this for ordinary RF, not for microwave Ghz signals. <S> For cell phone band, you will need to use PIN diodes rated for Ghz, plain old rectifier diodes will have too much capacitance. <A> The meaning of "faraday cage" is: a completely equipotential surrounding of any volume. <S> It does not matter what potential (ground, isolated, or any) the cage has. <S> Faraday cages are usually grounded because it makes it safe to touch them from the outside . <S> Thats all. <S> Grounding a Faraday cage in no way affects what is going on inside of it. <S> Say, you have an isolated faraday cage which gets struck with lightning. <S> This would charge the faraday cage. <S> You inside the cage would still be safe, it being the same potential on each surface on the inside. <S> Mind you, charged bodies carry charge only on the outside. <S> But technically, you would be on the same potential as the cage - but it being the same all over the the cage, there is no differential voltage, therefore no current, and therefore no dying. <S> Now, if you left your charged cage, and set foot on the ground, the charge stored on the cage would flow through you, getting quite dangerous. <S> Electromagnetic waves may penetrate the faraday cage depending on frequency. <S> This has to do with the thickness of the cage and the depth of the surface eddy currents induced by the waves. <S> Wikipedia explains all that quite nicely. <S> But again, all this has nothing to do with the grounditude of your cage. <S> http://en.wikipedia.org/wiki/Faraday_cage <S> For instance, your microwave, which is a faraday cage with the waves inside of it, works just as fine if you remove grounding. <A> Wrong Problem? <S> Your question, while interesting, assumes facts not in evidence. <S> There is an unsupported assumption that you need to use a Faraday cage. <S> Disable Communications, Not Radiation <S> If your goal is just to selectively disable communications , then all you need to do is use a jammer (broadband high-power emitter) next to your Device-Under-Test (DUT). <S> You can then turn the jammer on and off to disable communication. <S> Easy. <S> Breezy. <S> Beautiful. <A> I think creating some kind of electromechanical case, to create an opening/closing window, would be the most effective solution. <S> Using a "jammer" is interesting but not very plausible because it may disrupt your 'neighbors' reception as well. <S> One addition flaw with using a jammer, may be that those things are super expensive! <S> I am curious <S> @NickWilliams <S> did you end up implementing a good solution using antennas...
| You cannot electrically disable a faraday cage, unless you basically melt it from the outside.
|
Toy with non-waterproof battery box: is this an issue? What will happen? There is a toy that is intended to be used in water. However, we found out that the battery box (holds 2 AAA's) is not water tight and water leaks into it. Is this an issue? I know that water is conductive. So, essentially when water leaks in, the batteries are being shorted right? How dangerous is this? Will it overheat the batteries? How dangerous is this for the user? Is it going to shock my child to play with this toy in the bathtub? <Q> If I understand this right, you've got a electronic product that is intended to be used immersed in water, but it leaks and water can get onto the electronics. <S> Seriously!!!? <S> In case you really are serious, yes, that is a problem . <S> Even if the water only gets to the batteries, it can cause corrosion and will provide at least some leakage path for battery current, which will discharge the batteries prematurely. <S> Pure water has pretty high resistivity, but it doesn't sound like you get to control the cleanliness of the water. <S> Even a little salt, for example, will greatly increase conductivity. <S> There is little danger from the electric current since it will be largely inside the battery box, but again, seriously!? <S> You are really thinking this might be OK somehow? <A> Apart from the fact the toy won't work for long, it makes it potentially very dangerous and absolutely not usable. <S> There is a risk of rupture (or explosion/fire) which may cause the contents of the battery to leak into the water the toy is supposed to be used in. <S> This also depends on the type of batteries used. <S> My view is that since it's a toy, however unlikely, you must assume that the worst case will happen. <S> *perfectly de-ionised water is not very conductive, however most water is well ionised. <S> For interest's sake, based on the comments below I took a glass of water and some salts, an AAA battery holder and hooked it up to my supply whilst immersed. <S> As expected, the "pure" water had very little conductivity at 3V, but with salts added a peak of ~0.3A was reached. <S> Remember surface area is important with solutions, so it may be more with real batteries. <S> With two copper surfaces of few cm wide/across 1A was reached easily. <S> Not very scientific, but (hopefully) shows how the resistance can vary widely. <S> Anyway, here's a (bad, sorry) picture, note the bubbling from the negative electrode: <A> From experience with a weather station in the Scottish islands : it's not very dangerous because there isn't that much power from AAA batteries. <S> Water won't short out batteries the same way a screwdriver would short out a car battery; the leakage would be milliamps rather than amps and heating is negligible. <S> Still, that will drain the batteries in hours or days. <S> Worse (especially with salt water!) <S> the battery powers <S> spectacular electrolytic corrosion, dissolving copper wires, the battery casing, component leads and <S> PCB tracks anywhere the water can reach, quickly rendering the thing useless and ... quite difficult to repair.
| If *water gets to batteries, then they could be effectively shorted out (read low enough resistance to cause problems).
|
Why is there a -12V rail for ATX The ATX specification includes a -12V (and an optional -5V) rail on the main power connector. What are these negative voltage rail used for on the connected circuits? <Q> -5V was the back-bias voltage for 3-rail DRAMs, in the era of 16kbit DRAMs. <S> These used 5V for the interface, 12V to power the storage, and -5V to provide negative bias to the chip substrate. <S> Without -5V, all 16384 storage transistors turned on at once, pretty much shorting the 12V supply to ground and destroying the chip. <S> You needed to ensure the -5V supply was working before starting the 12V supply. <S> However as it supplied a bias voltage, it didn't need to source a great deal of current; 5ma was enough for a whole 64k memory! <S> (the 12V supply was somewhere close to an amp) <S> Later DRAMs (starting with the 64kbit generation though there were some 16k versions) generated their own -ve supply with an on-board charge pump - and possibly still do, for all I know. <S> These were already coming into fashion as the PC started to take off, but were possibly still more expensive... <A> ATX specifications still require a negative 12 volt rail to meet PCI specifications. <S> Regular PCI, not PCI Express. <S> It will probably be phased out in the future as the negative 5 volt rail has been. <A> I once had a modem which needed -5 volts for its audio circuitry, and I wouldn't be at all surprised if some sound cards needed it as well. <S> It's possible that -12 would have worked just as well (and indeed that some cards that expect -5 there wouldn't mind if the pin carried -12 instead), <S> but if an op amp needs to accommodate inputs and outputs in the range of e.g. +/-1 volt, there would be no reason for the card's designer to favor -12 over -5. <S> The higher voltage would more than double heat dissipation, and even if the extra heat wouldn't pose a problem good engineering practice would suggest that it be avoided. <A> Long story short <S> : -12V isn't really needed and i've seen quite a lot of mini PCs and motherboards that run all fine without it. <S> -5V <S> became obsolete with the introduction of ATX 2.0. <S> Full-thrown DB9 RS-232 ports are hard to find on a modern mobo and if you don't need them anyway, you could just omit the -12V. <S> If you need the port later don't forget about that, as the port won't work without it. <S> If you plan to make your own SPS, like i'm about to do, you could use a small isolated converter or even a charge pump. <S> the current requirements are usually less than 10mA.
| -12V was necessary for proper RS232 serial port levels; I can't think of any other purpose for it in a PC.
|
What is the reason this USB battery charge circuit will not work without a diode? I have a single cell, ~2100mAh rated Li-Ion battery. Something like 18650, I have taken it out from a laptop battery pack. I want to make a simple charging circuitry for it since I will use it in the heart rate monitor that I am trying to build. I am going to supply power to the battery via the USB port. Whenever the USB cable is connected to the device to communicate with PC using MCP2200 USB-to-Serial converter, it will also charge the Li-Ion battery which is the main power source of the device. Below is the circuit I am using: Here is how it works: V_BUS is the 5 V power from the USB bus. C15 is the bulk capacitor, I did not want to violate the standard, so I put a 4.7 uF capacitor. Also, since I did not want to violate the current limit of the standard, I have put a current limiter in the charger circuit; D5 and D6 limit the voltage that is dropped on R22 + (Vbe of Q2). The way the charging circuit works is simple; Q2 is current limited, but to limit also the voltage, TL431 is configured to control the base of Q2 with respect to the voltage on node A. Also, there are some other circuitry after node B, that is powered up from the battery BT2. Here is some of it shown: Now, I thought there is no way the battery can supply current to Vbus since Q2, D5 and D6 will be reverse biased, but it seems like I am wrong at some points. At certain voltages of the battery, for example at about 3.8V, MCP2200 cannot enumerate and Windows does not recognize it as a virtual serial port. Whenever I remove the battery, this problem is solved, USB enumerates successfully every single time. Also, I have inserted a diode between node A and node B with a polarity that is shown in the schematic, and this worked, too. I know that I have to connect R28 to node B again to compensate for the voltage drop of the added diode. That makes me come to the conclusion that battery feeds the circuitry on the left of it and messes up with the voltage or current levels of USB standard and it cannot enumerate. However, I cannot give a logical explanation. Edit: When the battery voltage is 3.8 V, I measure 4.3 V on the V_BUS node when the USB cable is not connected and there is a diode between Node A and Node B. Edit: It seems like V_BUS was getting fed by Rx pin of MCP2200, through the protecting diode inside of MCP2200. Madmanguruman said it right, I have to include full schematic and here it goes; Page 1 and Page 2 of the full schematic. I have edited the code to idle this pin at 0 V instead of 5 V, and the problem seems to be solved now. What is the reason this USB battery charge circuit will not work without a diode? <Q> As Madmanguruman noted, you did not show your complete schematic, so it was not possible for us to diagnose the problem. <S> The reason you were seeing some problems when you plugged your USB cable, is because there was already a voltage present on the V_BUS before you connected your cable. <S> Also, this voltage may even be fluctuating. <S> MCP2200 is rumored to be a PIC18F14K50. <S> Here is the pseudo block diagram of the input pins of MCP2200: <S> When there is no voltage present on V_BUS, which is the case of an unplugged USB cable, the applied voltage, hence current, flows through the input pin, which is Tx of your microcontroller, through the upper diode, to the V_BUS. <S> There you have it, 4.3V on your V_BUS <S> , exactly one diode drop lower. <S> Here is what to do; make the Tx pin on your microcontroller LOW if you are bit banging, or disable the UART module if you are using the hardware serial peripherials, until you somehow enter the serial mode. <S> If there is not some kind of "serial mode" or "PC connection mode" in your application, you can detect the connection by checking for a serial input, for example, start the module (or make TX pin HIGH if you are bit-banging) after you receive a character, say; S . <S> When you start the serial port, you make the Tx pin of your microcontroller HIGH, after that be sure to transfer a dummy character or <S> MCP2200 will get confused and you will not be able to communicate over serial. <A> With no cathode voltage from V_BUS, the regulator can not generate its reference voltage, so it is ON when the battery is connected. <S> V_BUS is shunted to ground by the 100 ohm resistor. <S> Edit: Nope. <S> Wrong answer. <S> Thought it might go unstable when V cathode less than V ref-internal, and V ref high. <A> Interesting solution of discharging battery to voltage divider for TL431: http://belza.cz/charge/liich.htm
| Here is the reason why; the PIC microcontrollers generally have protecting diodes, which are called internal clamp diodes, to both rails on their input so that any over-voltage, that is voltages higher or lower than a diode drop from Vcc or Vss.
|
Why does this buck converter output such low current? I'm making my first attempt at building a buck converter, as a constant-current supply for a 700ma LED, from a 5V or 12V supply. I have it working with the parts I had on hand, at about 88% efficiency, but even at 100% duty cycle, the output current is only around 70ma for a 5V input. For a 12V input, it'll go up to about 185ma, but my diode starts to heat up then. The switch is being driven at 62.5KHz directly from the PWM pin of an Arduino. There is no feedback currently, since it's designed to power a specific load at a specific input voltage. I simulated the converter in LTSpice before building it, though the parts aren't the exact same part numbers as in LTSpice, so I'm sure many of the important values are somewhat different. On the breadboard, I used: a DMG3420U (logic-level N-channel MOSFET) polarized caps 1N4001 diode a 47uh inductor I had around (I know nothing else about it's specifications, is there some way to measure the important ones?) There are a few things puzzling me: My understanding was that when the duty cycle is 100%, the diode would be reverse biased, so there shouldn't be any power dissipation there. Why would mine be heating up? Why is the converter only supplying 70ma? What can I do to find out what is limiting it? The LTSpice simulation shows it supplying around 850ma with a 99% duty cycle, but with different parts. My circuit, with a 30% duty cycle. Channel 1 is the gate pin of the MOSFET, channel 2 is the output to the LED. The ripple is fairly low, so I think that means it's running in continuous mode. My circuit again, with a 100% duty cycle. At this point my bench supply says it's supplying 70ma, at 5.0V. If I turn up the voltage to 12V, I get around 185ma out of it. The FET is an N-channel FET I happened to have around. Both capacitors are 10uf. The diode is a 1N4001 (not ideal, I know.) The inductor is a 47uh inductor I happened to have around. I don't know anything else about it. <Q> At 100% duty cycle, you are correct in that the diode will not conduct. <S> Also, your buck inductor will saturate out and you'll have the input voltage (minus resistive losses) applied directly to your LED with no other means of current limiting. <S> You're not driving the MOSFET correctly. <S> Your pulse voltage should be from gate to source, not gate to output return. <S> Buck converters with N-channel series MOSFETs need a high-side supply. <S> The MOSFET will never be able to fully turn on with gate and drain close to the same potential with respect to source, since the minimum gate threshold for this part (with respect to source) is around 1.1V. Tangent: you said you want a constant-current supply, yet in your powertrain you're not measuring the current that you wish to keep constant. <S> I don't quite follow how this is supposed to work. <S> I would expect that you have some sort of current sensing element (like a resistor) in series with your LED, which would be used to generate a voltage to control the duty cycle of the buck to make the current constant. <A> Where to start? <S> You don't show how you are driving the FET, but I am going to guess that it is being driven referenced to the source (I see Madmanguruman also mentioned this ... and more completely). <S> The LED (which appears to be obsolete ... <S> if this is it Digikey, says it was discontinued in 2011) has a forward drop of about 3.2V @ 0.7A, and with a PWM frequency of 63kHz means that you will want about 330uH for L1 (about 10 times what you've got now). <S> Here is a post that addresses choosing an inductor for a buck regulator. <S> 20%), so the equation would be: \$L\$ ~ <S> \$\frac{5 V_{\text{LED}}}{I_{\text{LED}} F_{\text{PWM}}}\$ = \$\frac{5 \text{(3.2 V)}}{\text{(0.7 V)} \text{(63000 <S> kHz)}}\$ <S> ~ \$330 \text{$\mu <S> $H}\$ <S> Looking at the waveforms, the top trace of the first picture doesn't look like the gate voltage. <S> It looks like the source or cathode of D2. <S> Note that when the switch turns off and voltage goes low, it goes below ground like you would expect the diode cathode to do. <S> Then note that about 2uSec later it jumps up to what appears to be the voltage across C1, like you would expect if the L1 ran out of energy and became discontinuous. <S> That's probably about the right amount of time for an L1 of only 47uH. <S> It should also ring at that time, but there is enough loss somewhere in the circuit (L1, D1, or maybe even M1) to dampen it out. <S> It is not clear how you are controlling the current, but driving a LED with constant current, you should not need C1. <S> Just keep the ripple reasonable in the inductor and get constant current in the LED. <S> It would also be easier to compensate the loop without C1. <S> As you pointed out, the 1N4001 is not a great choice, it will be too lossy. <S> A schottky would be better. <A> If you have 5V on the input, that 5V has to be dropping across something as current flows from the positive terminal of the source back to its negative terminal. <S> That something is what's limiting your current. <S> The obvious contenders are the FET, the choke, the input supply, and the load itself . <S> None of those components look like they should have those kinds of drops across them, based on the part numbers in your schematic, but obviously something's not adding up. <S> You should also consider the solderless breadboard; they can be difficult to predict. <A> I think your magnetics is very small. <S> With power inductors, inductance is not everything. <S> Check its series resistance and the maximum current it can support.
| To find out what's limiting the current, turn the duty cycle full on and look for voltage drops across each component. Since this is not a voltage output, but you would still want continuous conduction, you can probably get by with higher ripple current (in this case +/- Also, there are parts that provide PWM control for LEDs, like this one (which is the cheapest example at Digikey).
|
Measuring voltage on ac adapter I have a device (an ADSL modem) that when plugged in to an ac adapter does not seem to do anything (power light stays off). I would like to know how to measure voltage for an ac adapter to make sure it is working. I have multimeter, but when I connect the inner and outer rings of the supply, it does not register any voltage (I assume it probably needs some load in order to give a voltage but I am not sure). Output rating is 12 V / 1.4 A. I tried with a different ac adapter and it also did not register voltage. Yet while measuring a AA battery it shows correct values, which leads me to believe that I am not doing something right. <Q> Since you're not getting any reading for two different adapters there's indeed a chance that you're doing the measurement wrong. <S> Is the AC adapter <S> also AC out? <S> If it is, then you'll have a zero reading if your multimeter is set to DC. <S> Setting the multimeter to read AC voltages you should get a reading different from zero, even without a load. <S> The voltage will be higher than the rated voltage, like a 12 V AC adapter may give 14 or 15 V without load. <S> Likewise, if the adapter has an unregulated DC output the unloaded voltage will be higher than the rated voltage. <S> So, check that you're measuring AC voltages with the multimeter in an AC position. <A> I can only think of 2 possibilities: 1) Are you absolutely sure you are making contact to the inner and outer rings of the adapter connector? <S> 2) <S> Are you using the same range scales on your multimeter when you measure the adapter output vs an AA battery? <S> It is possible that your multimeter works on a low voltage range for the AA battery but not on a higher range for the adapter. <S> At worst, the multimeter will indicate overrange. <S> If it does, then your multimeter is faulty. <S> If it doesn't, then you may have multiple faulty adapters. <A> You may need to check the connector type on the end of the adapter. <S> There are two general kinds of power supply adapter plugs in common use. <S> The picture below shows the two types - both of which are referred to as "barrel type" or "coaxial power type". <S> Note that the type at the top of the picture has a full metal inner sleeve that is easy to contact with the multimeter probe. <S> The alternate type as shown in the lower section of the picture only has a pair of contact fingers on the inside. <S> Connection to a multimeter probe can take some finesse to make sure the probe hits one of those contacts. <A> An AC power adapter is only a transformer with secondary AC rated at 12VAC. <S> These are usually used to power multimedia amplifiers - the other parts converting AC to DC voltages are already inside the circuit of the amplifier. <S> It consists of 4 diodes connected as a bridge recifier and a filter capacitor.
| If you are using different ranges, I suggest leaving the multimeter at the range for the AA battery and then try to measure the adapter voltage.
|
Arduino Question regarding the resistor I was instructed to set up a resistor on the negative side of the LED and pulling it to ground. I'm confused why we are implementing a resistor on the backside (negative end) of the LED. I always thought we put resistors before our load (LED) to limit/control current flow. Therefore, I'm confused why we are putting the resistor between the cathode (negative end of LED) and ground. To me it seems like this resistor isn't doing anything. I don't know if it helps but on my board the positive side of the LED is connected to PIN 13 and the negative (cathode) end is going to the resistor then to the ground on the breadboard then to the ground pin on the Arduino board. I apologize for the picture as it's the best I can get it at the moment with what I have available to me. <Q> While driving a load with a microcontroller, you may add resistors on either side. <S> This is because the current entering the LED and leaving out of the LED is the same. <S> They can be used on either side and either way because they are not polarized. <S> In such configurations, resistors limit current flowing through an active component (LED in your case). <S> Considering Kirchoff's Law , it doesn't matter if the resistor is on the positive or the negative side of the LED. <S> It would limit the same amount of current irrespective of the positive side or negative side of LED. <S> More reading: <S> Kirchhoff's Laws <A> For the current the order of the resistor and the LED doesn't matter. <S> The current has to flow through both, so the voltages on the elements resulting from the current on each element are the same. <S> Independently of the order they add up to the same total voltage, because addition is commutative. <S> That would change if you were interested in the voltage at the connection between the resistor and the LED. <S> For example, with a resistor between the cathode of the LED and ground it is relatively easy to measure the current, using the voltage and the known value of the resistor. <A> The order of components in a series circuit does not matter [1] . <S> Consider a hydraulic analogy: a wire is like a hose, a diode is like a check valve, and a resistor is like a pinch in the hose that restricts flow. <S> You want to limit the current (water) that can flow in the hose. <S> Does it matter where you pinch it? <S> [1] at least, not until the speed of light is slow relative to the operation of the circuit. <S> See <S> How does the current know how much to flow, before having seen the resistor?
| So if a resistor is used on the high side or low side, it would limit the current.
|
Wiring SSR with Arduino I'm attempting to adapt a project with the wiring diagram shown here: http://www.glacialwanderer.com/hobbyrobotics/?p=9 But instead of the electromechanical relay used in the above link, I'm using an SSR with a 25-amp load current capacity(this one: http://www.fotek.com.hk/solid/SSR-1.htm ) My question is, should I still include the diode and transistor as shown in the first link's wiring diagram? Would that be redundant/unnecessary when using an SSR as compared to an EMR? Just wiring up the Arduino pin to the SSR seemed to successfully be able to toggle the SSR's load circuit (with the AC disconnected of course) but I think I should be concerned about adequate safety, reliability etc... <Q> <A> You just drive it from your uP but remember to keep the current limiting resistor (the 1k). <S> I forgot it once and fried two SSRs (~$13) <A> The shown SSR has a trigger current of 7.5mA with 12V . <S> I found also a listing from 6-25 mA. <S> Using a 5V GPIO <S> you should ensure that the uP can drive 20mA, which is the case with the Arduino. <S> So you can drive it directly .The data sheet of the manufactor doesn't state the need of a current limiting resistor. <S> I know about comments that it does not work always this way with 3.3V GPIO with i.e. Rasperry Pi. <S> These values seem to close to the limit. <S> Also note, that this might work alone but starts to fail if you drive more things with other pins as sum of all pin currents is limited . <S> Therefore it is still recommended to use the transistor with a resistor (1k is fine) like shown in your post. <S> This way to trigger current does not flow over the GPIO but over the 5V supply. <S> This is the usual connection if you drive e.g. LEDs with a uP.Also this way allows to provide 5V to the SSR from a uP with 3.3V logic. <S> You don't need the diode at all for the SSR.
| Driving an SSR directly by an MCU output is the correct way to use them, you don't need anything else.
|
Cause of LED burn When I connected an LED to a 3.7 volt mobile battery, the LED started to burn inside with a smell. Even though it lit, there was a burning sound. What might be the cause? Please explain. <Q> You applied too much voltage to the LED, which caused excessive current, which caused it to burn up. <S> Check the datasheet. <S> How much current does the LED want? <S> A simple way to limit the current is to put a resistor in series with the LED: <S> In this example I assumed the LED is rated for 20 mA and that you want to make it about as bright a it can be. <S> Figure <S> a normal green LED drops about 2.1 V. <S> That leaves 3.7V - 2.1V = 1.6V accross R1. <S> By Ohm's law we calculate the value of R1 to allow 20 mA. <S> R1 = <S> 1.6V <S> / 20mA = <S> 80Ω <S> I used the first common value above that, which is 82 Ω. <S> You can use a higher resistance if you don't need the full brightness, and a different value will be needed for other than a typical green LED. <S> Red usually drops around 1.8 V, for example. <S> Check the LED datasheet. <A> The most likely cause of an LED burning is that you supplied too much current to the LED. <S> Your series resistor was insufficient to regulate the current to a safe value. <S> (too small) <S> The voltage of your battery was higher than you thought. <S> Most 5mm LEDs can handle about 20 mA. <S> You need to include a resistor that limits the current to that value <A> The following is a current voltage graph of a typical LED. <S> Unlike resistors, which have a linear voltage current relationship, LEDs have an exponential relationship. <S> Which means that after a certain voltage (operation voltage is typically round 2V for small LEDs), the current increases greatly for just a small further increase in voltage. <S> High current, in itself, for most electronic components is not a problem including LEDs. <S> The problem is the heat .i.e. <S> the component generates a lot of power which it cannot lose to the air around it fast enough, and starts to get hot. <S> For the first few moments the temperature is still low and everything is fine. <S> But if the condition continues the temperature gets high enough to fry the component. <S> The way we solve this is as Olin mentioned, is to solve by assuming that the voltage drop on the LED is the operation voltage and it is consuming its operating current. <S> The remaining voltage we want to lose to a resistor at this current. <A> For sake of completeness, you can also use a constant current source, or a current limiter. <S> These devices work by directly supplying (or limiting) the correct current for an LED rather than using a set resistor and relying on ohms law to limit the resistor. <S> For a few small LED driven from a fixed voltage it's a bit over-kill, but they're useful if you have a large set of LED's you want to drive, or if you want to be able to precisely tune the brightness/current of an LED, particularly larger high-power LEDs. <S> These devices come in several varieties, from some which act similar to a variable resistor with negative feedback control to others which are switch-mode and will "pulse" an on/off signal at high speeds. <S> Whichever method you choose, just make sure you aren't providing too much current to the LED.
| This can easily happen if: You don't include a resistor in series with your LED to limit the current.
|
From what used/junk equipment can I salvage solenoids from? I have a few old 24V solenoids which I've used for years for random (often Halloween-related) projects. I can't recall where I got them. I'd like to get some more, but new ones can be rather high priced. I sometimes buy junk printers to salvage stepper motors, or dismantle speaker cabinets to acquire a driver. What old equipment commonly includes solenoids that I can salvage (push or pull type, 12-24 V)? Pinball machines seem to be the most-cited, but I never see those at the thrift store. <Q> Cash Registers use solenoids to latch the drawer in place. <S> Sprinklers use solenoids. <S> As do cars for multiple parts, from door locks to fluid systems. <S> You are most likely to find solenoids at a Junk yard than you are at a electronics recycling plant or a thrift store. <S> Consumer electronics just don't need short range solenoids, at best they use motors. <A> Before high-quality printers became available, 9-pin printers were very common. <S> That's 9 solenoids from 1 cheap device. <A> This question is too broad to stay open, so I'll be brief. <S> Anything with a mechanical component that isn't just rotary motion is a candidate. <S> Printers, copiers, etc. <S> I got a nice solenoid once from a old car.
| If you can find an old dot matrix printer, they have a solenoid per pin.
|
Switch-mode power supply, and output voltage range - unregulated? This Wikipedia entry specifically on the SMPS part, says: Switched-mode power supplies are always regulated . To keep the output voltage constant, the power supply employs a feedback controller that monitors current drawn by the load. However, I've found a range of mobile phone powersupplies, which claim to be switched-mode, but specify their output as being 4.7-6.5VDC at 900mA max, rated for 4W. Given that these were switch-mode and a range being specified, is what struck me as being contradictory. So, I am wondering if these are fakes ? In fact, I went ahead and bought one of these, but at the moment, I am far from home and don't have my tools. It seems to be able to charge my Android phone, and is also able to power a RaspberryPi -- though I tried just the boot sequence and then switched-off, afraid of damaging the board. One thing in favor of their claim to being switched-mode, is that they are pretty light weight, and relatively small. So, is the range, only because their manufacturing is not under tight quality control, and they actually operate at a fixed + regulated output voltage, but there could be variations within that range, from one piece to another ? Edit: The power-supply is as such meant as generic / back-market replacement charger for Blackberry smartphones, that expect 5V supply. My primary use for these supplies is to power a cache of RaspberryPi's (model-B), with minimal peripherals. The supplies available closer home, cost more than twice as much, so was wondering if this could be a good money saving bargain. Edit2: (Feb 11, 2013)If the switch-mode power supply output is indeed unregulated, would a LDO as an intermediate step be a good way to regulate the final output to 5V ? Are there any inexpensive (<= $1) 5V LDO's which could do this job ? <Q> The 4.7-6.5V DC may well be within spec for charging a Blackberry (no idea) <S> but on the Raspberry Pi the 5V side of the power supply has a SMBJ 5V transient voltage suppression (TVS) diode across the rail. <S> That has a minimum breakdown voltage of 6.4V <S> so at 6.5V it will be conducting to some degree and will possibly blow the 1A fuse which is a SMT part. <S> However if it doesn't blow the fuse the 5V rail also goes to the HDMI connector and the USB host connectors so it may cause problems with attached devices as well. <S> I wouldn't recommend using that particular adapter and look for something that is regulated to within 5% of 5V as per the USB specifications, so 4.75V to 5.25V. <S> Also as Dave Tweed mentioned the Wikipedia article is incorrect (it mentions citation needed) and a switching power supply does not have to be regulated by definition. <S> In this case however it may well be a regulated switch-mode supply, just one that is not regulated to a tight tolerance. <S> As per the updated question a typical linear regulator such as a 7805 has a drop-out voltage of around 2V, so that could end up being as low as 2.7V <S> (if it works at all). <S> Some low-dropout (LDO) regulators may be in the order of 200mV drop-out but as you may be starting below the specified voltage that wouldn't help getting things within spec the whole time. <S> The robust solution would be a buck–boost converter that can produce a constant voltage from a supply greater than or less than the output voltage. <S> But in reality the cost / complexity would be greater than just purchasing a better supply. <A> There are entire families of devices known as isolated bus converters (for example) which operate at fixed duty cycle to convert DC to DC efficiently, and they're certainly switchers. <S> Even a regulated SMPS can have difficulty maintaining regulation at load extremes (usually very light or very heavy loads). <S> This is normal, and usually some special techniques are needed to ensure regulation at absolutely zero load and at maximum load. <S> Adding an LDO can help. <S> Bear in mind that the LDO headroom may sneak up on you when the DC/DC converter output is low, causing your output to go lower (don't use a 5V LDO on a 4.7V to 6.5V rail and expect 5V out all the time - the LDO will act almost like a diode once the headroom is breached, dropping a fixed amount of voltage). <A> wikipedia should say "SMPS are always regulated to keep output constant" (No full stop).And in general, any system (not only power supplies) need regulation to keep a variable constant, isn't that what control is for?Unregulated <S> systems exist, including power supplies and SMPS. <S> As they are not regulated, output is dependant on input, load, etc.
| No, a switching power supply need not be regulated.
|
Do I need input capacitors for a regulator following a regulator? My system contains several switching and linear regulators: Main DCDC regulator taking the incoming 50v power down to 6v. Several small regulators (DCDC and linear) creating 3.3v, 5v, etc. from the 6v. If the small regulators are very close to the main regulator (and thus very close to its output capacitor), do they all need their own input capacitors? Could they share the main regulators capacitor? Could they all share one input capacitor? <Q> If the ICs are close enough the input capacitors for the second stage converters COULD be combined with the output capacitor of the 1st stage converter. <S> However, I'd be cautious about using a minimum value capacitor here as there is the potential for dynamic interaction between the various converters - especially so with 3 combined if all are smps. <S> I assume that the 6V/5V regulator is linear as efficiency is then 5/6 = 83%. <S> You can get somewhat more than that with a smps with care but to get much over 90% you'd want a synchronous converter and a limited range of loads. <S> At a minimum I'd suggest that, if a common capacitor was used, the value should be a minimum of the sum of the values required by the 3 individual designs - and then increase as much as possible above that. <S> Some regulators may require ESRs in a specified range - with lower and upper limits. <S> You may have to look at the conceptual pole zero diagram which drives this specification and see if you can discern any likely effect from inter regulator interactions. <S> OR, more easily, use a largish cap that does not violate any of the spec sheet values and see how it goes :-). <A> If they are linear LDO regulators, within an inch or so of the main, they probably can share safely. <S> However they should be OK with sharing any larger reservoir capacitor (10uf or larger). <S> This is just guideline advice : any specific advice in the datasheets may override it. <A> For the big ones, caps in the uF range, who act as current reservoirs, they can be trustfully lumped if the regulators are not spread more than a few cm. <S> For the small ones in the nF range, acting more as high frequency shunts, I suggest to keep them by the respective IC as the impedance of a piece of trace can be important at high frequencies. <S> And as they are SMD and cheap, should not be a problem to keep them duplicated for the sake of "safety".
| If they are switching regulators, a low value (say 10nf, maybe 47nf) capacitor directly across their input pins will reduce the loop area for high frequency transients and reduce RF emissions.
|
Why use DC motors for driving elevators? This New York Times article says that on November 14, 2007 Consolidated Edison Company was going to end supplying direct current to the remaining several buildings that used those to run elevators. I don't get why there would be DC-powered elevators. Yes, at the end of 19th or the beginning of 20th century DC equipment was rather popular, but it's unlikely that an elevator would last a century and all the elevators I could find information for now run on AC. Also DC is typically preferred for easier RPM control (like in trains, tramcars, etc) but this is not a problem for elevators - they typically use two-speed three-phase AC motors and speeds are changed by switching the number of poles. Why would there still be elevators running on DC? <Q> Century old motors were well built! <S> And probably conservatively designed because electricity was new; they didn't know which corners you could safely cut. <S> In those days, everything mechanical was designed for easy maintenance; nuts, bolts, taper pins; simple tools to take the whole lot apart, adjust to take up wear, reassemble and use for another 10000 miles. <S> Run out of parts? <S> Turn another one to fit! <S> I had a 1910-era lathe still capable of turning within about 0.002 <S> " (traded it for a 1928 model!) <S> and my 1840s watch is keeping very good time. <S> Who knows, we may end up back there some day! <S> Meantime it's worth studying how things from another era are made; partly to keep the skills alive and partly because good engineering is good engineering, from any era. <S> Just to clarify because this seems to have hit a nerve : I'm not simply equating long life with good engineering. <S> What makes these motors good engineering is the skill with which they met their design goals using materials and techniques available at the time. <S> And long life was almost certainly one of them; reliability (not measured as MTTF but the ratio between MTTF and MTTR) i.e. easy repair, and efficiency. <S> Swapping motors for a fix is not the issue; replacing brushes, re-lining bearings or (major job!) <S> rewinding the motor was what happened - and what the motors were designed for. <S> It's NOW we kinda-sorta-fix things by replacing motors. <S> We haven't improved THAT much on 92% efficiency in a motor in the last hundred years, but we do it with a lot less copper and iron. <S> We can equally well admire a modern brushless motor with sealed bearings and no maintenance for ten years; they can both teach us something. <A> I think the reason is DC motors when series connected (the armature and field coils) has a high torque at low speed (including 0) which fits well for elevators, trains and traction purposes. <A> San francisco also has a existing DC network in place which supplies old elevators. <S> I think the answer is far more mundane ... <S> In the early days of power transmission there was the Edison vs. Westinghouse DC vs. AC fight with Edison being a proponent of DC <S> (Edison promoted the electric chair in part to show how dangerous AC was). <S> This was known as the "war of the currents". <S> It's likely that this is just a hold over from the days when some cities started out with DC distribution grids. <S> The big hint is that it's Con Ed that is supplying the power ... from an article in IEEE spectrum magazine Nov 2012, by Peter Farley <S> There's more in there about winding motors on elevators. <S> Dynamos produce direct current. <A> for ac induction motor, if u change the number of poles it increases the synchronous speed of the motor to control the speed it requires external auto transformer which increases the cost.
| dc motor provide high starting torque with less transients also it enables to vary the speed at different ranges and easy control with armature voltage control and flux control. In an era of relatively cheap labour and expensive materials, this made sense.
|
Interfacing with RAM from a PC, e.g. SDRAM / DDR, to a microcontroller I'm looking into interfacing standard PC form-factor SDRAM or DDR sticks to a microcontroller, but I can't find any definitive details on how they work in terms of how the bus works. I guess it's similar to how any standard SPI or I²C interface works - send some instructions to the device, then read back some results until a particular pin state is met. Except in this case the data and address buses are parallel instead of serial. I have three related questions on the topic: What interface does standard PC memory, e.g. SDRAM or DDR, run on? I remember reading something about JEDEC being responsible for the spec, but I can't find any specific details. I'd like to use DDR (or DDR2) since it's cheaper right now, but I'll settle for SDRAM. Can standard PC memory be bought down to more "comfortable" clock speeds? The standard bus speeds for these things tend to be around 133MHz, but I'm hoping to run them at less than 1MHz. My understanding is that SDRAM wait for clock edges before responding to commands, so a low clock frequency should result in it being manageable by a microcontroller. What's the name of the physical interface? I tried looking on Farnell for sockets for such memory devices, but I only found some really tiny pitch surface-mount stuff. I could probably build my own through-hole version if I spent long enough, but I'd prefer to just buy one pre-built. <Q> Some single data rate (SDR) SDRAM can be run at slower rates - check the Clock Period (max) spec. <S> However, you have to issues refresh commands on a regular basis, and if you clock at 1MHz you might find you have no time for anything else! <S> DDR SDRAM typically has a minimum (yes, minimum) clock frequency in the high tens of MHz... and the physical interface would be very challenging to implement on a micro as it returns a clock/strobe-like signal along with the data and you have to find the middle of that clock period to know when to sample the data. <S> Micron is a great source for datasheets which document the interfaces very well. <S> As for physical connectors, they are called SIMM and DIMM (single and dual inline memory module) <A> Unless your microcontroller has a direct bus support for interfacing to DDR/DDR2/DDR3 type RAM or your microcontroller is interfaced through an FPGA which has been programmmed to provide the RAM interface then it is likely that futzing around with DIMMs is not a useful exercise. <S> There are several strong reasons why this is the case.... <S> 1) DDR memory chips may be operating at lower voltages than your microcontroller. <S> 2) <S> The interface to the DDR memory is multiplexed and requires precise clocking whilst the multiplexed lines change states in sync with said clock. <S> 3) <S> Modern DIMMs are designed to operate at very high frequency clocks of 800MHz, 1066MHz, 1333MHz, or 1600MHz. <S> Signal integrity is extremely extremely important when designing the circuit connections to the DIMM. <S> It is not a trivial exercise and the memory chips can be extremely sensitive to noise as a result. <S> 4) DDR memories require constant refresh to keep the memory cells data valid. <S> Without refresh the memory content fades away over time from milliseconds to seconds. <S> 5) <S> The command structure to operate modern DDR RAMs is complex. <S> The most complicated part is getting the initialization sequence correct which consists of some 13 to 20 individual steps. <S> 6) <S> Modern DIMMs are designed to feed data to modern PC type computers very fast. <S> The typical DIMM has a data path width of 64-bits. <S> Multi rank DIMMs also require multiple clocks and chip select signals to access all of the memory chips on the memory stick. <S> It is unlikely that the typical small microcontroller can make effective use of this wide data format without an excessive amount of external circuitry. <S> Keep this in mind too. <S> There is an engineering specialty for programmers that work in the BIOS field called MRC (memory reference code). <S> This is the program code module that initializes the DDR controller and all the attached DIMMs. <S> This specialty employs the best and some of the most senior BIOS programmers that do nothing but MRC coding as a full time job. <A> In order to use SDRAM, you need to have a chip that contains an SDRAM controller, period. <S> Either get a microcontroller that has one, or attach an FPGA that has one to your microcontroller. <S> Either way, it isn't a project for a beginner.
| Companies that make PC style processors that utilize DIMMs have onboard controllers to interface to the memory sockets.
|
Usefulness of constant current limiting in bench power supply I'm building a bench power supply as my introductory project to electronics. When it comes to adjustable voltage it's easy to see the usefulness of such feature but I can't figure out what is the usefulness of having adjustable contant current limiting on a power supply ? Isn't ideal to have a power supply providing as much current as possible/needed for a circuit ? <Q> Limiting the current and the voltage effectively limits power, since power \$P\$ is the product of voltage \$E\$ and current \$I\$: \$ <S> P = <S> IE \$ <S> Since bench supplies are commonly used for prototyping, where faults are commonly introduced mistakenly, this is a big win. <S> Many faults that would normally destroy a device will instead not destroy the device if the total power is low. <S> This is because many faults destroy components by excessive power generating heat faster than it can be carried away, causing (often microscopic) materials to melt or vaporize. <S> If the power supply can't supply enough power to vaporize your components, then this just can't happen. <S> Also in some cases it can be handy to have a current source instead of a voltage source. <S> Driving an LED, for example. <A> One thing that I dont see anyone mentioning is that a current-limiting supply is excellent at locating short circuits. <S> Set it up to limit current, set your voltmeter to its millivolt scale and start probing around the power and ground net. <S> Move only one lead at a time, looking for a lower and lower voltage between the two points. <S> the lower the voltage drop, the closer you are to the short circuit. <S> This makes short work (heh) of finding the tiny solder ball or bridge on a board filled with components. <A> I usually use constant current mode when powering a newly assembled board. <S> I set the supply to a minimum current and power up the project, then I slowly increase current limit while looking at the current consumption closely - if it does not increase above some calculated estimation, I'm certain I have no shorts or other heavy failures on the board. <A> Desk top lab power supplies are designed with current limit control so that, should you choose, you can control how much current gets to the load. <S> This can be useful in several ways. <S> 1) You can use this to test a circuit / component to a certain current level without having to use a resistor box in series from a fixed voltage supply. <S> 2) <S> The current limit can be used as a safety feature for either a new circuit or a faulty circuit under test. <S> The controlled current limit will keep the circuit from blowing itself to bits or severely overheating if there were shorts, backwards components or bad semiconductors. <S> 3) <S> The variable current and voltage controls of the lab supply make it easy to step through a whole series of data points for a circuit or component to collect data so that you can plot a current versus voltage plot. <A> A current-limiting bench supply is an essential tool when prototyping. <S> If one has enough space, and is operating at low enough power levels, that having the supply draw the maximum current from its source transform and dissipate all the power as heat would not pose a problem, a transformer, a regulator, some caps, a handful of resistors and two LM317 regulators would suffice [without current limiting one would only need a single LM317]. <S> Commercial bench supplies aren't exactly free, but if your labor is worth much a small unit may be worth the money. <S> If you don't want to buy a commercial supply, it may still be worthwhile to build a simple board with a current limiter that has a few settings (perhaps use a switch instead of a pot if you like), a few fixed-voltage outputs (e.g. 5.0 volts and 3.3 volts), and a variable output. <S> One could probably build such a thing on perfboard with an hour or two of work. <S> Even a board which only has an approximate 20mA current-limit setting may be useful. <S> In many cases, one can program a processor-controlled board in such a way that it should take less than 15mA [by not having the processor enable any functions that would take more]. <S> If one powers up such a board with a non-current-limited supply and something isn't right, it's possible that a mis-wired part could fail in such a way as to cause widespread damage. <S> If one powers up the board with a roughly-20mA current-limited supply, the 20mA current limit will generally be low enough to prevent immediate damage. <S> PS--It's entirely possible that an accidental short which causes 20mA to flow where it shouldn't will cause some parts to be operated outside their Absolute Maximum Ratings. <S> Any time a part is operated outside its AMR, one should expect that it may have been damaged thereby, and be aware of the possibility that a such damage might ironically alter a part's behavior in a way which would cause it to work in one's application even though an undamaged part would not. <S> Nonetheless, when one's trying to get a design working for the first time, it's often helpful to assume that things will have probably escaped damage unless one sees evidence otherwise [especially when a 20mA current-limited supply makes it likely that they will have done so]. <A> I think it would be valuable to add, as most answers suggest that CC mode = protection, that when relying on a power supply's constant current mode to protect components one should keep in mind that the transition between constant voltage and constant current modes is not instant, and in that time frame the unit will supply more current than intended, likely it's rated maximum. <S> This transition time varies from unit to unit and also usually depends on the difference between it's maximum current rating and the set current limit ( <S> the bigger the difference, the faster the transition will be). <S> So if protecting the components is important, make sure to check your power supply's current overshoot at your intended settings and anticipated load changes before relying on it as your only protection.
| A power supply with adjustable voltage and current limits can be either a current-limited voltage source, or a voltage-limited current source.
|
Why would one drive LEDs with a common emitter? I've seen tutorials aimed at beginners suggest the way to drive an LED from something without enough current drive is this: (option A) but why not this: (option B) Option B seems to have some advantages over option A: fewer components the transistor does not saturate, leading to a faster turn-off the base current is put to good use in the LED, instead of making the base resistor warm and the advantages of option A seem to be few: brings the load closer to the supply rail but when Vcc is significantly greater than the forward voltage of the LED, this hardly matters. So, given these advantages, why would option A be preferred? Something I'm overlooking? <Q> I would argue that there are fewer "gotcha's" with option A. I would recommend option A to people of unknown electronics skill because there's not a lot that can keep it from working. <S> For option B to be viable, the following conditions must be true: \$V_{CC_{LED}}\$ must be equal to \$V_{CC_{CONTROL}}\$ \$V_{CC}\$ must be greater than \$V_{f_{LED}} + V_{BE}\$ <S> It is a topology unique to BJT devices <S> These conditions are not as universal as they might first seem. <S> For example, with the first assumption, this rules out any auxiliary power supply for the load that is separate from the logic power supply. <S> It also starts constricting values of \$V_{CC}\$ for a single LED when you start talking about blue or white LEDs with \$V_f\$ > 3.0 V and a controller running off a supply less than 5.0 V. <S> And I think the other thing is that you can't really replace the BJT in option B with a MOSFET if you wanted to eliminate that base current. <S> Additionally, it is more complicated (marginally, but still) to calculate your load resistance. <S> With option A, you can use an analogy such as "consider the transistor to operate like a switch". <S> This is easy to understand, and then you can use familiar equations to calculate \$R_{load}\$. <S> \$R_{load}=\dfrac{V_{CC}-V_{f_{LED}}}{I_{LED}}\$ <S> Compare that to what is required for option B <S> and there is the marginal increase in difficulty: \$R_{load}=\dfrac{V_{CC}-V_{f_{LED}}-V_{BE}}{I_{LED}}\$ Couple that with the fact that the advantages of option B often are not needed. <S> Aside from the reduced part count, the base current from option <S> A shouldn't increase the power consumption by more than 10%, and LEDs are rarely (unsubstantiated qualitative guess) driven fast enough for BJT saturation to matter. <A> An even better variation on your option "B" is to put the LED in series with the collector, while leaving the resistor in series with the emitter. <S> simulate this circuit – <S> Schematic created using CircuitLab <S> This turns the transistor into a controlled current sink, where the current is determined by the base voltage, minus V BE , across the resistor. <S> The base voltage normally comes from a digital output of a microcontroller, which is fed from a regulator, so its value is tightly controlled. <S> For example, if you're using 3.3V logic, and have a 270Ω resistor, you'll get a nice 10 mA through the LED. <S> The anode of the LED (or even a long string of LEDs) is fed from a higher voltage (which doesn't even need to be regulated), and whatever voltage drop that doesn't appear across the LED(s) appears across the transistor. <A> Option B requires the control signal to be raised to a higher voltage than the LED drop voltage plus the base/emitter drop voltage. <S> Option A on the other hand can easily drive any LED drop voltage assuming your supply rail is high enough <S> and you don't reach the base/collector breakdown voltage. <S> Also keep in mind if you intend to drive multiple LED's in series you have to add up all the drop voltages of the LEDs. <A> Option A is a neat ON/ OFF switch. <S> When BJT is saturated, LED current depends basically on Vcc and R3, so LED will have a constant brightness. <S> Option B is an "emitter follower" and makes LED current to depend on input voltage, as VE would be Vin -0.7. <S> Option B is good if you want to control LED current and brightness. <S> But most of the times, it's better done with option A and a PWM scheme (more accurate) <A> I am not convinced about your implied assumption that the usual way is to use a the common emitter configuration. <S> However, let's assume that's true. <S> It's not worth going into the merits of the various approaches since that's not your question anyway. <S> I think the reason is that the common emitter configuration is the conceptually obvious one, and there is little more to it than that. <S> Keep in mind who writes this kind of advice you "see on the internet somewhere". <S> The guy that uses whatever method is appropriate for the particular design without it occurring to him <S> this is <S> even a issue isn't going to think of writing up a web page about how to drive a LED. <S> It's the person who just spent 2 days figuring out which legs of the transitor is the collectorator, emisser, and base-a-ma-thing, then a week getting the microcontroller code to blink the LED that's going to proudly post Looky me world <S> , I done blinked me a LED!!! <S> For those people, the common emitter configuration is the conceptually obvious one. <S> Common emitter is sortof the poster case of how to use a bipolar transistor. <S> It is more obvious how the transistor provides amplification. <S> For the newbie, emitter follower and even worse, using a bipolar as a controlled current sink, sound like advanced concepts.
| If your control driver is able to operate at a higher voltage than the LED drop voltage plus the transistor base/emitter drop voltage, then Option B would be valid.
|
How to sample and hold on very narrow pulse? I am looking to construct a simple data logger to record the peak intensity from a flash strobe. When a flash is detected, the peak will be captured (ADC), time stamped and written to memory. The frequency at which these bursts of light arrive would be roughly 0.2 Hz (one every 5 seconds or so). A typical output from my sensor in the presence of a flash strobe is shown below. The flash intensity is so great with respect to ambient conditions that detecting the flash is not an issue. In fact, I am already doing this to count the number of flashes. My problem then becomes sampling the peak value. My instincts tell me to utilize a sample and hold IC (LF398 for example). Looking at the datasheet, it seems I can achieve sub 10us acquisition times and that is acceptable to me. If I could then detect the peak (second derivative), I would know precisely when to hold. Problem is... I don't know where to start with that. Am I going about this wrong? Any suggestions? <Q> A peak detector is something of a sample and hold that samples all the time, and holds the peak: <S> Follow the input with this, and connect the output to your ADC. <S> Make C significantly larger than the capacitance used by your ADC's sample and hold, or follow it with a buffer , so the voltage across C doesn't sag as you read it. <S> Trigger an ADC reading just after the event happens, and when it's done, close the switch to reset the peak, or make the switch a resistor forming an RC time <S> constant significantly longer than the time it takes to measure the peak but significantly shorter than the interval between peaks to accept a little error but avoid the need to reset the peak detector. <A> This looks like a solution for a T&H <S> (Track and hold) circuit, like that from a TI (Burr-Brown) SHC605. <S> There are many expensive solutions including those from from Analog devices that can do everything you probably need as well. <A> I agree that the idea from @rawbrawb <S> that a peak detector is the right approach for this project. <S> Use a comparator to detect the leading edge of the flash pulse and then do a fixed delay, an R/C delay would probably work well, feeding into a second comparator. <S> The output of that 2nd comparator would trigger your S/H and start the A/D conversion. <S> The R/C delay would be long enough so that the peak detector has settled from the pulse capture. <S> After your MCU has grabbed the A/D conversion the software could pulse an output GPIO pin that coupled back into the peak detector circuit and reset it back to minimum level and get it ready for the next peak capture. <S> There are numerous examples of peak detector circuits around that you can find in various vendor data sheets and application notes. <S> The simplest of course is to feed the signal level through a Schottky diode and into a small capacitor. <S> This of course has the disadvantage is that you lose some signal level equivalent to the forward bias drop across the diode.
| An alternative is a peak detector circuit or precision rectifier - with reset of course!
|
How do you pronounce the following set of 'words'? I've heard people pronouncing the following 'words' in different ways and I would like to know the correct way of pronouncing them. SPI (spy vs s.p.i) I2C (I.2.C vs I.squared.c) LED (lead vs L.E.D) I use s.p.i, i.2.c and l.e.d because these are all abbreviations and not really 'words'. I mean, people don't really call USB as us-b right? <Q> I think pronunciation is related to region, laziness and the presence of phonetic pronunciation. <S> Short acronyms are <S> regional - Several answers here indicate this by the variation in SPI pronunciation. <S> Some examples: <S> Longer acronyms with phonetic pronunciation to some extent UART - Yu - ART ASCII - <S> AS - KEY VHSIC - VEE - H - SIC Acronyms with no phonetic pronunciation <S> VHDL - VEE - H - DEE - EL XKCD - EX - KAY - CEE - DEE <S> ;) <S> My pronunciation: <S> SPI - ES - PE - EYE <S> I 2 <S> C - EYE - squared - C LED - EL - EE - DE <S> USB - YU - ES - BE <A> I2C, SPI, and USB have no set pronunciation. <S> NXP/Phillips, Motorola, and the USB consortium declined to set a pronunciation in the relevant specifications for each of the protocols. <S> They also decline to state whether they are acronyms or abbreviations. <S> As such, there is no set guide for how they should be pronounced or used. <S> It is left to common usage. <S> Personally, all four are abbreviations, and I pronounce them as such. <S> I have heard SPI called the Spy Bus, but not often. <S> And that was a bit conflicting as there is a Spy Bi-Wire bus used by Texas Instruments, normally referred as SBW or Spy. <S> Basically, you pronounce them like others you talk to pronounce them, and never bring it up in polite conversation. <A> SPI = "Spy" as in "the Spy Bus" I2C = "eye squared sea" as in IIC = <S> I^2 <S> * C = <S> I2C = <S> Inter-Integrated Circuit Bus LED = "El Ee Dee" <S> (but Dave Jones does say it like the past tense of "lead" routinely) <S> There is, of course, no definitive right answer to this question as you'll hear them spoken in different ways by different people. <S> But all the cool kids are saying it this way. <S> For fun, UART is said "You Art", QUART is said "Queue Art", <S> ARM is said "arm", IC is said "ick" (j/k) <A> SPI = <S> Spy I2C = eye - two - sea LED = <S> Ell - EEE - DEE USB = <S> You - Ess - Be
| Longer acronyms (4 letters or more) are generally pronounced phonetically due to laziness if they have a phonetic pronunciation. I2C as Eye Two Cee instead of Eye Squared Cee, though Squared is more accurate.
|
Wake up MCU on UART RX data I have several MCU's of which I cannot use the deep-sleep modes, because they cannot wake up on UART data coming in. Are there any components for sale which can solve this? I can imagine something that delays the RX line for a fraction and toggles an GPIO on data arrival, which I can use the wake up the MCU. <Q> Any MPU with pin change interrupts should allow this. <S> Some (MSP430 at least) can wake in a microsecond and start timing the start pulse right away. <S> But even if your micro can't wake up fast enough, can you transmit an extra character at the start of the message to wake it up? <S> If you give us a clue which MCU you mean, someone might have a more appropriate suggestion. <S> The datasheet for the LPC11U1x says (page 2) Up to 8 GPIO pins can be selected as edge and level sensitive interrupt sources. <S> (page 14) <S> USART <S> RXD <S> ... PIO0_18 ... <S> so the UART RX pin is also a GPIO pin (PIO0_18 on some packages) (page 18) <S> Any GPIO pin providing a digital function can be programmed to generate an interrupt on a level, a rising or falling edge, or both. <S> (page 26) <S> The User Manual says(page 35) 3.5.33 Pin interrupt select registers <S> Each of these 8 registers selects one GPIO pin from all GPIO pins on both ports as the source of a pin interrupt. <S> To select a pin for any of the eight pin interrupts, write the pin number as 0 to 23 for pins PIO0_0 to PIO0_23 <S> (page 38) <S> 3.5.37 <S> Interrupt wake-up enable register 1 <S> This register selects which interrupts will wake the LPC11Uxx from deep-sleep and power-down modes. <S> Interrupts selected by a one in these registers must be enabled in the NVIC (Table 58) in order to successfully wake the LPC11Uxx from deep-sleep or power-down mode <S> So it looks feasible. <S> One remaining question is how fast you can get out of deep sleep in the interrupt handler and restart the UART. <S> I'll take a wild guess and say fast enough. <A> If the micro is really unable to wake-up from whatever sleep mode you are in based on UART RX traffic, there probably is a dedicated I/O pin that is capable of waking the micro from deep sleep. <S> You could tie the two pins together <S> (UART RX and I/O pin) <S> and then you would wake up from deep sleep. <S> I've never seen a micro that didn't have some I/O pin or peripheral that could wake it up from every sleep mode it had. <S> Otherwise it's not really a sleep mode so much as a death mode. <S> If you can't recoup any pins, you could probably set the micro to wake-up periodically based on a timer overflow (depending on your baud rate) and check the state of the pin, but now we're getting into ugly solutions. <A> Many processors can wake up when an input changes, including the UART receive pin, but cannot wake up fast enough to ensure correct reception of the first character that arrived following the wake-up. <S> You don't specify what baud rate you are using, but it may be possible to wire a small (and cheap) processor which has a very fast wake-up cycle between the device that's transmitting and your other processor. <S> That processor would sleep while it waits for a falling edge on its rx line. <S> Once it saw such an edge, it would output a 'wake-up' pulse and grab the first four data bits from its rx line. <S> It would then continue with receiving the next four data bits while it outputs the data it had received, at twice the baud rate. <S> The ultimate recipient of the data would receive its byte exactly when the transmitter finishes sending it, but could afford to spend 4.5 bit times at the old baud rate waking up without losing any data. <S> If one didn't want to have the device double the baud rate, one wouldn't have to--one could instead forward data with some delay. <S> Whether or not such a delay would pose a problem would be application-specific. <S> Note that if the device has a handshake wire from the CPU which will need the wake-up, the delay could be less than a character time, and could drop to almost nothing if the sender isn't transmitting absolutely continuously. <A> Check out Energymicro EFM32 MCUs - they are able to do exactly what you want.
| The LPC11U1x can wake up from Deep-sleep mode via reset, selected GPIO pins, a watchdog timer interrupt, or an interrupt generating USB port activity.
|
Detect if a microwave is running At work we have a alcove hidden from direct view with a wall covered in "standard" domestic microwave ovens (MO). You put in you food there and then you join your fellow colleges chatting; after a while you forget about your food: is it ready or is is not? You rise and walk the 20 m or so to check, either the oven has only been in use for a short time and the food is still cold or the oven been off for such long time that the food needs re-heating. It's a serious issue :-) If there was a way to detect if the MOs was running or not, we could connect some raspberry pis or arduinos and build a display of some sort indicating which MO that is running or not and put that display visible from the dining area. The question is how to detect of the MO are running or not? To further complicate the question: we don't own the MOs, hence they cannot be altered, which leaves the cord and the power outlet to be used. Then there is the issue with the magnetron at full effect I guess it operates constantly but lowering the effects turns it on or off. When of MO are done, the lights are still on inside, hence drawing current; so I guess some sort of threshold combined with measurement over time... There are roughly ~30 MO in the alcove so the cheaper solution the better. Is this possible to solve at a reasonable price that doesn't involve hooking a arduino/rpi up to each and every MO? <Q> Anything you wire up to each power outlet won't be cheap since someone has to wire it up to each power outlet. <S> Install a video camera in the microwave room with a monitor in the dining area. <S> Then people can look over and see if their microwave is done yet. <S> If you have enough resolution, they might even be able to see how long until it is done. <S> For more resolution, divide up the bank of microwaves between multiple cameras. <S> That will still be a lot cheaper than someone designing and wiring up some kind of monitor circuit for each unit. <A> This basically means no direct connections to the microwave and can be a very nice solution. <S> Basically you're detecting the 2.45GHz leakage from the microwave. <S> The closer it is, the more reliably it would work. <A> If you can just monitor the current with something like a Hall-effect sensor, for each of the power points that supply power to the microwave ovens, this should be doable. <S> I'd expect the current flow to be significantly higher, when microwave is running (especially at full-power). <S> If it is doing it's intermittent run, s.a. for defrosting, you can just monitor for current levels over a longish period of time. <S> If the sensor is silent for too long, means that the connected oven is not being used. <S> You could perhaps note the duty-cycle of the current surges to figure out, if it is being heated at 75% power, or 50% power or being defrosted etc. <S> Hall-effect sensors should be fairly easy to use with RaspberryPi or Arduino, and then communicate it back to whatever/wherever you would like to see/hear an indication.
| Presumably there is some display on each microwave that indicates if it is still working, or the cooking time has expired. You could use a 2.4GHz radio such as CC2500, scan a range frequencies and detect a change in the RSSI level.
|
Can you feed in a voltage higher than your supply to the input of an opamp? I have a 28V digital signal. 28V being logic 1 and 0V being logic 0. Can I feed the 28V into an opamp (Vcc @5V) to level shift it ? Or will I have to create a voltage divider to bring the 28V < Vcc ? <Q> Direct feed isn't going to work well for you. <S> You'll find that the common-mode input range of an opamp is quite often less than the supply voltage rails (less than VCC, greater than VEE) . <S> Some parts (those with rail-to-rail inputs) can accept signals at the same potential as the supply lines. <S> Usually there are p-n junctions between the opamp inputs and the rails (sometimes deliberate, often parasitic) which can forward-bias and fry if a stiff signal higher than the postiive supply or lower the than negative supply is applied. <S> Current-limiting the source will cause the voltage at the input to clamp a diode drop above or below the rail (depending on polarity) <S> but there's no guarantee the rest of the opamp will behave nicely in this condition. <A> You need a voltage divider. <S> Putting signals larger than the span of the power pins on the op amp inputs can cause permanent damage to the op amp. <A> Although in this case it's probably much simpler just to use a voltage divider, I'd like to point out that this can be done. <S> With an inverting opamp, you can do this. <S> Since the output drives the opposite way to the input, you can make use of this to compensate (work against) the input voltage and make sure the inverting input does not see a higher voltage than it's supply. <S> Using the correct ratio of Rin and Rf, you can adjust the gain as necessary. <S> If it's a DC input, you need to compensate for this at the non-inverting input though. <S> This maybe better explained with an example circuit (note that a rail to rail output opamp stable at all gains is required). <S> This takes a 28V pk-pk waveform (i.e. -14V to +14V) and outputs a 0-5V waveform (so we have an input voltage that exceeds both rails): <S> Simulation: <S> How do we calculate R3 and R2? <S> This bit's easy, we just need a gain of 5/14 = 0.178. <S> If we have a 10kΩ Rin (R3), we can use: 10kΩ <S> * (5 / 28) = <S> 1.78kΩ <S> What about R1 and R5? <S> We know that when the input is at +14V, the output should be at 0V. <S> Using this info and knowing that no current flows into the non-inverting input, we can treat R3 and R2 as a voltage divider. <S> So let's work out the voltage at the non-inverting input: 14V <S> * <S> (1.78k / (10k + 1.78k)) <S> = <S> 2.115V <S> So wee just need to apply 2.115V to the non-inverting input to compensate and shift the output voltage. <S> Using the +5V supply and a voltage divider: <S> 2.115V / 5V = 0.423 <S> - this is the ratio we need. <S> So R5 / (R5 + R1) <S> = <S> 4.23k / (4.23k + 5.77k) <S> = 0.423 <S> and: 5V * (4.23k / (4.23k + 5.77k)) <S> = <S> 2.115V <S> How to calculate for various configurations, and much more is discussed in Opamps for Everyone , a good free book from TI. <A> I have asked the same question here previously. <S> Later, I learned that the datasheet already gives this information. <S> Open the datasheet of your opamp. <S> Find the table in which " the absolute maximum ratings " are listed. <S> Example #1: <S> Example <S> #2: <S> Example #3:
| Since the opamp will try and make the inputs equal, we need the non-inverting input to be the same as the voltage at the non-inverting input at this point.
|
Driving three LEDs in series with different Vf at 700mA Given LED1: Vf = 3VDC for 700mA ---- and ---- LED2: Vf = 4VDC for 700mA If I put LED1 + LED1 + LED2 (in series) and apply 10VDC across them, will I have 700mA flowing through them? <Q> It would be more precise to say that with a LED1+LED1+LED2 stack @ <S> 700 mA <S> that you would have approximately 10V Vf. <S> The Voltage vs. Current curves for diodes are very abrupt (exponential) <S> it is never a good idea to drive them as if they are voltage mode devices. <S> If you apply 10V across that stack it is unlikely that you will have 700 mA exactly flowing through it. <S> So you'd have very poor brightness control as a minimum and <S> you could potentially have it run away from you, depending on the LED's response to temperature and various other factors. <S> etc. <S> etc. <A> Vf1 = 3 V, <S> Vf2 = 4V. <S> Vf1 + Vf1 + Vf2 <S> = 10V. <S> HOWEVER!!!! <S> LEDs, like almost all generic diodes, provide essentially NO current-limiting. <S> You put voltage across them, they will generally draw as much current as the supply is willing to put out, until the inevitable occurs. <S> The simplest mechanism is more voltage and a current-limiting resistor. <S> In this particular case, 12V, 3.3 ohms, and your LED string would give you 600 mA, instead of your desired 700 mA. <S> (You'd also be dissipating just over 1.2 Watts in the resistor, which isn't that bad compared to 7 Watts in the LED string.) <S> Incidentally, that's about 70 times as much current as I'm used to seeing in LEDs. <S> The numbers I'm used to seeing are Vf = 1.7V, <S> I = <S> 10 mA, Vcc = 5V, and R = <S> 330 ohms. <S> (Yes, I'm giving away my age here.) <A>
| In theory, yes, but device to device variations and temperature dependances (including self-heating) will make you have a wild range of values, although centered around 700 mA. You MUST use some mechanism to limit the current through the LED.
|
How do glass tube fuses work? This may be the an unspeakably stupid question for an electrical/computer engineering student to ask, but I ran across a few parts I didn't recognize (which, after some research, I found out were glass tube fuses and automotive fuses), and they made me wonder... So, a mechanical or thermal fuse I get; enough current, and a switch gets thrown or a piece of solder attaching a spring to a pad melts and the connection essentially ends (ignoring arcing). But I am holding a glass tube with two metal terminals, probably some gas internally, and a glass body. There are multiple ways I could see that the thing might work (e.g. the gas or the glass is conductive, but highly susceptible to temperature changes, shattering the body in high current), but since I can't seem to find the exact mechanism anywhere online, how do they work? -- Additional, more general question -- If they are designed to shatter at high current, well...Why are they still in use? It seems potentially dangerous, or at least fantastically annoying, to have components which leave broken glass everywhere in an expected use case. edit: It was a very thin wire, and I have awful vision, but it now makes sense. <Q> When the current passing through the fuse exceeds the rated current, the thin wire melts and breaks the circuit. <S> The glass fuses commonly come in various types: <S> Fast Blow <S> Normal Slow blow <S> Glass fuse does not contain any gas AFAIK. <S> The glass tube protects the outside environment when the metal inside melts as high temperature can build up. <S> Glass being transparent, helps to visually inspect the fuse to make sure if it is blown. <S> Following is one kind of fuse holder. <S> Edit: <S> Further reading on glass fuses. <S> As Dave suggested, quoting more information <S> The resistance of a given length of flat fuse wire is inversely proportional to <S> it's thickness. <S> A fuse burns open as a result of Watts generated by the current through the fuse squared times the resistance of the fuse. <S> The Watts are dissipated by the fuse resistance in the form of heat and heat <S> is what burns the fuse open. <S> Therefore increasing the thickness of a given fuse wire lowers the fuse resistance and thereby increases the amount of current the fuse can carry without generating enough heat to burn the fuse open. <S> Example: Heat is proportional to Watts and Watts = <S> (Amps^2) <S> X (resistance) <S> Therefore the following equation may be used to determine roughly by what factor an 8A fuse resistance must be lowered to dissipate the same Wattage at 16 Amps. <S> (8A^2) <S> X (R) = <S> (16A^2) <S> X (R/factor) factor = 4 <S> This indicates that a given 8A fuse`s resistance would have to be reduced by a factor of 4 to dissipate the same number of Watts at 16A. <S> This means that the thickness of the 8A fuse must be increased 4 times to enable it to carry 16 Amps and still only dissipate the same Wattage that it did at 8 Amps. <A> If you can see a fine wire inside, it'a low current fuse, maybe 250mA or so. <S> This value should be written in the metal terminals. <S> The physical mechanism is based on an equilibrium temperature when current passes and heats the wire up (P = R <S> * I ^ 2). <S> The gas inside the glass tube plus the external surface takes the heat away. <S> Higher current, higher temperature, till.... <S> the melting point! <S> There is usually no explosion or shattering at all, simply the wire melts silently and in most cases that's all. <S> For high current fuses and inductive loads, there can be a small arch... as dangerous as a snail's sneeze. <A> There's a fine wire through the center that conducts the current. <S> It may be hard to see. <S> If there's nothing there, the fuse is blown (use an ohmmeter to test). <S> They are not designed to shatter. <S> That is something that only happens at very high currents. <S> If such a thing is anticipated, then the designer will use a shatterproof fuse. <S> The body of this type is usually ceramic. <S> Glass is used as a convenience, since it's easy (usually :) to see if the fuse has blown.
| A glass fuse works by breaking the circuit when rated current passes through it.
|
How to achieve high impedance input on OPAMP without sacrificing bandwidth I was trying to simulate (In LTSPICE) buffer for ADC 08200 that would have 1Meg input impedance it is about to be used with standart oscilloscope probes. But I am having problem with bandwidth limiting. So far I have tried OPA354 and LMH6702 and both suffer from this pitfall. What is correct way to make high impedance ADC buffer? So far I have came to this as circuit with best result (as far as bandwidth goes, but it's having very high attenuation). I am simulating 1:10 probe with 9Meg resistor. //Edit: I have redesigned the circuit but I am having weird problem with simulation and I think that circuit should work but I am getting very small negative voltage out of OPAMP even thought it's supplied by positive rail only. This is my schematic now: Blue trace is output of OPA355 and green trace is non-inverting input. R11 and R12 are used for offset adjustment. C5 is AC coupling capacitor (if used). //Edit3:Fixed model of OPA355 now, but I am having different problem.. on certain frequency it seems that there is some parasitic capacitance charging, but I have no clue where .. Same trace is for non-inverting input, output and inverting input... <Q> An approach to high input impedance buffering with an op-amp is to create a non-inverting unity gain buffer, using a very high input impedance op-amp, such as the Intersil CA3140 (1.5 Tera Ohms), or the Texas Instruments <S> OPA2107 (10 Tera <S> Ohms) <S> , both of which have a Gain Bandwidth Product of 4.5 MHz. <S> (From Wikipedia ) <S> In a non-inverting unity gain buffer configuration, the input impedance of the buffer is the input impedance of the op-amp itself, and resistance noise is minimized / none. <S> One other factor, though, is the input capacitance of these op-amps, 4 pF <S> in the case of both these example op-amps. <S> This capacitance itself would load the incoming signal, if the signal frequency is very high. <S> As the question does not state the desired bandwidth, the suitability and capacitance impact of the suggested op-amps can not be verified. <S> Using a spice model for one of these in the simulation may help in this. <S> Based on subsequent comments, for a 100 MHz unity gain bandwidth desired, <S> the Texas Instruments <A> The problem with your simulation is possibly not the bandwidth of your input amplifier; it is the model of your 10:1 oscilloscope probe. <S> You are modelling it as a 9 Megohm resistor; feeding a (nominally) 1 megohm input stage. <S> A typical oscilloscope input stage is actually 1 megohm in parallel with 20pf (capacitance varies according to scope model) <S> and so the probe must take this into account. <S> It does so with a small capacitance in parallel with the 9Megohm resistor. <S> To cope with 20pf input capacitance, the parallel capacitance should be 1/9 of this value, or around 2.22pf. <S> Such a capacitance is difficult to generate; so a variable capacitor is used, and you have probably undergone the ritual of calibrating a new (or borrowed!) <S> scope probe before use. <S> The waveform you show looks like a very badly calibrated scope probe, so you need to do the same with your SPICE model, before worrying about the opamp. <S> Try 2pf across the 9megohm resistor, adjust the value for maximum flatness of a square wave. <S> (Or compute the value to use, from the details of the opamp model). <S> If the result still isn't good enough, then try Anindo's suggestions. <S> EDIT : it is difficult to read your schematic : if the 1000k resistor is really in series with the opamp input and the capacitor C3 is really shorted out, there are other problems to fix first. <A> Brian is right about the probe and the need for a parallel cap. <S> Also, combined with the high input impedance, the tiny input capacitance of the opamp makes a big difference at high frequencies. <S> The 2pF combines with the input resistor to form a low pass filter. <S> I can't see from your schematic what exactly you are modelling, but I'll discuss both the probe and scope input itself. <S> If you want to model a probe more accurately, you will need something like that shown below from the linked pdf, with a 9MΩ and parallel trim cap on the probe side, then transmission line and compensation at the input side. <S> You can then add this to the circuit shown below for a full simulation of both probe and input + buffer. <S> Having designed/built a couple of reasonably high speed (up to 500Msps) <S> DSOs myself <S> , I can say the front end can present just as many issues as the FPGA design, layout, etc. <S> It's where many of these low end handheld scopes fall down <S> (for example see Dave Jones review of the QDSO ) <S> Assuming you have a good quality probe with a compensation circuit at the BNC end (probe design is an art in itself, the T-line is intentionally lossy - see <S> The Secret World of Oscilloscope Probes for an excellent read) then the front end divider needs to allow for the op-amp buffers input capacitance. <S> Here is a "typical" scope input example circuit which divides by 2 and 20, that illustrates the difference between compensation/no compensation with just 2pF of input capacitance. <S> Circuit (C2 and C5 would usually be trimmer caps which are adjusted at calibration time) <S> AC Sweep Simulation up to 100MHz <S> Same simulation - capacitors removed. <S> Bandwidth is less than 1MHz! <A> Hello guys I have managed to get something like this, it's complete preamplifier with simulation of probe as lossy transmission line. <S> Which has frequency response like this (measured at R8), it has -3dB cutoff just somewhere at 100MHz. <S> Which is actually quite neat for 200MSPS ADC <S> I'm about to use. <S> Do you think that it could go better with this OPAMP? <S> I'm just curious <S> I think this will do.
| OPA355 or OPA356 would work, with their GBW of 200 MHz, and input impedance of 10 TeraOhms coupled with capacitance of just 1.5 pF.
|
Industrial connectors with fail-safe disconnect under cable tension (like MagSafe) Background/problem: We install electronic monitoring systems on semi-mobile industrial equipment. The environment is harsh and sometimes our cables are treated in a very rough manner. This can result in cable breaks (usually at the connector terminating the cable into our equipment). This is a problem because at a minimum we then need to replace/repair the cable; at worse a short can damage our electronics. We currently use Deutsch connectors which are extremely sturdy and waterproof. The question: Does anyone know of industrial cable connectors that operate with the same purpose as Apple's MagSafe safe disconnect? Ideally if someone yanks one of our cables I want the cable to disconnect rather than breaking. <Q> LEMO makes a nice line of "push-pull" latching connectors. <S> I can't find it now, but I seem to recall seeing that they had a way of attaching a lanyard or cable to the release mechanism, so that if you pulled on it, the connector would separate. <S> You could anchor the release cable to the electrical cable so that the former is shorter than the latter, such that if youput enough tension on the far end of the cable, the connector will release before all of the slack is gone in the loop of electrical cable. <S> Of course, this will probably only work if the direction of the pull is more or less in-line with the axis of the connector, but you might be able to arrange some sort of ring-shaped guide that the cable must pass through that helps insure that this is the case. <S> I hope my description is clear; if not, I'll try to sketch what I have in mind. <A> Amphenol, ITT cannon & molex all have variations. <S> A company called Souriau have a push/pull breakaway (opens a *.pdf) connector system. <S> All very expensive. <A> Another brand is from Rosenberger [1][2]. <S> I only used the medical ones though. <S> [1] <S> http://www.rosenberger.de/en/products/medical/magnetic.php <S> [2] http://www.rosenberger.de/en/products/automotive/magcode.php
| I think what you are looking for are called breakaway connectors.
|
How do I calculate the gain of an op-amp summing amplifier? So if I have a summing amplifier circuit like the one below: I know the Vin1, Vin2, and Vout value and the circuit is designed such that Vout = -(Vin1+2Vin2) but how do I calculate the gain? I know on a normal op-amp circuit with one input source the gain is just Vout/Vin. But if I have two input sources then will my gain be Vout/(Vin1+Vin2)? On PSPICE I set the DC and ACMAG values for the input voltages to 2V, and Vout is -6. So it works out right, but still what is the gain? <Q> Gain is set for each \$ V_{in} \$. <S> \$ A_{Vin1} = <S> -\dfrac{R_3}{R_1}\$. <S> \$ <S> A_{Vin2} = <S> -\dfrac{R_3}{R_2}\$. <S> and so on, \$ A_{Vin N} = <S> -\dfrac{R_3}{R_N}\$. <S> If you were to analyze this circuit using superposition, you would find that for each input signal, it is just an inverting amplifier. <S> The signals are amplified or attenuated individually. <S> Therefore, gain is only a meaningful quantity with respect to each individual signal. <A> The purpose of a summing amplifier is to generate an output that is a weighted sum of its input signals. <S> Because of the high open loop gain of the operational amplifier, pin 2 is a virtual ground, i.e. the voltage between pins 2 and 3 is close to zero. <S> Because of this, the 2 input signals are effectively isolated from each other. <S> The gain to the output of each input is determined by the ratio of the feedback resistor, R3, to the particular signal's resistor. <S> Thus the gain for input 1 is -R3/R2 and the gain for input 2 <S> is -R3/R2. <S> The isolation allows each of the input signals to have different gains. <S> (More than 2 signals can be summed by simply adding another resistor with another input signal) <S> The overall output is the sum of these two signals. <S> There is no quantity as "total gain" since there are 2 separate input signals. <A> If you put 2V on each input and get -6V out, and R1=R2, then the ratio of R3 to R1 is 1.5 to 1. <S> The gain of each input is -1.5, negative due to the inverting nature. <S> Instead of DC inputs, if you put a 1V AC signal on both inputs (both in-phase and same freq), then you'll get 3V AC out. <S> Since you show +/-7V <S> supplies, if you put much more than 2V DC in, the output will saturate (limit at ~ -6.5V).
| Since gains are all independent of each other, summing them does not yield a meaningful result.
|
Raw access to CMOS image sensor? I am interested in developing an idea using CMOS sensors, and I was wondering if I could get some pointers (I don't know much about image sensors) First , my understanding is that CMOS image sensors can (in theory) access pixels one at a time -- like simplified 2d ram there is a vertical line and horizontal line select -- this is different than CCDs which typically have to read out chunks of pixels at a time. Please correct me if I am wrong. If I am correct is it possible to get a raw CMOS sensor that let's me read out pixels in what ever order and timing I feel like (so I specifically do not want an easy to use, standardized video format, and I am willing to do the various downstream DSP and error correcting myself.) At this stage of my project, I don't need a high resolution, low noise setup -- something simple would be fine, I just want complete control over how I read out the pixels. (However, if the system came with simple optics and shutter that would be great) Does anyone know of such a setup? Are all CMOS sensors available in raw format, or is what I'm asking for very odd? <Q> You might want to read about the Kepler spacecraft's CCD readout system. <S> Monitoring thousands of stars at a time continuously, with 42 CCD chips, is just too much data. <S> It doesn't take conventional 2D images but reads out only the CCD cells in areas of interest. <S> Sounds <S> sort of like what you're asking about. <S> Basic info <S> http://kepler.nasa.gov/Mission/QuickGuide/MissionDesign/PhotometerAndSpacecraft/ <S> More detailed technical info <S> http://iopscience.iop.org/2041-8205/713/2/L87/fulltext/apjl_713_2_87.text.html <S> Plenty more is available online, in particular from NASA Ames and the SETI Institute. <A> Note that the sensed data will leak away over time (like DRAM), so you need to read it out promptly. <S> Generally the data that comes off from a sensor will have been converted to digital and put in scanline order, and had some brightness/contrast setting imposed by the ADC process. <S> Can you say what it is about your application for which this isn't suitable? <A> I am no expert on image sensors, but from my basic understanding, pixels are read out line by line and in sequential order. <S> A VSYNC pulse shall initiate a frame transfer, while HREF pulses initiate a pixel line transfer, which will begin a transfer of pixel data from the first pixel in a row to the last pixel in a row. <S> Please see this webpage for more details.
| CMOS image sensors behave a lot like DRAM; a column select is activated, which reads out all the rows at once to a set of sense amplifiers.
|
Audio streaming and udp doubt I'm doing a project, where I have to decode an mp3 audio stream which I receive from a web server, with a pic32 over Ethernet. My doubt is: What if the server sends more data than the pic can handle? I mean, Can I control the amount of packets that the server send me? Because if I there is only one device connected to the web, the server will send all the mp3 song at without wait, and the pic memory will be not enough. How can I solve this problem? <Q> <A> UDP does not provide flow control. <S> If you need that you should use TCP traffic OR a higher protocols would have to implement flow control, but basic http doesn't provide flow control either. <S> As most such data streams are either real time or TCP based, I doubt any of the higer protocols have flow control implemented. <S> My hunch is you have to switch to TCP. <A> If you can control the server, have it send the data at the right long term average rate. <S> Then the PIC only needs to deal with the burstiness. <S> With a big enough buffer, all should work. <S> Inevitably though, the two clocks will be a little off. <S> The long term average of each should be as good as its crystal. <S> To be pessimistic, figure 50 ppm crystals at both ends, so design for up to 100 ppm long term mismatch. <S> This can be dealt with several ways. <S> You could simply replicate the last sample on buffer underrun and skip a sample on overrun since in theory each will be a relatively rare event. <S> Or you can slightly change the playback speed based on the amount of data in the buffer. <S> Audio purests won't like that, but is no different than wobble of tape recorders from long ago. <S> Below some level is all still good enough. <S> If this sound is voice you can get away with a lot more than if a professional musician is listening to music. <S> In any case, no you don't want to use TCP. <S> That will add so much overhead on the PIC end that you may not be able to handle the audio stream at all. <S> There is no need for reliable delivery here. <S> If there is a glitch, the output glitches, but then you want to move on and continue normally as fast as possible. <S> TCP is not well suited for that.
| If you use a proper streaming protocol like RTSP, then the server will send the packets at the correct rate.
|
What's the catch with FRAM? After recently acquiring an MSP430 Launchpad I've been playing with various microcontroller projects. Unfortunately, the MSP430G2553 only has 512 bytes of RAM, so doing anything complex requires external storage. After looking at SPI and I2C SRAM and EEPROM chips, I discovered FRAM . It looks perfect. Available in large sizes (the one linked to above is a 2Mb part), low power, byte addressable and programmable, nonvolatile, no wear issues, no need to explicitly erase anything, and actually cheaper than serial SRAM (comparing against Microchip's parts). In fact, it looks too perfect, and that makes me suspicious. If this stuff is so much better than serial SRAM and flash EEPROM, why isn't it everywhere? Should I stick with SRAM, or is FRAM a good choice for experimentation? <Q> Flash technology has a limited write/erase cycles, but the reading cycles are almost unlimited. <S> In FRAM, each read cycle actually affects the memory and it starts to degrade. <S> TI states that they've found the FRAM has "Wear-out free endurance to 5.4 × 10^13 cycles and data retention equivalent of 10 years at 85°C". <S> After some calculations this turns out to be around 2 years of constant read cycles or so (without taking into account ECC). <S> The reality is that for most low power applications, where duty cycles are low, this is not an issue. <S> You will need to evaluate it for your specific application. <S> The limit in speed is also present, so waitstates will be added if needed. <S> However, one solution is to load code to RAM, run it from there (avoiding the cycles on the FRAM) and avoiding the speed limit. <S> There was an E2E post on the topic here that discussed some of the ramifications. <S> A good App Note from TI about what the advantages of FRAM are as far as security is Here <A> From what I can see, the (main) difference between it and SRAM is it's slower, and the difference between it and EEPROM is it's more expensive. <S> I'd say it's sort of "in between" both. <S> Being a pretty new technology, I'd expect the price to drop a fair bit over the next year or so providing it becomes popular enough. <S> Even though it's not as fast as SRAM, the speed is not bad at all, and should suit many applications fine - I can see a 60ns access time option on Farnell (compared with a low of 3.4ns with SRAM) <S> This reminds me - <S> I ordered some Ramtron F-RAM samples quite a while back, still not got round to trying them yet... <A> The only real issue with FRAM is that for the really dense parts, the part of the market that drives volume and margin, they cannot yet compete on density (which is either a yield thing or a size thing - it doesn't really matter which). <S> For the smaller parts (i.e. competing against older version of same technology) they do well. <S> So yes, it's a good fit for experimentation as long as you stay in the same size parts.
| FRAM is great, however, the technology has destructive reads.
|
Arduino Leonardo doesn't get auto-detected in Windows 7 (64bit) I recently purchased an Arduino Leonardo to control my Sumo robot. I plugged it in to my friends computer and was able to use the Arduino IDE to upload code to the board and run a simple wheel-test program. When I got home and sat down to play around with it myself, I discovered that it wouldn't connect to my computer. I plugged the micro-usb in to my computer and the board turns on and the LED goes into it's two-second pulse, but Windows 7 64bit never auto-detects new hardware. I've searched around on Google and tried some of the things that were suggested and it still doesn't work. I manually installed the Leonardo driver in the System section of the Widows Control Panel and it still doesn't register the device. I've tried manually changing the port of the device from COM1 all the way up through COM9, hoping that my computer was just stupid and didn't recognize what it was doing. I'm using a Gateway laptop (I looked around for a model name or number, but it doesn't seem to have one. It's just a cheap development machine that I bought at Wal-Mart) Any suggestions? Solution: The crappy USB cable I was using did not have a data connection, so even though it would power the board, Windows was never able to establish a connection to the device. Terrible cable. :( <Q> Ok, step by step. <S> Does windows make a sound as if it has found new hardware? <S> Does anything pop up or Device Manager show a new device (COM1 is default for windows, not related to Arduino necessarily)? <S> If not, then the Leonardo board isn't doing anything to be enumerated. <S> This is likely a hardware issue. <S> Try a different USB cable or test it to make sure it works well. <S> Perhaps a jumper is missing or a solder bridge is missing (on Arduino uno there are two points in the back that need soldering). <S> Did you follow the instructions Here in the communications section? <A> <A> Arduino Windows 7 USB driver fails to install, fixed. <S> First Try FAIL and FIX http://youtu.be/aAPCP5I1OjY <S> With a Thank you to Connor Wolf for this information about the USB-3.0 port. <S> The Leonardo drivers have issues with some USB-3.0 controllers. <S> Connor Wolf also on YouTube, (Electronics) <S> I also had to download and run " CDM v2.08.30 WHQL Certified.exe <S> " see download link inthe descritiption in the video, (not allowed to post that download here) <A> I had this problem today . <S> It was the USB cable that was for power only. <S> I used a USB with data connections and everything was fine!
| I found that the problem was the USB3 port, plugging it into the USB2 port the driver was installed correctly.
|
FT230X 3V3OUT pin connected to 3.6V, Safe? The FTDI ft230X datasheet states that, for the output pin of the internal LDO: When VCC is 3V3; pin 8 is an input pin and should be connected to pin 10. page 7. Meaning that 3V3OUT of the internal LDO should be connected to the power supply (VCC) when the chip is being powered by 3.3V. The datasheet also states that the maximum output of the LDO is 3.6V. page 17. The 3V3OUT is internally connected to some modules(USB transceiver and reset generator). page 13. I am assuming that since the LDO "may" output 3.6V, that the USB transceiver and reset generator will be fine if connect 3.6V to both the 3V3OUT and VCC pin. Is this assumption correct? This is for an application where an input voltage of both 3.3V and 3.6V are possible on VCC. Clarification: Ordinarily, when VCC is at 3.6V the LDO will be attempting to regulate down to 3.3V. BUT! since the LDO output is ALSO connected to VCC, there will be no current through the LDO. The LDO may attempt to lower it's output voltage by increasing it's pass element's resistance, but this will have no affect since the output is help at 3.6V. Is this safe? Having the same voltage on both the input and output of the LDO, that is higher than what the LDO is trying to regulate down to? (we know that VCCIO, USB transceiver and reset generator can handle 3.6V, so lets forget about that for now) <Q> Good assumptions. <S> But no. <S> You missed one part of the datasheet. <S> Section 5.3 shows: 3V3 <S> 3.3v regulator output Min 2.97 <S> > <S> Typical 3.3 > Max 3.63 in Volts <S> VCC must be greater than 3V3 <S> otherwise 3V3OUT is an input which must be driven with 3.3V <S> The 3.3v LDO is a Low Drop Out regulator. <S> The datasheet does not specifically state how much of a drop voltage is required (How much greater VCC needs to be than 3v3). <S> Emailing FTDI would be your best option though, as they are always welcoming and helpful on design issues. <S> Also, page 7 is for the QFN version of the chip, with different pinout from the SSOP version. <S> Edit: As Oli has pointed out, there is a Errata for the FT230x that shows an issue with the 3v3 LDO in the Rev. B chips. <S> This does not affect Rev A, or Rev C (latest). <S> For both packages, you can tell the Revision by: <S> The date code format is YYXX where XX = 2 digit week number, YY = 2 digit year number. <S> This is followed by the revision number (A/B/C). <A> Since it's just within specs, I would say this is not ideal, but probably okay, <S> yes <S> ( edit - see discussion, I think Passerby has a good answer and points, so I would contact support, or simply make sure your supply is either 3.3V or 5V). <S> As long as you can be absolutely sure your supply never exceeds 3.6V. Bear in mind 3.6V is an absolute maximum rating, which you should try and avoid running near if at all possible. <S> According to the datasheet though, it confuses matters by showing a self powered example with a VCC ranging from 3.3V-5.25V, but not connected to 3V3OUT. <S> However, this is a mistake, since according to the errata note: <S> This makes sense since any linear regulator needs at least a slightly higher voltage (usually at least 200mV, for LDOs) to maintain regulation. <A> From FT230X datasheet, section 4.2, paragraph "+3.3V LDO Regulator": <S> The +3.3V LDO regulator generates the +3.3V reference voltage for driving the USB transceiver cell output buffers. <S> From FT230X datasheet, section 5.3, table column "3V3": 3.3v regulator output: <S> min=2.97 V, typ=3.3 V, max=3.63 V. Condition: VCC must be greater than 3V3 <S> otherwise 3V3OUT is an input which must be driven with 3.3V <S> There is no explicitly defined limits for the transceiver, thus we (could) presume they the same as the regulator output limits, <S> i.e. (3.3 ± 0.33) V, or 3.3 V nominal ± 10 % tolerance. <S> Therefore, if your power source can achieve ±0.03 V (i.e. less than ±1 %) regulation tolerance (in all working conditions, including the temperature range as Kuba right noticed out), it can feed the IC safely. <S> If it cannot, the feeding scheme is unsafe. <S> Also note that USB 2.0 Specification, Sectiom 7.3.2 says the transceiver voltage has a 3.3 V nominal with a 3.6 V maximum for low- and full-speed devices.
| At 3.6v VCC, that would give 0.3v of a drop out voltage, which is well within most LDO minimum range. I'd definitely e-mail the support to make sure, and point out their datasheet is unclear on what is an important issue. Double check which you have and are referencing to, as the pinouts are not same.
|
What is a Class 2 Transformer I need to replace a damaged 120V-12V transformer that is a European sourced Comelit Model 542012/A, also marked as "Class 2 Transformer" supplying power to a halogen table lamp. My question is what is the meaning/importance of the "Class 2" designation? <Q> Class 2 refers to a transformer that delivers 100VA or less with a maximum output voltage of \$30\text{V}_\text{AC}\text{ }\$ or less. <S> They are covered by standard UL 5085-3 , for which UL will be glad to take your money (link is summary only). <A> Class II transformers are specifically different in the sense that it's a low energy device - its secondary windings impedance is inherently higher <S> thus its inductive reactance limits available current to its load. <A> Class 2 devices are also called "double-insulated"; it is safe to use equipmentwith such transformers even if a protective ground is not also present. <S> So, most two-prong plug power bricks are Class 2. <S> This allowsa two-wire cord from the power brick to the desk lamp, and <S> the desklamp need not have a ground connection either. <S> A Class 2 electric drill might completely lack metal enclosure parts,and have a two-prong AC power plug, while a three-prong AC power plugis used for a non-Class 2 drill.
| Class 2 transformers are limited, either by inherent winding impedance or external fusing, to power levels considered safe enough to receive special consideration in safety requirement compliance.
|
Can I use single phase 220v AC to power a rectifier designed for 3 phase AC? I want to use a use a rectifier (Eltek Aeon SMPS 4000 Rectifier, used in telecom) as a stand alone DC power supply (puts out 24v/125a). The unit was designed for 3 phase 220v AC input. I have only single phase. Is the unit likely to function on single phase? If so, would there be any performance loss on single phase vs 3 phase input? <Q> The answer is.... <S> Maybe. <S> Their calling it a "Rectifier" is very confusing. <S> What you have is really just a big DC power supply. <S> Generally, (ignoring the power-factor-correction electronics), the input of a switch-mode power supply is simply rectified to high-voltage DC, which is then converted to the desired output voltage using a DC-DC switching converter (hence the "switch mode" in the description). <S> If you're lucky, the power-factor correction electronics won't cause an issue with only a single phase, and you simply need to de-rate to 66%, as Spoon said. <S> You have to derate as you're only using part of the input rectification. <S> Normally there are six input diodes forming a three-phase bridge rectifier. <S> Since you would be only using two of the three power connections, you would only use four of the six diodes, hence the derating. <S> Really, the only way we can say anything definite about how the power supply will work would be to get a copy of the schematic, or trace out the PCB. <S> It will probably work, but there can be non-obvious side-issues, like reduced lifetime, etc... <S> If this is just for your own experimentation, you're probably OK. <A> If I'm reading this correctly each "rectifier" is a single phase unit; 3 phase installations use banks of six of them, possibly 2 on each phase for failover. <S> See waveform on slide 6, functional diagram on slide 10. <S> In which case it would work fine. <S> It comes from a country where 230V AC single phase is the normal domestic supply. <A> Even if it does work, you have to derate to 1/3 the normal output at the very least as others have said. <S> There are two likely AC input topologies: brute force rectification and individual rectification with PFC (Power Factor Correction). <S> Brute force rectification means that the rectifiers are arranged to take the max of the abs of the three power signals. <S> This effectively switches between the phases to pick off only the peaks. <S> One important feature of this is that the result is always actively driven to some minimum voltage. <S> The circuitry making use of that voltage may very well rely on that. <S> With a single phase you are not only supplying 1/3 of the possible input power, <S> but the DC voltage after rectification goes to zero twice per line cycle. <S> This can cause more problems than just not having as much power available. <S> The supply may be unable to hold up the DC output during parts of the AC line cycle, whether you derate according to the lower input power or not. <S> The best scenario is you have separate PFC front ends on each phase without special circuitry that checks for a phase dropout. <S> The supply then draws current from each phase separately as a function of its voltage. <S> This will allow making use of a single phase, but again keep in mind that the input power goes to 0 twice per line cycle, which never happens when all three phases are available. <S> The available output power may be considerably less than 1/3 of the 3 phase case. <S> You are basically asking if you can use a carefully designed piece of equipment out of spec. <S> The answer is always "no", unless you know something more than just the specs. <S> You can't count on how exactly the designers made use of the promise that all three phases would always be present. <A> Short answer is Yes. <S> However you have to de-rate <S> the rectifier to 67% of its current rating.... <S> that's from memory.
| Short answer is No, unless you know something specific about your power supply. It depends on the input topology of the power supply. It might work, but you should not assume so, and you can't complain when it doesn't.
|
Alternatives to using EEPROM As I understand it, EEPROM is a part of a computer (in my case, an AVR microcontroller) which stores data, and holds on to it even when the device completely shuts down. It allows data to be written to it, and read from it. The problem I am seeing is that it has a finite life, and a pretty short one. In other words, I can only read/write a finite number of times before I wear out the EEPROM. What I am looking for is a way to achieve the same functionality as EEPROM, but in a small form factor. I suppose I can use something like a microSD card, but I would prefer a solution which does not require the user to buy a memory card. Additionally, I only really need a few bytes of space, at most. Let's just say 1 kB to be very, very conservative. I would be spending more than needed to accommodate a memory card of any sort. So what are my options? Are there any common IC solutions which would allow me to achieve this kind of data storage/retrieval, without a short life and high cost? <Q> The way to overcome the endurance limitation of EEPROM is to apply a wear-leveling algorithm. <S> Basically for every record you want to store you allocate N-times <S> the memory requirement to it, and an corresponding space for N-index values, then use inference to figure out which is the "current record" and which is the next record to write to. <S> It's well described in this AVR App Note . <A> This has a limited lifetime in that the battery will eventually die, but it's unlimited in write cycles. <S> You could also use something like a large-ish capacitor to power it, if you know your off-time is going to be some smallish value. <S> A lithium coin-cell can last a long time in an application like this, if you design it right. <S> There are also parts that incorporate an RTC, nvram and battery (to keep the clock running) in one part. <S> These have the disadvantage that if the internal power source goes, you've lost the whole part (not just the battery), but depending on how long your product should last that might not be a problem. <A> Yes, an EEPROM is a type of nonvolatile memory which can hold data even without any power for a significant amount of time (the actual time depends on temperature and other conditions). <S> There are a few other non volatile solutions for you to consider: 1) <S> Internal Flash memory <S> - Most microcontrollers nowdays have Flash for code storage and some provide it for user data and logging as well. <S> This also has limited write cycles and requires block erase before changing bits from '1' to '0' (you store data elsewhere in the meantime and then rewrite it). <S> 2) <S> Internal FRAM memory <S> - TI has devices with FRAM memory which is nonvolatile, can be accessed very simply (like any other memory location. <S> Reads are also destructive as writes (though in your case this might not matter since the number of cycles is 10^13 or so at 85 degrees celsius). <S> 3) <S> External Flash memory - You can add memory externally to hold a few megabits of data rather inexpensively. <S> Depending on the rate at which you want to save (and whether you can shutdown nicely) you might be able to increase the effective number of cycles available for you. <A> I don't know what is your budget, but you might want to take a look at MRAM , which is fast as DRAM but non-volatile just like Flash. <S> Of course, these are way more expensive than EEPROM chips. <S> I've got a bunch of sample ICs from Freescale years ago, but never had a chance to use them, so I can't really tell if you'll end up with a much simpler circuit than if you have to attach an SD card slot. <A> I'm a computer guy rather than an electrical engineer <S> but I think there's another approach to the life cycle problem of flash memory: <S> My understanding is that the life cycle problem on flash is actually a matter of erasing, not writing. <S> You can write as many times as you want except for the little detail that the writes are one-way only. <S> Since the storage you need is tiny compared to the size of even small devices you can (assuming you have sufficiently low level access to the hardware) write it out many times, each time in a different location. <S> Make sure your data can be distinguished from unwritten memory (pad it if necessary to accomplish this) and the last written cell is the current value. <S> Furthermore, if your data is actually a counter being incremented once per write you can get even more out of it by not writing it at all, but rather writing out one bit per tick, the count is the number of bits written. <A> Serial NVSRAM from Microchip may fit your bill: <S> This device is significantly lower cost than other non-volatile RAM devices and the data is backed using an external battery. <S> This 8-pin, SPI device supports unlimited instantaneous writes to the memory array, making it ideal in applications such as meters, data loggers, data recorders, black boxes. <S> These devices are available in 512Kbits and 1Mbit densities. <S> This serial memory family supports battery backup. <S> The datasheet mentions the current draw of 1ua from the battery. <S> Price is less than $2 in 1K qty and free samples are offered by Microchip. <S> ICs are available in hobbyist friendly PDIP and SOIC packages. <A> You may want to look into serial FRAM. <S> The main manufacturer seems to be Cypress (née Ramtron). <S> Here's one part: http://www.cypress.com/?rID=73530 <S> It's available in large sizes (the biggest I've seen is 2Mbit), it's protocol compatible with MRAM or flash, it's byte read-writeable without needing erasing <S> , it's fast --- writes keep up with the SPI protocol --- and the retention is ludicrously high. <S> That said, it's a bit hard to find. <S> Not many distributors carry it and those that do seem to sell out instantly --- Cypress have their own store (free shipping, too) and between me ordering two FM25V04 parts they sold out. <S> Six weeks lead time, apparently...
| Serial NVSRAM offers non-volatile RAM storage and is ideal for applications that need to write very often to the memory. Another potential solution is a bit of static ram, and a battery.
|
How do I test how many amps a transformer actually puts out I have a 120v <-> 9v ac transformer rated at 3.34 amps, but my multimeter suggests that (after running it through a diode bridge), I can get 7+ amps out of it @ 9.4 volts ac. Can I? I have a device that draws 4 amps DC at 6-10 volts,a nd I'd like to power it from this device. <Q> If it's rated at 3.3A and you draw much more than that from it for an extended time, it will exceed its rated temperature and eventually its insulation is likely to break down. <S> At which point, smoke ensues. <S> Whether 20% overload (4A) is too much more I can't say. <S> I would guess short periods of operation (up to an hour, then cooling down for an hour) would be OK for my own use, but I wouldn't sell anything made that way. <S> 7 amps is definitely too much. <A> The transformer will not be giving out the same voltage when shorted out thru a shunt resistor in a multimeter. <S> Take another multimeter, set it up as voltmeter and measure the voltage while measuring current. <S> Then power delivered would be P = <S> I <S> * V and you can roughly expect I = <S> P/V of current in normal operating conditions. <S> Note that the voltage measured won't be accurate, rather some approximation your multimeter comes out with as you will not be getting constant voltage, rather something like that: <S> Try putting the biggest electrolytic capacitor you can find accross the bridge output while measuring (watch polarity and voltage rating). <S> BTW, you are lucky you didn't pop the fuse in your multimeter, never measure current while shorting the power source with multimeter, put some load in series, like 1ohm power resistor. <A> After reading about how you measured current i am pretty sure you made a slight mistake in assessing your observation. <S> You measured current by connecting your multimeter directly across the Bridge rectifier without another load in series. <S> Which means the only resistance was your Multimeter's resistance in ammeter mode. <S> The Transformer through bridge rectifier must have spit out 7 Ampere, but at a much lower voltage. <S> You could confirm this by measuring voltage across your bridge rectifier while measuring current. <S> It is something called load regulation , if you increase the load ( reduce resistance ) <S> the voltage starts dropping when its demanding more than the power rating of the Source. <S> So to answer you question, VA rating of your tarnsformer = 9 <S> x 3.34 ~= <S> 30VAExtreme demand for your load is 10V @ <S> 4A = <S> 40W. <S> Which is not possible <S> (well you can get it in practice <S> see @Brian Drummond's answer) since it requires more voltage and more power and more current than your transformer can supply. <S> Minimum demand by your load is 6V @ <S> 4A = <S> 24W. Here we have hope since its demanding less voltage and less power. <S> You would have to use extra components for regulation thought.
| You have to measure voltage while you are measuring current to get power rating.
|
Do I need to use any external parts with a voltage regulator? I have recently bought a voltage regulator (link, specs, and datasheet below) and I am regulating a AC-to-DC 9v power supply into 5v with as little components as possible. In the datasheet, all of the diagrams use capacitors, and I don't have any on hand, nor do I have the desire to use them if I can. I have seen people create phone chargers with Altoids cans with only a voltage regulator, two wire, 9v battery, and 2 resistors (from 5v to to both of the data lines), so I don't know if it is just providing additional circuits for different uses. Basic Information: LM7805 L7805 7805 Voltage Regulator IC 5V 1.5AManufacturer: STMicroelectronics - SGS THOMSONManufacturer Part No: L7805CVPackage / Case: TO-220RoHS: YesSpecificationsProduct Category: Linear Voltage Regulators - StandardPolarity: PositiveNumber of Outputs: Single Output Type: FixedOutput Voltage: 5 VOutput Current: 1.5 ALine Regulation: 50 mVLoad Regulation: 100 mVDropout Voltage (Max): 2.5 V @ 1AMaximum Operating Temperature: 150 CMinimum Operating Temperature: 0 CMounting Style: Through Hole From eBay descripiton. Datasheet P.S. This is not a duplicate of Proper use of a voltage regulator because that one is not about the schematics, it is talking about if it is needed in the first place. <Q> From the Datasheet (Figure 17, Standard Regulator Circuit): 2. <S> Although no output capacitor is need for stability, it does improve transient response. <S> 3. <S> Required if regulator is locate an appreciable distance from power supply filter. <S> Both can be omitted if you arn't too concerned with how clean the regulation is. <S> If you are using it for a cell phone charger, you would want the caps. <S> Also depends on how dirty/noisy the ac adaptor is. <S> But if all you are doing is adding a few leds with resistors and nothing else, you don't really need that clean of a line. <S> The input cap is to filter noise while the output is to keep the line steady during certain times. <S> The "appreciable distance" is wire length, in less than 10 inches. <S> That said, you could get those caps from dead electronics. <S> 0.1uf is common, and you could use the same size on the input cap as well. <A> Caps are not required but you should not ignore them! <S> From the datasheet the caps are not required but improve transient response: <A> Input and output caps are needed for fast and stable operation. <S> If you need a reliable voltage regulator - add caps. <A> You must use cap's with regulators, they make a very bad ripple after they regulate it, otherwise any sensitive electronics could be effected by the ripple, it will also reduce electrical noise.
| If you have a load that switches between low and high current often, you would want the caps.
|
How can I detect which arduino board (or which controller) in software? I have a project that I want to work on either a Uno or a Mega (or even a Due) and it would be nice if I didn't need two versions of the software. For example, on a Mega, to use SoftwareSerial, you have to use different pins than the ones on an Uno. See the docs on Software Serial . Anyway, it would be nice to detect that I'm using an Uno so I can just use pins 4 and 5 for TX/RX and if I'm using a Mega the software will detect and just use pins 10 and 11 (and of course, I'll have to wire it up differently but at least the software will be the same). <Q> Run time To my knowledge you cannot detect the board type, but you can read the ATmega device ID. <S> Check this question how it can be done: <S> Can an ATmega or ATtiny device signature be read while running? <S> Notice though when using this method, several register assignments will change, not just the pinout. <S> Therefore your code may get significantly more complex. <S> The advantage is that if you manage to work around all changing register assignments and other hardware dependencies, you can use a single .hex file to program your devices directly from avrdude . <S> Compile time <S> Another way to figure out the board/controller type is at compile time. <S> Check this code sniplet for an example: #if defined(__AVR_ATmega1280__) <S> || <S> defined(__AVR_ATmega2560__)#define DEBUG_CAPTURE_SIZE 7168#define <S> CAPTURE_SIZE <S> 7168#elif <S> defined(__AVR_ATmega328P__)#define DEBUG_CAPTURE_SIZE 1024#define CAPTURE_SIZE <S> 1024#else#define DEBUG_CAPTURE_SIZE 532#define <S> CAPTURE_SIZE 532#endif <S> The code sniplet was shamelessly copied from <S> https://github.com/gillham/logic_analyzer/wiki Check that code for some some more device specific trickery. <S> Depending on your host's operating system, the supported controller types can be found in the following file: <S> Linux: <S> /usr/lib/avr/include/avr/io.h <S> Windows: ...\Arduino\hardware\tools\avr\avr\include\avr\io.h <S> The use of C-preprocessor (by which the above code is handled) is probably out of scope for this site. <S> http://stackoverflow.com would be the better place for detailed questions. <S> If you are on Linux you can easily find all supported controller types by typing: grep 'defined (__AVR' /usr/lib/avr/include <S> /avr/io.h | sed 's/^[^(]*(\([^)]*\))/\1/' <A> As stated in the Arduino hardware specification , the Arduino IDE now defines a macro for each board, as defined in the boards.txt build.board property. <S> That value is appended to ARDUINO_ <S> so, for example, the macros for the boards you're interested in are: <S> Uno: ARDUINO_AVR_UNO Mega 2560: ARDUINO_AVR_MEGA2560 <S> Due: ARDUINO_SAM_DUE <S> Example of how you can use these macros in your code: <S> #if defined(ARDUINO_AVR_UNO)//Uno specific code#elif defined(ARDUINO_AVR_MEGA2560)//Mega 2560 specific code#elif defined(ARDUINO_SAM_DUE)//Due specific code#else#error <S> Unsupported <S> hardware#endif <A> An easy way to do board sniffing is to use a library such as ArduinoManager. <S> With this you can very easily get the board name and features https://github.com/backupbrain/ArduinoBoardManager <S> It uses the technique described above to reveal lots of information about almost every Arduino board, so it's great for making projects that might get deployed on a lot different environments. <S> Just download and include in your Arduino project. <S> #include "ArduinoBoardManager.h"ArduinoBoardManager arduino = ArduinoBoardManager <S> (); // required if you want to know the board name and specific featuresvoid setup() { Serial.begin(9600); Serial.print("Board is compatible with Arduino "); Serial.println(arduino. <S> BOARD_NAME); Serial.println("Speed <S> /SRAM/ <S> Flash: <S> "); Serial.print(ArduinoBoardManager::MAX_MHZ) <S> ; Serial.println(ArduinoBoardManager::SRAM_SIZE); Serial.println(ArduinoBoardManager::FLASH_SIZE); // Board features (multiple serial ports on Mega, for example) if (arduino.featureExists(ArduinoBoardManager::FEATURE_MULTIPLE_SERIAL)) { Serial.println("Your board supports multiple serial connections"); }}void loop() {} <S> The resulting output on Arduino Uno is: Board is compatible with Arduino UNOSpeed/ <S> SRAM/ <S> Flash: 16000000204833554432 <S> The process for making this library (including example code) to determine an Arduino board model and version is described in detail on my blog. <A> For all boards compatible with Arduio <S> Due #if defined <S> (__arm__) <S> && defined (__ <S> SAM3X8E__) // <S> Arduino Due compatible// your Arduino <S> Due compatible code <S> here#endif <S> (See the file <S> sam3.h <S> for more info.) <S> If you just want to target the Arduino Due (leaving out compatible boards), you can use #if defined (_VARIANT_ARDUINO_DUE_X_)// your Arduino <S> Due code <S> here#endif <S> (This is defined in the Arduino Due's variant.h file.) <S> Credit to Adam F <S> https://stackoverflow.com/a/21058963/354144 <A> Since the Arduino Due is a different processor family (ARM) than the AVR's, you won't be able to use the same executable for all three. <S> But you can have the same source code (assuming the syntax for reading a port is the same across both the AVR and ARM parts), and just two executables (since the same one will run on both the Uno and Mega without recompiling). <S> You can determine the board type at runtime without having to recompile, by choosing two digital pins that are not already being used by your program on any of the boards and tie them high or low as a board ID. <S> For example, if the pins you choose are PC1 and PC3: <S> PC1 <S> PC3 Board ID 0 0 <S> Uno 0 1 <S> Mega 1 0 <S> Due <S> 1 1 spare <S> Then just read the port on power up and set a variable in your program. <S> Another scheme that can be used, which ties up only one pin, is to use an analog input pin and use a resistor divider, choosing resistors such that you get different voltages in say, 0.25V increments. <S> I have used that technique to specify not only a board type, but also a board revision for the same board (which in a sense is a new board type).
| Basically you compile parts of the code or set macros depending on the device type configured in the Arduino IDE.
|
Ethernet shield-like functionality for ATTINY IC I'm looking to shrink-ify my arduino project in the future, and I was wondering if there's anything like an all-in-one 'tiny' ethernet board that'll work with an attiny chip, preferably with the standard arduino ethernet library. If anyone can name a few such boards/simple ICs, that'd be super! What I want to avoid is horrendous complexities. <Q> The Wiznet w5x00 (5100, 5200, 5300) series based shields is what you want. <S> They have a built in TCP/IP stack, which relieves code and ram intensive programming to to ethernet chip, and simple spi interfacing. <S> The w5100 is what is used in some standard arduino shields. <S> The w5200 is newer, has a sleep mode, and wiznet provides changes for the arduino library to make it work with existing code. <S> And the w5300 is the newest, has some bottleneck fixes, but no specific to arduino library is provided yet, though I doubt it would take much changing to get working. <S> The key part of this being that the built-in tcp/ip stack offloads the heavy lifting from the attiny to the ethernet chip. <S> The ENC28J60 and similar do not have the embedded tcp/ip stack, so you have to code (or use a library), and those libraries are memory and code size intensive. <S> A comparison, I can't find any attiny ethernet projects, but there is a w5200 based <S> msp430 Launchpad booster pack (Shield equivalent) <S> that targets a msp430G2553, which has 16kb of code space and just 512b ram. <S> Example code includes a fully working server. <S> It uses 4.5kb of code, and 400b of ram. <S> On the other hand, a ENC28J60 based shield and library has a code space usage of 7KB and 520 bytes RAM, on a arduino <S> atmega328p. <S> Using the w5x00 (or another with a built in tcp stack) <S> and you should be able to fit it on a attiny85 <S> (8kb code space, 512b ram) <A> If you want to avoid complexity, you don't want a separate board but rather as much integrated as possible. <S> I like the PIC 18F67J60 for small ethernet projects. <S> This chip includes a ethernet MAC/PHY built in. <S> All you need for additional ethernet parts is the connector, magnetics, and a few resistors, caps, and a ferrite bead chip inductor. <S> For simple (as apposed to cheaper), get a RJ-45 jack with the magnetics built in. <S> Microchip has libraries for various networking and other stuff you should be able to use. <S> I don't know if Atmel has a chip with as much of ethernet integrated as the PIC 18F67J60. <S> They probably have a parts selector, so look around. <A> (I think that's the p/n anyway)... <S> and I would expect a pretty significant code/ram footprint at any rate, not sure the ATtiny is suitable to Ethernet functions. <S> library and the ENC28J60 ethernet controller). <S> In the interest of full disclosure, I sell / produce the Nanode.
| You can check out the Nanode for an integrated AVR/Arduino based alternative (it uses the EtherCard If you want to use the Arduino Ethernet libraries, you're forced into the Wiznet 5100
|
Best way to build a 64-bit output multiplexer I'm looking to create something to multiplex N 64 bit signals together. The goal of the project is to provide digital switching between a library of old cartridge based video games. Essentially I want to have a number of cartridges always 'hooked up', but only one set of lines connected to the console. I could do it with 64 single output multiplexers but its seems like I'm going about it the wrong way. Any suggestions on ways to simplify the design? P.S. - I've been thinking about this a little more, and I have an idea for an alternative approach but I'm not quite sure how to execute it. I don't really need to quickly switch between the 64 bit inputs with any sort of speed, which is what a multiplexer would support. All I really need to do is to tie a given cartridge to the console, while electrically isolating all of the other cartridges. For that, I would essentially need 64 relays for each cartridge. I'd like to avoid that, so I wonder if there are any sort of on/off pass-through chips or circuits I could construct. All I would need is something with 64 ins/outs, +1 to open or close the 64 switches. Ever heard of anything like that? <Q> Do these cartridges have any kind of "cartridge select" pin? <S> If so, you could conceivably connect all the lines except for the select in parallel and just drive the appropriate select line. <S> If they don't have a select line, do the cartridges have any address(es) <S> which cause the data lines to be released/"driven" to high impedance? <S> If so, do the cartridges have a common address for all of the cartridges which do this? <S> If they do, there's your cartridge select -- connect the data lines in parallel and connect as many address lines in parallel as you can; that gives you fewer lines you have to multiplex. <S> Failing all of that, you're stuck with a high pin count FPGA to do it, which is probably your best solution. <S> I think that no matter what you'll want to go through the above exercises to minimize the number of uniquely driven lines. <S> It sounds like an interesting project. <S> Good luck! <A> Naturally, you'd need one per cartridge. <S> Or, you could use a bidirectional buffer IC and use the OE to enable and disable. <A> It sounds like you're going to design a big back-plane. <S> Even for a few cartridges, the number of lines is going to grow too rapidly to do this job with discrete components. <S> The solution, I think, is to put an FPGA on your backplane, and implement the multiplexing function in Verilog. <S> That should be a super easy FPGA to code up too.
| What you could use is a SP64T switch (single pole, 64 throw), which would basically open or close 64 connections with one switch.
|
Help me identify the adapter jack just met an industrial computer which has the following power adapter jack. how to identify this jack and where to find? (actually there are lots of different jacks here and there, how to identify all!). <Q> The jack is an example of the Kycon KPJ-4S-S, and is available from Mouser <A> It's not extremely common like coaxial dc barrel jack connectors, but common enough. <S> Provide for higher Amp rating than the smaller barrel jack connectors. <S> As I noted, your pc uses 5 Amps at 12v. <S> I've seen these connectors on LCD monitors, thin clients/embedded pcs and small Stereos. <S> While the label for the connector is shown as a typical barrel jack label (Center positive), that is not correct for this connector. <S> Any of the four pins can be V+ or Ground, or any combination of it. <S> My thin client used 12v on the top two, and Gnd on the bottom two pins. <S> Some thin clients use the same connector for 5v, so you need to be sure which ever adaptor <S> you get matches the wiring needed, or you will need to rewire it. <S> The label makes me believe that the same case is used for a number of the manufacturer's offerings, some requiring less current, thus a barrel jack connection. <S> As for finding the adaptor, and identifying the other ports on that embedded pc, you will be best off googling the brand and model number of the pc. <S> Or of the motherboard inside if it has no outward branding. <S> Most other jacks on that pc should be standard ports, ex: USB, Parallel, Serial, VGA, DVI, PS/2, Audio, etc. <A> The top-right blue connector looks like a VGA display connector. <S> The bottom-right light blue connector is a PS/2 keyboard connector (I believe this is a standard-compliant mini-DIN connector). <S> The power connector is a non-standard variation of the mini-DIN connectors. <S> It's a Kycon 4-pin DC power connector .
| A few power supplies come with a connector which fits this jack, for example the XP Power AML120P . Others have identified the power connector as a Kycon 4 pin:
|
Pull-up and Pull-down Resistor Usage on Input or Output MCU Pins Are pull-up/down resistors (whether internal or external) only needed for MCU INPUT pins? In contrast, an MCU pin configured as an OUTPUT "knows what level it's at" because it does the driving - a "floating" MCU OUTPUT pin tied to some input of another circuit doesn't make sense, because the state of the MCU pin can only be high or low... do I have this right? Now, upon MCU bootup or failure, it may be beneficial to have a pull-up/down tied to this "MCU output to IC input" line to ensure that the input to some IC is never floating. Maybe I just answered my own question here... pull-up/down resistors can be used on both input and output pins, depending on application? <Q> Pull-up and Pull-downs are normally used to ensure a line has a defined state while not actively driven. <S> They are used on inputs to prevent floating lines, rapidly switching between high and low and a middle "undefined" region. <S> Outputs normally do not need them. <S> But most mcu pins are GPIO, and sometimes on startup are defined as inputs instead of outputs. <S> As you said, sometimes you don't want an IC pin input floating on startup, especially like a reset pin that you would normally drive with your microcontroller's GPIO. <S> This is when you use a Weak Pull-up or Pull-down on the line. <S> Because they are weak, and you choose the default state, they provide no interference with your circuit (If the input is supposed to be low at all times, then pulled high, you choose a weak pull-down, and vis versa), but they do consume a bit of current. <S> This is why you choose a resistor weak (Higher the value, the weaker) enough for the job. <S> Another normal output setup that uses pull-ups (or pull-downs, rarer) is Open Drain or Open Collector connections. <S> These only drive a connection low, or release the line, leaving it floating. <S> The pull-ups are used to bring the line to a high logic state. <A> You have it about right; normally you don't need pullups on outputs, but they can be useful to maintain safety during boot time etc. <S> One other reason for using a pull-up on an output : if several outputs from several MPUs are connected to each other, you really don't want one driving VCC and another <S> driving 0V on the same wire! <S> So you either drive 0V on the output or turn the output off (perhaps by configuring it as an input). <S> When all the outputs are off, the wire is pulled to '1' (Vcc) by the pullup. <S> This is called a "wired AND" signal. <S> (You can do the same driving '1' or off, with a pulldown R, then it is called a wired OR). <S> This pattern has several uses including allowing any one MPU to signal an error or turn an LED on, or allowing them all to take turns sending messages to each other on a single wire. <A> This is done to mitigate firmware/MCU failure, but will only work to protect against Hi-impedance state (basically the pin is configured as input by accident). <S> Most MCU's <S> I am familiar with default IO pins to high-impedance input state on boot (but no guarantee, and I do not have experience with anywhere near all MCU families), which means it can take some time before the code to initialize the pin state is executed. <S> Sometimes this doesn't matter, other times it does. <A> The answer is it depends on the microcontroller family, and what it's default behavior is on Power On Reset. <S> If the microcontroller can only be configured for "output" or "input" on a pin, this usually means it is using a Totem-Pole driver for output - which is to say it's essentially the output of a CMOS gate, in which case the output is always driven to a rail, so there's no reason to passively influence it. <S> The only case where it makes sense to use pull-ups / pull-downs on an output is when it is configured as Open Collector / Open Drain topology. <S> It's far more common to see internal pull-up/pull-down options that are only applicable when a pin is configured as an input. <S> If you can guarantee that in your system the input is always driven by something, this wastes a bit of power. <A> You can have a pin which is an output <S> some of the time , such as for doing I2C.
| As you stated, using pullup/pulldown resistors on pins expected to be output pins can be there to guarantee an input state.
|
Hardware solution to fade LED on/off with digital output I'd like to find a hardware-based solution to make LEDs fade from digital pins. i.e. instead of switching on/off, slowly fading (500ms) into/out of full brightness.I can't imagine a small capacitor taking half a second to discharge... Ideally it would be in a nice DIP16 package so I can get an array of fading LEDs.Does my dream component exist? <Q> (Pulse Width Modulation) <S> Just about any modern microcontroller has a PWM peripheral that can be set up for this purpose. <S> The process is simple, the pulse frequency is set fast enough so the human eye cannot detect flicker (typically above 25Hz - see Persistence Of Vision ) and the time on vs time off is varied from 100% on (full brightness) through 50% on 50% off (half brightness) to 0% on (off) <S> Note that this can easily be used for an array, you simply supply the PWM to all the LED driver transistors (make sure the base current is adequate for bipolar, or use MOSFETs. <S> Design choices would depend on what type of LED you are driving <S> , high/low current) Check on the 'net for "555 LED Fade" <S> and you should get plenty of results. <S> Here's one picked at random from here <S> ( I haven't checked it <S> so I can't confirm it works correctly) : <S> This way the cap doesn't have to supply the LED current, only the base current. <S> Something like this: <S> Simulation: <S> Any general purpose NPN should do, and you can tweak the R and C values to suit. <S> This option can easily be extended to an current mirror array with the addition of an opamp. <S> This circuit should perform well as long as the transistors are all of the same type (supply used is +5V): <S> Simulation: <S> If you have a high enough supply voltage, the LEDs can go in series like this (supply used here is +10V): <S> Simulation: <S> Alternatively, if you have a low supply voltage but want to drive the LEDs in series, there are lots of cheap boost ICs such as the CAT4238 . <S> This part can dim the LEDS using PWM or a varying DC voltage (details are in the datasheet) <A> How's this? <S> The FAN5646 is a flexible and compact solution for a blinking/fading LED. <S> FAN5646 datasheet <A> You could use a small cap + big resistor to generate a nice long charge characteristic (t=RC), then feed that into the base of a transistor and drive the LED from there. <S> This allows for a bigger resistance since the current through the LED isn't limited by the resistor size, and then you can use a small cap. <S> It would be necessary to bias the transistor so that it's being used as an amplifier (if it hits saturation, then the LED will just stay on). <A> If by a digital pin you are using an output from some type of processor, it is possible to change the brightness in firmware. <S> As you change the duty cycle of the pin, the eye acts like a filter and perceives a shorter on time as a dimming in brightness. <S> 1 - Use a PWM pin output instead of a digital GPIO pins. <S> By changing a few registers you can change the on time of the LED and thus the brightness. <S> 2 - Use a timer (polled or interrupt) to change the state of your pin. <S> 3 - Use external shift register ICs to latch the on/off times of n LEDs. <S> Though this requires more programming effort, it is extensible and uses fewer GPIO pins than (1) and (2). <A> PWM LED Drivers. <S> They need configuration from a microcontroller though. <S> 555 Timer + a few resistors and caps can do the same, no software needed.
| If you don't want to use a microcontroller, a dedicated PWM IC or a timer IC like the ubiquitous 555 can be used. Alternatively, if absolute accuracy of timing is not so important, a simple option would be to use an RC filter and transistor switch. The usual way to do this is to use PWM
|
"Fine tuning" a potentiometer I am in the middle of a quandary at work. We have wire feeders that obviously control the feed rate of wire through a welder. We have need of putting these units up out of the way and what I did to accomplish this is to move the 10K pot from the feeder unit to the hand-held "whip" Because the knob on the new pot (also 10K) is now considerably smaller it is very difficult to fine tune the wire speed. The usable range for wire speed is approx 30%-60% as indicated on the original dial. How could I solve this problem? Change the value of the "new" pot in the hand-held unit? Parallel? Dropping resistor across tab 1 and tab 2? Am at a loss. <Q> If I understand you correctly, you want to adjust things so the range only covers between ~30% and ~60% of the current range. <S> Let's say the output voltage from the pot wiper is currently 0-10V, here is a circuit to alter it to 3.3V to 6.6V (so 33% and 66% of original range) <S> : <S> The 10kΩ pot is represented by the two resistors in the dotted rectangle. <S> Output simulation with pot swept from 0 to 10kΩ (x-axis, output voltage on y-axis): <S> You can make it even easier to fine tune by using a 10-turn pot. <A> Two potmeters an option? <S> Replace the single potmeter with a 'Coаrse' 10k potmeter in series with a 'Fine' 1k potmeter. <S> The 'coarse' can be put a bit further away as you probably don't need it all the time and 'fine' goes in the handle. <A> Oli's answer is excellent for using a standard pot, but there are also multi-turn pots available that need from several to ten or so turns to change from one end of the scale to the other if you need additional precision. <S> While more expensive look at the following for example: http://www.digikey.com/product-detail/en/3590S-2-103L/3590S-2-103L-ND/1088586 That 10K pot needs ten turns to go to one end of the scale from the other, so they may be worth looking into as well. <S> Look for parts from your preferred suppliers either listed as multi-turn or that show a rotation above 360 degrees.
| Another option would be to use a multiturn pot.
|
Solving a circuit with a directional loop I came up with the following circuit: Please disregard the labeled values in the diagram - the resistances are identical for the sake of simplicity, and of value \$R\$, and the voltage has value \$V\$. Assume ideal circumstances regarding the diode, wires, etc. I'm not able to solve it because I can't seem to find the total resistance. As stated in the diagram, there is a parallel branch which splits into a diode facing against the positive end of the circuit and a resistor, in series with an identical resistance. In my attempt at solving this, I imagined that once the positive current reaches the bottom node, it splits into current going through the resistor towards the negative terminal and current that re-loops through the resistor that was just passed. Given that assumption, the circuit acts as a series parallel circuit whose net resistance can be found by$$\Sigma R = R + x$$where \$x\$ is the value of the resistance in the infinite parallel branches that result from the current re-looping. Then, \$x\$ would seem to be given by$$x = (\frac{1}{R} + (\frac{1}{R} + (\frac{1}{R} + ...)^{-1})^{-1})^{-1}$$$$x = (\frac{1}{R} + x)^{-1}$$$$x^2 + x/R - 1 = 0$$$$x = \frac{-1/R + \sqrt{1/R^2+4}}{2}$$But this value of \$x\$ isn't even dimensionally correct! Is there another approach I can use to find the resistance? <Q> In my attempt at solving this, I imagined that once the positive current reaches the bottom node, it splits into current going through the resistor towards the negative terminal and current that re-loops through the resistor that was just passed. <S> It might do that. <S> But you know that both the resistor and the diode are passive devices. <S> And since they're connected in parallel, the voltage across them is the same. <S> Since they're passive devices (meaning, they're not adding energy to the circuit like a source can), current can only flow through them from high voltage to low voltage. <S> This means you know that current through the diode, if it goes at all, has to go in the same direction as it goes through the resistor. <A> The diode is reverse biased, so no current will flow thru it (other than leagkage, but you said ideal components and that would be much much smaller than the resistor currents anyway). <S> You therefore are simply left with two 4.7 kΩ resistor in series with a 5 V supply. <S> The resistances add, for a total of 9.4 kΩ. From Ohm's law, the current is 5V / 94.kΩ = <S> 532µA. <S> Since the resistors are equal, the node between them will be at half the supply voltage, which is 2.5 V. <S> Yes, it really is that simple. <A> If you want to solve this problem by hand, and not for example via the use of numerical methods on a computer, you will need to make some assumptions on the diode. <S> Specifically, you will need to decide how sophisticated the model of the diode will be. <S> For example, two common models are: 1: <S> The ideal diode: <S> Which has infinite resistance when OFF (open circuit), and null resistance when ON (short circuit). <S> 2: <S> Voltage source and limiting resistor model (more accurate):Where the diode on the model is ideal. <S> Solution <S> Since you are considering the diode ideal, then you have to solve this in two steps. <S> Suppose that the diode is ON <S> Then, you have a short circuit and therefore the parallel resistor is totally ignored. <S> In that case the the resistance is simply 4.7 kΩ. But look at the graph on the first link. <S> The current has to be POSITIVE, but in this case it's NEGATIVE. <S> This supposition is false, the diode isn't ON. <S> Suppose that the diode is OFF <S> Then, you have an open circuit and therefore two resistors in series. <S> In that case the resistance is 9.4 kΩ. <S> But, does this actually make sense? <S> Note that since we have two equivalent resistors, then the voltage across the parallel diode is -2.5V <S> (notice negative sign), which satisfies the graph on the first link. <S> This supposition is true. <S> Therefore the answer (finally) to your question, using the ideal diode model, is 9.4 kΩ. EDIT - <S> I noticed the poster has been having doubts about the possibility of having a looped current. <S> Well let's consider that possibility. <S> We can at least agree that the current is in the direction to where the diode is pointing. <S> In that case, if the current \$i_D\$ loops to the parallel resistor there will automatically be a voltage across that same resistor according to: $$V = <S> R i_D$$ <S> Since the diode is parallel to that resistor, then it also is subjected to that voltage. <S> But that means it would have a negative voltage, making it impossible to be conducting current. <A> In this case the diode is open, since the 5V supply is generating a current in the direction of the diode's cathode. <S> Since the diode is open, the resistance are connected in series and you can add the values. <S> In general, as a first approximation (ideal diodes), you can assume that diodes are either open or conducting. <S> You can then assume one of these two states and solve the circuit. <S> Then you test your assumption. <S> If you assumed that the diode is conducting, then you need to check that the current (defined as positive when entering by the anode) is positive. <S> Again, if it is not, then your assumption is wrong. <S> In this example, if you assume that the diode is conducting, then the current will be negative, implying that the assumption is incorrect. <S> If you assume that the diode is open, then the voltage between the anode and the cathode is -2.5V, implying that the assumption is correct.
| If you assumed that the diode was open, then you need to check that the voltage between the anode and the cathode is negative, if it is not, then your assumption is wrong.
|
Does a resistor in an AC circuit produce the same heat as in a DC circuit? Does a 1k ohm resistor produce the same heat in a AC circuit which has an rms voltage of 10 volts (60 hz.) as it would in a 10 volt DC circuit? <Q> Edit <S> This answers the original version of the question, which asked, Does a 1k ohm resistor produce the same heat in a AC circuit which has an average voltage of 10 volts (60 hz.) as it would in a 10 volt DC circuit? <S> No, the heat produced depends on V 2 , not V. <S> As a simple example, consider a sinusoidal AC signal with 10 V peak to peak, and 0 DC component. <S> The average voltage is zero, but it still delivers power to the resistor and the resistor still heats up. <S> Edit: <S> As D34dman points out in his answer, there are some special cases where the rms voltage and average voltage happen to work out to the same value. <A> Provided frequency is high enough, 1k ohm resistor in an AC circuit would produce same heat (a.k.a. power converted as heat ) as as it would in DC circuit provided the RMS (Root Mean Square) value of supplied Voltage is same. <S> You can read this wiki entry to know more. <S> Proceed to section Average electrical power. <S> RMS value is dependent on the the nature of AC waveform. <S> RMS value is not always equal to average value. <S> But they can be equal. <S> For example a square wave alternating between 0 and Vpeak with 50% duty cycle they can be equal. <S> So to answer your question, if you are giving an AC waveform such that its RMS value and Average value is the same, it would produce same heat. <S> If they are different it wont. <S> I felt compelled to write this answer since @The Photon has some misguided information in his answer. <S> Maybe he assumed that AC signals are necessarily pure sine wave type which goes from +Vpeak to -Vpeak. <S> Which is just a subset of AC signals. <A> If it's a "perfect" resistor, yes. <S> But if it has parasitic inductance or capacitance (as all real examples will, except at their self-resonant frequency where the two cancel) <S> then, no, not exactly, though with the exception of wirewound resistors the difference will be small.
| To get the heat produced in the AC circuit to be the same as in the DC circuit, you want the rms voltage (The square root of the mean of the square of the voltage) in the AC circuit to be equal to the DC voltage in the DC circuit.
|
Electrostatic painting on plastic I'm attempting to create an electrostatic painting process for small plastic parts. The material is ABS and is about 4 inches by 6 inches by 1 inch high. I'm somewhat familiar with electrostatic painting of metal objects, but I am dismissive, perhaps uneducatedly so, of the necessity of the objects to be metallic. To help the matter, I will be using a painting system that allows the paint droplets to be extremely small -- an airbrush. I'm hypothesizing that I can connect the negative side of a high-voltage low-current source to the tip of the airbrush, through which the paint flows, while I connect the positive side of the high-voltage source to the plastic part to be painted and mist the paint over the highly-contoured part as it is attracted to the surface. Will this work? <Q> Electrostatic painting works by charging up each tiny droplet of paint, and then setting up a E field so that the electrostatic force on the charged particles pushes them towards the object you want to paint. <S> Car companies have used this process for a long time now. <S> It not only saves on paint and reduces particulates in the air, but does a better job of coating the surface evenly with the paint. <S> It can even somewhat paint the back sides of small objects. <S> The sprayer only needs to be roughly aimed, and each particle will find its way to the charged target surface. <S> However, they are small particles, so the air appears quite thick to them. <S> Some get pushed around to the back side by the air flow, with the electrostatic force then eventually pulling them towards the object. <S> The paint is generally not conductive. <S> This means that opposite charge builds up on the surface of the object as the paint builds up. <S> This attracts less new paint particles, thereby automatically evening out the paint thickness somewhat. <S> However, all this works by keeping the underlying object at a significantly different potential than the paint gun nozzle (and thereby the paint particles). <S> The object needs to be conductive to do this. <S> First, it needs to be conductive to establish the potential all along its surface in the first place. <S> Second it needs to be conductive to counter act at least the initial opposite charge of the first layer of droplets which touch the conductive material directly. <S> The charged paint droplets moving from the nozzle to the object is essentially a electrical current. <S> If you can't drain that current from the object, then even a little paint will rapidly charge it up to the reverse polarity. <A> It will work if you use the standard method --- which is to metalize the surface first. <S> Metalization can be done by vacuum deposition (used for very fine/small objects), or by electroplating (used for objects that are not very fine/small), or by flame deposition (used for objects that are coarse/large). <S> Electroplating is a three step process that also requires an intermediate metal surface, and that surface is done by deposition plating on to an etched ionic surface. <S> The first step is surface etching, which exposes an ionic surface, then deposition plating, then electroplating. <S> This suggests two options: You could use electrostatic painting after the deposition stage. <S> That will probably work. <S> Or you could try electrostic painting after the first, etching stage. <S> You can probably find examples of dust deposition onto an ionic surface around your house. <S> The process is very slow, and requires very fine particles with very low surface tension. <S> If you work on it, you may be able to get a paint and a process to make it work for you. <S> Don't expect it to be easy. <A> As you say, this attempt is reasonable, and it is even done for things like painting aircraft . <S> Lufthansa says they like this process because more of the expensive paint ends up being on the aircraft and not in the hangar. <S> However, make sure that there is no danger of igniting your paint with sparks caused by electro-static discharge. <S> I guess if you use a metal object behind your plastic parts to be painted, you could still achieve good results.
| The object you paint needs to be electrically conductive, which in most practical situations means it needs to be metallic.
|
Serial communication in Atmega128 I want to send some string to PC via serial port. In cute com (software) its displaying the string but with some chars missing. Also some hex numbers are appended at the start and end of the string. What could be the problem? Can anyone please help to solve this issue. My code is here. #include <avr/io.h> #include <string.h>#include <avr/interrupt.h>#define F_CPU 16000000UL#include <util/delay.h> #define USART_BAUDRATE 9600 // Baud Rate value#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1)void usart_init() {//Enable communication in duplex modeUCSR1A = (1 << U2X1);UCSR1B |= (1 << RXEN1) | (1 << TXEN1);// Turn on the transmission and reception circuitryUCSR1C &= ~(1 << UMSEL1);UCSR1C |= (1<<USBS1) | (1 << UCSZ10) | (1 << UCSZ11); UBRR1L = BAUD_PRESCALE;// Load lower 8-bits of the baud rate value into the low byte of the UBRR register UBRR1H = (BAUD_PRESCALE >> 8); // Load upper 8-bits of the baud rate value.. } void serial_write(unsigned char data) { while(!(UCSR1A & (1<<UDRE1))) ; UDR1 = data; _delay_ms(10); } void transmitString(unsigned char *str) { int i; for(i=0;i<strlen(str);i++) { serial_write(str[i]); _delay_ms(1); } } int main() { cli(); usart_init(); unsigned char buffer[20]; strcpy(buffer, "Walk Alone"); while(1) { transmitString(buffer); //_delay_ms(250); } return 0; } <Q> The code here is probably not what you want: <S> UCSR1C <S> |= (1<<USBS1) <S> | (1 << UCSZ10) | <S> (1 << UCSZ11); This sets 2 stop bits (USBS1 value == 1). <S> You probably want one stop bit. <S> I would use a construct like this: UCSR1C = <S> (0<<USBS1) <S> | (0 <S> << UCSZ12) <S> | (1 << UCSZ11) <S> | <S> (1 << UCSZ10); just to make it very clear what you are doing. <S> Baud rate <S> According to my calculations, your BAUD_PRESCALE is 16000000/9600*16-1 = 26666 . <S> According to the datasheet, for 9600 with U2X1 set, the UBRR registers ( L and H ) need to be set to 207 . <S> So to my mind you are not setting the baud rate correctly. <S> A note on interrupts <S> In response to David Norman 's comment about the interrupts (I think what is meant there is that interrupts would be easier), I beg to differ. <S> For me, anyway, polling is easier to implement For many AVR tasks, (such as SPI sends), it has been found that polling is faster than interrupt-driven comms: probably due to the relative high-overhead of jumps (have to touch the stack), enabling/disabling the interrupt bits, etc. <S> As David Norman points out, if battery life is a concern, then interrupt-driven comms may be a better solution. <A> I would drop Cute Com straight away and switch to something like Termite . <S> Usually when you're dropping characters (it has happened to me many times) it is because the terminal program uses the .NET SerialPort class which converts received data to ASCII then translates it back to whatever the user wants. <S> Instead you should be using a program which uses the Win32API directly (i.e. Termite). <S> You can choose to display in binary, ASCII or hexadecimal without worry at all. <S> I switched last year and would never go back (after spending 2 weeks debugging something that wasn't broken). <A> I was facing the same problem when I was trying to send a string to my LCD display serially using mega128. <S> Firstly comment your baud rate in your program code. <S> Secondly, do not use delays in your function where serial communication is concerned. <S> Thirdly, to troubleshoot use break points where your code sends data which would be UDR1 = data; . <S> Observe on the other side if you are receiving each character. <S> This is to ensure that your serial driver is working correctly. <S> Fourth, since you are not using interrupts (which will be much easier to go about), check when the buffer is empty for a new byte as well as check if the flag is cleared (I reckon you have done that, I'm not checking the data sheet).
| According to my reading of your code and the datasheet there are two problems: Two stop bits The problem was that the system clock was too fast compared to the speed at which bytes are transferred.
|
Can I use a standard SMA connector and cable to deliver high voltage to a PCB? I'm designing a power circuit which I need to bring high voltage, ~3000V DC, into from an external power supply. Normally I would use an SHV connector, but they don't seem to offer these connectors in a form that can be mounted directly to a PCB. Is it possible to just use a standard SMA cable/connector? I assume the connector would be fine as 3000V is not enough to arc from the sleeve to the pin, but I'm not sure about the cable itself. <Q> Looking through an old (2007, paper!) <S> Farnell catalogue, I cannot see voltage ratings on any of their SMA connectors. <S> However there are ratings on (dimensionally similar) SMB and SMC connectors of 250Vrms and 335Vrms, but no DC ratings. <S> This SMA connector datasheet shows a dielectric strength of 1000V at 50Hz ( almost DC!) <S> and a corona extinction voltage of 250V, and a "working voltage" less than that. <A> Given the very high voltage nature of your board, I highly recommend you contact the manufacturer of the SMA connector and cable and ask them about this. <A> Mount your PCB in a chassis and buy the chassis connectors.
| I did find one RG174AU cable with a max DC voltage rating of 6kv between core and screen so with care, the cable may be up to it, but unless you have better luck selecting components than I did, the connector is likely to be a problem.
|
How can we read two digital inputs simultaneously from ATxMega128? I am new here.. I have two IR sensors that give digital output (0 when there is something in front of it and 1 when there isn't). I am using a ATxMEGA128 to run motors using these sensors but I am unable to read them simultaneously. The way I am reading 1 pin is : if(PORTD.IN & (1<<3)) this works perfectly fine but I do not know how to accept two inputs, For instance if my two sensors are on bit 1 and bit 3? Can anyone please tell me the syntax? <Q> Hassan's answer is not quite accurate. <S> If you really want to read both inputs at the same time , you can do that so long as they both reside on the same port. <S> uint8_t sample = <S> PORTD.IN;uint8_t <S> bit3 = <S> (sample >> 3) & 1;uint8_t bit7 = <S> (sample >> 7) & 1; <S> Now you can be asured that bit3 and bit7 are from the same time sample. <S> Read the PORT.IN into a temporary variable and base your decisions on that sample. <A> I would mask the bits I wanted from the port, and test for the possible combinations in a case statement: SensorMask : constant unsigned_8 : <S> = 16#88#;Right_Blocked : <S> constant unsigned_8 : <S> = <S> 16#80#;Left_Blocked <S> : constant unsigned_8 : <S> = 16#08#;... <S> case PORTD.IN and SensorMask is when SensorMask => reverse; when Right_Blocked => goLeft; when Left_Blocked = <S> > goRight; when others => -- carry onend case; In C and presumably the Arduino's own dialect it's called a switch statement and works slightly differently, but it's the usual way of testing several bits at once. <A> Never programmed an arduino... <S> but if portd.in is an 8-bit register starting from bit-0 to bit-7 <S> here is your code: <S> // <S> Im assuming <S> bit-0 is the least significant bit.. <S> ie: "((PORTD.IN) & 0x01)"if <S> ( ((PORTD.IN >> 3) & 0x01) && <S> ((PORTD.IN >> 1) & 0x01) ) <S> { // <S> printf("both <S> bit-3 and bit-1 are TRUE");}if <S> ( (PORTD.IN >> 7) & 0x01 ) <S> { // printf("bit-7 is TRUE");}if ( <S> PORTD.IN & 0x01 ) <S> { // printf("bit-0 is TRUE");}
| If you use PORTD.IN in multiple places, they are all distinct readings from the pins.
|
Cleaning up 4.8V and 10.8V DC power affected by spark ignition system I am developing an autonomous heli drone, powered by a petrol engine. Servos and radio receiver use power from a nominal 4.8V NiMH battery pack. Autopilot takes power from a nominal 10.8V NiMH battery pack. (These battery packs with full charge are typically 5.3 -5.5V and 11.7-12.0V) Petrol engine ignition system is magneto. The low voltage coil produces +/- 150V, this is fed to the high voltage coil connected to the spark plug. When engine is running, electrical noise is present on the airframe, and measurement of the power to the servos and autopilot shows voltage spikes of up to 500mV. This adversely affects the flight electronics. Ideally, I would like to prevent the ignition system from affecting the other aircraft systems, but cannot find anything on the web regarding suppression of the low voltage side of the magneto ignition. I have tried suppression of the high voltage side using additional resistance in the form of a 5K resistance plug cap - this did not significantly change the noise being induced elsewhere. This makes me suspect the low voltage side. If I cannot eliminate the source of the noise, then as an alternative I need to clean up both power supplies, using some type of regulation/stabilization immediately upstream of the flight electronics. Any suggestions? <Q> Basis for my unfounded assumptions: I think the magneto is flooding the engine assembly with noise. <S> It isn't dissipative, and there is no connection to a larger ground. <S> Given the insulating nature of design, not even earthed when landed. <S> It's just one side of a circuit with big spikes on it. <S> So:Don't earth your battery powered modules to chassis. <S> You know it makes it worse. <S> Float the modules, make Faraday cages for the electronics modules and use screened cables for your interconnects. <S> Use the outer screen to connect the Faraday cages. <S> Connect the screen at both ends. <S> ( contrary to normal practice.) <S> Float the electronics from the Faraday cages. <S> Currents from the magneto and other RF sources in the environment are not wanted. <S> (you will pick up plenty of RF once you get airborne) <S> Lightweight Faraday cages can be made from plastic enclosures and much conductive screening spray. <S> ( generally on the inside, where it doesn't get rubbed off) <S> Where possible use transformer isolated differential signals between modules. <S> Single ended or ground referenced signals will be problematic. <S> Shared power supply will cause problems, assume the power supply is a noise source. <S> Try at least common mode chokes at the boards. <S> In noisy mobile systems there isn't a convenient chassis or ground to bypass power line noise to. <S> Antenna feedthroughs are problematic. <S> Military solutions to this kind of problem involve screening the noise sources as well. <S> ( see the comment about Fitted For Radio (FFR) vehicles). <A> If it were a spark ignition system, put a capacitor across the B+ side and ground. <S> Here is the first hit I get on ' magneto filter capacitor ', and here is an article about maintaining them: Mag Check . <S> Route ignition wires close along their ground return paths, to reduce the size of the loop they make, and be sure the ground return path is good. <S> For instance, is the high voltage coil's ground direct to the engine? <S> Ground the electronics to the engine block and Heli frame. <S> That might help. <S> The kill switch wire might be radiating, be sure it is shielded. <S> And as a final resort, run the spark wires through coax shield. <S> The coils, both the hv and the magnet coil probably radiate pretty badly too. <S> A loop of copper tape 'round the outside of the coil, like you see on smps transformers, can suppress that. <S> You can explore the emi with a 'scope probe with it's ground wire clipped to the tip. <S> Wave it around the engine to see where the emi is coming from. <A> Isolated DC to DC converters with isloated PWM. <S> I have seen this exact problem before and solved it this exact way.
| Have an analog 5 volt rail from your batteries for servos and other power devices with a simple BEC and put all of your sensitive electronics on an isolated ground and keep it that way with optoisolators, sparkfun.com sells simple PWM isolation boards.
|
How can I seal a temperature sensor against water? I have some DS18B20 temperature sensors around and was wondering how can I seal them and use them in a water tank. The sensor must include a small resistance (140 k or so). Is there a simple DIY way to do it? it need to be something with a small thermal resistance/capacity. <Q> There are some DIY options along the lines of potting and conformal coating: Conformal coating. <S> Attach your sensor assembly to the end of the wire. <S> Dip the assembly into epoxy. <S> Let it cure. <S> Dip and cure several times to avoid leaks through the defects in the epoxy. <S> Consider using the type of epoxy, which is used for boats; not all epoxies are water-resistant. <S> Same as 1. <S> but with silicone instead of epoxy. <S> RTV silicone can be used for this. <S> Same as 1. <S> but with urethane. <S> Same as 1. <S> but with thermally conductive epoxy. <S> Potting. <S> Attach your sensor assembly to the end of the wire. <S> Put the sensor assembly inside of the metal tube (copper or aluminium). <S> Fill the inside of the tube with heat sinking grease for better thermal conductivity. <S> Seal the tube with epoxy. <S> edit: Heat shrink. <S> I'll second the other respondents, who have mentioned heat shrink. <S> It can be simple heat shrink filled with glue. <S> The are also specialized heat shrink tubes lined with adhesive and/or wax. <S> DS18B20 comes in IC packages (TO-92, and others), which are made of epoxy. <S> By itself that introduces thermal resistance. <S> If having a small thermal mass and resistance is paramount, consider using a different sensor such as a thermocouple, thermistor, RTD, diode sensor in a metal case. <A> I'd vote for glue-lined heat-shrink. <S> Alternative, if you can live with making holes in the tank or not fully submerging the sensor, would be to use automotive engine coolant temperature sensors - these, by definition, are sealed when screwed into a hole in the engine block with coolant flowing past. <S> The external connector is not always guaranteed submersible (but many are, <S> modern GM stuff uses AMP/Tyco <S> weatherseal connectors for example) <S> but they can be sealed easily enough, and the sensors are very robust, designed for high temperature, chemicals/oils, vibration, etc. <A> I've had success with heat-shrink tubes filled with Loctite ECL30 epoxy, reinforcing the ends with adhesive lined marine heat shrink tubing. <S> Loggers built with sensor chains of DS18b20 sensors have survived more than four months at 10m depth. <S> The epoxy is a bit gooey to work with & the trick is filling the HS tubing with one end sealed first, and then using the contraction of the tubing itself to squeeze the bubbles out as you work towards the other end. <S> More details on the process here . <A> I have actually done just this with a DS18B20 TO-92 sensor I used in a DIY etching tank. <S> I used some clear PVC tubing for it and the wires, then filled the area around the TO-92 package with some clear silicone, then epoxied the end of the tube to seal it. <S> I then epoxied the tube to the bottom of the etching tank and ran the tube through an epoxied hole in the tank to a PIC16F that is used for controlling the heater/LCD/buttons. <S> It's worked just fine having been submerged in Ferric Chloride for over a year. <A> That worked very good.
| I've used a heat shrink tube and some hot glue.
|
Reading from multiple sensors and synchronizing data I am working on a project which requires reading from four sensors simultaneously with time stamps down to millisecond. Right now the best I can come up with is to use four PICs to read from each sensor and output through four RS232 to a laptop. So those sensors don't interfere with each other. For time stamps, I use a mechanical switch to trigger a external pin voltage change interrupt to start timers in all PICs at the same time. Timers increment every one millisecond and I just simply append the value from timers at the end of every measurement and output them through serial ports. It works but I just want to know if there is a better solution since this project is kind of time critical (1000 measurements per second required). And also internal timer for each PIC varies which defeats the purpose of synchronizing timers. I also thought about just reading from one additional chip's timer using SPI so all time stamps come from one source . However, I don't know when those PICs will read the time from that source chip. There could be four PICs reading from it at the same time which will mess up time stamps. Sensor 1: Quadrature encoder (channel A B and Index) Sensor 2: Laser (sending measurement back through Rs232 interface) Sensor 3: accelerometer (analogue) Sensor 4: inclinometer (RS232 interface) I am using four DSPIC30f4011 chips. They have QIEs enough UARTs and also support four channel simultaneous ADC. For Quadrature encoder , I use an on chip QIE to read from it and send measurement to a laptop through UART. For Lazer and inclinometer , I read from them through UART1 and send measurements to a laptop through UART2.(one chip for each of them) For accelerometer , x y and z information are being collected using four channel simultaneous mode. Measurements are sent to a laptop through UART. <Q> Why not use ONE micro with FOUR ADC's (not a hard thing to find) that reads all four values at once, then reports the data back over ONE serial link? <S> Without more detail about your setup <S> I suspect you're deluding yourself about your ability to get 1mS accuracy/synchronisation too. <S> Edited to add : If you can give more detail about the application there are lots of other solutions; 1ksps is easily doable through the laptop sound-card (most will do 96kHz/16-bit on 2-channels, many can manage better / more channels). <S> Edit now we have more info: <S> Sensor 1: <S> Quadrature encoder = 3 GPIO pins (as A, <S> B,I are just logic levels) <S> Sensor 2: Lazer = 1 <S> UART <S> Sensor 3: <S> accelerometer = <S> 4x ADC's Sensor 4: inclinometer = <S> Another UART Connection to base: = <S> Another UART <S> So that's 3 GPIO, 4 ADC and 3 UART - which is doable with ONE of your current PIC devcies, if you're willing to bit-bang an extra UART port (plenty of PIC bit-bang UART routines on the google). <S> It would be easier using a single chip that has a spare UART or some other port, but perhaps your inclinometer or laser could use SPI/I2C? <S> Just a thought. <S> I'd question your specification for the synchronisation of any of this (given the sample->conversion->UART->PIC->UART path for the Laser & Inclinometer), it seems to me everything will be subject to different amounts of delay, even if the data is reported back in one hit every 1mS <S> it's likely to be out-of-sync with itself by some degree. <A> Okay, we have some info on the sensors. <S> This should be doable with one of the newer dsPIC33Fs. <S> As @gbarry correctly notes, they have variants that can do 4 channel simultaneous sampling (i.e. they have 4 sample and holds) <S> I am currently using one of these for some experimentation, the dsPIC33FJ64GP802 . <S> It's an impressive little chip, much better than the older dsPIC30F4011s. <S> It runs at up to 40 MIPs, and has an 8-channel DMA which you can use for the ADC and other peripherals, so getting your timing within spec should be not so hard. <S> The DMA makes life much easier, you can use it plus interrupts to save your main loop as much as time as possible. <S> You also have 2 UARTs, and 4 capture/compares (for the quad encoder) plus 5 timers. <S> You are missing 1 UART, <S> so you will neither need to bit bang or add an external UART IC if you can't find a variant with more than 2 UARTs. <S> There are a few versions to choose from, the one I linked to is one of the smaller ones memory wise <S> (I was mainly interested in the ADC and audio DAC plus DMA for audio ideas prototyping), so have a browse through all the options. <A> Would an FPGA solution be possible? <S> Four independent PICs with independent clocks sounds like a recipe for timing hell. <S> I'd recommend the Papillio . <S> Bit of a learning curve if you've never developed for FPGAsbefore <S> but they're pretty powerful in certain scenarios.
| I'd imagine an FPGA, as a true multi-tasking capable hardware solution, would be able to process and encode all four signals in parallel quite easily.
|
Generation of text on composite video I'm building a homebrew computer. I want some way to get video out, preferably along the lines of 80x25 text. I'm not interested in framebuffer graphics. Does such a thing exist as a single-chip text generation system, complete with clock, internal character generator ROM and video memory? Preferably speaking something like I2C... Back in the old days there was the SAA5243 Teletext video generator, which did almost all of this. It would surprise me a lot if there wasn't something similar (but better) available today. I have found things like the MAX7456 , but that's really intended for OSD use and only does 30x16, which is a bit small. Is there any kind of modern equivalent? Of course, I'm aware that any reasonably fast microcontroller can bit-bang composite video in software, but then I'd have to write it myself and I'd kinda like something which works. (Incidentally, and this is not part of the question, but if anyone knows where I can get hold of an HD44780-style character LCD larger than about 80x16 I would be delighted .) Update: Of course, anything that emits VGA is fine too. I basically want some form of video that's cheap and easy to display. <Q> What sort of processor and memory system are you using? <S> Many home computers in the 1980's had the video system that takes data directly from the processor's memory. <S> Depending upon the processor, it may be possible to have the video system receive data from memory when the processor isn't using it <S> (this was done on e.g. the Apple ][ series); even if that's not possible, having the video receive data directly from the CPU will often allow nicer screen updates than would be possible if the data had to be fed to another chip; one can vary the complexity of the hardware based upon the level of CPU loading that would be considered "acceptable". <S> Note that if your processor/microcontroller has a spare DMA channel, the level of hardware required may be very slight--especially for a bitmap display--and the CPU may only need to be interrupted once per frame [depending upon the DMA controller, you might not even need that]. <S> You could also use a CPLD along with a parallel RAM to emulate a serial RAM; if you were planning on interfacing a serial RAM with your CPU anyway, that might be the best approach. <S> Since the main CPU and the video would each only need to access two million bytes per second maximum (assuming one-bit video), there should be no problem interleaving the parallel memory cycles. <S> I would guess that a CPLD with 64 or 72 macrocells could do the job "barely", or one with 128 or 144 macrocells could do the job "comfortably". <S> I'd be inclined to go with the latter, since it could probably include a variety of features that would greatly expedite display updates (e.g. the ability to automatically bit-shift or mask incoming data). <A> You could use a Parallax Propeller chip as a peripheral, and use either a parallel or serial (SPI/I2C) bus to communicate with it. <S> The chip costs $8 in single quantities and is available either in DIP or SMD packages (whereas the MAX7456 costs more than twice as much and is only available as a SMD). <S> The Propeller has special timing circuits to generate both composite and VGA video under software control. <S> Although you mentioned the need for only text, it can do graphics too -- here is a demo . <S> As far as text goes, check out the VGA text demo at around 2:05 into the video which has a format close to what you are looking for. <S> There are plenty of libraries existing for sending text to the display so you don't have to write your own from scratch. <S> The default font is contained in a bit-mapped table included in the same ROM that contains the bootloader and interpreter used for the Spin language (the high-level language Parallax supplies for programming the Propeller; C and assembly can also be used). <A> If color is not important you can take a look at cheap Tellymate for AVR and XMEGA . <S> There is also a device which works on both composite video and VGA.
| It would be possible to use a CPLD along with either a parallel or serial RAM to create a video subsystem which could run mostly or totally autonomously but would allow the main CPU to perform some display updates during the time when the display was blanked (depending upon how much logic you want to put in the CPLD, the main CPU may have to make sure it reset the address on the SPI RAM in time for video to resume clocking).
|
Any way to use N-channel mosfet in P-channel configuration? In my application, I need the HIGH signal to turn a device OFF and vice versa. Clearly, this is P-mosfet configuration. However, I only N-mosfet on hand. Is there any clever way to utilize N-mosfet to turn a device OFF when signal is HIGH ? In other words, given a switch (N-channel mosfet) , is there any way to turn a motor ON when signal is LOW & vice versa ? Credit:vishay.com <Q> As Olin says, the definition of ON can mean a few things - for instance, do you mean current flowing from drain to source? <S> Or a "high" voltage at the drain in a common source setup? <S> However, there are a couple of options depending on what it is you need to do: <S> If it's a voltage signal you want to drive a load (.e. <S> current gain needed), a simple way to achieve this would be to put another N-ch common drain MOSFET in front of it to invert the signal, for example something like this: <S> If the current gain is unimportant, but you wish to switch a larger voltage, then a common gate setup could be used: <S> Simulation: <A> Sadly no as it seems you are using an enhancement mode NMOS. <S> Potential solutions:1.Use a depletion mode <S> NMOS2.Use <S> a second nmos to create a not gate (or just use a not gate if you have one)3.Use a PMOS as you yourself suggested (probably will be trickier because of the body diode) <A> The diagrams mentioned by other answers on this page where a resistor is used can distort your signal significantly. <S> The resistor will slow down the charging rate of the FET gates which will smooth out the leading edge of your inverted signal. <S> Using an actual inverter or 555 inverter "squares up" the wave to keep nice sharp/hard edges. <S> A solution worth mentioning is to use the trusty workhorse 555 IC as an Inverter. <S> Go to the bottom of this page to see the 555 wired as an inverter: http://electronicsclub.info/555timer.htm
| If you mean a way of switching an N-ch MOSFET off when a positive voltage relative to the source is applied to the gate, the answer is no, there is nothing "clever" that can be done.
|
Over what frequency range can the microphone of smartphone receive the sound? I have a project in which I am considering using the microphone from a smartphone for the reception of inaudible signals (> 15khz). What is the frequency range that such a microphone of receive sound?And what is the maximum frequency ? <Q> The best idea is to ignore what everyone says, and test it yourself. <S> Install an app like "SpectralPro Analyzer", and either generate some high frequency sounds using PC programming (easy) or download some high-frequency MP3's from web sites. <S> I've done all of the above on many different phones - I find that I get excellent results for a very long way off the top of my hearing range, at least as high as 21kHz (the limit for those apps). <S> The interesting thing about this is: a) <S> everyone who said PC speakers can't do 21kHz was wrong, and b) everyone who said smartphone microphones can't pick up high frequencies was wrong too. <S> Bottom line - almost everyone who's never tried this stuff makes a guess. <S> Good intentions don't make their guessing relevant though :-( <S> Best of luck with your project! <S> Here's a Samsung Galaxy Note-1 recording a Macbook Pro signal which went from 9kHz to 21kHz: ( Image source ) <A> This is likely to be different for each manufacturer / model and something you'll either need to test yourself or do some searching of manufacturer specifications and/or tests that other have performed. <S> For example here's an iPhone microphone frequency response comparison: http://blog.faberacoustical.com/2009/ios/iphone/iphone-microphone-frequency-response-comparison/ <S> Also note that many people, especially the young, can hear up to 20 kHz and sometimes beyond so what you're trying to achieve probably won't be possible on most phones. <A> Apparently it is possible for a smartphone microphone to pick up on sounds that most people can't hear, because: "Narrate's Zoosh software leverages smartphones' speakers and microphones to enable the same data communications between devices that today's NFC provides, but with ultrasonics frequencies that are inaudible to humans." <S> -- Eweek , Slashdot . <A> It depends entirely on the phone, they will all use different microphones/circuits. <S> Generally, an audio mic will be within a range of 20Hz - 20kHz. <S> Many cheaper mics ( or intended for voice only) will have a lower cutoff frequency of 15kHz or less. <S> The circuit the mic is attached to may intentionally roll off the frequency - various DSP techniques are used to minimise background noise and feedback, adjust compression, etc - <S> so the software processing is quite sophisticated and dynamic on a modern mobile phone. <S> At a guess, you should be able to rely on at least 100Hz <S> - 10kHz. <S> For a particular model, have a look at the specs, it should give at least some basic detail on the microphone input range. <S> Or do some testing with a function generator and some recording app on the phone. <A> As a first time iPhone user (and trained BBC recordist) <S> I am beyond impressed by the audio. <S> Spectrum analyser app (Octave RTA) registers down to 16 Hz and up to 20 kHz on my iPhone 7. <S> Live concert organ is very well recorded, pedals and all, albeit mono. <S> The 19kHz pilot tone leakage from an FM radio speaker is perfectly visible. <S> I have no way to confirm flatness of response, though a natural white noise source such as a waterfall is displayed without evident peaks or banding. <S> Recording speeach alongside a good studio condenser <S> mic <S> there's really not a lot of difference, just a bit bass light and mid-treble bright, easily EQ'd. <S> Hope Apple never change the mic or input. <S> Or maybe they did later? <A> The best way to tell would be to locate which MEMS mic is in your phone and finding the data sheet. <S> Testing it yourself without lab quality equipment will have many problems, including: 1) <S> other posts have recommended just playing a frequency sweep on your speakers. <S> The issue here is your speakers (with enclosures) themselves have a frequency response that is not flat, so you're introducing a frequency sweep that is already transformed by the frequency response of the speaker dynamical system. <S> 2) <S> You do not have a reference lab quality microphone with flat frequency response to compensate for 1. <S> 3) <S> The fact that the microphone is enclosed in your cell phone case will change the frequency response due to the effect of the microphone inlet geometry, see articles on Helmholtz resonance and audio design. <S> Outside of a lab environment, it will be really difficult to get a meaningful frequency response. <A> Just a note:The maximum frequency you can get from your microphone is half the sampling speed of the AD converter. <S> So half the sampling frequency.(nyquist freq?)(you need two samples to make a minimal "wave") <S> If you would want to detect this signal you'd have to sample at 60kHz <S> , i have no idea if you can change your microphone input sample freq, on smartphones .
| I've read that an electret microphone (if that is what is used) should be able to detect frequencies in up to 30kHz.
|
Continuous light: do LEDs flicker like fluorescent lights? Continuous light - do LEDs flicker like fluorescent lights? Under fluorescent light there is a flicker. As I understand LEDs work only with DC current, thus they have a AC to DC transformer circuit pumping electricity into them. That would mean that they emit continuous light. <Q> LEDs will emit steady light if given steady current. <S> The question then becomes what kind of current waveform LEDs are driven with in a light assembly. <S> The exact answer depends on the circuit in the light. <S> LEDs run on just a few volts. <S> The much high line voltage has to be converted to the lower LED voltage somehow. <S> Most likely, this will include the cheapest, dumbest, and most stripped down switching power supply possible. <S> I see other answers mention a transformer, but I think that is quite unlikely. <S> There is no need for isolation in a sealed unit with no external connections other than the power line. <S> Even if there is a transformer, it's not going to be fed directly from the line frequency. <S> The extra savings in cost and size of a transformer that works at 10s to 100s of kHz far outweighs the cost of the components to produce that frequency. <S> Most likely, there is a full wave bridge to rectify the AC line voltage directly. <S> That will then be chopped thru a inductor to drive the LEDs. <S> Even a little current feedback would keep the LED current reasonably constant over most of the line cycle, perhaps dipping only briefly at the power line zero crossings. <S> A small cap would reduce that, but caps cost money and take space, so may not be included. <S> LED lamps are made in large volumes, so serious manufacturers probably develop custom ICs just for this purpose. <S> In such a case I'd expect at least some attempt at regulation, so the LED brightness will be largely constant, perhaps with short dips at the power line zero crossings. <S> However, all this is speculation. <S> Why not just look? <S> Put the lamp at the end of a extension cord and swing it around in a otherwise darkened room. <S> Whether it flickers or not will be immediately obvious. <A> Your assumption is correct that when a LED is fed a stable DC current it will not flicker. <S> However LEDs that run from an AC source such as mains will normally use a rectifier to convert the AC to DC, the following diagram from Wikipedia illustrates a full-wave rectifier: <S> A capacitor is typically used to smooth the output for applications where stability is important, but if the value is too small relative to the current drawn, or not used at all, a flicker is certainly possible. <S> I wouldn't be suprised if a lot of "drop in" LED replacement lamps and LED supplies omit the capacitor to reduce size and cost. <S> Other than flicker <S> there's no drawback I can think of <S> so it's a reasonable design compromise. <A> LED's are still diodes and can be used to rectify AC to DC. <S> Some of the least expensive LED lights are simply comprised of strings of LED's wired such that the sum of forward voltages comes close to the peak line voltage with a small inline resistance for current limiting. <S> THis is simply placed across the plug that goes into the mains. <S> A second string of lights can be placed in the opposite direction for the opposite phase. <S> SO the LED will light up for only 1/2 of the 50/60 Hz cycle. <S> OF course many variants of this wiring, like using strings of these LED's in a bridge configuration. <S> This is how LED christmas tree lights are wired, it essentially requires ZERO external components (except the resistor) and results in a flickery string of lights. <S> If you were to take those same strings of lights and apply a higher voltage DC to them you'd get steady light on only some of the lights. <S> This technique will be used in several situations where the manufacturer does not want to produce a control circuit. <S> Of course there are many different variations, the key point is that you don't need any extra circuits if wired correctly and you can accept flicker. <A> I own quite a few LED lamps (A form factor). <S> What I do to check for flicker is to use a spinner-top with a pattern of closely spaced lines, one inner one outer. <S> When spun under an incandescent lamp or (strangely enough) compact florescent lamps the lines will blur. <S> If there is any flicker, then you get the "wagon wheel effect" where the inner and outer lines seem to travel at different speeds and in different directions. <S> Cree is the worst offender and the non-dimmable 10.5w 800lm <S> Philips is bad as well. <S> Samsung, Sylvania, and the dimmable Philips A-line are all smooth. <S> I should also note that I'm referring to the mostly non-perceptible flicker and NOT the flicker that occurs with dimmer switches.
| Depending on how cheap the lamp is, it might chop at a fixed duty cycle, which would make the LED brightness vary with power voltage.
|
Very accurate time measurement I'm going to measure very short times as accurately as possible. The device will get first one pulse and within 150 microseconds six more, each on their own wires. The time between first signal and each of the six other signals must be measured as accurately as possible. The accuracy should be at least 100 nanoseconds but more is better. Which microcontroller would be best for this? I've found this . They seem to have a timer with period of 4 nanoseconds. It would be accurate enough for me. Would some other microcontroller be better to do this? Can this be done with AVR? <Q> The speed of the microcontroller is not always the limiting factor. <S> The MSP430 can be an appropriate solution, not because of the fact it only runs up to 25MHz, but because several MSP430 devices have the Timer D peripheral which enables up to 4ns time period (256MHz). <S> This is faster than almost all microcontrollers out there. <S> Even the STM32 in its latest versions (F4) can only do 180MHz. <S> Timer D is available on MSP430F51x1 and MSP43051x2 devices such as the MSP430F5131. <S> However, that only solves being able to capture the time. <S> The big question is what do you do with it because the processing itself will be slower. <S> You could sample the time between two pulses, but you won't be able to do any processing between them, if that's what you mean. <A> Timing to a resolution of 100ns requires a timer running at 10MHz. <S> Many microcontrollers should be capable of running a timer that fast. <S> The problem comes when you are trying to time the arrival of 6 signals. <S> Are these signals all on the same wire, or each on a different wire? <S> If they're all on the same wire, then is might be possible to do this accurately on any MCU with a single 10MHz timer. <S> Naively, the code to do this would look something like this: wait for trigger signalreset timerwait for first signalsave timer valuereset timer.... <S> wait for sixth signalsave timer valuereset timer <S> The problem is that it takes a finite amount of time to reset the timer. <S> This causes two problems: <S> The times measured would be wrong by a few 100ns, depending on your implementation. <S> However, they should be consistently wrong. <S> I.E. wrong by exactly the same amount every time. <S> This means you can easily compensate for it by adding a small amount to each measurement. <S> If the any pulse arrived 100ns after the the previous one, then you'll probably miss it. <S> I don't know if there's anything you can do about that on in software. <S> Which microcontroller can handle multiple pulses in hardware? <S> The Cypress PSoC ! <S> This is a microcontroller which also contains configurable digital blocks, meaning you can easily have 6 separate timers running, each at 60MHz, giving you a better than 20ns resolution. <S> Here's an example I knocked up quickly to show you the sort of things you could do with it. <S> I've got 6 separate timers, all running off the bus clock, which can go up to 67MHz. <S> There's a trigger pin which starts all of the timers running, and 6 other pins, each of which causes a capture event in the timer. <S> A status register allows your code to monitor which timers have captures a pulse. <S> The code can read the values out of the timers. <A> Revised answer : <S> A fast digital storage oscilloscope or possibly frequency counter device. <S> Old answer : <S> In simple terms, "the fastest microcontroller you can find", on the grounds that the faster your clock / sampling, the more accurate you can be. <S> MSP430's are not fast devices. <S> STM32's are 32-bit and will run faster, plus have similarly cheap dev boards & tools available, but even that is quite slow compared to some of the more powerful stuff available (Raspberry Pi @800MHz - 1GHz(Overclocked)). <S> Generally though, the faster you go the more complicated the processor so there can be a trade-off in the learning curve. <S> Added: <S> Benji is right, you (may) also need an accurate oscillator for the micro if you want very accurate measurements <S> (you don't really specify error bounds in your question).
| You'll have to find a microcontroller which can handle multiple pulses in hardware. There would be a minimum time you could measure.
|
What is typical power consumption of FPGA devices I am new to this site and had one question. I know typical CPUs have power consumption (TDP) in range of 100-200W, for example Intel Core2 . I wanted to know what is typical power consumption of FPGAs. I saw this paper , where it says power consumption of Xilinx xc5vlx330 is 30W, but it gives no reference. I wanted some authoritative reference of any FPGA board (preferably high-performance FPGA) and any company. I searched online where they provide datasheets, but they do not clearly tell the power value, but only direct to power estimation tool. <Q> In general, the amount of power an FPGA "consumes" is related to the function it is performing and the frequency it is operating at. <S> That's why you can't find an authoritative number; because "it depends". <S> I suggest that you play around with the power estimation tools, figure out what the input fields mean, and then you'll have a much better understanding of the factors that contribute to the overall power consumption of the FPGA while it is running a particular design. <A> Obviously, the more information you can provide, the more accurately the results reflect the power consumption you'll see. <S> Otherwise, there are too many parameters that influence the power consumption. <S> I highly recommend that you try it, even if to see what are the major factors that go into this (Clocks, number of I <S> /Os active, etc). <A> The reason they direct you to a power estimation tool is because the power consumed depends very heavily on how hard the device is working. <S> Intel know that their processors will be clocked at the max rated frequency (at least some of the time) and that all the processing units will be used (at least some of the time). <S> Xilinx have no idea what their customers will do. <S> It may be that the design is slightly too big for a small device, so needs the larger device, hence only (for example) <S> 60% of it is used and the other 40% lies idle, not consuming dynamic power. <S> Most time customers cannot clock the entire device at anything close to the theoretical fmax, so that reduces dyanamic power also. <S> If you were to calculate a theoretical max power dissipation, it wouldn't help much as you'd then end up overspecifying your power and cooling subsystems by a factor of (guessing) 2x to 4x!
| The power estimation tool provided by the FPGA manufactuers is a very good way to obtain an estimate.
|
How do I calculate the required value for a pull-down resistor in a PWM circuit? I'm using 74HC595 with SoftPWM to control some LED's. When the 74HC595 is off, its outputting about 0.57v, enough to turn my LED's on somewhat. How do I work out the value of the pull-down resistor (R1), so that the LED is completely off when meant to be, but also able to reach maximum brightness. <Q> In the circuit as you have drawn, R1 does nothing. <S> The 74HC595 has totem-pole outputs . <S> As such, the output is actively driven either high or low. <S> When QB is high, the output will source however much current is required to drive QB to ~5V. <S> When QB is low, it will sink however much current is required to drive QB to ~0V. <S> I think you are not understanding how PWM actually works. <S> The whole idea with PWM is that you turn something on and off fast enough that the square-wave PWM signal is basically integrated by the system it is being fed into. <S> In the case of lighting, the integrator is your eyes . <S> As such, the proper value for R1 is infinite, and you need to get rid of C2 entirely. <A> There circuit you have makes no sense for several reasons. <S> First, the pulldown is in the wrong place. <S> Second, C2 will prevent the transistor from turning on and off sharply, thereby causing it to spend a significant portion of the time in-between and dissipating power. <S> Third, what is that CCR2 thing? <S> No, I'm not going to chase down a part number. <S> It's your job to explain basically what it is and then provide a link to the datasheet if needed. <S> Here is a better way to drive a low side NPN switch from a 5V CMOS digital output: <S> R1 and R2 are a voltage divider, so the digital output needs to be about twice the B-E voltage in this example for the transistor to turn on. <S> That should give you about 1 V noise immunity on the low end. <S> The two resistors together also lower the impedance the base is being driven with, which in this example is 500 Ω. <S> That should allow the transistor to turn on and off quickly. <S> Another issue is that the output of a HC gate shouldn't be hovering around 1/2 volt when low. <S> These gates have CMOS outputs, so are rail-to-rail. <S> The output voltage should be within a few mV of ground unless it is sinking significant current. <S> In your case it's not sinking any current at all when low, so the output really should be effectively 0. <S> It might be possible to suggest better alternatives, but we need to know what you really want to accomplish. <S> What PWM frequency? <S> What is the max LED current? <S> The example above is only good for about 150 mA or so. <A> Your problem is that you have a circuit that must be driven by an output stage with particular properties, notably a very low voltage for a logic 0, because the capacitor must be discharged down to below the Vbe treshold of the transistor. <S> (You probably should have mentioned your reason for this rather unusual LED driving circuit in the original question.) <S> You can solve your problem in (at least) two ways: change the driving circuit, or change the LED driver. <S> A simple (and low risk) way would be to insert a buffer between your driver circuit and the LED driver, that has the same output specs as the circuit te LED driver was originally designed for. <S> This would keep the on/off timing intact. <S> You seem to prefer to improve the performance of the driver by adding a pull-down resistor. <S> The problem here is that for this to be effective the pull-down must have a low value compared to the series resistor R2 (which is only 1k), and that it must be sufficiency high in order to not affect the voltage level for a logic 1. <S> I don't think there is a value that satisfies both constraints. <S> But I guess your current R2 value is way lower than it could be, so let's say swapping the values might be a good start. <S> (better: calculate the maximum value for R2, choose R1 at 1/10, check if that does not affect the high level). <S> I would prefer a third approach: <S> change the LED driver so that it can work with an input that does not reach down to 0V. <S> A diode in the emitter lead might be sufficient: it raises the required base voltage by ~ <S> 0.6V. <S> An extra resistor as Olin and Dave suggest might help if the LED needs more than 2 V.
| I don't know the voltage required by your LED, if it is not too high you might get by without the CCR with placing a suitable resistor in the emitter lead, thus turning the transistor into a constant current source.
|
What does "Sub-Miniature" really mean? The title of this datasheet is "Sub-Miniature Slide Switches". What meaning does "Sub-Miniature" add? I notice that " SMA connector " also contains the term "Sub-Miniature". What does "Sub-Miniature" mean? <Q> It just means "of greatly reduced size", or "very small". <S> link1 <S> link2 <S> Interestingly enough,the "sub" found in the name d-sub for connectors is also for subminitaure, because they were one of the smallest connectors of the time, even though they're considered huge today. <A> The first time something is introduced that's significantly smaller than the normal version of that thing, it's "miniature". <S> If something is introduced that's smaller than that, simply calling it "miniature" would suggest something the size of the first thing that used that term, so it's necessary to apply a term that suggests something smaller than what people think of as "miniature". <S> If something is introduced that's smaller than that, it might be called "micro", but beyond that point manufacturers usually give up on trying to find "smaller" adjectives. <S> A rough analogy might be with "small scale integration" chips (a couple dozen or so transistors) and "medium scale integration" (a few dozen), which were followed by "large scale integration" which could put hundreds of transistors on a single chip, and "very large scale integration" (a few thousand). <S> Even if each "very" denoted an entire order of magnitude, it would seem rather silly to talk about a modern memory chip as being a very-very-very-very-very-very-large-scale integrated circuit. <A> Its pretty vague and relative, as in "Its smaller than the last, most frequently used generation"
| So it is a relative term that seems to imply "smaller than we've built before".
|
Options for getting 3.3v @ 220mA from small batteries I have a system running at 3.3v requiring 70mA at most times and 220mA at peaks (roughly 20% of the time). I'd like to find a way to power this from coin cell batteries or other small portable source. Battery life needs to be about 1h but size should be as small as possible (which is why something like AA's won't work) I see a couple ways of doing this: Put several 4 button cell alkalines in series and use an LDO voltage regulator to get the voltage down to 3.3v Use ~3 alkaline button cells in parallel and boost the voltage using TPS61200 (datasheet: http://www.ti.com/lit/ds/slvs577c/slvs577c.pdf ). Schematic similar to this: http://www.sparkfun.com/datasheets/Prototyping/LiPower-v11.pdf Same as the previous one but with the batteries in series. The TPS61200 will regulate down to 3.3v when the batteries are full and boost to 3.3v in the end Same as above but with a single cell LiPo battery. I'd like to stick to easy to find batteries though. Rechargeability is not important. Use 3 AAA batteries in series with a voltage regulator (size is a bit of a concern..) In terms of efficiency does it matter if i put 3 alkaline batteries in series or parallel (TPS61200 can work down to 0.3v with a 0.6v startup voltage)? So far i tried using a CR2032 lithium battery with NCP1450A ( http://www.onsemi.com/pub_link/Collateral/NCP1450-D.PDF ) to boost it to 3.3v but the output voltage stays around 1.4v. It may be that something else is wrong in my circuit but from what i understand the battery can't provide enough current anyway (4mA continuous, 15mA peaks) so there's no point continuing that path? <Q> Have a look at CR2 batteries . <S> They have most of the characteristics you want, especially if you can run directly from 3V, and are used in cameras so you can buy them from supermarkets or Amazon. <S> They are however a bit pricey and non-rechargeable. <A> Coin cells will not work well with your needs. <S> A CR2032 has a nominal 250ma capacity (and that varies based on current load btw), and an internal resistance (Equivalent Series Resistance or ESR) of 18 to 30ohms, again based on current load). <S> Depending on the speed of the current draw, you are going to get voltage drops, and quickly drain the coin cell. <S> If you can get that much current out of it at a given time. <S> 70mA is pushing it even for high quality CR2032, and 220mA is improbable, frankly, impossible. <S> That is why your CR2032 boosted to 3.3v isn't working. <S> The current draw of the regulator is causing the cell's voltage to drop. <S> That is, without having multiple in parallel (or using high capacity caps). <S> That's the second part you asked. <S> Batteries in series are a sum of the voltages, with the same amount of current. <S> Batteries in parallel are a sum of the current capacities, with the same voltage. <S> It gives you relatively high capacity while still keeping space to a minimal. <S> The <S> TPS6107x <S> family would do the same, same minimal components, in a sot6 package. <S> You only need 1 battery for either of these. <S> An AA gives 2400mAh <S> nominal, an AAA gives 1200mAh nominal. <A> Use 2 AAA cells with a boost convertor - if size matters, no need for 3 of them. <S> That TPS61200 looks as if it'll do nicely. <A> For such current requirements, I would suggest LiSOCl batteries. <S> They provide 3.6V and have the required pulse capability. <S> A 2/3AA ER type will have 1.7Ah capacity and able to provide enough current on pulse. <S> They are a bit harder to find than CR types (Lithium manganese) and a bit more expansive. <S> Some brands are much more expansive, but also much more reliable. <S> Also, if you decide upon CR type (Coin cells) use a well known brand name, even if it means paying few more cents. <S> TI did a comparison between branded and no name types and the differences are quite large. <S> Since your constant current is quite large (70mA), a regulator is recommended.
| As for your options, one or two AAA batteries with a boost converter would suit you better. While it varies by brand and size, most coin cells have low capacity, and an internal resistance that limits current output. The TPS61200 you mention would work, if you can deal with a tiny (3x3mm leadless package.
|
What's the use of a decoupling capacitor near a reservoir capacitor? I've seen some circuits where a decoupling capacitor is used as well as a reservoir capacitor, like this (C4 and C5): I've read about decoupling capacitors and for me it looks as if they are meant to remove small fluctuations in the supply voltage. Then I thought - wasn't that the purpose of a reservoir capacitor as well? Why wouldn't the reservoir capacitor be able to filter out the small fluctuations, if it is able to filter out the large fluctuations? So I feel like I have a basic misunderstanding here. What is the purpose of a decoupling capacitor next to a reservoir capacitor, when we assume we place both equally near to the power consuming part? Or is the only advantage of the decoupling capacitor that it is smaller and can therefore be easily placed more near to the power consuming part? <Q> Generally, the higher the capacitance of the capacitor, the less it will be able to react to high frequencies, while small-valued capacitors react better to higher frequencies, as seen in the graph below. <S> Using two different-valued capacitors together is just done to improve the response of the filtering. <A> As you say, a decoupling cap and a power supply bulk reservoir cap serve two different purposes. <S> The bulk cap can be anywhere on the power net since it deals with low frequency currents. <S> However, the incorrect assumption you are making is assuming schematic placement implies physical placement. <S> It doesn't. <S> In a good schematic, there will be some hint to physical placement. <S> In this case we can't tell if if the decoupling capacitor (C5) is physically near IC1 (where it should be) or not. <S> Personally I wouldn't draw a schematic this way for exactly this reason, and I think doing so is irresponsible. <S> However, the schematic capture software will generate the same net list either way, so the details are really up to placement. <S> Without a board layout diagram, you simply can't tell. <S> I usually draw the decoupling caps physically close to their parts to give a hint that this is what I intend and that I've thought about it. <S> This is one issue I mention when talking about how to draw good schematics at https://electronics.stackexchange.com/a/28255/4512 . <S> Unfortunately, there are a lot of badly drawn schematics out there. <A> When two or more decoupling capacitors of different values are used in parallel, it is necessary consider the parallel resonance that occours between the two networks. <S> Clayton Paul described this phenomena. <S> Consider a parallel coupling of capacitors C1, C2, with different values and C1>>C2 with parasitic L1 and L2 about the same L1=L2 <S> (figure 1.A). <S> We suppose \$f_1\$ is the frequency where the capacitor C1 is resonant with inductor L1, and \$f_2\$ the frequency where capacitor C2 is resonant with inductor L2. <S> Below the frequency \$f_1\$ both networks look capacitive, and the total capacitance is equal to the sum of the two capacitors. <S> This improves (very little) <S> the decoupling at the frequencies below \$f_1\$. Above \$f_2\$, both networks look inductive and the total inductance is equal to the two inductors in parallel, or one half the inductance. <S> This improves the decoupling at frequencies above \$f_2\$. <S> At a frequency between the resonances of the two networks (\$f_1 < f < f_2\$), the equivalent circuit of the two networks is a capacitor in parallel with an inductor, as shown in figure 1.b (parallel resonant circuit). <S> This produces a resonance (figure 2), which becomes a problem when the tolerance of components are over 50%. <S> Therefore, we can conclude that the decoupling will be improved at frequencies above (and under) <S> the frequency at which both capacitor networks are resonant. <S> The decoupling will actually be worse at some frequencies between these two resonance frequencies, because of the impedance spike caused by the parallel resonant network, which is bad. <A> The main difference in small capacitors and large electrolytic capacitors is their frequency response. <S> Electrolytic capacitors have poor specifications for higher frequencies and may eventually fail because of being stressed by the high frequency noise. <S> In turn, high frequencies that the electrolytic capacitor only partially filters, may well be in the upper audible range of your amplifier. <S> The small capacitor easily filters the high frequency noise, but of course has little effect when it comes to low frequency mains power supply ripple filtering. <A> Not all capacitors are created equal... <S> The larger bulk capacitors cannot respond as quickly due to ESR and ESL (Equivalent Series Resistance and Inductance) which is dependant upon their make-up. <S> There is of course the ability to get close like you mention, but in general a good scheme will have bulkier, slower and larger capacitances the further you get away from the circuit. <S> the corresponding frequencies that need to be dealt with also drop, if done properly. <S> What limits the small decoupling capacitances is the self-resonance of the cap itself and the inductance of the bond wires in the package (again depending upon the package). <S> This scheme of hierarchical scaling continues inside the IC with critical nodes having local capacitors for higher frequency events. <S> Of course these cap on the inside are the most expensive and smallest of all.
| The most likely reason why that is done is because, in real life, capacitors do not have infinite bandwidth. You are correct in that the decoupling cap needs to be physically close to the consumer of the power it is decoupling.
|
What is a one-bit ADC good for? I have recently heard of the concept of a one-bit ADC, and have seen it implemented in the context of a sort of digital-to-analog converter (oddly enough), and I'm wondering, what is the point? Why not simply use a higher-resolution ADC, if higher resolution is desired? <Q> To give a basic example of how a 1-bit ADC can be used to obtain useful information from a waveform, take a look at this circuit. <S> It uses a triangle wave to turn the information into a pulse width modulated output. <S> This is a similar but simplified version of how other 1-bit ADC techniques work, by using a (usually fedback) reference signal to compare the input to. <S> Circuit Simulation <S> Magnified Timescale View: <S> We can see from the top input waveform, the triangle wave is used to compare the waveform at different points through it's period. <S> As long as the triangle wave is of a considerably higher frequency than the input (the higher the frequency the more accurate), this causes the comparator to output an average of high/low depending on the voltage level of the waveform. <S> To see how we can reproduce the original waveform from the PWM data, the comparator output is fed into a low pass filter, and out pops the sine wave again. <S> For further reading: Delta-Sigma Converters Successive Approximation ADC Single Bit ADCs Ramp Compare ADC (Counter ADC) <A> A one-bit analog to digital converter (A/D) is just a comparator with the threshold in the middle of the range. <S> Usually you don't call it a 1-bit A/D though, although it is legitimate to think of it that way. <S> There are ways to make use of a comparator to ultimately get a higher resolution digital value. <S> A delta-sigma A/D is one example. <S> This keeps integrating the comparator output and comparing it back to the analog input. <S> Over a number of bit times, the analog value is represented by the number of 1 bits out of the whole. <S> Resolution is a tradeoff with time. <S> Nowadays the bit rate can be in the multiple MHz range. <S> For example, at 10 MHz bit rate, getting a 20 bit result (about 1 M counts) would take 1/10 second. <S> Another example is a "tracking" A/D. <S> This contains a D/A and the comparator compares the D <S> /A result with the analog input. <S> If the comparator result is low, the D/ <S> A value is incremented, otherwise it is decremented. <A> Another name for a one bit ADC is a comparator. <S> I can imagine 1 bit ADC may be enough for an application which needs to turn on/off a valve, switch, alarm if the signal goes above/below a threshold. <A> One difference not yet mentioned between the terms "1-bit ADC" and "comparator" is that in many places where comparators are used, it is desirable to have hysteresis in an amount which is greater than the system's baseline noise level, but in applications that use a 1-bit ADC, such hysteresis is not wanted. <S> When constructing a multi-bit DAC or ADC, it is often difficult to ensure that each bit will have an effect precisely twice as big as the next lower one. <S> If the effect of a bit is larger or smaller than this, the difference in the voltages represented by between a code which ends in e.g. "0111" and the next higher code (which ends in 1000") will be incorrect. <S> If e.g. a 1mV change on an input sometimes causes a reported ADC value to change by 2 and sometimes causes it to change by 6, that can cause differential-feedback-based control systems to over-react to some changes and under-react to others. <S> If one measures the percentage of time the signal is high, one may thus infer the input voltage. <S> In the absence of hysteresis or related effects, this measurement may be very accurate. <S> Hysteresis, however, may cause non-linearities which may be difficult to correct for.
| Using a 1-bit ADC along with some analog electronics, it's possible to design a circuit so that the percentage of time a signal is high will depend upon the ratio between an input voltage and a reference voltage.
|
How to improve symmetry of +/-1 gain circuit? In an attempt to have a square wave with a voltage-controlled amplitude, I've made this little circuit: Unfortunately, when negating, it has a slight offset from -Vin. I assume this is because the BJT doesn't pull all the way to ground. What are easy ways to improve the symmetry of this circuit? Ideally I'd be shooting for <1mV error between the positive and negative sides. <Q> Using a MOSFET for Q1 may be easier. <S> A larger value of R3 will allow the transistor to have more effect. <S> Other stuff will need to be changed to suit. <S> Massively overdriving a BJT so that it has a forced beta of say 0.1 or even less allows a very low saturation voltage. <S> Long ago I had a BJT switching a resistor and the junction needed to be ~ 0. <S> Any Vsat added to the signal at the other end of the resistor. <S> Driving the base for 10 x as much current (or more) as the collector greatly improved the result. <S> I don't now recall the forced beta value I used - may have been 10x - may have been 50x. <S> As Icollector was low the actual base current was not vast. <S> Whether you can do the following depends on circumstances and desired realness [tm] of circuit. <S> - returning negative lead from local ground to psu via a diode gives you a point one diode drop below ground on the cathode side of the diode. <S> Can be very useful. <S> eg single supply opamps with their ground pin returned to -Vbe below local ground <S> can then truly genuinely swing their Vout to local ground rather than to N mV above it. <A> The easy way to guarantee symmetry is a high-pass filter, such as an RC after the output of the circuit. <S> But this necessarily puts a lower limit on the frequency that the circuit will pass. <A> Another variation would be to use one op amp to generate an inverted signal, and then use a multiplexer to select whether an inverted or non-inverted signal should be fed to the input of a voltage follower (second op amp). <S> The behavior of this approach should be relatively symmetric, since the current flowing through the multiplexer should be very small, and should be basically the same regardless of whether it's passing through the inverted or non-inverted form of the original signal.
| Using an opamp with feed back and the ability to pull to or below ground would be useful. Another easy solution would be to replace the BJT with a FET of some sort. If you can find a whisper (or more) of negative bias lying around you may be able to mix some in.
|
Where to leave the test leads on a Fluke multimeter I think this is somewhat of a "trade secret". Being a software engineer for embedded devices myself, I often find myself using oscilloscopes and multimeters. I have always wondered about my Fluke 87-V and all flukes before that. They have these slots in the back that perfectly fit your test probes/leads, protecting their points. However: I have -never- been able to find a way to properly wrap/fold the leads around the multimeter, and still be able to use the slots nicely. Is there some secret to this, or should I just disconnect my leads after use? <Q> The slots are designed also to hold one of the probes so that you can hold the meter and one probe with one hand and the other probe in the other hand. <S> This comes in handy when working on equipment in the field when you can't put the meter down. <A> As a long-suffering hobbyist happy to finally have a grown-up multimeter, I was surprised this wasn't more intuitive. <S> I think I've worked out a decent way to wrap it: <S> Leads remain plugged into terminals, wires wrap around sideways. <S> Start at the bottom and wind your way up towards the dial. <S> For the last wrap across the face, angle back down towards the terminals. <S> Then on the back hook the leads under the lip of the tilt stand and route them out the notch. <S> The probes will just reach their slots with a bit of stress relief and the foot of the kickstand should keep them from unwinding. <S> It took me a few tries to wrap <S> so there was enough (but not too much) slack, but after getting the hang of it I can wrap it fairly quickly without worrying too much about the precision of it. <S> I'm not sure if this is less or more stressful to the leads than the alternatives—but to avoid loose, tangled wires without a pouch? <S> I'll take my chances! <A> Vertical wrap works great! <S> Check out my pics. <A> I never use the slots. <S> I wrap the leads around the meter and leave it at that. <A> I now wrap the leads lengthways around the meter. <S> After two turns, the probes are turned upward and fit perfectly in the slots provided, with the leads having just the right tension. <S> It may help if the leads are not twisted. <A> I always put the probes in the slots, then unplugged them from the multi, and wrapped them around the multi, then plugged them back in to keep them from unrolling... <S> Is that wrong? <A> I put the probes into the slots at the back of the meter, leave the bananas plugged into the jacks, and wrap the leads around the meter and put it in the zippered case. <S> Using this method, I think the leads will have a longer life: wrapping the full length of the leads (by either end being not secured) means you'll wrap the leads more times (twice as many times) around the body of the meter than if you attach both ends (bananas plugged in; probes secured in back). <S> More wrapping = shorter life. <S> This way it unwraps very quickly (twice as fast) than if you don't secure the probes, and I never had an issue with stabbing myself.
| With the leads plugged in, I start wrapping them vertically, toward the display and down the back side. The slots are a nice idea but you will just end up stabbing yourself worse than if the leads were loose and had some "give".
|
How to light an LED with very low voltage and low current? The goal is to demonstrate, visually (with a light of some sort) that power is begin generated, albeit very, very small amounts of power. What kind of set up could I use to light up an LED (or any visual indicator). My power supply is incredibly small; about 0.1 volts and I'm not sure of the current, but consider it low. I've heard of things such as a "joule thief" that could maybe allow me to light up an LED with very low voltage, but I believe that works by sucking current, which I don't believe I have enough of to do that with this very small power supply. Another option-- if my power supply is constant, but very, very small, can I use a capacitor somehow to store the small amount of energy trickling out of my power supply to then make an LED or other indicator light up (even just flash) once every few seconds or every few minutes? <Q> This is going to be very difficult at best. <S> Transistor circuits don't work with just 100 mV power supply voltage. <S> If you really need to run something from this low voltage, the circuit will need some initial external power to get going. <S> This could charge up a cap to a few volts, which could then run a boost converter which would boost the 100 mV up to the few volts to keep itself going. <S> This is of course assuming there is enough power available to not only run the circuit at the higher voltage after conversion losses, but to have enough left over to light up a LED to a noticable level. <S> Let's say you get the best efficiency <S> LED you can find and that it is bright enough a 500 µA and drops 2 V in the process. <S> That's 1 mW. <S> Without conversion losses and power needed by the circuit, that would mean the 100 mV supply would need to source 10 <S> mA. <S> If your 100 mV supply can source a few 10s of mA, maybe you have a chance, but you'd still need some initial external energy to get the bootstrap process going. <A> If you can squeeze just a little more voltage out of your plant-based power source, the TPS61201 boost regulator can step 0.3v up to 3.3v, which would be enough to light an LED. <S> You can get 555 timers that work at 3.3v and draw 30 µa. <A> Perhaps you can "demonstrate visually" by blocking or reflecting a light source when the galvanometer moves. <A> LED will be hard; instead you can use the lcd off of a small calculator. <S> very small amount of power required to "light" them. <S> Remove the batteries (if any) and remove the solar cell. <S> Connect your supply to where the solar cell connects.
| As other have mentioned, you may want to charge up a supercap and discharge it into the LED every few minutes. I think your only way out is going to be with a galvanometer.
|
7805 regulator outputting 4V instead of 5V I followed a tutorial on Sparkfun to put together a 5V power supply. But for some reason I'm only reading 4V coming out of the regulator. I know it's not the regulator because this is the second one I've tried. I checked the data sheet to make sure it's connected right and yet the problem still persists. I'm pretty sure I'm giving it enough power because it outputs 4V with a 9V wall wart input as well as around 15V from two 9V batteries in series. Eventually I gave up and decided to move on, even though 4V is below the minimum rating of the ATmega328p (4.5V,) and now I'm facing problems trying to program the chip, which I assume is because of the chip not getting enough voltage. Does anyone know why the regulator isn't regulating properly? The schematic for the power supply is: from here <Q> If you are doing everything correctly then the chances of it working correctly are extremely high (99.999%) <S> SO it is very likely that you are doing something other than you say or imply. <S> Follow the following to see if we can find out what the problem is: <S> Are you using C1 and C2? <S> You MUST to start. <S> Are they close to the regulator? <S> Must be close to start. <S> What is your load? <S> What is Vout with no load? <S> 5V? <S> Have you put a new battery in your voltmeter ? <S> ("Low battery" in meters is a too common cause of apparent voltage errors.) <S> What are you using for the PTC resistor? <S> If it is too high a resistance it will cause problems. <S> The PTC is wholly unnecessary to start and reasonably unnecessary in any case. <S> If you are using one, short it out. <S> Were you using one? <S> If the circuit is not your EXACT circuit please modify it to show EXACTLY what you are doing. <S> Report ... <A> These IC's don't put out exactly 5V. <S> But the error shouldn't be more than a few percent. <S> That you tried two and <S> they didn't work does not strictly rule out that both may have been defective, but it reduces the statistical likelihood. <S> Pay attention to the datasheet. <S> Does the input side of the regulator have enough voltage? <S> The dropout voltage must be maintained at all times (instantaneously), not just on average, which is one reason why there have to be filter capacitors on the input side. <S> You must build the circuit with all the capacitors. <S> Check all your connections. <S> (Is this on a breadboard socket, or soldered circuit?) <S> Make sure you haven't connected the regulator in reverse. <S> Lastly: is your multimeter working properly, and are you using it correctly? <S> The circuit schematic you're working from is sound. <S> Bingo: <S> It was the multimeter, evidently. <A> I guess you are drawing more current. <S> But if you are getting 4v with no load, then check if you have grounded correctly, check with caps of 0.1uF. <A> You said that you have also provided the 15v to the circuit and yet it is providing the same 4 volts? <S> You said you tried the second regulator and faces the same problem if it is then try regulator of some other manufacture. <S> And one more try you can give, by increasing c1 from 100uf to 470uf, or a lit higher. <S> Your circuit is correct. <S> improper ground cannot be problem(as some other says) in my opinion. <S> because in case of improper ground the regulator mostly outputs very low output or mostly 0volt. <S> High current drainage can be problem for low voltage output. <S> For that you should check following things ->. <S> How much current your circuit is taking? <S> If this power supply circuit giving 4volt with out any load then the high chances be the problem in c2 or some other shortage near power LED. <S> Try to check any shortage in circuit ->. <S> If you connected this power supply with some other circuit that takes supply from this cuircuit Then try to find out the total current of the load. <S> If the Load is not of high current then there are chances that you may some <S> how make some where shortage in the soldering. <S> You can also check the heat of regulator if it is heating too much <S> then shortage is must if it is normal <S> then the most cases are in problem of regulator or C2 capacitor. <A> I have used many of these and each worked fine, try the following: <S> Be sure capacitors are close to it. <S> I usually attach them to its legs directly. <S> Take out components one by one i.e. switch, PTC, diode. <S> (connect voltmeter to its input and ground terminals) <S> If still a problem take away any load and connect voltmeter. <S> Try to keep one dial analogue meter in addition to your expensive digital one.
| If a capacitor isn't connected properly, it's effectively not there. These devices require a certain dropout , meaning a certain voltage drop from the input voltage to the regulated output voltage. If that's the case, then the most chances are the problem in your regulator. You should take a step back from your project and question everything you're doing. The first circuit, "basic regulator configuration", shown in that tutorial page, therefore, is not correct. These 7805 chips work and are a "no brainer" to use. There are millions of them out there in all kinds of devices.
|
How can I tell the size of a barrel power connector? Spring cleaning, and I'm trying to get power supplies for all my devices with missing power supplies. They're all the typical barrel power connector, and I'm having a dickens of a time trying to figure out the pin/hole diameter. I ordered the power supplies I needed based on outside diameter (e.g., 5.5mm in my example below) and was surprised to discover that while the jack fit, the center pin did NOT. How do I prevent this from happening in the future? Do they even make calipers that can get into the hole to measure the pin diameter? Radio Shack has their little keyring behind the counter with every known tip size, but all they can get from that is which stock number fits on their universal wall wart. Personally, I think that these types of "universal" kits are the worst thing to happen to electronics in, like, FOREVER. Too many parts to misplace and the tip-to-cable connector is almost always proprietary. If I try to pump them for information about what the outer and inner diameters are, they want to know if I'm happy with my current cellular provider. As you may surmise, I'm not a big fan of trusting my local Radio Shack for electronics guidance. So...that leaves me with a bunch of power supplies that don't fit their devices, and me a little peeved that I have to deal with RMAs, return shipping, etc., especially when I really don't have a clue how to figure out what to order. That also begs the question about how to ensure that I buy the right jack when designing something that NEEDS wall wart power. Where do I even start? Anyone have any ideas on how to finding the correct barrel & pin diameters when I don't have specs on the jack? Is it really trial and error? or is there some measurement device that's available to help? <Q> Just look up a fractional inch to mm conversion chart. <S> Then break out the drill bits. <S> 5/64 inch = <S> 1.9844 mm 3/32 inch = <S> 2.3813 mm 7/64 inch = <S> 2.7781 <S> mm a 5/64 bit will fit the 2.1mm barrel but not a 3/32 <S> a 3/32 bit will fit the 2.5mm barrel but not a 7/64 <A> Vernier calipers can be used to measure both the inside diameter (i.d.) <S> and outside diameter (o.d.). <S> (Photo courtesy technologystudent.com.) <A> Those are barrel power connectors. <S> Looking at Digikey , it looks like common inner diameters with a 5.5mm outer diameter are 2mm, 2.1mm, and 2.5mm, but that doesn't mean that your target application doesn't have a custom size which doesn't match any of these. <S> The one I usually use for my projects is 2.1mm*5.5mm if I can, but as far as I know this is by no means a rule of thumb. <S> Knowing what the jack is being used for may help in identifying a correct size. <A> If you're using calipers, then use blue tack or something similar to make a mould of the internal dimensions of the plug or socket and measure the mold. <A> Source: https://www.accesscomms.com.au/reference/outputplugseiaj.htm <S> EIAJ <S> RC-5320A Plugs <S> EIAJ is an acronym for Electronics Industries Association of Japan. <S> EIAJ have now merged with the Japan Electronic Industry Development Association (JEIDA) to form the Japan Electronics and Information Technology Industries Association (JEITA). <S> EIAJ developed a range of plugs and jacks for connection of low voltage power supplies to consumer equipment. <S> EIAJ plugs have now been widely adopted by Japanese and other consumer product manufacturers. <S> EIAJ Plugs are similar in design to more commonly used Concentric Barrel Plugs. <S> They can usually be identified by a yellow coloured insulating ring at the tip. <S> EIAJ RC-5320A plugs are available in sizes to suit five Voltage Classifications. <S> EIAJ Type A (1, 2 and 3) have a hollow centre similar to the Concentric Barrel Plugs. <S> EIAJ Type B (4 and 5) have an internal pin. <S> The EIAJ standard requires that these plugs are always wired with the centre pin as positive (+) polarity. <A> An additional caution I learned the hard way: if trying to fit an appropriate barrel plug to a barrel jack, do not get a barrel plug which is exactly as wide as the jack. <S> If you do this, you will not get good connection with the center pin, because that is made by the jack's sprung outer contact pressing the (rigid) plug sideways against the center pin, which can't happen if the plastic shell holds the plug centered. <A> Differentiating between 2.5 and 2.1 mm plugs is very simple. <S> Strip <S> the insulation off of a #12 solid wire- used commonly to wire houses. <S> It is 2.05 mm diameter and will be loose in a 2.5 mm plug. <S> It will just fit in a 2.1 mm plug and can only be slightly wiggled. <A> Wikipedia has a conversion matrix with conversions between the radioshack letter codes and actual measurements found here this way you can use the radioshack keyring to find an appropriate size connector and then buy the correct adapter. <A> I found that the easiest, but not the cheapest, way to determine the inside diameter of a 'barrel' connector is to use a set of "pin gages" which are hardended and ground to precise external diameter steel 'rods' that come in sets. <S> A lot of times sets are available cheaply at discount tool supply places, or if you have a machine tool supply store available, individual gage pins can be ordered. <S> Then you just take a 'pin' and try its fit in the inside of the connector. <A> I have not verified this, but a possible solution may be to use a spark plug gap tool. <S> I have one that uses metal wire loops embedded in a plastic disk. <S> I bought it years ago <S> but I still see them around. <S> Just snip the loops and bend them straight for an instant ID estimator. <S> Hard to beat the price. <A> The radio shack plugs may not use a standard nomenclature, but it is also not arbitrary, here is the description for the size <S> N connector: <S> Metal panel-mount coax-style DC power jackTip size: 5.5mm O.D.x2.5mm I.D.Requires 7/16" mounting holeNickel-plated, solder-type terminal
| This works if you have only the device (receptacle) or the supply (plug). This metal panel-mount coax-style DC power jack accepts 5.5mm O.D.x2.5mm I.D. plugs. My disk has both metric and inch labeling. Be careful if anything in the connector is gold plated (doubtful) as the ends of the 'pins' are capable of scratching the plating off their being 'as machined' and not debured.
|
Protect DC Circuit from too much voltage How do I protect a 3v DC circuit from being damaged, if someone accidentally plugs in a 12v power supply? The circuit will draw much less than 1 amp. <Q> One thing not specified by the original question is if they are looking for protection of I/O signals or power supply connections. <S> If the protections are needed for I/ <S> O signals then the suggested zener diode circuits or other methods including TVS (transient voltage surpressor), clamping diodes are the useful ways toward protection. <S> When protecting at the power supply connections there are a number of schemes that can be utilized. <S> My suggested approach is to use a design that uses a wide voltage range input regulator circuit and a polarity protection diode. <S> This gives very reasonable "protection" for voltages that a user is likely to mistakenly apply to the power supply input. <S> Here is a block diagram of the suggested approach. <S> This approach also becomes the power supply for the device itself. <S> For devices that operate at low power this approach can utilize simple linear regulators such as the 78xx series. <S> These will protect for input voltages of up to 35 volts or so. <S> Higher power devices will want to utilize a wide supply voltage range switcher type regulator. <S> There are various devices voltages from vendors such as TI and National (now actually part of TI) that can support input voltages up to 60V and in some cases even 80V. <A> This is one of a standard methods used in power supplies and devices as a protection for over voltage. <S> A simple crowbar circuit is depicted below. <S> Circuit above will protect your circuit/device at Vo by blowing the fuse in case of an over-voltage condition. <S> Keep in mind that this is a generic circuit describing the protection method. <S> Further Reading: 1. <S> Crowbar Circuit 2. <S> Basics of Over-voltage Protection <A> If you are willing to have a fuse blow, then a clamp circuit would work. <S> The point is not to try to regulate the input voltage down to 3 V, but to deliberately blow the fuse, thereby disconnecting the input power, if that power exceeds some threshold. <S> The fuse could be a polyfuse that then resets itself after power is removed, but that will add some series resistance to the supply even in normal operation. <S> Whether that is acceptable depends on parameters you haven't told us. <S> You therefore want a circuit that ideally acts open until the voltage accross it reaches something like 3.5 V, then acts like a short. <S> In theory a zener diode does this, but it won't have the current capability to blow the fuse. <S> Or, you can use something like a TL431 as a voltage reference to turn on a transistor. <S> A totally different approach is to have a active switch in series with the power supply. <S> A circuit would only enable the switch when the input is below the threshold, and disconnect when it is above. <S> It won't be able to react instantly, so your circuit has to be able to tolerate probably at least a few µs of overvoltage. <S> A L-C filter can limit the slope of input voltage, but this is starting to get overly complicated. <A> Thing you are looking for is "Over voltage protection Circuit". <S> One way is to use a Zener Diode in reverse bias. <S> Zener diode will always give you a constant output voltage irrespective of input voltage (But Check Datasheet for Vmax) <S> You can also use ICs like NCP372 or MAX16126/MAX16127 <A> Well really you need a crowbar. <S> This cct basically shorts (nearly) <S> the power supply and hopefully signals the issue i.e. blows a fuse or engages a current limited supply to, well, current limit. <S> The Wiki link has the principles, axotron has some solutions (which are generic and good). <S> http://en.wikipedia.org/wiki/Crowbar_%28circuit%29 <S> http://axotron.se/index_en.php?page=26
| The previously mentioned poly fuse or other type that is designed to trip at a voltage overload are workable but often have a kick-in delay time where the circuit is momentarily exposed to the high voltage condition. What you need is a crowbar circuit to protect your circuit from overvoltage. You can use a zener to turn on a transistor, which then does the heavy lifting.
|
What are FIT's and how they used in reliability calculations? In Military, Medical, Space, Professional eqt. design there is a need to be able to prove that your device can last a certain length of time with a certain confidence level. Or that reliability must be used in design to inform the design direction, either through component selection, component testing and sort or in amelioration techniques (like redundancy, FEC's - Forward Error Correction etc.). How are FIT's (Failure In Time) used in the reliability aspect of design and verification? Examples of calculations? How are FIT's determined/derived? How is this related to MTTF (Mean Time To Failure) and MTBF (Mean Time Between Failures) <Q> The term FIT (failure in time) is defined as a failure rate of 1 per billion hours. <S> Most components have failure rates measured in 100's and 1000's of FITs. <S> For components, such as transistors and ICs, the manufacturer will test a large lot over a period of time to determine the failure rate. <S> If 1000 components are tested for 1000 hours, then that is considered to be equivalent to 1,000,000 hours of test time. <S> There are standard formulas that convert the number of failures in a given test time to MTBF for a selected confidence level. <S> For a system of components, one method of predicting the MTBF is to add the failure rates of each component and then taking the reciprocal. <S> For example, if one component has a failure rate of 100 FITs, another 200 FITs and another 300 FITs, then the total failure rate is 600 FITs and the MTBF is 1.67 million hours. <S> For military systems, the failure rates of each component can be found in MIL-HDBK-217. <S> This document includes formulas to account for environmental and usage conditions such as temperature, shock, fixed or mobile equipment, etc. <S> However, component reliability is more of an art than a science. <S> Many components are so reliable that it is difficult to accumulate enough test time to get a good handle on their MTBF. <S> Also, relating data taken at one set of conditions (temperature, humidity, voltage, current, etc.) to another is open to large errors. <S> As already mentioned in the comments, all of these calculations are mean numbers and are useful in predicting the reliability of a large number of components and systems, but not any individual unit. <A> I understand FIT as Failures over a billion hours of operation. <S> MTBF = <S> 1,000,000,000 <S> x 1 <S> /FIT JEDEC JESD85 <S> (Standart Used for semiconductors and thus relevant for most electronics) <S> We use for our (industrial electronics) reliability calculations Siemens SN 29500 , but it is kinda specific for Europa. <A> There is some truth to both of your answers. <S> The environment that the device will see is a factor along with the type of packaging technology (ceramic vs plastic packaging). <S> These items were not part of normal MIL-STD-217. <S> When we were trying to use mil-std-217 for automotive electronics, we had a PHD statics person that would correlate lab accelerated testing with field experience. <S> The he would recommend factors( I remember things like technology, new IC vs Old IC, environmental factors) that would be used in the calculation. <S> Not sure what is done in this area today as I have been out of the reliability field for some now.
| A component having a failure rate of 1 FIT is equivalent to having an MTBF of 1 billion hours. In initial stages of a design, these calculations are useful in determining the overall reliability of a design(to compare with the specified requirement) and which components are most significant in terms of the system reliability so that design changes can be made if deemed necessary.
|
Ideas on how to build a line sensor I would like to detect a set of objects (width and height) as they pass through some sort of line sensor in a conveyor line. Something like this (transversal view): Not sure where to start... What type of sensor is the right one this for this scenario? Any thoughts on how to integrate a sensor like this into an Arduino board? If nothing comes to mind, what other approach would you recommend? <Q> There are tons of line scan solutions available, all the way from cameras using cameralink interfaces and with ethernet interfaces for $6K to sensors from about 8 different manufacturers. <S> However, since you are mentioning Arduino, I'll assume that: 1) <S> This is a one off project - there is no consideration for designing something 2) <S> You want to spend as little as possible. <S> Typically the best (least expensive) result will be to use what is know as a CIS (Contact image sensor) module, which is the lowest cost that you'll be able to get. <S> The best place to get these is to buy a very inexpensive scanner and tear out the guts and repurposing it, it would have a USB interface to your Arduino then. <S> This would have the lights and everything you need. <S> The fundamental problem you have from your drawing is that there is no optics. <S> Even the scanner CIS module has some lenslets in from of the array <S> but they only image very close to the array itself. <S> with the drawing as shown your just going to get a blur. <S> Perhaps it would work to get a scanner that has some lenses in it. <S> Some of the higher end ones do not use CIS modules but use lenses and CCD's. <S> The other alternative is to use a smaller section of the CIS array and to put it behind a SLR lens (35 mm - tons of used ones available) . <S> Most machine/industrial imaging solutions tend to use similar lens types as those that are used for SLR, simply because of availability. <S> If you use a lens solution yo will have to have a lot higher <S> stand off (distance of lens to object). <A> How about an IR line sensor ? <S> That will give you an analog voltage that can be read into the ADC on the Arduino board. <S> If I understand your diagram correctly, that should do it. <A> Depending on your budget, you can get much high resolution sensors. <A> If you are trying to go with a adhoc. <S> I suspect with a range of 6cm you will find the width of overlap of the UltraSonic or IR sensors a problem. <S> You could use a cheap laser tape measure with the following add-on to connect to your Arduino. <S> Depending upon your costs and update requirements. <S> You may need to either have multiple lasers or you could drive a servo (or something) to scanning mirror and scan the points of measurement. <S> You may want another long shallow mirror across the range area as to eliminate (minimize) tangential errors.
| You could try an infrared distance sensor such as this model from Sharp or anultrasonic distance sensor such as the ping board .
|
How can I switch a high current with a low-rated switch? I'm designing and building a breadboard power supply for myself, which draws power from an ATX-like SMPS (Mains in, single Molex plug out) via a 4-pin Molex connector . The design includes a switch to select either 12V or 5V output, but the only appropriate switch I can source is rated for a paltry 30mA! Obviously I can't switch up to 2A with a 30mA-rated switch, but what can I do (that's cheaper than the ~$5-10 local vendors want for 2A-rated switches)? I thought of using an NPN transistor (see diagram, below), but in simulations that resulted in an unwanted voltage drop, and having the load connected to both emitters seemed to do weird things to the voltage. simulate this circuit – Schematic created using CircuitLab (Note: Q1 & Q2 are generic NPN transistors, I've not considered part specifics yet.) I thought of perhaps using a MOSFET, but decided that since I really don't know what I'm doing, asking for help was perhaps an even better idea. <Q> To return to your transistor solution (as others have opted for a different mechanical switch), it might look like this. <S> I included Wouter's hint for using a diode instead of the second transistor. <S> Also I changed the bipolar transistor to a MOSFET. <S> Reason for a MOSFET is because the base current of a bipolar transistor gets rather high with regular power transistors. <S> Reason for P-channel high side switching is that this way the load can be attached to ground. <S> If this is not a requirement, the circuit can be slightly changed to support an N-channel MOSFET. <S> D1 should be rated <S> > 2A T1 should be rated I <S> d <S> > <S> 2A (P-MOSFET) simulate this circuit – Schematic created using CircuitLab <A> What about a simple mechanical switch, or if you want to control with an MCU or whatever, a relay? <A> For a bench power supply, rugged and maintainable is better than elegant. <S> Installation is simple but may not match the desired aesthetics...
| If all else fails, mains power switches for wall mounting are available in any hardware store, usually at much lower prices than that!
|
Ten millions cycles on arduino I am trying to build a suitable pull-switch for my invention. Inside the switch, there is a tiny metal plate. When the user pulls the switch, this metal plate gets close to and makes contact with two metal structures and forms a closed circuit which is connected to a digital pin on an Arduino. The problem is that I need this to function for up to 10 million cycles or more, and I'm neither a eletrical nor a mechanical engineer so I have no idea if it will hold that long. I have designed the two metal structures so that there should still be plenty of area in proximity to the metal plate (less than 1 millimeter away) after expected bending, wear and tear, but apart from that I have no idea what other problems I might encounter. My three questions: Are there any other issues I need to consider for 10 million cycles? Can the Arduino handle that many cycles? Suggestions on suitable material for the metal plate and structures? <Q> 10 million is quite a lot of cycles. <S> Making a switch that can last that long is surprisingly difficult, as you can tell my the number of non-working buttons you can find around the place. <S> I don't recommend trying to make your own switch which relies on making and breaking a contact. <S> For example, this "Long Lifespan" DF2 switch from Omron is only guaranteed to last for 1M cycles. <S> For example: Magnetic: <S> The pull moves a small magnet closer to a Hall effect sensor . <S> The sensor detects the magnet, and sends its output to the Arduino. <S> This has the advantage that it works even when it's wet or dirty. <S> Optical: <S> Old fashioned roller mice used these types of sensors to measure the X and Y movement of the mouse. <S> Again, these are very reliable, and will easily manage 10 million cycles. <S> However, they are sensitive to environments that are very dirty, or where you have large changes in the amount of ambient light. <A> The Arduino can handle 10 million input operations, BUT you will find it exceptionally difficult to make a switch that will do the same. <S> There are two areas of concern. <S> You need the electrical connections to remain reliable - they may not wear out, bend excessively, oxidise, fatigue or stop conducting for any reason. <S> The problem then becomes mainly a mechanical one. <S> You need to provide more details. <S> Hall switches draw standby power. <S> Whether this matters depends on your application. <S> Then there are issues of force, distance of travel, frequency of operation and more. <S> Tell us more and we can help more. <A> You definitely don't want to use a mechanical contact method if it needs to last 10M operations. <S> In addition to Hall effect and opto-interrupter as Rocketmagnet suggested, there is also capacitive sense and other types of magnetic sense. <S> With capacitive sense, a passive chunk of conductor is moved between two fixed plates. <S> None of these touch. <S> The electrical connections are only to the fixed plates. <S> Other types of magnetic sense moves a chunk of magnetic material (iron) near a stationary coil, and the rest is electronics effectively measuring the change in inductance. <S> Again, the magnetic material doesn't touch the coil, only get nearer and farther like with the Hall sensor. <S> The electrical connections are only to the fixed coil. <S> The microcontroller won't be the limting factor. <S> It routinely does M of little things per second. <S> Micros don't wear out with use.
| By far the best way to make a switch is to make some kind of non-contacting sensor. A far easier solution is to use a "Hall Switch" which is an electronic switch which is activated by the proximity of a magnetic pole and which has no electrical moving parts and no need for actual contact. You need the switch to mechanically survive 10^7 repeated operations. Some of the parts may wear out over time, but that has relatively little to do with how many operations it performed as long as specs of temperature and maximum voltage were followed. The pull moves an opaque object between an optical transmitter and receiver.
|
Why a high number of harmonics means a lower bitrate? I am studying on a book (I'm still at basics) and I haven't understood why a signal with a lower number of harmonics implies a low bit rate. I have this figure: It clearly shows how a signal with a high number of harmonics means that the bits are easier to "recognize". The bits in the last figure are 01100010. But it also shows the relationships between the number of harmonics and the bit rate: My question is: shouldn't it be the opposite? A signal with many harmonics could represent more bits than a signal with few harmonics. A signal with N harmonics is able to carry N bits in a certain period of time T, while a signal with just one harmonic can carry just 1 bit in T nano seconds. But there is something wrong in my argument, could someone clarify this? <Q> It is unclear what you mean by "implying" a particular bit rate, and what exactly you envision bit rate meaning. <S> If you wish to accurately measure a signal by sampling it at regular points in time, then the minimum necessary sample rate (not bit rate) is dictated by the frequency content of that signal. <S> In fact, the absolute minimum sample rate is twice per cycle of the highest frequency of interest. <S> This is often referred to as the Nyquist rate. <S> Any arbitrary repetitive signal can be decomposed into a sum of sines with specific amplitudes and phase shifts. <S> The period of these sines is the basic repetition period of the composite signal divided by all positive integers. <S> These are called the "harmonics" of the signal, with the first harmonic having the base period/1 sometimes called the "fundamental". <S> Therefore, sampling a repetitive signal is the same as sampling all the sines that are added up to make that signal. <S> The Nyquist rate applies to each of those. <S> Therefore, more harmonics, which means the sine components will to go to higher frequency, requires a faster sampling rate. <S> It is the highest frquency of interest that dictates the minimum sampling rate. <S> More harmonics means a higher frequency of interest. <A> The table merely says that given a channel with a fixed bandwidth, if you transmit a signal through it (input can contain infinite harmonics), at the output only the first harmonics will get through, where a high baud rate (high fundamental frequency) will get less harmonics through than a low baud rate signal. <S> In other words, a low baud rate signal will come out the other side relatively unaffected by the channel, while a high baud rate signal can be severely distorted (even completely filtered out). <S> This is important because if the signal gets too distorted, the original bits cannot be reliably recovered due to intersymbol interference and the increased relevance of noise perturbations. <S> So a low number of harmonics does not imply a low bit rate. <S> Quite the opposite, a low bit rate implies a high number of harmonics going through the channel. <S> The general criterion for finding baud rate vs channel bandwidth limits are given by the Nyquist Criterion. <S> Note that, although related, this is different than the sampling theorem mentioned in another answer (Shannon-Nyquist), <S> because you are not trying to reconstruct an original "bandwidth limited signal" in the analog sense from a set of samples, it is a matter of determining the original symbols, which is related to threshold decisions, which can be based on sampling, transmitted power (areas), etc. <A> If the channel bandwidth is limited, then baud rate is available bandwidth divided by highest harmonic, which clearly sets up the inverse relationship. <S> (Bit rate is baud rate adjusted for coding.)
| The more harmonics, the more channel bandwidth is required to transmit a particular baud rate.
|
Transforming volts to bits I have need to detect when something around the house is switched on. A simple example would be that if someone switched on a light i need to be able to track that on a computer. It needs to be at it's very basic form, for example: simple cable connected to a USB port. if i connect a battery to the USB cable i need to be able to detect that. I had a look at some of the USB specifications, but they all mention reading information, nothing on reading voltage input into the USB port. My next logical step, is to try and convert that voltage into something the USB might recognize, which i presume is transforming volts to bits. Does anyone have a schematic of how to build something like this? i would prefer not to make use of a micro controller, i need the device to be as simple and cheap as possible. <Q> Updated answer: <S> It looks like you only want to detect the presence of voltage, not actually measure the voltage. <S> If this is true, you can avoid a micro and use a USB to GPIO chip (such as the CP2103: http://www.silabs.com/Support%20Documents/TechnicalDocs/cp2103.pdf ). <S> The chip I listed above is actually a USB-to-GPIO chip which also has 4 GPIO inputs. <S> You would be able to program these (from your host) as inputs and then read the 0 or 1 state of each pin. <S> Old answer: <S> You will need code running on the micro to read the value from the A/D and make it available over the the USB interface. <S> Examples of suitable micros would include the C8051F321 or SiM3U134, both from Silicon Labs. <S> There are many others, from many other manufacturers. <A> Expecting to do this without a micro is unrealistic. <S> USB is a fairly complex serial protocol that was designed from the beginning assuming there would be dedicated silicon at the other end to perform the handshaking. <S> USB has a lot of complexity under the hood so that it can seem simple to end users. <S> Providing all that simplicity is complex! <S> Fortunately, the silicon to do much of the complicated handshaking is now built into a number of microcontrollers. <S> Take a look at the PIC 18F2550 and the like. <S> These things are cheap and small and can be powered from the USB, so expense isn't really the issue. <S> The average 10 foot USB cable costs more than one of these micros. <A> As Anindo says, USB is a complex protocol which requires a microcontroller or specific USB IC, such as the FT245 , FT232 USB to parallel/serial chips. <S> If you want to and are willing to learn, then grab a starter USB dev board from e.g. Microchip or Atmel (e.g. PIC18F , 24F or PIC32 based) <S> a couple of basic electronics books and learn the basics (plenty of questions on here about getting started with this stuff, have a look around) <S> If you are not looking to learn about circuit design or microcontrollers, which from scratch would take a considerable amount of time and effort to accquire the skills you would need for Home Automation type stuff, then my advice is to purchase something like a USB <S> I/O or logging type device or Multimeter with PC comms capability. <S> National Instruments do a range of USB data logging products which can deal with digital or analogue inputs, plus outputs for controlling relays, etc. <S> Here is an example of one; a digital <S> I/ <S> O <S> with up to 96 lines . <S> Another is the Compact DAQ system for sensor logging, which has various sensor modules that can be used with it. <S> Have a browse around the main data acquisition pages to see if anything suits your needs. <S> For simpler and cheaper more basic devices, see the Anatrek options . <S> Whatever you choose, it's quite likely you will still have to build some basic circuit to interface with the logging device. <S> We would need to know the details of exactly what you want to do to provide a specific solution, such as whether you want to use wiring or RF, whether you want to measure voltage/currents and of what levels and frequency, etc. <S> To figure out if something is switched on or off is easy enough, if that's all you want to do then tell us what it/they is/are, and whether you want to do it wirelessly or not (plus any other details you can think of which may help) <A> Previous answers are all good. <S> You need a microcontroller to interface with usb, but you dont need to program it yourself. <S> Dataloggers are programmed to do that for you. <S> A soundcard is an analog input. <S> If you need to detect on/off, you don't need to convert analog to digital. <S> Get a parallel port card/usb device and maybe use optocouplers or lightsensors depending on application. <S> If you don't understand it, don't connect it. <S> Don't play with mains voltage. <S> If you can tolerate a very hackish approach that is quite safe and really need analog input, be creative. <S> There are lots of computer devices that do convert analog to a digital value you can use. <S> Think about a wireless gamepad with analog sticks. <S> You can probably get one for cheap because it has a broken stick. <S> My "Wireless" suggestion was added for security... <S> if you don't know what you are doing, you won't fry your pc... <S> only the gamepad.
| If you really want to build this, what you need is a microcontroller with an analog-to-digital converter and a USB interface. Considering the question, you should be very cautious before connecting any voltage source to any input. And if you only need to detect light, the cheapest webcam can probably do that reliably and will be safer than trying to interface mains/AC with anything.
|
PIC - Time to enter the interrupt I am using the PIC18F2550 and I wanted to know how much time takes between an event happens (e.g. ADIF)and the interrupt routine starts. In other words, how much time the "interrupt system" takes to change the MCU's state, saving all the registers and changing the Program Counter. <Q> There are two things here: the time before the ISR starts and the time the ISR takes. <S> When you're using C, the ISR execution time may increase a lot: http://www.xargs.com/pic/c-faq.html#isrfunc <S> However you asked for the time before the ISR starts, which is a few clock cycles. <S> This can be read in section 8.3 of <S> http://ww1.microchip.com/downloads/en/DeviceDoc/31008a.pdf : <S> Interrupt latency is defined as the time from the interrupt event (the interrupt flag bit gets set) to the time that the instruction at address 0004h starts execution (when that interrupt is enabled). <S> For synchronous interrupts (typically internal), the latency is 3TCY. <S> The exact latency depends upon when the interrupt event occurs (Figure 8-2) in relation to the instruction cycle. <S> The latency is the same for both one and two cycle instructions. <A> Some datasheets tell you the latency from event to interrupt execution explicitly, but this one doesn't seem to. <S> Check the family reference manual; there might be more information in there. <S> In either case it's pretty quick. <S> Basically the processor takes the next opportunity to execute a call to the interrupt location. <S> The registers that get saved are written to special hardware for that purpose, so that happens overlapped. <S> Basically, the processor has to wait until the start of the next instruction cycle, and there is probably one more to flush the pipeline, then execution resumes at the interrupt address. <S> If one or two instruction times really matter, then do some tests to see what the latency really is. <S> Remember that events like ADIF are synchronous, so the jitter should be 0. <S> With external asynchronous events there is necessarily one cycle of jitter since the instruction clock keeps running. <S> What are you doing such that one or two instructions of latency matter? <A> One good way to answer questions like this is to use MPLAB's simulator. <S> If you enable the stopwatch you can see exactly how many CPU cycles, and how many microseconds everything takes:
| For asynchronous interrupts (typically external), such as the INT or Port RB Change Interrupt, the interrupt latency will be 3 - 3.75TCY (instruction cycles).
|
Switch that can be remotely switched I have a circuit that is controlling a water valve. The state of the valve can be controlled via an http request, or a physical rocker switch. I would like the physical rocker switch to represent the current state of the water valve. ie it is in the "Open" or "Closed" position. This means that if the valve is closed or opened over the http request, then the switch moves to represent that state. Does such a switch exist? <Q> The best solution is to use a momentary switch to both manually open and close the valve rather than a physical rocker switch - this would require an additional latching circuit to record the switch value and compare it to the current state of the valve and open or close it accordingly. <S> The state of the valve could be displayed by a bi-color LED - red for closed, green for open. <S> Then, the LED would give you the state information (regardless of if the action came from the switch or HTTP request), and the position of the switch would be meaningless since it is only momentary and always "open" unless it is being pressed. <S> To do what you are suggesting would involve an actuated switch. <S> These do exist, but they are product-specific and typically pretty expensive. <S> A good example is the older style volume knob on some car radios that have steering wheel control - change the volume with the steering wheel buttons and the volume knob on the radio head unit will rotate accordingly. <S> A lot of digital sound mixing boards have a similar feature for recording gain level settings - press a button and all of the levers and knob automatically adjust. <S> You could do the same with a rocker switch by connecting internal cables from each end of the switch to a servo motor which would pull the the switch on or off from an HTTP request, and then return to a neutral state to allow manual operation. <S> This solution would be overly complicated - hence the reasoning behind LED indicators and a single momentary push button instead. <A> Panavision and technicolour would be an illuminated rocker switch with independent LED control. <S> The LEDs display the current state; the switch captures the local request. <S> A microcontroller handles the local and http requests and turns on/off the LEDs. <S> SPDT rockers with independent LED control is a pretty tall order. <S> I would suggest 2 momentary SPST buttons with independent LED control, and each with a different lens colour. <A> The simplest device that the microcontroller can use to turn to the valve on or off is a relay. <S> One might think that a relay could be available that would expose a mechanical lever to which displays the state and allow the user to "manually" turn it on or off. <S> However, the manual interaction wouldn't affect the current in the relay's magnet, so even if the manual action forced the relay's switch to the on or off position, that effect would be undone when the lever is released. <S> There is a device called a "latching relay" which switches based on a pulse of current to either the "turn on" coil or the "turn off" coil, after which it stays in that state. <S> Such a relay could be made to expose a lever which would work as you want. <S> However I don't see any such devices. <S> I think a reasonable solution would be similar to the other suggestions here: <S> Given that the microcontroller already has the wherewithall to switch a relay, have it read a couple of local pushbuttons too, for manual on and off. <S> (Could even be a center-off momentary rocker, if the rocking aspect is important. <S> The LEDs could even be in the two rocker switch halves.). <S> I would also suggest that the microcontroller be able to read the actual state of the relay, so it can report that back to the http interface. <S> You can either have it read the power going to the valve, or use a relay with an extra set of contacts. <A> Another approach is to follow the "NVR switch" safety protocol used in machine tools. <S> "NVR" stands for "No Volt Release" so that if power is interrupted, the machines stop, and don't restart unexpectedly when power is restored. <S> One (green) momentary push button switch to start : traditionally, this switches power to a relay coil, and when the relay energises, one of its contacts is used to maintain power to the coil. <S> Normally this also illuminates a light to show the equipment is running. <S> One (red, highly accessible) switch to stop : pressing this breaks the circuit to the relay coil, disconnecting power. <S> This is a little more complex than the "momentary switch" approach. <A> I understand that your question is about the switch and not the water valve, but I am on board with a few others on looking at the vale too. <S> I have used several actuator controlled ball valves for dirty water systems from Spears Link to spec sheet <S> that have several options for control that would lead to a simple indicator circuit. <S> Diaphragm vales such as RainBird's Link to product list have a DC latching solenoid options as well as the normal 24VAC operation. <A> I'd still want them to be different colors though. <S> You could even have multiple colors or blinking to indicate error codes.
| I would actually suggest a momentary toggle, but with one LED above and one below the switch, to recreate some of the up/down/toggly feel of a toggle.
|
What makes intel capable of very high clock rates? What are the determining factors responsible for why Intel chips can clock at 4Ghz or higher speeds, while other processors such as ARM can't? Is it because Intel's state of the art fabs or is it the architecture of the x86? It hard to understand how a complex chip like the i7 can clock so high. <Q> The main reason why ARM processors are not clocked at 4GHz is power consumption. <S> Architecture, fabrication, etc do play a big role, but the reality is that a tablet or mobile phone needs to last as much as it can off a battery, so all those factors are designed so that power consumption will be minimized. <S> When going for lower power consumption, you sacrifice performance because of design choices in the node, architecture etc. <S> Higher frequency is a battery killer because: P = CV 2 f Where C is a capacitance, V is the voltage, and f is the frequency. <S> So it varies linearly with frequency, and it's why frequency scaling is so prevalent, even in laptops. <A> I don't think there is any one cause, but a combination of several different factors. <S> Intel does aggressively pursue the latest process, and that buys it some extra performance. <S> It's difficult to say exactly how much, but a typical claim for a new process would be about 50% increase in speed over the previous one. <S> Another difference is that Intel perform full custom layout to take full advantage of their own process. <S> Arm supply their cores in different forms under different license terms, but typically as generic "IP" to be incorporated by other companies with their own IP in mainstream ASIC processes. <S> As such, it is more likely to be treated as a "black box" by ASIC layout tools and not as tightly optimised as a full custom design. <S> Hopefully someone with ASIC experience will correct this estimate : but from my FPGA experiments, careful hand placement can get about 30-50% higher performance than the tools by themselves. <S> Put these two factors together <S> and it is possible that Intel's implementation of the exact same design would be about twice the speed of a generic ASIC implementation. <S> ARM can mitigate this by working closely with TSMC or other ASIC manufacturers to optimise their core for specific ASIC processes; I can't say how many of the ARM cores available are optimised this way. <A> A significant factor is "horses for courses". <S> The i7 is marvellous in a straight line drag race but can't corner at all. <S> Demand, power consumption, necessary cost and need are all factors. <S> If you really really really wanted a 4 GHz ARM <S> somebody would sell you one relatively soon - if you wanted to pay enough. <S> The Freescale MCIMX535DVV2C ARM Cortex A8 is specified at 1.2 GHz datasheet here and the MCIMX6Q4AVT10AC ARM Cortex A9 quad core at 1 GHz datasheet here . <S> With CAN, EBI/EMI, ESAI, Ethernet, GPMI, I2C, MMC/SD, PCI, SATA, SPI, UART, USB, USB OTGand peripherals dedicated to DMA, HDMI, I2S/SSI/AC97, MIPI CSI, MIMI DSI, MIPI HIS, PWM, WDT, odds are it would give an X86 i7 an immensely good run for its money in many areas where the ARM is made to be used. <S> Adding those as external add ons to the i7 would be "annoying" [tm], at least. <S> At $42.50 in tube quantities for the A9 and half that for the A8 it probably makes the i7 look like a really bad deal for any application that the ARM is appropriate to. <S> Overclocking: <S> Anything can be overclocked. <S> Some things work perfectly when overclocked at a certain speed. <S> Some things appear to work perfectly when overclocked at a certain speed. <S> Some things work perfectly most of the time when overclocked at a certain speed. <S> For semi-random values of "most" and "appear". <S> YMMV, and probably will. <A> Why does my washing machine not go as fast as a Ferrari? <S> They're built to do different jobs, both manufacturers pursue different markets and both employ different technologies. <S> If you read up on their products you'll get more than enough info on the subject. <A> Subdividing operations into smaller steps will reduce the worst-case propagation for each step, allowing more steps to be performed per second, but the total time for each operation would be increased. <S> If an operation doesn't require as input the result of a previous operation, it may be possible for the second operation to get started well before the first one completes, but for really efficient operation requires going beyond that. <S> If operation #2 depends upon the result of #1, but operation #3 doesn't depend upon either of the first two, optimal performance should start operation #1, "schedule" #2, and start #3; <S> once operation #1 completes, operation #2 can be performed. <S> Essentially, what happens is that while subdividing instructions into smaller pieces (necessary for achieving higher clock rates) isn't hard, doing so without adding a lot of scheduling logic would decrease the amount of useful work per cycle so much that the amount of work per second would be diminished. <S> The more scheduling logic one adds, the more one can shrink the worst-case propagation time without reducing the amount of useful work done per second.
| Power consumption in certainly one big reason, but not the only one. An issue not really touched on by other answers is the fact that while simple processors can do every operation using a relatively small fixed sequence of steps which run at a fixed rate, such a design requires that there be enough time between steps to accommodate the worst-case propagation delays.
|
10 million switching cycles with a hall effect sensor I am trying to build a pull switch for my invention that can survive 10 million cycles, and in a previous question here I recieved advice not to use a mechanical contact. The other problem is size. The sensor assembly cannot be larger than 1x1x4 centimeters and the sliding distance can't be larger than 2 centimeters, otherwise I would need to do a mayor redesign of my invention. There won't be more than 3-4 switching cycles per second, usually less, and the 10 million cycles is my extreme worst case scenario after several years of use. The sensor assembly will be sealed so there shouldn't be any problems with moisture, but perhaps some loose material from the casing due to wear and tear. I've searched the net for a suitable pullswitch but found nothing that would work. My questions are: I tried using a hall effect switch with a permanent magnet and it worked fine, but wouldn't magnetism cause problems with EMC testing, CE and FCC rules? I need to use a non latching hall effect switch, are there any reliability issues with those? Do permanent magnets loose some of their strength over time? The sliding distance needed to close the switch cannot change more than a few milimeters. Are there any other good alternatives besides hall effect sensors? Perhaps some form of piezo sensor? Preferably one that can work with the voltage levels of Arduino, though I have plenty of room on my PCB for resistors so wrong voltage shouldn't be a showstopper. <Q> wouldn't magnetism cause problems with EMC testing, CE and FCC rules? <S> Not if it is a tiny permanent magnet - fridge magnets are typically not FCC certified. <S> A varying magnetic field is more of a concern. <S> hall effect switch, are there any reliability issues <S> Not if the Hall Effect switch is from a reputable manufacturer. <S> Adding the identified switch(es) to the question will help provide additional insight. <S> Do permanent magnets loose some of their strength over time? <S> Some types of permanent magnet lose field strength due to impacts, but a tiny rare earth magnet will probably outlast the rest of the device by orders of magnitude. <S> Are there any other good alternatives besides hall effect sensors? <S> That would depend on the purpose and application of the switch, but capacitive sensing lends itself to really long operational life, with the actual switching by a MOSFET for instance. <S> See these two references: 1 , 2 . <S> Another option is light path interruption sensing, such as using an LED and a photodiode, or prepackaged such sensors with both parts integrated. <A> One alternative is a microswitch. <S> These are not particularly small, despite the name; they are sealed industrial grade switches designed to be operated by machinery (e.g. to limit motion) <S> Some microswitches like this or <S> this are rated for 10 million mechanical operations. <S> In the case of this one, it is only rated for 100,000 electrical operations at full load, but switching small currents its life should be dominated by the mechanical rating. <S> They are arranged to be operated in a variety of ways : this one has a lever which could be moved by a pull cord. <S> If so, you should arrange the connection such that if pulled too hard, something else takes the excess pull, not the switch! <A> For the root question of EMC, CE, FCC and magnets... <S> The only issue likely is extream magnetism hazards. <S> The sort that leads to physical trapping of fingers, skin etc when handling . <S> The other issue is Induced currents in conductive parts. <S> The magnet has to be moving for this to be an issue and at 4 cycles a second your talking theoretical issue unless you have extream magnatism or hundreds (thousands?) of turns of a coil nearby. <S> So generally there is no issue. <S> As for finding a pullswitch, I think it is unlikely you will find one.. <S> this is where you have to modify a switch or make your own... <A> Howe about optical? <S> When you pull on the slider, it moves out of the way.
| This is not the sort of magnet you would normally use with a hall sensor as they don't need that sort of strength. There are many capacitive sensing products available, including some self-contained cap-sense pushbutton and proximity sensor (QTouch and QTouchADC) ICs from Atmel that do not even require a sensing electrode, the IC itself works as the sensor. LED and photo-diode with the light blocked by a slider.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.