text
stringlengths 83
79.5k
|
---|
H: Moving Coil Circuit
My wife and I are planning a Robot themed room for our 1st child which is due in May. My goal for his, yep its a boy, room is to make a wider variety of sensors that will hang on the wall that will each display a different input.
For my first sensor I want to build a simple sound measuring device that will use a moving coil meter and an artsy fartsy backdrop. The problem I'm having is trying to hook up the electret to the moving coil and was wondering if someone out there had a schematic.
AI: I believe what you want is called an analogue VU meter, and the mic won't generate enough power to move the needle.
So what you need is a microphone preamp. I found this circuit on the internet which should do the job:
|
H: References with explanations of how works CORDIC algorithm for division
Does anyone know any available reference to learn how works CORDIC algorithm to implement a division?
AI: This is an excellent article written by someone on the Parallax forums, called CORDIC For Dummies. Well written and explains things nicely: https://forums.parallax.com/discussion/127241/cordic-for-dummies
|
H: How to break out Board to FPC connector
I'm trying to (hopefully) reuse a smartphone LCD and touchscreen controller, among some other components.
The first step is to break out the tiny connectors on the board. It appears to be 2 board to FPC connections. See picture here: https://i.stack.imgur.com/jctIv.jpg (bottom right, sorry for the poor quality)
I found this resource but it's almost impossible for me to tell which one specifically is used.
Any suggestions for how I could get to those signals or wire it up to a breadboard?
Much appreciated.
AI: These type of connectors are usually called fine pitch board-to-board connectors. I doubt that you'll really find a way to connect to them without having to solder small wire leads. With the right tools, it's not as hard as you think. You'll need some fine gauge wire (wire-wrap works great), magnification, and a soldering iron with a sharp tip. With a little practice, I'm sure you can do it!
|
H: Measuring Resistance/Impedance with SPICE
How does one measure impedance/resistance using SPICE? I have access to regular SPICE(MacSpice) and HSpice.
The DC current divider circuit at the bottom of this webpage seems to be one method. 0V DC sources are used, and the current through these zero volt sources is measured. Using the node voltage and the current measured, we can deduce resistance. Of course for circuits where we already know the resistance this is only good for measuring the current.
How can one do resistance/impedance measurements for AC circuits, such as the inputs or outputs of transistor amps (e.g. resistance looking into base, output at emitter, etc.)?
AI: I know of two methods for impedance measurement. The first deals with DC impedance, and the second deals with AC impedance. They work regardless of whether you are looking at the input or output.
Measuring input impedance: Apply a DC voltage source to the input of your circuit. If any output loading, power supplies, or additional biasing is required, include this in the schematic as well. Sweep the input DC voltage source over the voltage range you expect to use the circuit. Use the equation below to give you the input resistance. Note that it is very possible to not have a flat curve.
R = 1/(Iin dI/dV)
Explained, this is the inverse of the derivative of the input source's current w.r.t. the input voltage.
Output impedance (or some other port): Apply the required bias voltages to the inputs to cause the device to be at its quiescent point. Apply a voltage source to the node you want to measure, and sweep the DC voltage over the range of expected node voltages. Calculate resistance in the same method as the first technique.
AC Impedance: Superimpose a small (1 uV) sine wave on the port you want to measure. Measure the amplitude of the current, and the phase difference between the voltage and current waveform. This will give you a current phasor, which can then be used to solve for a value of Z. You may be able to do this with an AC simulation, but a transient simulation with different frequencies should give the result you are looking for.
|
H: How to check the CAN bus is free or not
I read a lot of stuff regarding CAN bus arbitration, but it didn't answer my questions.
If one node is already transmitting the data on the bus and in between another node wants to initiate the data transfer, how will that "another node" get to know that the bus is busy?
All the documents (which I read) take condition that both nodes are starting transmission simultaneously and then one with first dominant bit will get the bus but nobody explained the condition which I want to know.
AI: The short answer is that the node must monitor the CAN lines to be idle for a certain time before it attempts to transmit. So if another node is transmitting, it must keep quiet till the other node is done.
A CAN bus is based in differential signalling. The two lines, CAN-High (CAN+) and CAN-Low (CAN-), are both at the same potential when the bus is idle. To send bits, a CAN transmitter puts a differential voltage on the lines of about 2 volts.
A CAN transmitter first sees if the bus is idle and if it is, starts to transmit. How the arbitration works is that a transmitter monitors the bus as it's transmitting. Transmission is done as above by either keeping the two lines at the same potential or at a differential potential. So if the transmitter transmits a bit by keeping the lines at the same potential (sic), but it sees that the two transmit lines have a differential potential, that means that some other node is transmitting and the first transmitter has lost the arbitration. It must then stop transmitting.
When a node first starts transmitting, the bits transmitted are the same until the address of the transmitting node which are obviously different. If two nodes start transmitting together, they will transmit together in sync till the address part is reached. When the address differs, a node will notice a potential difference on the lines even when it is not putting one on the lines. Then it knows it has lost and has to try again. The winning node continues transmitting without knowing that some other node was trying as well. Of course, this logic extends to more than two nodes also.
I hope this helps.
|
H: System Generator: How to configure the CORDIC divider block?
He all, I was wondering how should be the parameters fo the CORDIC divider block in order to get proper results.
In this example I´m trying to get 0.1/0.2 = 0.5 but I don´t get it and I don´t know why?
Please, does anyone know how to do it?
Thank you!!!
EDIT:
To take a look to the parameters of the CORDIC block see this question:
System Generator: How to configure the CORDIC divider block. Understanding the block parameters
AI: From the latency on the cordic block, that looks as if you've chosen to use a single processing element - that will produce results of limited accuracy. Very limited it appears :)
I tried using 10 elements for example, with [zeros (1,9) 1] for the "latency per processing element" - to get back to your 21 tick latency. Making sure I ran the simulation long enough (oops), I then got a result (using UFixed_16_11 inputs) of 0.501953125. Which is closer...
Does that help?
|
H: Don't understand how these resistors operate in this circuit
When reading a manual on using a PICAXE and an I2C device I saw this diagram.
I can't work how this would behave as wouldn't it make the connection on the lines constantly high due to the connection to the power rail, so never goes low. I understand that they are open-drain lines and they are needed inorder to make the lines go high but how can it make them go low with that connection to the positive rail?
AI: The resistors you see are called "pull up" resistors; they literally "pull up" the signal to the positive voltage rail.
I2C is a communication bus that allows multiple devices to talk on it. Since there is only a clock and data line there is no way to ensure that two devices won't start talking at the same time, or a device mis-identifies a message as being for it and responds out of turn.
If two devices try to control the data line and one wants it '1' and the other '0' you end up with a condition called contention. Internally a normal digital output is built up out of two transistors: one connects the signal line to +V and the other to ground. The device turns on one transistor or the other to set the output signal to the appropriate level. When two devices are trying to make the same signal two different voltages you end up with +V connected to ground through two transistors. This is known as contention and is something you want to avoid because it causes high currents and can damage one or both of the output drivers.
In order to get around this problem, the I2C specification requires the use of "open collector" or "open drain" (same thing) drivers. This means that the devices on the bus can ONLY connect the signal to ground. The only way for a device to output a '1' is to not drive the line to zero. Something has to bring the line to a logic '1' and that something is the pull-up resistor.
What happens now if two devices try to drive the data line is that one is not doing anything (it wants the line to be '1') and the other device has its output transistor turned on, connecting the signal to ground. The resulting signal is a '0' -- there is no contention because the only thing holding trying to make the line a '1' is a resistor which by design limits the amount of current it allows through. Pull-up resistors are usually selected to offer a bit of resistance to a changing signal but not too much. For I2C the value for a pull up is usually 4700-10000 ohms.
Check out http://en.wikipedia.org/wiki/Open_collector and http://en.wikipedia.org/wiki/I%C2%B2C for more information.
|
H: Particular JTAG to program/debug MCUs from different companies or architectures
Althougth I never used one, I know JTAG is a standardized way to program and debug MCUs. But I see a lot of JTAG from various companies. Can I use a particular JTAG to program/debug MCUs from different companies and with diferent architectures?
For example: can I use a JTAG to program/debug STM32 and LPC micros? (all Cortex-m3) Can I use the same JTAG to program/debug MSP430 micros? (16bit MCU from TI)
Which JTAG do you recommend to buy? And why?
AI: At its very basic level, JTAG is a standardized serial protocol. You can build one out of a handful of components for under $20, but it will be slow. Generally speaking the more expensive ones offer higher speed, broader voltage support and even autonomous operation. The software used to drive the particular JTAG interface determines whether you will be able to program the devices you are interested in.
Personally I am happy with the $70ish dollar Olimex JTAG units. They are USB, based on the FT2232, work with 5V and 3.3V devices and have good support for both Linux and Windows (I'm not sure about OSX). I also have an Atmel USB Blaster for programming Altera FPGAs (supports down to 1.0V IO) and an older USB based one for Xilinx devices. Finally, I also have a GNICE+ JTAG adapter used primarily for Analog Devices Blackfin processors.
I have not tried it, but I believe that the Altera USB Blaster should work for anything I connect to, although it does not support RTCK (return clock) support. It is primiarly ARM devices which support RTCK, which is a means for the JTAG interface to detect how fast the JTAG clock can go and still be reliable.
My suggestion is to take a look at the particular devices you wish to use and see if you can find a common JTAG unit that is well supported by all.
|
H: How to affix graphic LCD to PCB?
I'd like to mount a small (2.5") graphic LCD or OLED display on a PCB. I believe it should look something like this:
I've seen this done (links to pics) on my LM3S6965 development kit, on my TI Evalbot, and on this Sparkfun breakout board. All of those images show a pane of glass, the screen itself, an FFC folded underneath the board, and very little information about the mounting technique. The LM3S6965 and Evalbot have a bit of foam visible underneath. (I can't speak to the Sparkfun board as I don't own it).
I suspect that the display is adhered to the PCB with double sided tape or an epoxy.
Am I correct in my suspicions, or is there another method of doing this? I've considered cutting a relief out of some clear acrylic and screwing that to the PCB as an alternative.
Is it removable? I've considered using a solvent or some force. I'm interested in trying out the screens I already own on other PCBs, and I'm also interested in replacing the screen on my new PCB if I break it or doing edits to the PCB beneath the display.
Is it easy to do? I'd like to distribute the PCB with the components (including the display) as a kit to other engineering students, and I don't want them to have to deal with complex epoxy mixing ratios or risk damaging the LCD in the process.
Is replicating this technique the right thing to do for a development board or in-house tool? I expect users to abuse or break this board, and I expect it to need rework.
AI: Usually LCD displays come in a plastic "cage" that has pins (more precisely, bumps - they are very short) on each corner of its back. The PCB has holes to fit in, but that's just to prevent the display from sliding horizontally on the board. The board is then attached someway (screws, etc.) against the case "top" which has a window for the display, a little smaller than it in each dimension, and that holds it in place. Usually there's no need for an adhesive or glue, which also makes repair easier; just the LCD ribbon is really mechanically attached to the board. But for hobby projects there's nothing that prevents you to do so.
There are other, less popular methods. Displaytech's "LCD Connection Methods" document has a few diagrams, but it's not possible to attach a file here in .pdf format. In a roundabout conversion method, it's now on E&R's imgur account here, sorry for the low quality.
|
H: Is this a good way to power my camera?
I have a Canon SX210 IS which has not a connector to use a external power supply. So I wanted to connect "my" power source to the pins the battery usually touches.
In the back of my camera, it says 4.2 V but the battery has 3.7 (model NB-L5).
Right now, I have in my hands a voltage regulator (7805) and a diode which would drop 0.7 V.
I plan to connect the 7805 to a car battery so there is no line noise. Do you know if it safe to feed my camera with those 4.3 V?
Should I use less voltage? Would the camera be damaged if I pass 4.2 V?
I haven't tried anything yet just for precaution.
Thanks in advance!
EDIT
Does somebody know about a voltage regultor with arround (3.8 - 4.3)V of output?
AI: The camera likely has a voltage regulator on board between the batteries and the main circuitry. If you're able to find a part number on that, you should be able to find a datasheet for the part and that will tell you what the max / min input voltages are.
EDIT: I did some googling, and it looks like there is a power adapter you can purchase:
http://www.amazon.com/Canon-ACK-DC30-Adapter-SD700IS-SD800IS/dp/B000EVLS3S
It's bloody expensive, but if you can find some specs on that power adapter, you should have a better idea of what you can supply the camera with safely.
EDIT2* I did some more searching, and it appears as though unit expects around 4.3 volts, so you should be good to go.
http://www.studio3d.com/download/canon_870_user-guide.pdf
4.3V DC 1.5A
I would think it would be easiest / most robust to just plug your power supply circuit into the DC jack.
|
H: Deciphering Mux/Demux/Switch Nomenclature: AxB:C?
I'm looking through Digikey's Interface - Switches, Multiplexers, Demultiplexers section (and, thanks to W5VO, the Logic - Signal Switches, Multiplexers, Decoders section as well), and I'm having trouble deciphering what circuit/topology I need.
I've got a processor with a 32-bit coprocessor interface, and I'd like to interface it with a parallel Flash or RAM chip. Ideally, I would have both, and could swap between the two in software. I imagined (wrongly, it appears) that this would be a fairly common need, and that I could buy a pair of ICs that would each break out 16 inputs into 2 banks of 16 outputs, with power, ground, a single channel select pin, maybe an enable/high impedance pin. This would ideally come in a 54-pin TSSOP or 64-pin QFP or something of that size. A 32-switch chip would also work, but I imagine that two switches would make routing the a bit easier. The interface would be digital (I don't really need an analog switch), and I'd like to keep up with the 150MHz maximum speed grade of my processor (but will settle for 72MHz or so of actual performance). I am confident that I don't need some of the $200+ crosspoint switches!
I imagined that this would be a simple task, but it seems that my idea of what AxB:C should mean is different from Digikey's idea. I thought that the options would include 1x16:32 or 16x1:2, but (1) these options are not available at reasonable prices (I don't see why this device should cost $70 or $234!), and the other options (like 8x2:1, which seems popular) are designed for analog switching of Ethernet signals.
Where can I learn about the mux nomenclature? (An answer on this site would be ideal :) Also, where can I learn about the various functions listed, like AV/crosspoint/Ethernet/USB?
What topology or function should I use for to do this task (digital, ~100MHz, 32 or 16 lines)?
If all else fails, how can I build a switch out of discrete components or transistor arrays?
AI: There's a few questions in there, so I'll address them one by one.
What does A x B : C Mean?
Read this as A instances of a B number of inputs to C number of outputs. What you are looking for, if I understand correctly, is a 16x2:1 or a 32x2:1 chip. If C is more than 1, then your chip is significantly more complicated - you would no longer be selecting one input and connecting it to the output. Which leads well into the next sub-question -
Why are there $200+ chips for this simple function?
The specific part you linked is a 1x32:16 wide-bandwidth, DC coupled, buffered, video MUX, which can select any of it's 32 video inputs and output them simultaneously on it's 16 buffered outputs, with a gain of 1-2x. You could sorta think of it as a 16x32:1 with a lot of features. It's got quite a bit more inside than just CMOS switches. It isn't really designed for your function, which is...
How do I connect two memories to a master CPU
The most common method for hooking up multiple memory chips to a driver/controller/cpu is to use a tri-state bus. The address lines drive both chips, and the data bus is shared between all chips. Both chips should have a pin like "output enable", which can be controlled by the CPU. I found this article discussing memory buses at a rudimentary level - it has descriptive images. See Figure 8 for the gist of what I think you want. It is the simplest way of hooking things up, and the way I would recommend if the chips support it.
How would I make one?
Well, I think you were on the right track. CPU buses can be bi-directional, so intercepting the right output enable signal may be risky. The part you were probably looking for was a digital switch, something like this 16x2:1 FET mux. This is the cheapest one at $1.75 each. Wide bidirectional buses are best handled by ICs.
Note
I would check with the maker of your CPU to look for app notes and reference designs regarding memory buses. That will be the easiest way to see if you're on track.
|
H: Why can't a multimeter measure its own current and voltage?
Well I finally obtained another multimeter, so now I have a Mastech MS8226T and a Ben Electronic M92A. I decided to measure at which voltages would the low battery warning appear and how much current each of them consumes.
So here's my setup: Power supply->M92A->9V plug->MS8226T->other end of the 9V plug->power supply.
I used M92A to measure current and wanted to use MS8226T to measure voltage. Unfortunately, I couldn't measure the supply's voltage using MS8226T. I always got 0 V. When I swithched the meters, M92A would show voltage out of range for every scale.
So I decided to use the powered on meter to measure current and the second meter to measure voltage. I got zero as result on both meters, when I wanted to use them to measure their own curent consumption.
Why is that so?
EDIT
Here are the schematics.
On this image, XMM1 is the meter measuring current and it is powered by its battery. Meter XMM2 is powered by the power supply V1. I used R1 as the meter's power plug. When I use MS8226T as XMM2 in such a set-up, I get zero volts on the supply. When I use the M92A, I get out of range on all ranges. The XMM1 meter shows expected values.
On this image meter XMM1 is powered by its internal battery, is measuring voltage and shows expected values. Meter XMM2 is measuring current and reads zero. I'm using resistor R1 instead of meter's power plug here.
AI: It's because of the circuit used inside of the multimeter to create a virtual ground at approximately Vbat - 6.2V, or about 2.8V for a 9V battery; this basically means the COM terminal on the meter is at 2.8V relative to battery ground and readings will be offset by this.
I tried with another meter to measure its 9V battery - it read 6.08V, which is very close to the predicted 2.8V drop.
|
H: Do I have a ground loop or another problem?
Okay, I know this is an electronics Q&A site, and this question is mildly computer related. But I've got this problem with my VGA monitor, a graphics card and a computer. The problem is the video output is blurred in one direction quite badly. This looks very similar to a low pass filter - i.e. parasitic capacitance.
The confusing part is - this only occurs with one card, an Nvidia 9800 GT. I have a somewhat broken ATI card (GPU started melting and now all 3D games have misplaced polygons), and this doesn't occur. So I'm thinking something else is up with either the card or some configuration involving it. I've also noticed that there is an odd ripple to the black in the image. Could it be a ground loop? I'm using a cheap DVI to VGA adapter which could also be suspect.
I've attached an image of the problem.
AI: This looks exactly like VGA ghosting. This is usually caused by a long VGA cable. If you are only seeing it on 1 video card then I would suspect the video card is very poorly designed.
To add a technical note, the ghosting is usually caused from a mismatched line causing reflections and ringing which shows up as what you are seeing.
|
H: Image processing on PAL/NTSC
I want to process a PAL or NTSC video signal and pick up colors, like green, orange, blue and red. Is there any way to decode RGB from NTSC/PAL easily, and then detect these colours? I'm looking for a small and cheap solution. The end goal is to build up an array of pixels matching a colour, then filter this to decode shapes and locate targets on a camera.
AI: You're probably best off using a dedicated chip to do the decoding. A quick trip to Farnell's website showed a few of these under CODECs/encoders/decoders, with digital output selected. This type of chip forms the front end of frame grabbers and some displays, with chips like Brooktree bt848 recording the data to memory.
That search found devices from Maxim, Texas Instruments, Analog Devices and Philips (NXP brand, apparently now bought by Trident who don't publish the datasheet).
It's possible you can build a lower cost alternative using the same analog circuitry an old TV would; a comb filter to separate into Y and C components. Digital comb filters are apparently patented. Intersil AN9644 might be one document to read.
|
H: Calculating the amount of torque needed to turn shutter
I'm working to design a motor to control a mechanical shutter. After considering some other possibilities I have decided to try using a stepper-type micro motor. We're using a shutter from Edmond optical. I'd like to pair it with one of the Micromo stepper motors.
The critical datasheet specification seems to be the holding torque which is rated as nMn. I take this to be Millinewton/meter. I rigged up the shutter with a simple pulley and found that a weight of 12.8 grams was sufficient to turn the shutter's lever (which opens and closes the aperture).
This explanation might benefit from a diagram, so I drew up one to illustrate the experiment:
If w=mg then the weight exerts a force of 126 mN on the lever...ignoring the geometry of the pulley and that the lever turns on a circular orbit. My naive self imagines that I need a motor which provides a torque of more than 126 nMn. Is this a correct estimate?
If so it seems all the Micromo stepper motors are too weak to turn the shutter.
AI: You have calculated the force required to operate the shutter but not the torque.
Assuming that the lever is perfectly horizontal and the pulley cable is perfectly vertical, you must multiply the force of 126 mN by the distance between the shutter axis and the point on the lever to which the cable is attached. For example, assuming your diagram shows the shutter displayed 1:1 on my monitor (which I'm sure it doesn't!), I measure the distance as 30mm giving a torque of 30E-3 * 12.8E-3 * 9.81 = 3.8 mNm.
|
H: System Generator: How to configure the CORDIC divider block. Understanding the block parameters
I have some dudes about the block parameters of the CORDIC DIVIDER.
I would like to someone explain me the parameter called "Latency for each processing element".
(See the parameters inside the red rectangle)
I don't understand the notation that is used, some zeros or ones between two brackets.
By the way, this question is realted with one I asked before:
System Generator: How to configure the CORDIC divider block?
AI: The cordic block is split up into a bunch of processing elements (PEs). Each PE is a bunch of logic operations. There is some latency associated with each PE already.
You can add additional registers at any point in the pipeline by putting non-zero values into the vector you have highlighted. The vector should have as many elements as you have requested PEs. In your case, you've requested one PE so it will only look at the first value of the vector, resulting in an additional latency of zero.
As regards notation - [] is standard Matlab for a vector (or matrix, depending on how it's used, but I'll not go into that here!). It's a bit like an array in other languages.
so
a=[5 6 7 8]
creates a 1x4 vector called a. Element 1 (which you can access in matlab by doing a(1) ) has the value 5. Element 4 has the value 8.
Note that Matlab starts its numbering from '1' not '0' like many other languages!
|
H: Chassis / case for electronics projects
I'm looking for some chassis and cases to put my electronics projects in. My projects tend to involve at least one microcontroller and/or fpga. My boards are often very "verbose" and I put few major features on each board so I often end up with several boards. I would like an easy way to both reuse some of the boards across projects but also have a structured way to connect the boards, not just lay them out on my desk as I do now.
I would like something like this except that it shouldn't cost me my first born. It doesn't have to be as big, but I would like something that can hold a handful of boards and have a "useful" backboard. It would be nice if uses standard VME connectors or something similar (even ISA would be useful). Hopefully each board be 100mmx160mm in size, but that's not critical either.
Also, does anyone have an alternate way of organizing the few boards that make up a project?
AI: Design your own Eurocard motherboard PCB using DIN41612 connectors that will fit in a standard low-cost enclosure like this one. That should hold half-length Eurocards (100 mm x 80 mm).
|
H: Looking for a open-source ALU
I am looking for a open ALU to compute several equations like these:
y1 = e^((constant1 - x)^2/(2*x))
y2 = constant2/y1
y3 = y2*constant3 + x*constant4
Where x is the input of my system and y3 is the output.
I would prefer that the ALU supported floating-point operations. Where can I find an open or free floating-point ALU?
AI: As a processor guy and designer of an open-source microprocessor, I can tell you that it will be difficult to find what you are looking for.
Multiplication, subtraction and addition are very doable in hardware but irrational numbers, arbitrary powers and division are difficult if not infeasible to do in digital hardware. It may be easier to do it in analogue electronics if your equations have a tolerance for errors. Otherwise, you will need to come up with some tricks to get what you need.
If performance is not critical, you would be better served by doing it in software.
From this and some of your other questions, I think that you may need to re-define your problem or come up with a better alternative that does not rely so much on complicated math.
It may not be possible to do what you need, in hardware and you may need to resort to software emulation instead.
|
H: AGND/AVDD on a chip
I am considering using a chip, but the datasheet is confusing me as it has several distinct power pins.
It has:
PLL_VDD
PLL_GND
AVDD
AGND
DVDD
DGND
DVDD_IO
DGND_IO
This is the chip.
How do I hook up each? Do I connect AVDD straight to DVDD, and what about PLL_VDD, and the ground pins? The suggested schematic seems to show them all connected to the same potentials (with different symbols for both types of grounds); from a cursory glance it doesn't mention anything about PCB layout. So how should I wire it up?
AI: Divide your board into those discrete sections: PLL, Analog, Digital, and IO. Try to keep all of the copper (signal & power) for each section separate except where they require interconnect. Join the power to each sub-circuit only at near the power supply, within the sub-circuit and at chip when possible. Bypass each at the chip grounds with a cap or two (you might leave an extra footprint here for test).
You may find that the layout doesn't permit total separation of sub-circuits. If so, at least try to use a wider trace to supply the split and filter where necessary.
|
H: Timing differences with a 27 MHz data clock
I'm considering using a chip which outputs 8-bit data on a 27 MHz clock. The data will go from the chip to a FPGA, a distance of a few cm max. Do I need to be concerned about timing differences between traces on a PCB, and if so, how can I mitigate these? I've often seen motherboards with traces in small coil shapes, presumably to act as little delay lines.
AI: Leon is right, it probably doesn't matter for 27MHz signals on traces that are only a few cm long.
However, you can mitigate skew by making the trace lengths equal. If you've got the time to ask a question about it, and you have the board space, why wouldn't you want to do this? There's very little reason to build skew into your circuit. Make little 45o wiggles in the traces to make the distances the same and avoid building in reflections. This makes equalizing the trace length easy if your PCB program doesn't do it for you. Or, you can use rounded traces, but keeping the trace lengths equal gets more difficult.
Here's a PCB which uses LVDS. There's an NI board connected to this one through a 2m, 100-pin ribbon cable, and the other side of the LVDS transcievers connects to a parallel bus, so there are many sources of skew. Why not eliminate the PCB as a source of skew?
Note: On this PCB, the paired traces are supposed to be coupled together. In a non-differential bus, running pairs like this will give you really bad cross-talk.
|
H: What're the benefits of checking electronics in person over the exclusive online stores?
I found a few specialized electronic parts that I am interested in buying from eBay and/or Alibaba. However, knowing that I will be traveling to China soon, I felt checking the purchase in person would lower my risks of getting a lemon. What do you think and why?
Thanks in advance.
AI: I lived in China for several years. If you're looking for specialized electronics pieces (as opposed to consumer or computer pieces such as hard drives), you will probably have difficulty finding retail places to look at them. Most of the electronics vendors sell to other manufacturers, so if you don't have a certain quantity you wish to buy you will not be able to find many people to talk to.
What part of China are you going to? If it's Shenzhen or one of the other manufacturing cities in the south of China you will have much better luck than if you're going to Beijing, etc.
|
H: System Generator: How to generate a .bit file?
I am using System Generator and I would like to generate a .bit file in order to load into my FPGA. Does anyone know how to generate a .bit file with SG?
Thank you.
AI: Well, I found the how-to.
Just click on the System Generator token block on the simulink scheme and configure its parameters. In the parameter compilation it´s neccesary to select 'bitstream'.
|
H: What's the best cable to transfer audio signal?
Sorry if this is the wrong place but I'm interested in a scientific and electrical explanation and not some HiFi voodoo magic.
I guess you all have seen the discussions about expensive audio cables and "improved" sound quality.
My question is, what's the best cable for an audio signal? Loudspeaker cables are usually a pair of ~12 AVG cables terminated with banana connectors.
As far as I understand this must be affected by all sorts of noise. To minimize noise it's normal to use coax cable for "radio" signals (LF, MF, HF, ...). Wouldn't coax with proper connectors like APC-7 or equivalent be the best for audio too? Or are the frequencies too low for coax somehow?
Internet was a bit vague on this topic.
What I'm really wondering is why don't we use coaxial cables for loudspeakers in average home stereos?
Lets say a signal level of 50 dBm (100W).
AI: There are two reasons why speaker cables are not shielded/screened:
The signal is so powerful that any interference would not be noticed.
Speakers are not very sensitive; it takes a lot of power to create sound on a speaker
This is why speakers are connected to an amplifier.
Input to amplifiers are very sensitive and so input should use shielded/screened cables.
P.S. If you have a 100W amp the good ones use about 48V. So you have at least 2A, with peaks higher. Peaks might hit 20A but for a very short time. To hear this your speaker cable needs to be thick.
|
H: Build ATMEGA16 Board
First of all, I'm a newbie regarding electronics&robotics so please bear with me.
I have been working as a programmer for a few years but I just got interested in playing with microcontrollers.
Can anyone recommend a book/tutorial for building a development board based on ATMEGA16-16PI
.
As of yesterday I own a breadboard and a atmega16 microcontroller.
Where do I go from here?
Thanks
AI: I wanted to do something with microcontrollers for some time now, but it wasn't until yesterday that I collected enough courage to actually buy one.
Since you said that you're absolute beginner, here are some very basic pointers.
First site you may want to visit it Atmel's website for the microcontroller you have. Here it is. There, you'll need to visit the documentation section and get the 2 datasheets. You should read the summary and take a look at the datasheet. While you can read the whole datasheet, I think it may be better to just keep it as a reference. You might want to download AVR Instruction Set and keep it as a reference too, but to me at least, it looks more interesting to assembly fans and compiler writers.
By now you should have an idea of what the device you have is capable of. Next step would be to set up the needed toolchain. On the site I linked, go to tools section and look under design software. There you'll find a link to AVR Studio 4, which is one of the available programming environments. Some of the other IDEs are WinAVR, IAR Embedded Workbench for AVR(non-free, but there's a program size limited demo), ImageCraft, CodeVisionAVR, CrossWorks for AVR.
For a beginner, AVR Studio and WinAVR seem to be the easiest to obtain.
After that, you can start programming. There's a simulator in AVR Studio, so you can try out and debug programs before you burn them on the controller.
Next step which needs to be overcome is how to get program from your computer to the microcontroller. On the tools page, you'll find a list of officially blessed development boards and programmers and debuggers. Problem with them is that they are usually too expensive for a beginner. On the other hand, they should work without any problems and there's a lot of documentation on how to use them.
If you want to save some money, but suffer potential headaches, you can get one of the many alternative programmers. Just search for AVR programmer and you'll get countless results. Unfortuantley, I can't recommend you any specific programmer, since I'm looking for one too.
The other option is to build one yourself. There are countless schematics available for AVR programmers and many of them can be very cheap to make. On the other hand, there's the problem with finding specific parts (some programmers need Russian transistors, which are now difficult to obtain and then you'll have to look for compatible replacements and so on) and that you have to build it yourself. Still, building a programmer yourself can be a good learning experience.
After you have a programmer, you'll need a circuit which can power up the controller and provide the basics. You should know by now that AVRs run on 5 volts, so that's what you'll need. There are lots and lots of examples on the Internet for basic boards, so again search. Some sites with programmer schematics will have most basic target boards too. For most basic system, you'll need a 5 V source and that's pretty much it, as ATMega 16 has its own clock source. If you can't make a basic board, feel free to ask for specific instruction.
Next step is to make a basic program which will do something. For microcontrollers, hello world programs are a bit more complicated and are a good project for a bit more advanced users. Instead, the most basic program will turn on an LED. After that comes flashing LED and after that button controlled LED and so on. Circuits for such project are very simple. In addition to the most basic AVR board, you may only need one resistor and LED. I think that ATMega 16 can source enough current to power a LED, but I'm not 100% sure. You can always check the datasheet. If you're feeling a bit more advanced, you could make a circuit which will use a transistor to control the LED.
In the end, here are some interesting links for beginners:
http://www.avrfreaks.net/ They have a nice forum and they have a list of projects which could be interesting.
Here are several interesting tutorials:
http://imakeprojects.com/Projects/avr-tutorial/
http://avrbeginners.net/
http://www.avr-asm-tutorial.net/avr_en/
http://www.ladyada.net/learn/avrdevtut/
Another interesting thing worth mentioning is Arduino. It's an electronics prototyping platform which is based on AVR microcontrollers. The plus side of them seems to be that you'll be able to skip the background stuff, such as getting a programmer, getting a basic board for the microcontroller and so on. There's an IDE for Arduinos and a simple programming language too. The minus side of them is that you'll be able to skip the background stuff, such as getting a programmer, getting a basic board for the microcontroller and so on. There’s also the problem with the fact that there's an IDE for Arduinos and a simple programming language too.
|
H: Using motors with arduino without external hardware
I have three small motors, and I know you should use a motor shield or driver when working with the arduino, but would it be safe to use these with the arduino by themselves without a shield? And if so, what would be the best way to work with them and control their speed?
AI: You will damage the Arduino chip if you connect a motor directly to one of the outputs. I've used the Adafruit motor shield with motors like that.
|
H: Multi node bus options
I want a master node consisting of a TI Stellaris Cortex M3 core connected to what can be up to 32 slave nodes of TI MSP430 (or possibly more Stellaris slave nodes). These will be maximally 0.5 meters between master to most distant slave. Bit rates of around 0.5-1mbps will be needed. What kind options are available for internal communications?
From docs they both seem to support SPI, UART and I2C.
SPI will from what I find, need 1 selector wire pr node. Way too many wires.
I2C seems easy, but for from docs I get the max speed is 400KHz. Too slow without degrading quality or maximum number of nodes.
UART seems to acheive the speed, but can it be used outside of A to B communication?
Did I miss anything?
Update: As noted in comments, updated I2C speed for msp430 to 400KHz. Still too slow though. Also the network is purely one master and n slaves.
AI: I would suggest either RS485 or CAN; RS485 has the advantage of almost universal availability (if you've got a UART, you can have RS485; if your UART has automatic RTS control, you have a perfect RS485 solution). You can find cheap, small devices that will go up to several megabaud as well.
CAN is a little more robust, but if your microcontroller doesn't have the peripheral it can be an additional cost you're not willing to add to the project. CAN's main advantage over RS485 (IMO) is that in the case of bus contention, a complete message will still get through; If two devices start talking on an RS485 network, nothing intelligible is received and there is no built-in means of bus management, so you have to take care of this in software.
For your given speed and given that I don't believe the microcontrollers you mentioned have built-in CAN controllers, I'd suggest a token-based RS485 network. Essentially none of the nodes speak until it's their turn to speak, and this is done though the passing of a "token" (a short network message granting the use of the bus) to each of the nodes in turn. It's relatively easy to set up, is far more reliable than CSMA/CD and I think you could have something up and running within a day or so.
|
H: What cable do I need to connect rows of male header pins together
I have a Jaguar motor controller that has a set of 5 inset male header pins to connect an encoder. The encoder has only loose wires coming out.
What type of connector should I be buying to solder/crimp onto the end of these?
Also, there're a couple of sensor boards with a similar arrangement of 0.1" male headers. The control board also has male headers. However, every compatible cable I can find is male to female.
Do servo cables with sockets at both ends exist?
This is what the controller looks like. Encoder slot is on the front, as the freehand-circling below shows
AI: Are those jumpers beside the connector? Then probably the connector can be connected using the common jumper wires (available with up to at least 10 pins in one housing).
Servo cables usually have a different kind of connector (rounded corners).
To make your own jumper leads, you can buy crimp connector housings from pololu. They also sell pre-crimped wires, if you don't want to crimp them yourself.
|
H: Power Supply Rejection Ratio for Battery Powered Systems
Analog Devices just brought out several LDO regulators claiming double the power supply rejection ratio of competing devices, and targeting these devices at battery powered devices.
However, I thought that batteries were quite noiseless, as opposed to powering up your device via a switchmode power supply where (i would have thought) a very good PSRR would be handy.
Why would PSRR be a crucial factor in battery powered systems?
AI: The reason why PSR is important even in battery supplied devices is that one can (and usually) have several different kinds of circuits supplied from the same battery in the same device. Due to internal resistance of the battery, changes in the current consumption of the one part of the device will be seen as voltage variation for all the circuitry supplied by thereof.
One dramatic example is GSM phone, where power amplifier for transmitter will consume significant amount of current (amps range) every time the frame is transmitted with almost no current consumption in between frames. Assuming* 0.5 Ohm internal resistance and 1A consumption that means 500mV voltage variation repeating several hundreds times a second.
*) those are example numbers, too lazy to check actual GSM numbers
|
H: Extra negative battery cable when charging outside car?
If you go to: http://www.battery-chargers.com/charging_instructions.htm
...Under "Operating Instructions" part "B: Charging battery outside of vehicle", it says you have to attach an extra jumper cable to the negative battery post, that is then clamped to the charger's actual negative cable. See below:
Both my charger's instructions and these look identical on this point (Indeed, they might be the same instruction sheet).
Why is this extra cable needed?
(Not like I don't have one, just rather curious...)
Thanks!
AI: So that you can connect/disconnect while not standing over the battery. The batteries contain sulfuric acid which is not a very pleasant substance to splash. Even the fumes are dangerous.
While connecting inside a vehicle, connect the positive first and the negative on the vehicle body while not facing the battery. The negative can be connected to any exposed metal part on the vehicle (and at a distance from the battery). Similarly while disconnecting, disconnect the negative first and then the positive cable. The reason is that the vehicle body is connected to the negative terminal. If the positive cable slips and touches any other vehicle body part, it will cause a short.
|
H: Difference between BGA and LGA
I have come across a chip which is only available in LGA. I wouldn't touch BGA, but what about LGA? How possible is it to design for one with little experience? Are there any gotchas? I'm planning to reflow solder these using a hot plate.
AI: LGA is similar to BGA, but without the solder balls, so you have to apply solder paste to the pads with a stencil. I don't think you will find them any easier to use than BGA.
|
H: How to get TinyCAD to output correct netlist when using hierarchical design?
I've got a design (PIC microcontroller that uses transistors to turn on banks of LEDs). I have 2 instances of the LED array, so I made a hierarchical design - I have a separate schematic for the LED array, and I put 2 instances of it into my main project.
The LED arrays are just a bunch of resistor/LED pairs, labeled R1/D1, R2/D2, etc.
The problem comes when I generate a netlist - the netlist appears to include everything, but it doesn't differentiate between the R1 from the first instance of the array and the R1 of the second instance. So I get things like this in my netlist file:
*SIGNAL* _HN_1_!ON
Q1.3 D1.1 D14.1 D2.1 D15.1 D3.1 D16.1 D4.1 D17.1 D5.1 D18.1 D6.1 D19.1 D7.1 D20.1 D8.1 D21.1 D9.1 D22.1 D10.1 D23.1 D11.1 D24.1 D12.1 D25.1 D13.1
*SIGNAL* _HN_2_!ON
Q2.3 D1.1 D14.1 D2.1 D15.1 D3.1 D16.1 D4.1 D17.1 D5.1 D18.1 D6.1 D19.1 D7.1 D20.1 D8.1 D21.1 D9.1 D22.1 D10.1 D23.1 D11.1 D24.1 D12.1 D25.1 D13.1
Q1 feeds the first LED array, Q2 feeds the second LED array, but you see that D1 is referenced in both. If I feed that into FreePCB, I'm only going to get one LED array and it's going to be wired ALL wrong.
Is there a way to make TinyCAD do the right thing here?
Update: I tried putting the LED arrays on separate sheets, but that didn't help.
Update again: I suppose I could just copy the LED array design onto separate sheets and then number their reference designators appropriately, but that's giving up the hierarchical design altogether.
AI: I've looked into it and this seems to be an open bug issue that just hasn't been fixed yet: http://sourceforge.net/tracker/index.php?func=detail&aid=2859909&group_id=47763&atid=450703
If you can use a different type of netlist output that might help but I'm guessing it's not an option for you. Your best bet at this point is to just abandon hierarchical designs until it gets fixed. Sorry.
|
H: Roland Microcube modification, need a hand
My Roland cube has stopped working, the guitar input connector for the main channel has been faulty for a while but now its gone completely. I opened it up and it looks like the connector is badly damaged.
I want to take the connector from the clean/line in channel at the back. Its the same connector as the main channel. I have a soldering iron. I am a noob.
Here is a photo of one of the sockets:
How do I remove these connectors? Can I do it with just a soldering iron?
AI: What you need is:
Soldering Iron
A desoldering tool or some solder wick
Some solder
First you need to locate where the pins are soldered to the board. You need to remove all the solder from these joints.
If you have a desoldering pump (it looks a bit like a syringe with a sprung piston inside it and a release button on the side), this is the easiest way. Heat the pins until the solder has melted, keep the soldering iron on the joint, then at the same time touch the tip of the desoldering pump to the pin and press the button. This will instantly suck all the solder off the pin and into the tool.
If you have solder wick, this absorbs the solder by soaking it up into the wick. This won't remove it all though.
When you've got most of the solder off all the pins, nudge the pins with the tip of a screwdriver to release them from any final solder bonds, and you should be able to lift off the socket unharmed.
Do the same to the faulty socket, replace with the good one, and resolder.
Job done.
|
H: IR-near visible light detection
I want to detect light near 10 micrometer wavelength. It seems like photodiodes are mainly targeted for 1 micrometer range. Is there any detector/sensor for 10 micrometer wavelength ?
AI: Certainly there are microbolometers for this spectral range. They are called PIR sensor and are cheap and readily available as they are used in motion detectors.
See for example this (first Google result) sensor: 5-14µm
|
H: USB ESD protection
I am using a microcontroller (PIC32) with a USB interface. The USB interface will be often exposed to human body ESD discharges. Should I protect against these, and if so, how?
AI: USB pins need protection from ESD. Here is one solution using TVS devices.
|
H: ADC input circuitry and source impedance
I'm using a maxim ADC in my application from this family: http://datasheets.maxim-ic.com/en/ds/MAX1304-MAX1314.pdf
The devices have relatively low input impedance. If you look at Figure 5 in the above datasheet, on page 19, you can see the equivalent input circuit. My ADC is 0-5V range. My input signal however is in 0-10V range, so i have to reduce it to match the ADC.
If I use a resistive divider at the ADC input, it seems to me that I can not get a proper reading from the ADC due to the interaction between my 2 resistors, and R1 and R2 in figure 5. For example:
| Vdiv
| Vin------Rdivider--------Rdivider---------> GND
| |
| |
| |
| R1 (3.33k)
| |
| | Csample
| |-------/ ------| |-------
| |
| R2 (5K)
| |
| |
| |
| v
| 0.9V
In the above figure, no matter what Rdivider values I chose, it seems to me that Vdiv will not be Vin/2.
Do I have to use an amplifier in the input for this case?
AI: Yes, from the datasheet:
Due to the analog input resistive divider formed by R1
and R2 in Figure 5, any significant analog input source
resistance (R SOURCE) results in gain error. Furthermore, R SOURCE causes distortion due to nonlinear
analog input currents. Limit RSOURCE to a maximum
of 100Ω.
So practically, this means you need to drive the input with an amplifier. Although, a resistor divider made with a 192 Ω and 200 Ω resistor will meet specs if your signal has a low output impedance.
|
H: How do constant current power supplies work?
How do constant current power supplies work? For example I have a power supply that is constant voltage that can supply up to 5A and I have a 12V motor that takes ~500mA so I crank up the supply to 12v and my motor pulls ~500mA from the supply. But how does this work for a constant current power supply? Would it determine its own voltage output depending on the resistance of the load(ohms law)?
AI: The simplest constant current supply is a large value resistor in series with a much smaller load resistance. Suppose we have a 12V supply to a 1k resistor in series with a 10R resistor: the current flowing through the load will be 12/1010 amps or 11.88 mA. If the load is 20R, the current will be 11.76 mA. It's almost the same although the load resistance has been doubled. The voltage across the load has been doubled, in the second case, keeping the current at about the same value.
|
H: what is an average CPH speed for hand SMD assembly?
What would be the average speed (an experienced) person would assemble surface mount components on to a PCB? Assuming they have desk that is correctly set up (pick and place station) and the PCB has solder paste already applied.
Reason for the question:
Pick and place machines talk about components per hour (CPM) speed, interested to know how to compare this against a person. Looking into doing small runs (100 units) of a product, need to determine if I hire staff or purchase a small scale pick and place machine instead.
I know Sparkfun say they do this sort of work by hand, but I have a part count of 90!
AI: When soldering is done by hand there are lots of aspects that factor into how fast it can be done. Here are the largest factors for me when I am soldering:
The pitch of the components. I have this cover both IC pitch and 2 pin size. The smaller they are the slower the human has to go to get it set properly.
Through Hole components or SMD or both? Through hole components will actually take a lot more time to solder in my experience.
How closely spaced the components are. Humans will always make mistakes and the closer the parts are together the harder it will be to fix them. Also the closer they are together the more likely a slip of the hand will cause another component to get hit and have to be fixed.
How organized the parts and documents of assembly are. This one is pretty clear, if it is hard to figure what to put where it is going to take longer.
In general though, I would say it takes me about 45 seconds per part to place the parts on the board. The board can then be baking while more boards are assembled.
Where you have to be careful in time estimating is the time it will take to check for shorts and fix them. There will be errors, maybe just a couple out of the whole batch, but there will need to be more testing time when soldered by hand.
|
H: reading raw data from a cdrom
Can you point me some technical resources on how cdrom works and is it possible or lets say how easy to make a diy cdrom ? I am interested in reading and processing raw data from cd, not using a chip to decode EFM etc.
AI: Maybe you will get direct links in other answers. I'd suggest googling for the particular components of a CD drive: CD focus, tracking, decoding, etc...
An even better method is probably to open a CD player (preferably an Audio CD because of low data rates) and to look at the signals using a scope. I have even done this with hard disks and it is pretty informative.
|
H: T-trigger: minimum transistor count
I am playing around with real implementation of basic logic schemes from transistors.
Could you suggest any compact implementations of T-trigger? Obviously, classic "CMOS" way eats way too many.
Other nonlinear elements are allowed (like tunnel diodes), diodes and other components does not counts.
I will need this to implement binary counter.
AI: Most people think of this in two layers of abstraction, the logic gate layer and the transistor layer.
To minimize total transistor count, you need to (a) minimize the number of logic gates, and (b) minimize the number of transistors per gate.
You might get some ideas for (a) at Wikipedia: flip-flop.
For (b), my understanding is that resistor–transistor logic and integrated injection logic and diode-transistor logic uses fewer components per logic gate than other logic families.
In order of number of components:
You can make a 4-input NOR gate out
of 4 n-channel FETs and a single
resistor (5 components) with one
style of RTL, which requires 2 power
supply rails.
You can make a 4-input NOR gate out
of 6 carefully-chosen resistors and a single
transistor (7 components) with another
style of RTL ("threshold logic"), but
it requires 3 power supply rails.
You can make a 4-input NOR gate out
of 6 diodes, 3 resistors, and a
single transistor (10 components)
with one style of DTL, which requires
2 power supply rails.
Have you seen "The Transistor Clock"?
It's on Youtube and Make Magazine and the transistor clock web site.
p.s.: Does anyone know what happened to the MT15 CPU, built out of individual discrete transistors?
|
H: What kind of spade connector is this?
I need to replace a plug on a mains powered device. It uses a specialised connector (to make it difficult for hobbyists, I guess) so I want to replace it with a standard mains plug. Unfortunately the cable connects to the PCB using some kind of spade/Faston connector, but there are millions of different variants of these and I have no idea which parts to buy! Does anyone know what it might be, from the photo below? It's kind of hard to get a good view, so let me know if a particular angle would help. The plastic cover is 9mm wide, and the metal receptacle is about 7mm wide. The device is rated at 24A, so I'm not sure if that means there is a special high-power variant needed.
Any ideas?
AI: There's generally only two important variables in spade connectors:
Blade (not socket) width (the thickness may vary as well, but it should be prescribed by whatever the width is),
and if it's on a wire (versus a board), wire gauge it accepts.
Measure the blade width (I've only ever seen them specified in inch sizes, 0.187, 0.250...), and see if there's a good match on some parts catalogs (here's the Digi-Key category). After that, pick the one that fits a wire gauge that will safely carry your current.
|
H: Is there a text or markup standard for describing a Bill of Materials?
I'm an electronics newbie, and recently purchased empty PCBs for GoodFET and Ubertooth.
While trying to put together an order for all the parts in the bill of materials, I realized I'd very much like to have a computer parseable format I could dump into a parts search engine like octopart.
I started hacking up a simple website to do this using the octopart API but I can't find any sort of xml standard for a BoM.
Has anyone heard of such a thing? I'd be particularly interested in some sort of standard format that's available from gEDA, EagleCAD, etc
AI: I don't think there is a standard, but that doesn't mean that you can't make one.
I've written my own part searcher for EAGLE and Kicad which loads a bom from EAGLE or the parts list from kicad, produces search URLs for my preferred supplier and accepts SKUs in return.
What I'd do is to specify an xml format to hold the BOM and write a bunch of converters that can produce that format.
My eagle and kicad scripts are here:
https://github.com/dren-dk/HAL900/tree/master/door-ctrl/kicad2elfa
|
H: How should I route SPI lines?
In my schematic, I have 4 SPI devices to hook together. I am going to operate the SPI up to 8MHz. Should I be concerned with installing damping resistors? source termination resistors? Should I route them in a star formation, or in a serial fashion? Does adding lots of vias hurt the signal integrity?
I also have to add that these devices are quite close together, within 25mm of each other.
AI: From a signal integrity perspective, 8MHz isn't actually that fast so you can probably get away with any reasonable layout. You might want to include termination resistors in the layout. If you don't need them you can just install 0 ohm resistors and then leave them out in the next revision. I would lay out (star versus serial) with whatever gives you the tighter layout (e.g. shorter traces). Stubs are considered a bad thing for high speed layout, so I'd pick one or the other and not have some scheme where some parts are tied together serially and others are branched off from that. When laying out in a serial fashion, keep the stubs off the main lines as short as possible. Adding vias does hurt signal integrity, but as I mentioned, you most likely have such a large timing budget at 8Mhz that it does not matter. The other question is, do you have a ground and power plane? If so, you want to keep the signals referenced to the same plane (e.g. don't run the SCLK trace on one side of the board referenced to the ground plane and then via to the other side and run for a while referenced to the power plane). You'll probably have to worry about EMC issues here long before you'll have to worry about signal integrity issues, but EMC may not be a concern for you project.
|
H: What makes a particular platform suitable or unsuitable for production use?
Let's assume that the cost of goods is an insignificant factor. If a company lacks a team to produce a custom board for a particular product, but has success with an off-the shelf development platform like Arduino / Netduino / mbed, what sorts of things should be considered before going forward?
If I'm not mistaken, Arduino was originally targeting university students because of its low price and ease of use. It naturally became a popular platform for artists and makers. I see the Netduino as a logical extension of Arduino -- it allows people to use a robust and rich IDE (Visual Studio 2010) and get things done quickly via the .NET Micro Framework. mbed is another nice hobbyist platform because of its ease of use, free tools (online compiler), and hardware peripherals.
So my question is, why shouldn't companies adopt these development platforms for production usage? In other words, is it a bad idea to just buy several boards from Sparkfun, program each of them with the code, and then deploy the product to customers?
I'm specifically interested in Netduino, but arguments for / against Arduino and mbed are also welcome. On the flip side, would you, or have you done this before?
I personally look at the Netduino development as a "core module" that other processor manufacturers sell for product integrations, but maybe I'm missing something important here.
AI: Some of the things you might look at when sourcing a controller module are issue such as security of supply over time, any licensing issues, any inefficiencies in firmware loading process for production, any code security issues, and any manufacturing quality or regulatory compliance concerns. Some of those are going to be more of a concern for a proprietary module than a relatively open one you could have someone else make an equivalent to or eventually merge with other functionality in your product.
|
H: What is the purpose of an IO shield on a computer case?
What purpose does the IO shield on computers serve? I have been reading a lot of articles (mostly forums) on the internet and can't seem to find a definitive answer.
AI: I/O shield:
1) Shield to keep electro-magnetic radiation inside of the case
2) Dust Cover / Air circulation director: The fan in the power supply shall draw air throughout the entire case and not just along the short way from the I/O area to the power supply that's usually right above.
3) Aesthetics: No ugly hole.
|
H: Is there a way to protect RS-232 Transceiver IC from static death
My company sells devices many devices that use RS-232 line transceivers like the MAX232 chip. In many cases our users run their RS-232 cables in the range of 30 to 50 feet to connect our device to their PC. Over the years we have seen many boards come in for repair because the serial communication stops working and the problem can often be fixed by simply replacing the MAX232 line transceiver.
My guess is that the long serial cable is acting as a giant antenna for EMI or static and the transceiver can only take so much. In our next board design we want to go with a surface mount chip which will be much more difficult to "pop-out" and replace if the problem occurs again. Is there a way that I can protect this chip against such problems without increasing the cost of the board/components greatly?
AI: You may want to consider a part with built-in ESD protection as a first-line of defense.
Maxim has a good application note on the topic.
|
H: If mobile phones have to go through such extensive FCC/CE/EMI testing, why do they interfere with my radio?
It seems that to sell a GSM mobile phone, companies like Apple, Motorola, Sony Ericsson and many others invest a considerable amount of money in EMI testing them. Yet they still interfere with my stereo, radio, computer speakers, and other devices. Why?
AI: The interference caused by GSM phones is an intentional radiator that is within the required limits of regulations.
I tend to blame the other devices for not shielding well enough. Any wireless device is going to have harmonics, its just a way of life and it just so happens that one of the harmonics with many GSM devices is in an audible range.
|
H: Would pictured circuit be good enough to power ATmega162?
I've read the datasheet and the application notes elated to AVR Hardware Design Considerations and EMI. From them and various Internet sources I came up with pictured design for power supply circuit for ATmega162. AVR would be connected after C3. Right now, I plan to run the device form its internal clock source, but later I plan to try with external 16 MHz crystal.
There are few things I'm not certain about. First, I'm I overdoing it with 4 capacitors near the microcontroller? Some sources say that decoupling capacitors should be placed in decades while some say that the 100nF is enough. I was thinking about using multilayer capacitors for 100 nF and 10 nF and ceramic disk for 1 nF. Would that work?
Next point is the inductor. In one document, it is placed between the electrolytic capacitor and in the other document between last capacitor and power supply. Which location would be better? I'm thinking about placing it after last capacitor close to the microcontroller, but the HDC document made me uncertain about that. As far as I understand it, coils do their best to keep current constant, so the coil should prevent spreading of pulses as the controller switches states.
AVR Hardware Design Considerations recommend tantalum electrolytic capacitor. Is there any special reason for that?
On the board, I'd place a MAX232, couple of 20 mA LEDs and 2*16 character LCD screen. What decoupling capacitor should I use near the power connector of the board?
AI: It depends a lot on your requirements as a simple logic circuit will run properly with just 100 nF and nothing else. If you have sensitive analog voltages the choke (or, maybe better, ferrite) can be helpful.
I don't think 1 nF and 10 nF will give you any advantage, but if you have a lot of input ripple or want very low output ripple, I'd add 10 µF on the right side (there are even ceramics in 0805 nowadays).
The inductor needs to be on the power supply side, not near the controller. If it would be there, the controller's supply voltage would drop seriously every time it switches something (internally or externally).
Multilayer ceramics are the new tantalum. ;) I guess, they recommend them in contrast to aluminium electrolytics because of their low ESR.
Your circuit won't draw much current, so maybe 100 µF electrolytic or less at the input? That's really just a guess because if you have a clean supply you probably don't need any capacitors at the input at all (but they won't hurt).
|
H: What wire do I need to carry 30 A for 18"?
I have an 11.1v lithium polymer battery pack which has 1300 mAh capacity and has a 20 C rating. Therefore I figure the maximum amperage the battery can supply is 26 A. (C * mAh / 10001) To be safe, I figure the wiring I use with it should be able to handle 30 A in case a higher capacity battery is used later. I figure that I can safely use an ~11.1 V, 1500 mAh, 20 C battery at that current.
The circuit this will be used in has a momentary switch (trigger) and a DC motor. (Airsoft gun wiring diagram) There will be about a foot and a half of wire from battery terminal to battery terminal. The circuit under nominal conditions would be under load for no more than half a second every few minutes. However it could potentially be under continuous load for up to 5 seconds with an average of those cases being 3 seconds.
The problem is, the wiring has to fit through small passages. And I need to use the smallest possible wire gauge that will handle the current. I currently have some stranded copper 18 AWG wire for automotive use. I'm pretty sure that this will not handle the current this battery is likely to supply3. From memory, (without measuring the clearance of the passages) 18 gauge wire seems to be an ideal size, though I think I really need 14 gauge wire to handle the current if it's just stranded copper.
I have trouble finding any easily understood documentation on the subject and there are so many variables to consider. Such as the length of the wire, the diameter of the strands (if stranded), the number of strands, the coating (if any), the ambient temperature, etc.
My research leads me to believe that if I were to get some 18 or 16 gauge wire with silver coating and a thin insulator (teflon?) that it would fit the bill. What is the proper gauge (solid or stranded), coating, and/or insulation for this application?
Update: I added "duty cycle" information to paragraph 2.
AI: Over 18 inches you would drop about 0.675 volts with 18 gauge wire. 12 gauge would drop about 0.1 volts. You would need to use 6 or 7 gauge to handle 30 A over an extended period.
If you are not using continuous current, but pulses, you could get away with using a smaller gauge wire. However an undersized wire would heat up significantly in just a few seconds. Unless you are sending pulses of less then 1 sec, you will need a large diameter wire.
AS for the insulation, it depends on how the wire is being used and how it is routed. 30 A is a lot of current. If some one can come in contact with it, you need heavy insulation for safety. Especially if it flexes. If it is total enclosed in a non conductive housing, you could use thinner insulation.
|
H: How to connect decoupling capacitor when VCC/GND pins aren't close
I'm making a board which will host an ATmega 162 microcontroller in PDIP package. Unfortunately, VCC and GND pins are diagonally arranged. From what I've read, the capacitors should be as close to the pins as possible for maximum effect.
Right now, I can see 3 ways to connect the capacitors. Run wires to the capacitors so that they are at equal distance from both pins, place capacitors near ground and run wire to VCC or place capacitors near VCC and run wire to ground. There's always the "none of the above" option too.
How do I make right decision in this case? Or is is irrelevant?
AI: For these types of packages you should use at least two equal bypass capacitors, one at each side of the IC (one near ground and one near VCC). The parallel inductance of two traces to two different caps lowers the total trace inductance and the current flowing from each bypass cap in opposite directions helps cancel out EMI. See Henry Ott's book "Electromagnetic Compatibility Engineering" for more details here. Apparently this technique reduces noise by a significant amount and will also help functionally. This technique taken to the extreme would involve using a power and ground plane and surrounding the entire chip with bypass capacitors, or if you have the money to spare, using buried capacitance planes, but simply using two caps at either side of the package makes a large and measurable difference (as opposed to just at the VCC side) (I'm too lazy to look it up but I think we're talking 10dB+ improvement).
EDIT: Added my cheesy drawing. The arrows are supposed to show the canceling current loops (one clockwise the other counterclockwise), but note the capacitors should be placed closer to the chip then I drew.
|
H: Seeking cheap RFID reader / writer
What I do not want is one of those RFID readers which attaches to serial or USB port and writes its input to stdin.
I am looking for cheap & nasty RFID reader which I can query over serial or USB; a bonus is if it is also an RFID writer but doesn't add too much cost.
Coding something like:
fopen(com1);
fwrite, com1, "hey, you, send me some input");
read(com1, ipit_value);
fclose(com1);
AI: There are a whole bunch of different RFID types, so it's hard to recommend something without any further information.
I'll assume that you meant EM4100 125kHz tags, those are read only, but very common, so there are many choices.
If all you want is to get the rfid ids into a pc, then pick up an USB reader, which simply shows up as a USB keyboard, which spits out the id and hits return:
http://cgi.ebay.com/125Khz-RFID-Proximity-ID-USB-Reader-Free-5-RFID-Cards-/260641368732?pt=LH_DefaultDomain_0&hash=item3caf6faa9c
For your own electronics, the cheapest choice is to hook about $2 worth of jellybean components up to an AVR, like I've done here:
http://www.hackaarhus.dk/forum/download/file.php?id=45
Forum thread: http://www.hackaarhus.dk/forum/viewtopic.php?f=4&t=113
Sources: https://github.com/dren-dk/HAL900/tree/master/door-ctrl/hardware-4
Next step up is a module like this:
http://www.sparkfun.com/products/8419
|
H: FOSS ModBus libraries/VCl?
I'm looking for FOSS (for commercial use) VCL components for Delphi or libraries for Visual Basic/C/C++/C# ... basically, just something to abstract the h/w for development, although a h/w simulator might be useful for testing.
Does anyone know what is available?
AI: Take a look at MODBUS simulator here. This one is also worth a look. For Delphi components take a look here, here, and if you don't mind the nag screen here.
|
H: Are discrete MOSFETs ESD sensitive?
CMOS inputs on microcontrollers and other ICs can be damaged by ESD discharges. Can the gate of a big discrete MOSFET (2N7000, IRF9530, etc.) be damaged by ESD discharges?
AI: Yes. I've used MOSFETs which had a conductive rubber band around the pins to protect the gate(s) by shorting the pins, to be removed after soldering. (TO-39, IIRC)
|
H: Heating an object with a circuit
I would like to make a circuit that can heat up an object to a very high temperature, similar to an electric griddle or coffee cup warmer. What kind of heating elements do they typically use and where can I buy them? They should be pretty easy to power with 120VAC right? I just need to be able to switch it on and off from an MCU.
Target temperature is ~200°C
AI: Resistance wire is what you want. This is used in (at least older) space headers. But make sure you have a fail-safe.
|
H: IC Design Resources
Looking for some resources on the design of Integrated Circuit Designs as they can contain a range of components. I am interested in how they can produce diodes and resistors on the dies in the ICs. Are there any free resources available?
AI: If you're looking for a free IC design book available on the web, I would recommend Hans Camenzind's book Designing Analog Circuits. It's a pretty good resource that goes from the device building blocks to the large complicated circuits. It has plenty of drawings and is much more readable than any textbook I have.
His text is not encyclopedic, but you should be able to get enough examples to understand A way to build a diode so that you wouldn't be shocked by a new method.
|
H: FPGA board for implementing wireless video
I want to build a FPGA based prototype for uncompressed video over wireless connection with one box being transmitter and other a receiver (to display). The transceiver speed for HD video (1080) is 3-4Gbps. But it would need an expensive FPGA board. I am thinking of VGA and I guess it needs around 1 Gbps (correct me if I'm wrong).
What type of FPGA board should I use (preferably cheaper)?
Also, I would need to interface the FPGA with an RF module. Are there any RF module available for that could be interfaced with FPGA and support 1Gbps speed?
AI: I think reliable 1Gbit RF transmission is the biggest problem here.
Personally, I would take let's say 5-10x WiFi 11n transcievers in 5Ghz band so that you can have multiple 40Mhz channels there without interference.
So, I would start from cheapest FPGA board and single transciever, and once you master that, you will see which bigger board you would need, it's totally depend on huw much logic you want to implement there.
Another way to think is compressing video, or going stright to DLNA (which is basically compressed video over WiFi, standardized).
|
H: Very low stacking height PCB connector
I need to stack two PCBs together, but the stacking height is extremely critical. In terms of board-to-board connectors, the best I could come up with was SAMTEC GFZ series.
What other solutions can be recommended to stack two different PCBs? I need to have very low stacking height (less than 2 mm, the lower the better), and about 100 connections.
AI: The SlimStack and/or PMC connectors might be useful alternatives, it depends a bit on the pin pitch that you can use:
https://www.molex.com/en-us/products/connectors/board-to-board-connectors
I have a card with the PMC connector, and it is really tiny:
|
H: Very low frequency (<1Hz) high pass filter design
I want to design a very low frequency (<1Hz) high pass filter. I was thinking of using a 2 pole sallen-key opamp design with a pair of r's and c's. Is there anything special I need to consider when choosing component values/types. It looks as though the caps will need to be in the 100's of µF range.
Thanks
AI: It depends on how accurately you are expecting to control your cutoff frequency. A few point come to mind ...
Tolerance
High value electrolytic capacitors have wide tolerances, indeed cheap ones can be as wide as +100%/-50%. You won't get much better than ±10% and stability could still be an issue. Solid electrolyte (aluminium/tantalum) have better stability but will be much more expensive.
Leakage
Electrolytic capacitors will have a finite leakage current which will produce dc offsets given that your resistor values will also be high.
Polarization
Make sure that your circuit biasing keeps capacitors correcty polarized.
Charge/Discharge
High value capacitors will have to charge & discharge somehow if there is a non-zero dc bias (ie single rail). This will cause turn-on 'thumps' as the circuit settles-down which may take a many (tens of) seconds. At turn-off, the capacitors may discharge into the op-amp causing damage although given that your resistor values will also be large, this is less likely to be a problem.
The lowest frequency filter I have ever built was a 5Hz ±20% two-stage S&K (4 pole) maximally flat design which worked perfectly well.
You might also want to look at a Gyrator circuit to simulate a high value inductor.
|
H: What's the best tool to design casings/boxes?
I often tend to build a prototype for a project and if I have something that's good enough I find a case that matches the prototype I've built. However, now I'm trying to do more of the design up front and would like to design the casing up front. The latest projects seem to involve more parts as well.
Which tools do you use? I would like something that could give me a 3D view of the assembly. As a hobbyist I'd like something that is free or cheap.
I'm looking at Google's SketchUp now which seem useful but kinda cumbersome for my task.
AI: SketchUp can be a little cumbersome in the beginning. I would urge you to stick with it. There are a lot of really great tutorials out there (start at http://sketchup.google.com/support/bin/answer.py?hl=en&answer=36207). I'd spend just an hour or two really getting familiar with the tools and see how you feel. I'm in the same situation--hobbyist, so free/cheap is the best option. I hated that I could never get things to 'snap' or align properly. A few videos later, I'm fairly competent, and don't feel lost anymore. If nothing else, learn about inference and alignment. That should take some of the frustration out of it and make you more productive.
Sorry I don't have any alternatives, but I hope SketchUp works out for you. Good luck!
|
H: Soldering Tiny Leads?
I've got some really tiny leads on a USB port that I need to solder to a board.
The local Hackerspace has a microscope that I'm going to see about using this for, but even a soldering iron is gigantic compared to these tiny leads. Does anyone have any tips (pun intended and unintended) for soldering these leads to a board?
AI: Flux! Use plenty of flux and it will magically work.
You don't need:
a super-skinny soldering tip
hot air station
very thin solder
solder paste
desolder braid (helpful though)
You do need:
Flux
Magnification (you've got that covered)
Flux up the pads really well, then apply heat and solder. Try to make a big ball that covers all the pads. Then remove solder by repeatedly cleaning the tip and touching it to the pads. This technique is similar to drag soldering. If in doubt add more flux.
|
H: I want to be able to measure weight (typical range of human weight), what sensor can I use?
I've seen this force plate from Vernier and it requires another USB interface device. They have an SDK that will they allow us to communicate with the force plate.
Is there something that I can create on my own that also measures weight?
I think that I've seen a strain gauge thread on this forum.
There's this load sensor from Sparkfun (mentioned in thread) but it maxes out at 125lbs.
I essentially want to create a plate for someone to step onto and be able to measure their weight.
AI: Like this? http://www.walmart.com/catalog/product.do?product_id=5740778
You could buy one and interface to its strain gage. Or even its measurement electronics.
If you are making a computer interface to a scale, try to stick to the SMA Serial Communication standard: http://www.scalemanufacturers.org/smastandards.htm Then your scale will be instantly compatible with all software.
|
H: Importing an asc PADs file into Eagle
I have a .asc PADS file that defines the footprint for a part I am using. Is there any way I can use this file with Eagle so that I don't have to make the package from scratch?
AI: I don't know of any Eagle user scripts for importing files from PADS. I suspect that your best bet is to design your own footprint using Eagle for the part.
If money is no object, I found a company who claim to do conversions: http://www.logicswap.com/eagle.php
|
H: System Generator: How to make an implementation a mathematical function through a ROM
I want to put in a ROM a vector of values I have in the workspace. Does anyone know how to do it?
Thank you to all possible references, articles or comments.
AI: Use a ROM block (from the memory section of the Xilinx blockset).
It has a parameter called Inital value vector - put the name of the vector in there. Put length(vector_name) in the depth parameter.
Setup the output type tab to the fixed point representation you want to use. Bear in mind the sizes of RAM bclock you have available in the target FPGA when selecting the number of bits. For example, 2k elements of 9 bits fits just as well in a single RAM block as 2k elements of 8 bits (in case you, or other readers, aren't already aware of that).
Job done!
|
H: How to charge Laptop Li-ion Battery cells manualy?
I have received some Li-ion batteries which were originally used in Asus A2 Laptop battery original one and I would like to know if it is possible to charge each cells independently with some device or just normal universal charger.
I Apologize if i asked in wrong section.
AI: So are these loose cells you have?
You will require a voltage limited and current limited source to charge your li-ion batteries; something such as a lab supply will do nicely but a universal supply will probably do aswell - check its specs tho!
You'd probably want to charge the cells to a max of 4.2V (Check datasheets or go lower to be safe with 4-4.1v but you'll be storing less juice tho!).
Set your current limit conservatively to c/3 or something, c is the capacity of the cells so if you had 2400mAh cells, charge them at 1/3 of that so at a rate of 800mA each. Most cells let you do 1C and few do 10C or other high charge rates but best to be safe and sure when working with these and use low currents.
If you have a whole bunch of these cells in series, you'd want to be careful because of the imbalance that may occur as Thomas pointed out. This isn't an issue with single cells however.
Also for the battery monitoring chips - they'll disconnect your battery when the voltage / current are beyond safe limits but you will still need proper charging power source as the BMS will not limit current for you.
|
H: Short circuit protecting a class AB amplifier
I am designing a little class AB amplifier for a small circuit. This circuit is biased such that it has low crossover distortion. Below is a schematic:
As you can see, I have inserted 68 ohm resistors in series with the power supply lines. This is such that when the output is shorted, the current is limited to about +/-200mA. In this demo, I have inserted such a short; a 10m resistor. However, in operation the resistors dissipate 1.5W each and in short circuit conditions about 2.5W, which means I have to use two big and expensive 5W resistors to remain within safe operating boundaries, and it also might cause problems for the power supply.
So I'm looking for some way to limit output current to about +/-100mA before the amplifier begins clipping (which the current solution manages), but without the "hack" of using resistors on the power supply lines. I was considering a comparator measuring the output current across a shunt resistor, but I wasn't sure how to achieve this for short circuits of both polarities. Also, I need the circuit to ideally work up to around 5 MHz, which limits the choice of components.
Edit: Thanks to russ_hensel and opencircuits.com, I devised the following current limiter (including amplifier), which actually works really well (it clips the output and doesn't make it sag or invert, like some limiting circuits.)
AI: take a look at this circuit. you would need two one for each "side" of the amplifier.
http://opencircuits.com/Basic_Circuits_and_Circuit_Building_Blocks#Current_Limit_or_Constant_Current_.28_Transistor_Based_.29
|
H: Measuring temperature of microcontroller and other large ICs
I'm going to be using a microcontroller and SDRAM IC in an enclosure that could, given some environmental variables that I have no control or knowledge of, get too hot for the devices to work properly. Redesigning the enclosure is not an option. However, I could notify the operator, if my microcontroller had a means of reading the temperature.
How can I monitor the temperature of a large IC? I'm using 54-pin TSOPs and 100-pin TQFPs. I've considered using a SMD thermistor and an ADC on the microcontroller, or using a prepackaged solution like this SOT-23-3 'active thermistor'. However, with either of these methods, I'm not sure how to thermally couple the devices. I'd like to avoid having components on the back-side of the board if possible.
Other possibilities include adhering a device on some long leads to the center of the IC, or monitoring the current used by the device, and extrapolate the power consumed to get an estimate of the temperature. Both of these seem like hack jobs, while a thermistor or temp sensor seems much cleaner.
What single-sided layout will simultaneously give be the best thermal properties to cool my devices, and allow the sensor to be thermally coupled with the die of the IC? Or, are there other methods that I'm not considering that would be better?
AI: I guess the cause of overheating is not power dissipation of your uC. That means you can just place thermistor close to uC and you'll get +-2C accurate readings.
Some uCs have internal thermistors connected to one of ADC input - check datasheet.
|
H: Visual logic designer + simulation
in university we had our internal program called HLCCAD - it was very nice, and now I need to do design & debug some digital circuit and wondering what is current state of art software for that kind of things (price is out of consideration for now)?
I.e. I want to visually place components, and then simulate it.
Manually writing VHDL code & looking at simulation traceouts of specific nodes is not enough.
Any suggestions?
Update: Found Logisim - this is exactly what is needed. Are there any commercial alternatives with more horsepower?
AI: I've heard good from Qucs (which has some basic digital logic, including VHDL apparently) and tkgate, which is an event driven logic simulator. Both are free open source software.
|
H: Is it safe to keep on using AC adapter with a damaged output capacitor?
I was experimenting with my universal laptop adapter (Meind 100W) and when I switched it to 34V mode (while official max is 24V) the capacitor (25V) popped (the top opened and some white fibers spread over the nearby parts).
The capacitor is glued to the board and is not easy to remove. When using the adaptor it slowly heats now.
When under load the output voltage of the adapter drops (and probably recovers after some seconds), so I have to set it to voltage that is higher than needed.
Questions:
Is it safe to continue using that adaptor? Can it degrage further with time or it will remain stable?
How to unglue the damaged capacitor from board?
Should I use some additional safety measures (for example, external capacitor connected to output) to reduce the risk? (I'm not going to just buy another adaptor)
AI: Most likely the popped capacitor is causing stability issues (output going up and down as you described).
It should be replaced with a part with comparable voltage, ripple current, ESR and life ratings. Failure to choose an appropriate cap will likely result in the cap failing prematurely.
A properly protected power supply should not be damaged from a blown output capacitor. I wouldn't recommend operating it until the cap is replaced.
It seems odd to me that the power supply is capable of self-damage. With 25V caps the max output ought to be below 20V.
I would use a sharp utility knife to cut the part from the glue, then desolder it and replace it. Make sure you note the polarity.
|
H: Calculating weights in a particle filter experiment using multiple state variables
I am trying to implement a particle filter for coupling gyro and electronic compass for better measuring device orientation. [related question]
I understand my state vector would contain the absolute angle and turn-rate and my observation vector contains the readings for the same from the compass and gyro.
In my transition model, I just use the constant turn-rate assumption plus random noise to move the particles to their next states. Then, when I get a set of readings (angle and turn-rate from the sensors) in the next time instant, how do I assign weights to the particles? Is there a systematic procedure to assign the weights for a state vector containing multiple variables or should I just calculate it based on the difference between the predicted value and the observed value for both compass and gyro?
i.e.: weight(particle X) = RMS(angle(Particle X) - angle(sensor), rate(Particle X )- rate(sensor)), and then normalize all the readings?
EDIT:
Let me explain my problem a little further. I am working on the basis that the electronic compass alone is subjected to magnetic interferences in the indoor environment and hence the gyro should be used along with it to improve the accuracy of orientation.
Now, these magnetic interferences will form the external/environment noise of the process and will definitely be non-Gaussian, since they are bound to be biased towards the side of the metallic structure. That is why I chose the Particle filter over say, the Kalman filter although it is the most preferred method. So when I really don't know the pdf of the noise, then how do I estimate the likelihood that a predicted value is equal to a real value (which would be its weight, right?)
Assuming a normal distribution in this case would not work, because it would give me wrong probabilities for particles. Atleast, this is what I understand; please correct me if I'm wrong.
AI: No, it's not a stupid question. Reweighting (or resampling) particles is non-trivial for any "fun" problem. Weighting is typically performed by computing the likelihood of the particle fitting the observation. See page 28 here. This link and this link give reasonable discussion on particle resampling.
These links assume you can easily compute the likelihood a particle corresponds to the observations. For ease, we typically assume the likelihood can be expressed as a normal distribution (i.e. with a mean and a variance). Since your observations are comprised multiple dimensions, you might use the multivariate version of the
normal distribution.
|
H: Why is a capacitor placed in parallel with oscillator output?
I have a circuit board with an oscillator and I'm curious about why there is a capacitor hooked up to the output. The oscillator is a SWO series HCMOS Square Wave output crystal oscillator. The schematic of the oscillator connections is as follows.
+3.3V
|
--------- | C=0.01uF
NC-| 1 4 |---------||-----GND
| |
GND| 2 3 |---------->Direct to FPGA input pin
--------- |
|
= C=15pF
|
GND
The data sheet (select H22/H32/H53/SWO) does not reveal much, but there is a "Load" section that says the max load is 15pF. Specifically, it says:
Load | 15 pF ; ( 30 pF and 50 pF load are also available for +3.3V and +5.0V VDD)
In such a circuit, is the load the capacitor or the FPGA input pin? If the load is the capacitor, why is the load needed for the oscillator? What is its purpose?
AI: They have a technote paper on this subject, "Effect of Load Capacitance on the Crystal":
http://www.mecxtal.com/pdf/te_notes/tn-021.pdf
|
H: Darlington Array IC that can sink 1.5A
I am looking for a darlington array IC like the ULN2803a that can sink up to 1.5A. It needs to be in a DIP. Any recommendations? Its needed because i am driving a stepper motor and requires 1.2A per coil. I am controlling the stepper motor from a PIC. So if you have another solution let me know.
AI: I don't think you will find a Darlington array in DIL that will handle 1.5A per output. The package can't dissipate enough power. You will probably have to use use discrete devices.
|
H: Power and ground configuration in a schematic
I have a schematic for a commerical circuit board, and I was curious about the following:
1.2V
|
------------------------------------------
| | | | | | |
=10uF =1uF =.1uF =.1uF =.1uF =.1uF =.01uF
| | | | | | |
------------------------------------------
|
GND
What is this network for? I see that for all of the ICs there is a decoupling capacitor on the input voltages near the IC. The above, however, appears to just be caps connected between the supply and ground. What purpose does such a network perform, and how does one decide on the value Ctotal of the network? They all add up to Ctotal=11.41uF for the 1.2V supply. There is also a 3.3V supply with the same network, except that Ctotal=11.43uF.
There is also a ground-ground connection I am curious about.
------------------
| |
GND GND
What is the purpose of coupling ground to ground?
AI: In the schematics they are put next to each other to avoid cluttering the functional part, but on the PCB they are usually spread out as follows:
100nF are placed across the power supply of each ICs.
10µF is used for a group of ICs, often only one for the whole circuit, if it is not too big.
I've seen 10nF to decouple the analog supply, I suppose to be able to use a higher quality C0G capacitor without it getting much bigger.
The total capacitance doesn't matter much.
As for the ground connection, there are probably two separate ground networks or planes, which need to be connected by a wire, and for technical reasons the schematic needs to contain that wire (so it is not forgotten).
|
H: Need bin or hex file for Pic 16F648A Serial LCD
I have seen some kits and boards for a Serial LCD based on the PIC16F648A.
A have a few of the chips and a few LCDs. I'm not into PIC programming, does anyone have a link to the compiled software I can program my PIC chips with to make my own serial LCD?
AI: Compiled bin/hex files are very specific and can not be easily adapted to your specific situation. This means that the bin/hex file would have to be for the exact PIC you have along with all of the exact pins connected as was designed for in the original code.
Also many companies protect their code and compiled versions of their code very tightly. This means that there is a good chance that they wont just hand it over to you.
So, likely you wont find an answer to your question. Instead you should look to see if someone has released information on how to build what you are looking for. It will require that you are willing to be open to learning about firmware coding as you will have to touch it to work on a project like this.
|
H: Is it possible to repair a PCB which has suffered a DRC failure?
Okay, so I was a bit of an idiot while designing my PCB. The specifications of my PCB fab were 6/6 mil trace/space, and the boards did not meet this. So, below is the design for the PCB:
The trace going to C16 (a ground) is way too close to the pad which is connected through a trace to an inductor (it's a switch mode buck converter.) This basically connects the +3.3V line next to the filter capacitor to GND, shorting it. I verified this with the continuity test on my multimeter.
My PCB:
I have already bought 10 PCBs, so I'd like to know if it's possible to hack these and repair them. I'm okay with having to provide them with an external 3.3V source; in future, I'd like to get the converter working, but it's the rest of the circuit which is important.
Obviously I won't make this mistake in the next version... I might actually run the DRC. This is only for development.
AI: If I were you, I would try to burn the small copper bridge with a current surge. Using some cheap probes or solid wire, touch between the two points you don't want connected with a power source current limited to about 5A. If it doesn't work, increase current limit -- I wouldn't go past 50A, though. Note that the points you touch will oxidize immediately, and possibly also release magical smoke, so it'd be best if they were the edges of relatively large pads. Of course, everything between the two wires will be destroyed by 5A-50A, so don't miss any current paths...
Now, I don't mind blowing stuff up -- kinda' enjoy it, really -- but this method carries quite a bit of product risk. Don't get too mad at me when you burn your fingers, break your PSU, and melt some FR-4 on your desk. (You can get a little bit mad, though -- I understand.)
|
H: Which potentiometer to chose for LCD screen contrast?
I recently obtained DEM 16217 SYH-PY 2x16 character screen. Here's the datasheet. As far as I can see, its contrast pin should be connected to voltage source over a potentiometer. How do I pick correct resistance of the potentiometer for this use?
AI: I don't think it makes a whole lot of difference. I've used a 10KΩ linear before which works perfectly well.
You're essentially making a potential divider, connecting your pot between your supply and ground, so as long as it's not too low value that it starts to draw more than a negligible amount of current.
|
H: Difference between E/SP and I/SP and other variants
First post in Electronics and Robotics... I've been trying to order a DIP PIC off of Microchip (first time going directly off the website) for use with the RFM12, but I dont really know what all the variants are.
I'd like to get http://www.microchipdirect.com/ProductSearch.aspx?keywords=PIC16F873A so that it would fit on a non-solder breadboard. Most confusing is E/SP and I/SP, what's the difference? I couldnt find anything online.
Thanks in advance!
AI: If you look at their summary page, you'll see the difference is in temperature tolerance/range:
PIC16F873A-E/SP 28 SPDIP -40C to +125C
PIC16F873A-I/SP 28 SPDIP -40C to +85C
|
H: Dual slope converter vs. delta-sigma converter?
I'm curious as to why dual-slope analog to digital converters are used in most digital voltmeters, like one of these when a delta-sigma converter like one of these easily exceeds the specifications of any of the other dual-slope converters sold by Microchip, and in fact many other suppliers, especially given the low price point of the chip (about $4 in low quantities.) Is there a reason I am missing?
AI: With a dual-slope ADC you effectively get free averaging as the run-up integration phase will have this effect. The output is also extremely simple, just a pulse that needs to be timed which can be done with even the simplest micro controllers.
$4 is a really big deal when your making 50,000 of something and trying to sell it for $50. The dual-slope part you linked is $1.64 in a PDIP for 5000+. The sigma-delta's cheapest package is $2.88 in its cheapest package. Saving ~$1.20 on a single part AND being able to use a more basic microcontroller is a big cost win.
I think you'll find the more expensive multimeters do use higher end ADCs.
|
H: Weird Thermal Reliefs in Eagle PCB
The thermal reliefs of my ground polygon to one of the pads of my footprint are just simply weird! I dont know what causes it? It seems to me that the lines leading up from the polygon to the pads are just too thick and are out of proportion to the pad.
AI: You need to change the width of your ground polygon. The polygons are actually made up of many wires drawn to make a continuous surface. If you zoom in on a polygon that is drawn in a non-solid pattern (like an inner layer on a 4 or greater layer board) you can see what I mean.
When you draw the polygon you can choose the size of the wires used, just the same as when drawing wires. You can also change it after the fact using change->width, if I remember correctly.
You probably want to make the width no greater than the width of your IC pads.
|
H: Are MOSFETs Sensitive to heat while soldering?
I'm soldering through the hole MOSFETs in to a PCB and I don't have a temperature controlled soldering iron. So will I need to heat sink the legs as I solder them to stop internal damage. I as this as bipolar transistors are damaged from heat.
AI: The difference in the structure of MOSFETs and BJT is that the former have a thin insulation layer. I don't know if this is easier damaged than the rest of the crystal when heating it. But I would most strongly advise you to get a temperature controlled soldering station. If you leave your iron unused for a minute the temperature will rise to levels components won't like.
Also, most likely a temp controlled station will have proper earthing which is even more important than temperature when soldering MOSFETs.
|
H: Relay vs. Transistor?
Rather basic, I'm afraid, but when would you use a relay, and when would you use a transistor? In a relay the contacts wear out, so why are relays used at all?
AI: Relays are on-off devices. Transistors can have their voltage drop varied.
Relays are far slower than transistors; typically 50ms to switch, and probably more. Some types of transistors can switch in picoseconds (almost 10 orders of magnitude faster.)
Relays are isolated. Transistors can be (e.g. SSR), but are often not.
Relays are electromagnetic and bring problems with them - for example, try building a relay computer with many relays. You will find that relays will interfere with each other in some cases. Transistors are not very EM sensitive. They do not emit much electromagnetic interference.
Relays consume a lot of current in the "on" state, most transistors do not.
|
H: If I'm amplifying a triangle or square wave, does the GBWP of my op-amp need to be higher?
I want to amplify a 4 MHz triangle or square wave by 2 using an op-amp. Do I need an ~8 MHz op amp, or a much higher rated (and more expensive) device to handle the harmonics?
AI: Short Answer- Yes. Minimum 3x the fundamental frequency for triangle and 5x for square wave. (9x gets you pretty good, low ripple answer for both)
Long Answer. Both of these waveforms are the sum of multiple sine waves. To get a reasonable (and your definition of this may vary) quality square wave, you need at least the first 5 or 6 harmonics (1x,3x,5x,7x,9x, and 11x multiples of the fundamental). If your opamp doesn't pass these frequencies, then you'll get distortion in the output.
The links below will show you how to build up triangle and square waves mathematically if you want to see for yourself how much fidelity you get for a given bandwidth.
References:
http://en.wikipedia.org/wiki/Triangle_wave
http://en.wikipedia.org/wiki/Square_wave
|
H: Powering laptop from 12V sources without inverter
This question has two parts:
1) How inefficient is it to boost 12V to 120V and then back to 12V as in using a traditional car power inverter to power a laptop (i.e. the 12V car battery power is boosted to 120V by a power inverter and then back to 12V by the laptop's power supply)?
2) Is there any way to power a laptop directly from a 12V car battery? This would be useful not only for use in a car, but also for a solar-powered home that runs on 12V batteries. If there is a significant gain in not going through the boost/buck cycle of power inverters, then it would seem wise to power laptops and other 12V devices directly from battery power. I realize that laptops have different power supply ratings and some require more than 12V, but it seems rather wasteful to boost everything to 120V before bringing it back down.
AI: Yes, tons of power is wasted going from 12V to 110V, especially when all you do is to stick it into a psu which also loses some power turning it back into low voltage DC.
You can buy a DC/DC converter which will deliver a 9-20 V DC adjustable voltage when given 10-24 V DC input.
I've built a SEPIC style converter before, for just this sort of thing:
http://dren.dk/carpower.html
|
H: What's a good spectrum analyzer to learn with?
I'm trying to learn more about building RF circuits and I want to buy a spectrum analyzer. I've looked around on ebay, and a lot of them are really expensive. I'm a student, so I don't have a lot of money to spend on it. What's a good model to buy since I'm just starting out?
AI: I use a spectrum analyser made from a kid's toy.
These are £4.99 in my local toy shop.
It's been handy for determining the operating frequencies of wireless sensors.
|
H: Getting started with robotics
My brother is a senior in High School. When he visited our college. I've took him to a robotics event (inter college robotics competition). He got to see various bots designed by college students and got mesmerised. Now he too wants to design bots like that.
I told him programming is necessary. He already knows little bit and I'm helping him in becoming proficient. But I've no clue regarding this field.
Can any one kindly suggest a path & tiny projects to improve his interest.
AI: See if there's a FIRST team at his high school. They're a great place to start learning about robotics and he'll get to actually make stuff. If not, something like a Lego NXT kit or Vex kit would be a good place to start. They've both got pretty easy methods of programming, and since they have pieces you put together, you don't need to worry about machining your own parts. That way he can concentrate on getting something actually working and driving around instead of designing electronics, fixing tough programming bugs, buying stock and milling parts.
|
H: Motor drivers and kickback diodes
I am considering buying one of the hbridge drivers referenced in the below tutorial, but when I looked at the comments underneath the second hbridges sparkfun page, kickback diodes were referenced and how one of the drivers has internal diodes but the other doesn't. I will be working with motors no more than 8V and much less than 1 A of current. Which of these drivers should I use and should I use kickback diodes with it also?
http://itp.nyu.edu/physcomp/Labs/DCMotorControl
AI: From the comments @ sparkfun (Specifically superbrad):
The L293D has internal flyback diodes, which catch what would
otherwise be high voltage inductive noise (sometimes even in the
kilovolts). With the SN754410, you must use external flyback diodes in
your H-Bridge.
Even though you might feel like you can get away with it, it's a VERY
bad idea to use the SN754410 without a flyback diode. It's not just
the driver you have to worry about, it's your entire circuit (MCU,
accelerometers, expensive XBee, etc.). Eventually, your luck will run
out, even if you don't turn it on and off frequently.
|
H: When a battery is your power source, what is ground?
For the sake of not incorrectly connecting my power supply and damaging my board I'm going to ask a relatively dumb question. Is ground on my board the negative terminal on my battery? Explicitly should I connect the ground to the negative terminal of the battery?
AI: Yes - just remember that your ground in that case will only be relative to the battery. If you go to connect this to another device (serial interface, etc) you need to link the ground lines so they're a common ground.
So long as it is isolated, you're fine.
|
H: Power brick with a high pitched whine
The powerbrick for my computer emits a high pitched whine. What could be causing the noise? Any way I can stop or reduce it?
AI: Switching power supplies use an inductor which can emit high-frequency noise. You can't do much about it, apart from replacing it. You could try disassembling the unit and injecting hot-melt glue into the inductor windings. That might dampen the vibration.
|
H: Can I burn out my multimeter's µA range by using a few mA of current?
My multimeter only has one 400mA fuse protecting the µA and mA range (and a 10A fuse protecting the amp range.) Is it possible to damage the microamp range by feeding milliamps through it?
AI: Multimeters use a precision shunt resistor to measure current indirectly (known R, measure V, calculate I). Typically a low current range (uA to low mA) will have a larger resistance shunt resistor to generate a larger voltage drop.
As a result, this larger resistance is no longer negligible at higher currents and begins to cause a measurable voltage drop. Additionally, the power dissipation can begin to cause resistance change and eventually it will kill the resistor. Typically, a fast-blow fuse protects the shunt resistor from continuous over-current.
If you're wondering if running 10mA through the meter while in uA mode will damage it, the answer is most likely "no". If you run 300+ mA through the meter, then you will probably be in danger of blowing the fuse. If you try to use the meter as a volt-meter and forget to switch the leads, and connect it to a supply capable of dumping a lot of instantaneous power, you might be able to blow the shunt resistor before the fuse blows.
|
H: I've done breadboards and programming, where is a good place to move on?
I have a decent (equivalent of introductory college level) with circuit design, all on breadboards, as well as programming on a variety of microprocessors and a couple FPGAs. I'm just wondering where would be a good place to go on from here in more advanced and higher level circuit designs, but I'm not sure if I'm at the point where I should make the jump to PCB layouts, or is there an intermediate step that's recommended? I was highly considering making something like Arduino on pcb.
I've also never actually used a soldering gun, and that's something I know I should learn, but I'm not sure really what kind of devices are good to learn that on, and circuits to do stuff like that.
AI: Try transferring the circuits you have been working on to stripboard. That will also get you soldering components. Don't get a soldering gun, BTW, get a temperature-controlled soldering station with suitable tips.
|
H: Error output for daisy chain flip flops
I am working to create a daisy chain Flip Flop circuit (following the asynchronous method of connection).
The Q output of a flip flop acts as the clock for the next Flip Flop.
module dff(d,clk,q,qbar,rst);
input d,clk, rst;
output reg q, qbar;
always@(posedge clk)
if(rst) begin q<=0; qbar<=1; end
else begin q<=d; qbar<=~d; end
endmodule
module dffchain(d,clk,q,qbar,rst);
parameter N=2;
input [N-1:0]d;
input clk, rst;
output [N-1:0] q, qbar;
wire [N:0] connect;
wire [N-1:0] qbarc;
genvar i;
assign connect[0] = clk;
generate
for(i=0;i<N;i=i+1)
begin: DFFL
dff DU(d[i],connect[i],connect[i+1],~connect[i+1],rst);
end
endgenerate
assign q[N-1] = connect[N];
endmodule
I am obtaining the following error: Line 21: Illegal expression in target
The Line 21 is dff DU(d[i],connect[i],connect[i+1],~connect[i+1],rst);
Why is the problem occurring, and what are best practises to avoid it in the future?
AI: The problem is that the expression ~signal is not an lvalue — an entity that can be assigned a value on the left-hand side of an assignment. Anything connected to an output port of a module must be an lvalue, like a bare signal name. That's why you're getting that specific error.
But more to the point of your actual example, why would you want to connect to both q and qbar? They are just redundant copies of the same information.
|
H: How does a diode-connected MOS device 'clamp' the voltage
Hi,
I'm having some trouble understanding how the diode-connected device M3 maintains a fixed voltage difference between VDD (source) and node X (drain)? In other words, why is it called a diode?
I know that diode-connected devices are always in saturation if they are turned on. But who says that their Vgs will be equal exactly to their Vth. Can't Vgs be greater than Vth for a diode connected deivce?, so then the Vdd to Vx difference will no longer be a constant Vth.
AI: Can't Vgs be greater than Vth for a diode connected deivce?, so then the Vdd to Vx difference will no longer be a constant Vth.
That's not the point here. The point is, for a given voltage difference between the gates of M1 and M2 there will be defined currents through M1 and M2 (sharing Iss). This current through M1 sets the \$V_{gs}\$ of M3 and thereby the voltage drop from \$V_{DD}\$ to point X.
So for a given input the voltage the voltage on point X is always \$V_{DD} - V_{gs}\$.
|
H: How to check whether an IC has gone bad or not?
My Question
I have unfortunately, had an incident with my the 74LS08 (And Gate) IC. When I accidentally powered it incorrectly, the IC started to heat, very quickly. I was powering it using an adapter from a wall socket (5V of input power).
I cannot remember exactly the wire up, however the IC was getting hot very quickly. I unplugged it from the mains and from the connection onto the breadboard. There seems to be no visible damage to the IC, however the area of the breadboard below it seems to have widened a bit (I was bridging it over the middle channel of the breadboard). There was also no smoke, or anything else apart from the IC heating and the breadboard damage.
My Question
So what is the best way to test whether the it is usable? I currently don't have a spare, so I don't really want to be throwing it away unless I can be sure that it is definitely dead.
Other Notes
I have checked out both other questions on whether an IC is fried, however I have seen no smoke or the like to make it obvious that it is definitely useless.
Datasheet
https://www.bitsbox.co.uk/data/7400/74HC08.pdf
AI: It's an AND gate. Give it two inputs from somewhere like buttons and observe output with something like LED or oscilloscope or multimeter.
|
H: How do modern CPUs treat memory operations?
How does a modern CPU treat memory reads and writes on the hardware level?
With old 8-bit architectures all memory locations are read and written to one byte at a time, but how do modern CPUs that have much wider data buses treat 8-bit memory?
What would a modern CPU like an x86 or ARM based CPU do if it needs to read and write a value in memory which width is less than it's data bus width? AFAIK modern architectures read and write memory in chunks, so would it read and write several memory locations at a time then?
AI: Most modern CPUs (except possibly for some small embedded ones) use multiple levels of data cache between the CPU and memory subsystem. Possibly write buffers as well. So single bytes might be written to the a write buffer or inserted into a first level cache line. But then entire multi-byte cache lines are read from and flushed to DRAM memory, level by level, before and after, at times dependent on various cache hit, miss, pre-fetch, and dirty flush algorithms. For IO, non-trivial PCI and on-chip controllers have different strategies for dealing with on-chip resources and devices connected to external pins that have physical buses with less than cache line or processor register size widths, using shifters and field extractors, etc.
The size of the actual physical buses (wiring) can vary widely within a single CPU or system, from many multiples of the register size, down to single bit serial. Some are data only. Some combine data with addressing and control bits. So there is hardware to decipher, serialize and deserialize, pack and unpack the bits, as needed.
The memory subsystem as well can have physical bus sizes that are very different from either CPU register size, internal bus sizes, or cache line sizes. All the way down to various serialized connections.
|
H: W5500 2-layer PCB or 4 layers?
I am in process of hiring a freelancer to develop a PCB which will incorporate Wiznet W5500 ethernet IC.
Some have suggested a 4 layer PCB, but some are saying it is possible in 2 layers.
As the board has many buffer IC's and other connectors which don't require 4 layers.
I am skeptical to take this decision and need help.
Please advice. Thanks!
AI: You may be able to make a board smaller in 4-layer so the square inches may compensate somewhat. 4 layer has dropped quite a bit in price in the last couple years, price starts to tick up considerably at 6 or more.
That said, 2 layer looks do-able. There was a layout here some time ago which has a number of examples of what not to do (pours are not great, power lines don't look great, crystals are very poorly and unnecessarily placed in relation to other lines). Make sure that the freelancer follows the hardware guide.
Personally, I would go for 4-layer unless I had a lot of confidence in the designer and budgeted enough of their time to take care with signal and power integrity (assuming they know how to do that in the first place). On the other hand, a novice following the guide would likely not have any issues with a reasonable 4-layer or more layout. I've seen some pretty slapdash subcontractors purveying their work online.
|
H: Troubleshooting I2C issues of ESP32-POE-ISO with LAN
i'm trying to read a I2C HTU21D from this breakout (schematics below) temperature and humidity sensor and send data to an mqtt broker.
I'm using PCA9306 in order to use 5V and go "far" (30m) from the main MCU PCB using CAT5E cable and RJ45 connectors.
The MCU circuit is very simple, one HTU21D, a PCA9306, 30 meters of cable cat5e and a ESP32-POE-ISO with another PCA9306.
The two PCA are used in order to go with 5V in SCL and SDA bus lines.
The cable has a capacitance of 56pf/m, so five meters are 1680pf in total, higher than the maximum I2C limit of 400pf.
I've used my logic analyzer to investigate and it seems that when i plug LAN to the ESP32-POE-ISO there are some logic spikes on I2C lines that produces those wrong measurements, tomorrow i'll post some screen of my oscilloscope
I'm using Arduino with the latest Espressif 1.0.4 Library.
The I2C bus speed is 10khz and there are external pull-up resistor of 10k on I2C bus (ESP32 side) and 330ohm pull-up resistors on the PCA9306 bus side.
Here is the schematic:
EDIT: 27/07/2020 - changed pull up resistors and added oscilloscope traces
I've replaced the pull-up resistors from 330ohm (as suggested) to 2k2ohm, here is the result:
Scope trace of 330ohm pull up resistors (SCL - CH1):
As you can see, the clock waveform is really sharpen, and has around 340mV of delta from 0V (i think that this could be a problem) - In this scenario, data reading works but it's unstable: like 10 measurements wrong every 100,
Scope trace of 2k2ohm pull up resistors (SCL - CH1):
As you can see, the clock waveform is a nice square looking signal and there isn't any delta from 0V, in this scenario the data reading works very unstable: 40 measurements wrong every 100
Any suggestion to solve that issue?
AI: The sensor can drive the i2C bus at up to 4mA as said in the datasheet. The 330 ohm pullups are far too strong for the sensor. The Adafruit module provides 10k pullups to 3.3V, and level shifting with 10k pullups to 5V. That is below 1mA, so the remaining pullups must only add up to 2-3mA. This means that the PCA 5V side does not need pullups as there is already pullups on the sensor 5V side, but you can put 1-2mA pullups there. The 3.3V side of PCA needs also pullups if the ESP does not provide them.
|
H: 3-to-2 line encoder (or generally 2^(n-1)-to-n) -- not priority, but telling how many inputs are on?
This is not homework (not taking any classes) although it could be homework. I am wondering what is the easiest implementation using a single TTL chip or gates (fewest chip count) to encode the number of input lines that are high. So, not a priority encoder that says which line is on, but how many of them. Truth table:
+-----++---+
|INPUT||OUT|
|3|2|0||1|0|
+-+-+-++-+-+
|L|L|L||L|L|
+-+-+-++-+-+
|L|L|H||L|H|
|L|H|L||L|H|
|H|L|L||L|H|
+-+-+-++-+-+
|L|H|H||H|L|
|H|H|L||H|L|
|H|L|H||H|L|
+-+-+-++-+-+
|H|H|H||H|H|
+-+-+-++-+-+
Sometimes I feel like really solving this myself, as I did in the most intelligent design of an encoder that determines the maximum number of consecutive lines but sometimes I have higher goals and don't want to waste the time. Especially nice if there was one single chip that can do that.
The final purpose is to add this number of the 3 inputs on or off to an existing 3-bit number without overflow, but rather a bounded sum, i.e., ..., 3+3=6, 4+3=7, 5+3=7, 6+3=7, 7+3=7. So, if there was one or two chips that can do that that would be cool. I'm designing Conway's Game of Life in hardware that can produce a new field in a single iteration at the speed of the display frame-rate, computed at the same time that the display scans the memory, and this particular bounded sum of up to 3 lines with an existing 3-bit value, is what my neighbor-count algorithm needs.
UPDATE: actually, this "bounded sum" adder is even more restricted, it is bounded at 4, i.e., no addition needs to produce a value higher than 4. Only 0, 1, 2, 3, and 4 are needed. Anything greater than 4 just yields 4. This definitely will make a difference in how many gates are needed. I feel it.
AI: The is a fairly standard building block when implementing a multiplier matrix (you are effectively "counting" the number of ones in a column). It's generally referred to as a "compressor" and there are various forms 3:2, 4:2, 7:3, etc. that wind up giving you what is called "carry-save form", ie. 2 numbers which must be added together.
Most compressors can be built out of cascaded full-adder blocks. The 74LS183 is a dual full-adder chip.
This definitely will make a difference in how many gates are needed. I feel it.
Unfortunately, your "feel" is not correct for the compressor. The problem is that a "1" can come from anywhere in the full number of bits. So, at some point, you may have to add bit 2^(n-1) to Bit 0 to get the count. That means that somehow you have to cascade all bits together so the number of gates is fixed.
Once you have the carry-save format, you have to add the two pieces together. Your "bounded sum" is called a "saturating add". Yes, you can probably save some gates at this step as you don't automatically have to add all the positions (if there is a 1 in any position above the saturation point you can just return MAX). However, that doesn't save you as many gates as you think (you still have to OR all those bits together).
However, if you are implementing in TTL you'll be better off using something like a 74LS382 (or 74LS381) and just add things up to minimize the number of chips. And possibly a 74LS85 binary magnitude comparator to get the saturate.
Good luck.
|
H: High voltage PSU resistors
I've looked at a dead power supply and see transistors, ICs, an optocoupler, etc and have come across what the board says are resistors[ R<#>]. Resistors that I've come across are the typical 3/4/5 band DC ones. I'm guessing these are high voltage resistors though I don't know the real term for them.
Resistor 1 looks like a relay but with "0.18ohm", so it's a resistor.
Resistor 2 looks like a resistor but with none of the bands (which I guess comes with the territory of high voltage resistors).
The question I'd like to ask is are these actually resistors? And if so, what is the right terminology for these? Furthermore, what are the differences between the two? I tried testing them out with a multimeter and got really weird values.
1: while holding the two leads for resistor 1 and testing the resistance, I get 0.3ohms. When I put it on the table and measure it, I get 1ohm].
2: while holding the two leads for resistor 2, I get 0.4ohms. When I put it on the table and measure it, I get 0.9ohms.]
3: When I test for continuity, I get a beep for both resistors.
At this point, I'm terribly confused and am thinking I've been testing resistance wrong, or my understanding of resistance is wrong (or even both).
Or am I testing high-voltage resistors wrongly?
Can someone point out if I've done something wrong?
AI: All these are power resistors. Although they may have high voltage (relative to ground) on them, they obviously cannot have high voltage across them or they'd glow with the incandescence of a pottery kiln.
The first one may be a wirewound cement type with a ceramic casing. May or may not be inductive (which affects their usefulness as fast current sensors). The other two are probably MOF (Metal-oxide film) types.
You are likely getting inconsistent readings on your multimeter because most inexpensive multimeters don't do very well at measuring low resistances. If you just short the leads you'll often get a reading of several tenths of an ohm, and not necessarily all that consistent. Then there is the contact resistance with the probe tips.
Ideally, to get an accurate reading and verify the +/-5% tolerance of those resistors you would want to measure them to perhaps +/-1% or better, or in the 1-2m\$\Omega\$ range. To do that you would use 4-wire measurement techniques. Better bench multimeters will have that as a built-in function but you can do it with two reasonably good handheld meters and a power supply by putting (say) 0.5A thorough the resistor from the ends of the leads and measuring the voltage inboard of the current leads (say on the 200mV scale). If the resistor drops 90.0mV then the resistance is 180m\$\Omega\$.
The continuity function on multimeters causes a beep below some finite resistance, perhaps 40\$\Omega\$, which allows for probe and contact resistance etc.
|
H: How to strongly fix N-type connector to thick RG cable?
Can someone tell me what kind of solder or conductive hardening paste is used here to fix the inner conductor of the cable to the pin. I tried soldering of the pin to such cables with tin, but this does not stay fixed when applying stronger tension to the RG cable and the rf-matching box is not able then to match impedance.
This solution (silver like glue from inner conductor to pin) looks professional und not soldered, but what is used here and is there a good tutorial?
AI: I use paste solder, a SMD rework hot air gun with a small nozzle and a soldering iron to solder center pins in coax connectors (for connectors that do not allow crimping).
Fill the pin with paste, apply extra to the wire near the pin, heat up the pin and conductor, then hit the conductor (not the pin) with a hot iron and some additional solder to complete the joint. This helps to produce a good joint without getting solder on the outside of the pin, which usually prevents assembly of the connector
|
H: Making a circuit entirely with 4:1 MUX, 2-input OR gate and NOT gate
I'm stuck on this question for half of a day. Let's say I have this function
That's everything I know about it. Now I must implement it using only 4:1 MUX, 2-input OR gate and NOT gate. I've tried to look at the truth table and create a circuit, but it uses a constant and AND gate, which is forbidden in my case.
Is there any convenient way to solve this problem, instead of trying to guess it?
AI: You're nearly there. Your solution uses the mux to select rows of the K map and then you generate the correct function for each row.
If you instead use the mux to select columns of the K map — i.e., connect "y" and "z" to the select lines — then you can generate the function for each column: column zero is just "x" and column 1 is "w+x". In other words, the only other gate you need is the OR gate. The NOT must have been thrown in as a red herring.
|
H: How can I generate overflow condition from a 74'283 or 74'181 adder without an output pin of the carry-in of the MSB?
I've been building my own CPU from low level chips, using the 74LS283 adder. And I've been wondering about how to set the overflow flag. Finally I seem to have grasped that the overflow flag is the carry-in of the MSB xor-ed with carry-out of the MSB. See also https://stackoverflow.com/questions/29330787/signed-overflow-why-carry-in-and-carry-out-of-msb-should-match. But I wonder how I could even know the carry-in of the MSB when I use the 74LS283 adders?
I suppose with the '181 ALU, there are signals !P and !G. From the datasheet:
P (Carry Propagate) and G (Carry Generate). In the ADD mode, P
indicates that F (result) is 15 or more, while G indicates that F is
16 or more. In the SUBTRACT mode, P indicates that F is zero or less,
while G indicates that F is less than zero. P and G are not affected
by carry in.
this sounds like it might come close, but if I interpret the 4-bit numbers as two's-complement signed numbers, then 15 is already -1. In subtract mode this might work. But what about signed addition overflow?
There is another related question here: How to determine if a Carry Look Ahead Adder Overflows but it seems to have only allusions and comments that speak about precisely the problem that the carry-in to the MSB is hidden inside the package.
AI: You don't need to see the carry in, you just need to see the result. If the carry out and the MSB of the result (i.e., its sign) are the same, there was no overflow. If they are different, there was an overflow.
EDIT:
Note that if the signs of the input operands are different, it is impossible to have an overflow. So the complete solution is
$$ Overflow = \overline{(A_{MSB} \oplus B_{MSB})}\cdot(SUM_{MSB} \oplus C_{OUT})$$
You can also think of it as a parity operation on the above four bits. If 0, 2 or 4 of them are set, there was no overflow. If 1 or 3 of them are set, overflow.
$$ Overflow = A_{MSB} \oplus B_{MSB} \oplus SUM_{MSB} \oplus C_{OUT}$$
Note that these two equations are not exactly equivalent, but because of how the adder works, the differences are all "don't cares".
|
H: Can you program an attiny 85 after is soldered to a board?
I'm developing a project that involves an attiny85 that is already soldered and with several components and sensors connected to it (on the PCB)
Can I program the attiny85, with the other components connected to it? Or should I preprogram it before soldering to the PCB?
AI: It depends on your circuit.
You need to make sure nothing puts voltages on programming pins (PB0, PB1, PB2, RST) while the programming is in effect.
If you design your circuit such that those pins are connected to LEDs or normally open pushbuttons, you will be able to reprogram it just fine.
If you connect other devices to those pins, you'll need to disconnect them somehow.
For example, in one of my devices I had a piezo speaker between PB0 and PB1. In order to program in the circuit, I had to put a jumper in series with the speaker, and remove it while programming.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.