texts:
I am trying to make some pins act as input in PIC32MX795F512L.

I am doing like this

TRISEbits.TRISE9 = 1
TRISBbits.TRISB5 = 1
TRISCbits.TRISC13 = 1

So I making above pins as input. But when I debug my code, all the pins of PORTE are acting as input whereas I have only made PINE9 input. Same is happening with other PORTS.

What could be the reason for this.?

Also I want to know that what is the default status of PIN(input or ouput), when we don't make it input or output.? I am really confused at this point. Please help.?


texts: Transformer Insulation - High Voltage can Jump Through Ferrite Core?

texts:
First of all, I really searched the topic on both EE.SE and Internet but could find nothing. If this is asked before, please forgive me.

As I stated here earlier, I was working on an HV amplifier. We built the circuit but before testing it with the output transformer I first wanted to measure the insulation resistance of the transformer.

The guys have wound the transformer's primary and secondary across the marked pins below (i.e. primary across the red ones and the secondary across the green ones):

Measuring method: Descibed in the picture below:

simulate this circuit – Schematic created using CircuitLab

METER is a device consisting of a variac and an adjustable current threshold. If the measured current is close to the threshold then a warning lamp lights up. If the measured current exceeds the threshold then METER activates its breaker. So we rate the insulation voltage as the maximum voltage before the failure.

According to the method above with 5mA current threshold, the insulation voltage of the transformer was about 1kV which is quite low to me. Because I want it to be at least 2kV.

One of the collegues told me that it's due to the low distance between pins and the core. So I moved the windings start and stop pins to 3-4 and 9-10, respectively, which have higher distance to the core. After that modification, I measured the insulation voltage as 1.5kV.

I cannot explain this! How is this even possible? If it was an iron-powder core then I could explain this, because it contains "iron". But this is soft ferrite (MnZn - Manganese and Zinc) and it does not contain any "conductive" materials, doesn't it? Can high voltage really jump through the ferrite?


texts:
I have the following problem:

MY ATTEMPT

Okay, I've found two formulas that will definitely help me solve this problem:

The first is \$S=\frac{N_s-N}{N_s} \$, where \$S\$ is the slip, \$N_s\$ is the synchronous speed, and \$ N\$ is the rotor-speed.

The second formula is \$N_s=\frac{120f}{P}\$, where \$ f\$ is the frequency and \$P\$ is the number of poles. Combining these two formulas and isolating \$N\$ we get:

\$N=\frac{-120Sf}{P}+\frac{120f}{P}=\frac{-120 \cdot 0.05\cdot350 \text{Hz}}{8 \:\text{poles}}+\frac{120\cdot 350\text{Hz}}{8\:\text{poles}}=4987.50 \: \text{RPM}\$

So a rotor speed of 4987.50 RPM. But is this what is meant when they ask for the "ideal unloaded rotor speed" or have I calculated something different?

I hope someone can clarify this for me.


texts:
I've a small question about TRIAC operation.

If I've a TRIAC with IGT=5mA, Ih=10mA and IL=20mA, driving an AC Load (230VAC 50Hz).

I know that if I send a 5mA pulse to the TRIAC gate, it will be ON until load current falls under 10mA.

I also know that if I send a 5mA pulse to the TRIAC gate, load current must be at least 20mA when I remove gate current to keep the TRIAC in ON state.

But what's going on when I continuously power gate with 5mA ? Does the TRIAC able to provide less than 20mA (or 10mA) to the load ? Or Ih/IL are absolute minimal current going through the TRIAC ?

Many thanks for your answer and sorry for my bad English.


texts: Can this RVDT be wired in a 3-Wire RVDT Configuration

texts: Hello I have an RVDT and was wondering if it can be wired in a 3-Wire configuration. Here is the RVDT I have. I thought by combining the blue and green wires it would be the same as a 3-Wire.


texts: What sizes are detectable from 1m using a fairly good cmos camera?

texts:
I haven't ordered a CMOS camera module yet, but I am planning to use it to detect a small object from ~1-1.5 meters.

Just too be specific, say I am using the following CMOS camera (although if you know there is better with around the same price I'm open for suggestions):

its 1920*1080p, 120fps(this may reduce the resolution), I plan to use it ~90 degree viewing angle (I had the impression that its adjustable). Lens is "2.8-12mm varifocal". I have no idea about DPI.

Considering other factors are satisfied (such as illumination, colors), what size of objects will I likely to be able to detect in image processing? Would a 2cm object be detectable for example? Is there a way to estimate what size would correspond to a pixel in 1m distance?


texts: Transformer labeled 120v-60hz-35va-12v - What exactly does it do?

texts:
I have a pool light whose bulb physically broke, but I've found a way to open the water-tight bulb enclosure to get at the actual bulb. I'm trying to either hunt down a replacement bulb (rather than the whole expensive assembly) OR make some LED magic.

Either way, the transformer's somewhat permanently mounted and I'd like to use it as it's already there, water-tight, and has the specific fitting to match the pool light flange.

I just can't figure out what 35va-12v means, and google didn't really help. I assume 35VA means 35VAC, but 12V is a common DC voltage and it's on there too!

Of course, I tested it and I actually get 14 VAC. How would I, in the future, know that based on the label? Is there a spec for this kind of stuff?


texts: Dual Dc regulated voltage circuit design

texts:
I'm working on my term project which is designing a dual DC regulated voltage that gives a DC voltage between +or-ve 3 to +or-ve 15. I have completed the testing for positive DC output part, but I have few inquires. (refer to design image below first please)

First for my choice of resistors values in the regulator part R3,R4, and R5. For variable resistor R4, since I'm given a potentiometer of 10K I have choose that value, but the other two resistor I used this formula taken from LM317 regulator data sheet

v0 = 1.25v(1+Radj/R1)

My question is does the values of R3 =1.1k and R5=1.5K practical for the real implementing of the circuit? is it logical?

Also, when I tried to test the negative DC out voltage it's not correct although I have used the same design done for the positive DC?


texts: Can you damage an iPhone by charging it using a (homemade) solar panel?

texts:
I found a guide online that shows how to make a solar phone charger (in a bottle), and I thought I'd try it out, but I'm worried about damaging my iPhone 4 (for a school project).

(If anyone's interested, it's found here: http://www.instructables.com/id/Solar-7-up-Solar-phone-charger-in-a-bottle/#intro)

But basically you use small pieces of solar cells (the author of the guide calls them "solettes") and superglue them together in series (so it's not exactly a solar panel; it does what you need though). 11 solettes are needed.

I purchased them on eBay as 52x19mm solar cells; the seller gave the following information for each:

Average Power (Watts): 0.14 Wp

Average Current (Amps): 0.28 Imax

Average Voltage (Volts): 0.5 Vmax

Effeciency: 17.6%

Everywhere I looked said iPhones need 5V since it uses a USB charger, so as the guide says, you'd need ten 0.5V solettes, plus one " 'false' solette that doesn't produce electricity but just serves to bring do the top surface connections to a solette underbelly". To my understanding, amps and watts don't really matter, the volts do (I think higher amps/watts just mean it would charge faster)? I'm really new to all of this.

Anyway, the voltage will probably differ a bit from the required 5V and also the amount of sunshine you'd get would change things a lot, so I was wondering if getting the wrong amount of voltage (and oftentimes - when the sun isn't shining - less voltage) could damage my phone.

A lithium battery and a lithium charge chip or board is also needed. The author used a 2000mAh LiPo. The guide says:

  In order to power the LiPo charge circuit, which then pumps current into the LiPo battery, which then charges your smartphone, we need to produce 4.8V - 6VDC from our homemade solar panel.

I was wondering if it was possible for someone to explain this part a bit. The cheapest rechargeable 2000mAh LiPo battery on eBay is a 3.7V one (others have 11.1V, others have 7.4V, etc). Can I use any kind of battery? And what I don't understand is if the battery has its own voltage then isn't the amount of volts that goes to the phone 3.7V (from the battery) rather than 5V (from the solar panel)? I'm sorry if this is a stupid question, even a link or something would be sufficient, I couldn't find an explanation online myself.


texts: Wireless water level sensor, in sump. Installation best-practices for longivity

texts:
My wireless water-level sensor is working fine, and when deployed in the sump-well, it is giving me periodic readings quite well. At this stage, I have the circuit still on a breadboard, and now plan to put it on a veroboard, and finally install this thing in the sump-well for long-term reading purposes.

There are few challenges I am facing and few that I am perhaps imagining. Thus looking for answers on how to fix / work-around.

The sump has an iron cover. The ISM band ASK/OOK transmission cannot be detected, even 5 feet away, when the iron cover is closed. With the cover open, I am getting a decent range of about 20 feet, which is what I need.
I had left the circuit installed for around 36 hours, and next day when I took the circuit out, I was surprised that it was still working and had not shorted out. It was full with in water-drops that had condensed overnight. The iron-sump cover is a dark shade of brown, and gets extremely hot during the day, in the sun. In the night, the temp drops significantly, and thus the result.
Given how how it gets inside the sump in the day (I've not measured, but I'm guessing that it'd get like 50-60 deg, with relative humidity above 95%, in the sump), what can I expect about the life of my 4S AA batteries ?

Due to these challenges/observations, I am think of splitting the circuit into 2 parts, i.e. the ultrasonic sensor, mounted on a tiny PCB, with the soldered/exposed pins all potted with hot-glue. This part stays inside the sump. The rest of the circuit is housed outside the sump, in an IP66 type of enclosure. The enclosure kept outside, would let the RF TX work well, keep the batteries in saner temp, avoid excessive condensation. Of course, here the challenge is, how to wire the 2 parts together, as the wire coming out of the sump, will have to avoid being damaged by the sump cover crushing it, once closed tight. One problem with this is, I cannot keep the IP66 enclosure within 5 feet of the sump, so the wirelength might become an issue (?)

Should I alternatively, just do something to keep the RF TX antenna outside the sump ? But won't the wire of the antenna extension, alter the antenna behaviour (altered gain for the necessary frequencies) ? If I do this, I still don't know, how to address the water condensation issue. Or how well the batteries would do.

Edit:
Finally, I am not sure, if the water condensation will (and how badly) impact the ultra-sonic range sensor itself, i.e. the transducers themself, as those need to remain exposed. I can imagine a drop of water (from condensation) hanging on the transducer and easily throw-off the readings completely. No ?


texts:
I have a new intercom that requires 12V when the ring switch is pressed, but my ring wire does not supply voltage, it just loses its resistance (it is grounded.)
What circuit do I need to turn on voltage when the input is grounded? P MOSFET? I am not an electronics engineer, so I would need a complete circuit diagram.
I have another wire (for the microphone) which delivers 12V. Maybe I can switch this voltage to the ring when the switch is pressed.


texts:
I will need to connect several PCBs within a single enclosure for the project I am working on (They are split to reduce cost should there be a manufacturing error).

I need to connect an I2C Bus, 5V , an analogue and 3 digital signals (and importantly, the ground plane) from each 'slave' board to the master.

Is there a universal connector that would be appropriate for all of these signals?
I am also under the impression that I want as 'wide' a connection for the ground planes as possible (Multiple connection points?) to reduce RF emissions?

to clarify: all of the digital signals are 5V logic, either from a PSOC, arduino or a CMOS chip. The analogue signal is 0-5V.
Signal integrity of the analogue line is a priority as I cannot connect the external reference signal to the line due to pin restrictions and am relying on an internal reference.

The PCBs are 35mm Wide (Though I will take them down to an inch if I can manage), will be placed basically touching each other, and arranged like this:

. _____________________
|######MASTER####   |
|____________________
| # S #  |# S # | # S #  |
| # L #  |# L # | # L #  |
| # A #  |# A # | # A #  |
| # V #  |# V # | # V #  |
| # E #  |# E # | # E #  |
| # # #  |# # # | # # #  |
|______|______|______|

Sorry for the bad ascii art, I made bad paint art but couldnt attach it.


texts: Track loader actuators: Provide reverse capability for two DC motors, on board snow blower attachment

texts:
I bought a 7 ft wide John Deere snowblower and want to use it on an ASV track loader.  The two companies use different strategies for running electrical units on attachments.   This requires wiring up special electrical devices on the attachment to run it using my Joystick in the ASV Loader.   The pigtail leading outside the loader to run the two DC motors has:
4 wires each of which is energizable via a dedicated, momentary button on the joystick, and
2 ground wires.
The two 12 volt DC motors operate the snowblower accessories to 1) rotate the snorkel exhaust tube either CW or CCW to redirect snow Left or Right of machine and 2) move a deflector plate up or down on the exhaust exit port .   This physical movement is done by reversing the polarity of the two motors on a momentary basis-- 2 or 3 seconds each time.
Wiring available on the input side of the snowblower is simply the two wires from each DC motor, no grounds-- 4 wires total.
After discussion with ASV technician I concluded the only way to accomplish this is to use two relays for each motor.  (To me, this sounds excessive, as an accomplished rookie at electrical work.)   I generated a crude relay diagram to operate just one motor, attached.
To assist me it would be most helpful to:
-- Suggest ways to simplify: a double coil relay?? Is there such a thing?
-- Suggest a better way altogether.
-- Actual model numbers or specific types and brands of relays (plan on sealing in a small box and mounting on the attachment, probably see a lot of weather)
Thanks!


texts: Frequency response of MCU decoupling capacitor

texts:
I'm designing a board that contains an MCU and an 8 MHz crystal. I was planning on keeping the MCU power/ground localized and isolated from the main power supply power/ground except at a single point. I understand that for this scheme to work, the MCU decoupling capacitor must provide a low impedance path for high-frequency currents drawn from the MCU.

Does anyone know of any rules of thumb for acceptable frequency response for a capacitor used for this purpose? I'm using a 1uF ceramic through-hole (should probably use surface mount but I've got these things lying around) with the following frequency response:

I'm a little worried that it becomes inductive at only 2.5 MHz. Will this capacitor serve its intended purpose of decoupling an MCU run from an 8 MHz crystal?


texts: I have the following differential pair circuit that is designed to have a diff gain of 4 V/V and a power consumption of 1mW. The transistor should be biased to have a Veff=0.3V and should have a length of 0.25um. With uCox = 270 and Vt=0.45V. I should determine W in the transistors and the values of RD and Ibias. Do you have any idea of how can I find these parameters? I have some equations but I got to a point that doesn't make sense. Where should I account on the consumption power?


texts: Does there exist a digital wireless broadcast protocol?

texts:
EDIT: Thanks very much to @pjc50, @dave-tweed, and @MoJo For their valuable comments. I apologize for the ambiguity of the original question. I've made edits below to clarify.

I am in search of a wireless communication protocol purpose-built for broadcast digital communications. I've looked at Bluetooth 4.0 Connectionless L2CAP mode, and ZigBee unicast operation; neither support enough data throughput, or sufficient range.

EDIT: I have the following application in mind: A digital broadcast that could support a very dense area of receivers in about a 1km radius, for example in a stadium during a sporting event. I expect the operating environment to be extremely noisy on the 2.4GHz band; again, think a stadium during a sporting event. A central tx unit will be installed at the event. Receivers will be battery powered dongles that receive data, and transfer it to a smartphone via Bluetooth.  In terms of bandwidth, I'd like to support 1 channel of streaming audio, along with asynchronous (5 seconds of delay is fine) data, probably including images. The transmitter will broadcast live audio, along with asynchronous data. More recently published data will be broadcast more frequently, and the re-broadcast frequency of previous updates will decay over time.

Requirements:

Supports generic data transmission
Resistant to interference
Capable of supporting transmission on arbitrary spectrum OR operates on unlicensed spectrum. EDIT: I totally understand that no one will sell me a transmitter that I can tune to the frequency of my local airport tower. I mean that it should allow operation on an unlicensed frequency, within applicable tx power restrictions.
Data throughput of ~2MBps possible. EDIT: Excuse the preposterousness of the previous data rate. 200 Kbps would be lovely.
EDIT: Additional requirement: True unidirectional, connectionless broadcast operation. I am hoping to design something that will support 1000s of simultaneous receivers.

The following would be nice to have.

A full stack protocol, like Bluetooth or IEEE 802.11 that handles both the physical and link layers.
Implemented in commercially available ICs.

I've been searching the web for a while, but all references I can find assume digital video transmission, rather than generic data.

Thanks for your attention.


texts: How is the emitter current kept constant in common base BJT?

texts:
While studying the output characteristics of a common base BJT I had the following question:

How is the emitter current kept constant? Do we ignore the early effect, if so then why?


texts:
So I'm trying to do some insane home DIY with my room blinds. I'm trying to make them adjust (go up and down) automatically.

Now for this, obviously, I will need a motor.

The blinds I'm working with don't require much strength to pull down, but a fair bit to pull them up (using the little string/cord), So I'll need something fairly powerful, but slow.

I'm taking a look at a few gear motors on this site, but I have no idea which one would be right to use for this kind of task.

Could anyone help me out?


texts: Synchronise crystal oscillator with external short burst

texts:
I am trying to generate a stable 4.43361875 MHz clock (i.e. PAL colourburst) synchronised to the colourburst of a PAL video signal.

In a PAL signal the colourburst is provided for only about 8-10 cycles near the beginning of each line. So, I need a way to start the oscillator immediately on the rising edge of this clock source so they are in phase with each other. Once started, it can free run to keep the colour reference frequency accurate for other parts of the system.

I've thought about using a low end PIC24EP64GP202 to do the timing stuff (thanks to its onboard PLL and easy availability), but I can't think of a way to get its oscillator to start on a rising edge input. Is it perhaps possible to "pulse" the crystal with this incoming colour burst (so it rings for a few cycles) and then let the PIC take over? Perhaps it's possible, once running, to change the phase of the system clock?

I've noticed the PIC has a rated 1024 cycle start-up time, but I wonder if that's simply the lock-out period in which the processor doesn't get any clocks but the oscillator still runs fine.


texts: Confusing oscilloscope calibration signal

texts:
EDIT: See last paragraph

I recently got a cheap 2-channel oscilloscope (Hitachi V-212). Judging from the "calibration not required" sticker on the front, it's been beaten up and/or neglegted (by the police, no less!) for several years.

I've found the relevant service manual and have correctly adjusted the really easy things like DC offsets etc (and don't worry: I'm staying away from the high voltage CRT end).

However, I don't understand what's going on with the calibration signal. It claims to be a 1kHz square wave and the loop sticking out the front is marked "CAL .5V". There are two confusing things:

When I connect up a X1 oscilloscope probe between the calibration and the input, I don't get a square wave at all. Instead I get sudden jumps in both directions from zero (presumably the leading edges) and a fast exponential decay back down to the middle. (I would take a photo, but I don't own a digital camera - sorry!)
Also, the "square wave" is best visible when VOLTS/DIV is set to 5 or 10mV. This doesn't seem to agree with the "0.5V", but the service manual suggests checking x1 AC GAIN by settings VOLTS/DIV to 10mV and connecting to the calibration signal, so maybe I misunderstood something.

I'm not too concerned about the second part - it's something I don't understand rather than something I want to fix... But can anyone tell me what's wrong with my "square wave"? Am I using my probe wrongly (it's an adjustable x1/x10 probe, but I have it set to x1)? Or could the calibration signal be wrong? Or is it the oscilloscope's actual measuring system?

I've used oscilloscopes (some time ago) at school, so I understand vaguely how things work, but (of course) they were all in good nick so I've never had this sort of question.

Thanks for any help!

EDIT: Hmm, I just tried a different probe and everything looks fine (ie very slightly like the blue trace in stevenvh's example, but easily fixable). I take it that something's wrong with the probe.


texts: What is the rectifier's role in this AC dimmer circuit?

texts:
Here is a typical AC dimmer circuit:
http://www.eleccircuit.com/wp-content/uploads/2010/09/light-ac-dimmer-120watt.jpg

I just came across another variant which uses a rectifier:
http://www.electroschematics.com/10115/triac-lamp-dimmer-snap-on/

I was also wondering why there was a rectifier in a AC fan speed control circuit in one of my previous question:
Controlling a single phase AC fan with a 0-10V DC input

What could be thathe job of the rectifier in the AC dimmer circuit schematics above?

Could it that be the rectifier in the previous question's circuit was used for the same reason?


texts: Capacitor selection with multiple regulators

texts:
I'm working on a circuit that needs three voltage regulators: +24VDC, +12VDC, and +5VDC.  The power input is +28VDC from a bench power supply.  The +24VDC regulator is a 78M24.  It is supplied from +28VDC and the load is off-board and typically 120mA.  The +12VDC regulator is a RECOM R-7812-0.5 switching regulator in a 3-terminal package (pin compatible with a linear 7812).  This is also supplied from +28VDC input, and the load on this regulator is typically 125mA.  This includes an off-board load and the load of the +5VDC regulator, which is a 78L05 whose typical load is 20mA.

I have specified capacitors according to the 3 regulator data sheets as shown in the circuit. C5, C6, C7, and C8 are ceramic.  C9 is aluminum electrolytic, for higher ESR, per the data sheet.  My question is, do I need any additional bulk or reserve capacitors at the input, outputs, or in between the +12VDC and +5VDC regulators?  Many thanks for your help!

Added:

I have several follow on questions. The first answer mentions that a low ESR cap should be on the output of each regulator. Does that include the switching regulator (U8)? That data sheet specifically excludes low ESR on the input side, but says nothing about the output. Also, wouldn't changing from a 100nF to a 1uF on the output reduce the high frequencies that the cap bypasses? With regard to the input of the regulator, my understanding is the ceramic caps on the inputs are required for stability of the linear regulators (U9 and U10). Would bulk caps on the +28VDC net also suffice to provide bulk input capacitance to U9?  Or does a bulk input cap for U9 need to be on the +12V net? Finally, since both U8 and U10 are supplying power to loads off-board, do they need bulk caps on the output? Many thanks again.


texts: Why would you stack a resistor and capacitor on top of each other?

texts:
I've inherited an charge amplifier/shaping circuit from my predecessor.  When he wanted to make a low-pass filter with current-to-voltage conversion, he had a standard circuit like:

simulate this circuit – Schematic created using CircuitLab

He would make a single footprint for R9 and C11 and solder them on top of each other like this:

What reasons could he have had for designing the circuit this way?  I have not seen this particular technique anywhere else.  To my eye, it looks problematic, both from an assembly point of view as well as for minimizing the capacitor's feedback path.  For what it is worth, the circuit is meant to deal with extremely short (~4ns) pulses.

Edit:  Thanks for the insightful comments!  The idea behind this circuit is, indeed to widen the pulses generated by, in this case, a PIN Diode.  The capacitor is COG +/-10%.

To expand on my confusion regarding this circuit, I agree that parasitics are changed by stacking.  But I should have mentioned that the capacitor and resistor are both 0603 (if it wasn't clear from the picture).  I'd have thought that if the designer were concerned about parasitics, his first step would have been to reduce the component size.

I'm correcting some other issues with the board and wanted to make sure I wasn't missing something critical in this stacking business.  Thanks again for the useful insight.


texts: Solving DC Operating Point of Common Source Amp

texts:
My lab partner and I are really stumped. We are given a circuit that has a FET with a \$V_{DD} = -V_{SS} = 15\mbox{ }V\$. We are told \$A_V = 20\$ and \$I_{DS} = 1\mbox{ }mA\$. The DC circuit is straightforward, containing an \$R_D\$ and \$R_S\$ between \$V_{DD}\$ and \$V_{SS}\$, respectively, and the FET drain and source terminals. There is a resistor \$R_G = 1.5\mbox{ }M\Omega\$ on the gate terminal of the transistor, connected to ground on the other end.

We are asked what the DC current through this resistor (\$R_G\$?) is. We are then asked what \$V_{OV}\$ is. It seems to imply that we only need values that I have outlined so far, but maybe it would require values from a data sheet too, I'm not sure.

Then it says, using \$V_{GS}\$, which I would know how to calculate if I knew \$V_{OV}\$, to calculate \$R_S\$. It also says we don't know \$V_{DS}\$ nor \$R_D\$ yet.

Any help would be appreciated. I have tried reading the notes and textbook, but I can't find what I need. I would also appreciate any sort of good sources/guides to this, if you don't want to just give me the answer. I too, would like to understand so I feel less like a cheater, haha.


texts: Is it possible to lower an ADCs input range?

texts:
I'm trying to use an ADS8504, a 12-bit ADC, and get as good a resolution as possible. The ADC accepts inputs in the range of +-10V.

However, my circuit is limited to only having a power supply of 5V via USB (I've already manage to produce a -5V source), as such, even though I'd want to amplify the desired signal to +-10V, the maximum I'll get is +-5V.

So my question is if there is any way to change the input range of the ADC so it will only consider +-5V as the conversion range. i.e: go from 10V being +2048 and -10V being -2048 to +5V being 2048 and -5V being -2048.

I've gone through the datasheet and haven't been able to figure out a way to do it. There is a part that talks about calibration, but I'm not quite sure if the trimming circuit provided does what I'm looking for or if it's for something else entirely.

If it is possible to remedy the same issue through software rather than hardware, it would also be good to know.

Any solutions are appreciated.


texts: Identifying the polarity of the aluminium electrolytic capacitor

texts:
I have the following device - polar electrolytic capacitor (it is/was having stripe on its sleeve):

I know its capacitance and voltage rating - 2.2 uF / 400 V, but accidentally removed the remainders of the sleeve so it is not clear where + and where - are.

I have found this question, and tried with 220 kOhm resistor, tried with 10 kOhm resistor, and can not understand the result. I have Fluke multimeter, and it seems to measure only tens of mAs. In both cases above I see it measures approximately 20 mA in both direction when connecting non-charged cap, and then current quickly goes to 0.

Is it multimeter issue - I need more sensitive device? Is there any other way to identify the polarity?

  Are you certain that this is a polarized ("normal") aluminium electrolytic?

Yes.

  Did you measure case resistance to -ve lead?

Yes, both pins with case in all directions go to infinity.

  Throw it away and buy a new one.

Bad idea, I can not find a replacement of the same size (6x11). I would try to reuse it, as I suspect it is of good condition (but I can not measure it, do not have such measurement equipment).


texts: i want to operate a normal 220V/50hz Air conditioner at 115V/400HZ system

texts:
I have a AC inverter board . in the start ( imean before converting AC 220v to DC 310v ) a filter LC pie filter is used .  as we know the operating voltages of AC is 220V/50Hz  for normal air condiotioners.
my question is that i just want to operate this AC interver circuit at 200Vac/400Hz .
what i have to do ?
im thinking to change the filter circuit for 400HZ frequency .
If any one know about,  how can i operate our normal  220V/50Hz system by using Aircraft supply
115V/400Hz ??
please help me


texts: Why does a mains appliance give a shock after it is completely unplugged

texts:
My wife has a food processor, bought a few weeks ago, powered directly from the A.C. mains, i.e. not via a "wall wart" power supply, and, after it has been switched off at the wall and fully unplugged, she experiences a slight, but significant shock -- more than a tingle, if she touches the pins on the plug as she packs it away.

Please, how does this happen? It seems almost as though a capacitor has remained charged, but I do not understand how this can occur on the A.C. input pins. Also, is it a fault with the appliance that means we should return it to the retailer as dangerous?

Following up from the accepted answer, thank you, could I or should I, and I know enough to do this safely, connect a high ohms value resistor across the line to neutral to discharge the capacitor?


texts:
I want to increase the armature contact time with pin 87 of any relays when coil is energized.

For instance, if the initial armature contact time is 2 seconds with 87 pin, how to increase the contact timing by 3 or 4 seconds?


texts: Switching power supply simulation problem

texts:
I'm building a 5V power supply using MC34063 IC. Before I build a prototype, I want to simulate it in Proteus to see if everything works correctly. Here is the schematic:

It is done according to the datasheet for the IC (page 7), which can be found here:
https://www.onsemi.com/pub/Collateral/MC34063A-D.PDF

Transformer is 10:1.
However, when I start the simulation I cannot finish it (whole thing goes off after simulation of 100msec). Is there something wrong with the schematic? Thank you for help!


texts: How Do I Make sure That IR Emitter signal Reached Receiver?

texts:
I am a trying to make a TV remote with one improvement that if the receiver doesn't executes the command, my remote should be able to broadcast the signal repeatedly until executed.

The problem is that, TV doesn't sends a signal if it received a IR signal or not.
Is there anything I can do to know whether the signal was executed by TV or not ?


texts:
I am trying to use a voltage regulator to regulate a 12V, 2A DC Power supply down to ~5.2V with a load current of less than 0.5A.

My schematic is as follows:

Problem: the regulator is getting quite hot, and voltage is dropping down to 4.3V or so with my fan connected. The output voltage is correct (~5.2V) with no load connected.

This is the datasheet for the regulator. The 10 uF capacitor is a tantalum capacitor (16V), and the 22 uF capacitor is an aluminum capacitor (20V). I do not have a heatsink on the regulator.

Is there something I am misunderstanding about the application? Is there a different regulator that would perform better?


texts: Write program for Atmega microcontroller with C#

texts: Anybody know that is there exist a way to write program for Atmega microcontroller With C# language? Or there is exist a plug in for Atmel Studio that add support C# in that IDE?


texts:
When I pass my EMF radiation meter near an electricity cable (a cable that is connected to the home mains), it shows me that there is a radiation.

But if there is an extension cable for example, and nothing is connected to it, there is still radiation measured from the EMF meter.

How it can be? It is an open circuit so the current is 0, so how there is a movement of electrons?


texts: Surge or other suppressor I can use, to prevent tool blowing fuse if blade sticks

texts:
I want to say up front, that this question involves minor modification (transient surge/current suppression) to the power supply side of a power tool. Usually I'd be the last to do anything like this (and never have). But in this case, my basic knowledge of electronics suggests that a trivial component inline with or across the mains supply, would have a very beneficial effect - no opening or changing of the tool itself is intended or would be acceptable. I think "anti surge" plugs also exist that do what I'm after, to underline that it's a safe intention. With that, on to my question.....

I have a power tool. Actually it's one of these, a 2400W 230V rotary concrete saw. I've had one of this model for years, and it's robust and reliable, with one design flaw. If the blade happens to stick, it's handled safely, from a mechanical/safety perspective. But there's clearly some kind of suppression missing or skimped in the design, because it typically also blows the 13A amp mains fuse in the plug.

Since this doesn't happen that often and replacing a fuse is trivial, I've satisfied myself with just keeping a bag of 10 fuses to hand, and replacing if it happens. It's cheaper than any alternative, which is typically an extra £200 for more rigorously built brands such as Makita, Husqvarna and the like - and 230V saws of this kind aren't easily found, so it's a limited market.

But today it clearly stuck bigger than usual because the motor itself has, after 4 years, shorted out. Swap fuse, press start button, 1/2 a second spin and fuse consistently blows. Admittedly it was under heavy use, but still.

As the performance was good, and I never felt endangered by the occasional lapse in surge suppression (it stalled and blew the fuse but never in all that time "kicked" or showed other untoward behaviour), I've replaced it with another of the same. But I'm wondering if there is some kind of component I can put inline or across the supply, which would safely handle whatever happens when the engine seizes, so it doesn't blow fuses and perhaps even avoids burn out in future.

Is this possible to do safely? If so, what would one use?


texts: Circuit to shut off power after a short time of turning on

texts:
I've got a 3V button battery driving an led and a trembler switch functioning now. However, the sensitivity of the switch is giving me trouble because I need it to remain open when at rest in a horizontal and vertical state and only open when set into motion. This works sometimes but is very difficult to duplicate reliably. The answers to my last post helped a lot but I wanted to try one last tack. If I replaced the trembler switch with a tilt switch it would be 100% reliable to activate every time it was tilted from vertical, but would unfortunately remain on when horizontal which I need to avoid. I have tried to find a very small (I only have about a 1/2 inch of space to work with) tilt switch that is open in the vertical and horizontal planes. The best would be if I could find a component like that. Barring that, what would be the simplest possible way to alter the circuit so that it would turn off again after some short period of time like a second and only reset if the switch turns off again? Thanks for any help.
-Rory

On the comment regarding using a capacitor, how would I determine the correct capacity to choose besides trial and error?


texts: An appropriate voltage regulator / limiter for a 5V solar panel for USB charging?

texts:
I'm building a USB solar charger for my tablet, which has so far worked well.

I'm using a 5 Volt, 5 watt solar panel (same as this one), which outputs about 4.5V and 0.6A in real use when charging my device, together with a 5.1V, 5w Zener diode (1N5338B) to regulate / limit the voltage, as it goes up to ~7V when not under load, which I presume could damage my tablet.

Now, I want to add a second identical solar panel (in paralell), to get more current to charge my tablet faster.

I need an appropriate voltage regulator, as this 5 watt zener diode would no longer work with (up to) 10w of power.

So far, I've looked into:

10w Zener diode, but I have not been able to find one.
LM7805, But they require a higher input voltage than my panel produces, and have a ~1v voltage drop.
A DC-DC voltage converter, such as this one. Would this work ? Does it have a voltage drop ?

Any other possibilities ? What do commercially available USB solar chargers use ?

Essentially, I'm looking for an appropriate component to prevent the voltage from the solar panel going over 5V and damaging my device.

Any recommendations ?


texts: Proteus - Copied subcircuit does not work even after renaming

texts:
I have a problem with subcircuits in Proteus software.
I know I should change the name of the subcircuit to work and it gives error when we don't.
But even when I change name and run simulation it still doesn't work and just the last subcircuit that I copied works.
The simulation is working and it gives no error in run or after runnig.


texts: 8 Bit Computer Program Counter (4 bit Counter IC) Counting When Disabled

texts:
Awhile back I built a version of Ben Eaters 8 bit computer, on my build, I changed only AND, NOT, and OR gates to all NAND. Otherwise the design was exact. I tested it before touching it and found that it does still work. I've made a modification to the RAM by adding an Arduino nano and 2 595 shift registers so that I can program the computer at the push of a button. That all works. The program is successfully loaded into RAM from the Arduino. However the computer itself seems to have an issue now as the same code that worked before, will not work. I have noticed 2 problems:

The program counter, despite being disabled (shown by the multimeter below) will still count on occasion when it shouldn't. However it is consistent, on my test program it will about 90% of the time count on the first clock cycle(which it should not), then again on the 2nd clock cycle, which it should and does.
The output 7 segment displays will output a random number from time to time, seemingly to be just before it switches to a different number, however not every time. The random number also does not show up anywhere else, whether on the bus, in the memory, or any of the registers.

The problem I am focused on here is the counter, but I am unsure if the two problems might stem from a common issue.

The counter IC is a 74ls161

What I have tried:

The most obvious being checking if the chip is enabled at the correct time to check if its a control logic issue. Based on the multimeter it is only being enable when it should be.
The chip is not being loaded, the only time it should ever get loaded is when jump instruction occurs of which there are none in my test program, this is double checked with a multimeter as well.
Trying to fix any loose wires and shorts, if there is one causing it, I havn't found it yet
I have removed the counter from the computer and tested it on its own, and seems to work just fine
I have tried switching out an EEPROM I thought to be iffy, as it would seem to "turn off" to the touch, however I believe this to have been some sort of short, as it doesn't have that issue now. However I cant be 100% sure that was the case.
Lastly I have looked in the assembly test code for any patterns, but the issues happen a couple times during the test run and not one instruction is used more than once. But it typically happens during the very first microcode instruction, which is consistent for every assembly instruction (Outputting the counter to the bus and the memory address register receiving it).

I will check back frequently and try and be as active as I can on here around work, let me know if you need any more information!

Description of photos, since I don't see the captions showing up

Step 0, the computer has the program uploaded and was just reset(minus the RAM of course) **Notice the  CE (count enable) control LED (bottom right) is not lit up (its hard to tell from photo, but it isn't), meaning it should not count on the next clock. Confirmed by multimeter
The Counter (top right, green LEDs, counted, despite being disabled. It is NOW enabled both confirmed by the CE light and multimeter)
Again the counter was incremented, this time it should have, but now we will miss a whole memory address


texts: Inverting summing amplifier vs Non-inverting summing amplfier

texts:
As known there are inverting and non-inverting summing circuits, such as below:

What's their cons and pros?


texts: USB-host on PIC32: enumeration not working

texts:
I've been struggling with this problem for about half a year and I'm on the verge giving up completely. This post on this forum is my last resort, and I hope anyone can throw some light on what I'm doing wrong.

Facts: PIC32MM0128GPM048 on an own developed PCB with the goal to read a USB keyboard just to get the hang of how USB host works.

Using Microchip Code Configurator in MPLABX I've setup everything required for USB host and let it create the code. Then I copied the code from USB HID examples in MLA (Microchip Library for Applications). In short; a far from a blinking LED, I haven't typed a single line of code. Everything comes from Microchip.

Using MCC, I've also generated code for UART2 (with printf to UART checked) and USB-host. In the USB-code, there's a lot of DEBUG-lines from Microchip which are called if DEBUG_ENABLE is enabled. So, I enabled all the DEBUG-outputs just to investigate what's happening. I connected a PL2303 USB-TTL-adapter for the debugging. I've checked "HID Keyboard" in MCC under the USB TPL-table settings.

I program the chip and put it in run-mode, and I can see this in the serial-window:

HOST: Initializing DETACHED state.

So, the USB-stack is initialized and the PIC is running. Then I connect a keyboard and see this:

[>HOST: Starting settling delay.

Then there's...nothing in the serial-window, and I'm unsure where to go from here. Trying to pinout the error, I flooded the USB-code with more debug-messages and I finally found where the code gets stuck:

                    case SUBSUBSTATE_WAIT_FOR_SETTLING:
                        // Wait for the timer to finish in the background.
                        LED_Toggle();
                        break;

So it seems that the USB-connection is never settling. Now I just have to find out what that means, and this is what I've been trying to figure out for half a year without succeeding.

Reading the datasheet again I find that to be able to use USB host the clock source is crucial, no more than +-50ppm drift is allowed. At first I missed this information so I assumed my HC49 crystal was the culprit, so I switched it to a MEMS-oscillator. Same result.

Then I double triple checked in case it was a PCB error, that the crystal clock lines were interfering the USB data lines or similiar, but they are way apart (see image where I've marked up the two pairs of connections) so I do not think this is the source of error. I could ofcourse be wrong.

I'm out of options. I have no more ideas of where the error source can be. I cannot isolate it to a software error or a hardware error.

Any ideas, help or pointers that will get me forward on this project would be immensely appreciated.


texts: What are the units used in Shannon formula calculation?

texts:
I'm a CompSci student with absolutely no background in wireless communication who recently needs to do something with the Shannon formula:
$$
R = W log_2\bigg(1+\frac{P_t H^2}{N_0 W}\bigg)
$$
I need to calculate the achievable data rate \$R\$ given:

Bandwidth \$W=2\$ MHz.
Transmit power \$P_t=0.2\$ Watt.
Path loss model: \$128.1 + 37.6log_{10}(d)\$, where d = 0.45 km.
Noise power density \$N_0 = -174\$ dBm/Hz.

This is how I'm calculating \$R\$:

Convert bandwidth \$W\$ to Hz, so now \$W=2\times10^6\$ Hz.
Leave the transmit power as is (Watt).
Given the path loss model, we have \$H=10^{-12.81}(450)^{-3.76}\approx 1.64\times10^{-23}\$.
Convert noise power density \$N_0\$ to W/Hz, so now \$N_0=10^{\frac{-174-30}{10}}=10^{-20.4}\$ W/Hz.
Finally, the data rate
$$
R = 2\times10^6\times log_2\bigg(1 + \frac{0.2\times(1.64\times10^{-23})^2}{10^{-20.4}\times 2\times10^6}\bigg) \approx 0 \text{ bps (?!?)}
$$

The resulted data rate is extremely small - close to zero. I reckon because the channel gain is too small? Could someone please tell me what went wrong in my calculation above? I'm quite confused with all the different units of measurement in wireless communication.
I already went over this relevant question (Calculating Data Rate using Bandwidth, Transmission Power, Noise Power Spectrum Density and Channel Gain) but still couldn't figure out.

UPDATE 1:
I just found out that the path loss model: \$128.1 \text{dB} + 37.6log_{10}(d)\$ is equivalent to \$ \frac{P_r}{P_t}=\frac{10^{-12.81}}{d^{3.76}} \$. So that we can find the actual received power \$P_r\$ (transmit power minus the power lost by distance during the transmission). I guess the numerator in the formula (\$P_t H^2\$) should be replaced by this \$P_r\$. The data rate now is:
$$
R = 2\times10^6\times log_2\bigg(1 + \frac{0.2\times \frac{10^{-12.81}}{d^{3.76}}}{10^{-20.4}\times 2\times10^6}\bigg)\approx 0.5 \text{ Mbps}
$$
I'm not sure whether distance \$d\$ should be meter or kilometer. If meter, the data rate is 70.2Mbps, which is crazily high. If kilometer, we have spectral efficiency (the log part of the formula) \$=0.25\$ bps/Hz, and data rate \$R=0.5\$ Mbps, which makes more sense. Am I doing this right? Is this number realistic given all the settings above?
~~
Alternatively, I've seen the channel gain being calculated like this \$H=d^{-\alpha}\$, where distance \$d\$ is in meter, and path loss exponent is, say, 3.76. If I apply this to the original formula above. The data rate is now:
$$
R = 2\times10^6\times log_2\bigg(1 + \frac{0.2\times (450^{-3.76})^2}{10^{-20.4}\times 2\times10^6}\bigg) \approx 0.8 \text{ bps} \approx 8.1\times 10^{-7} \text{ Mbps}
$$
which seems quite small compared to what I got above (0.5 Mbps). I know the setting here (channel gain calculation) is different but I wasn't expecting such a large difference.
Is there anything wrong? Which calculation is more realistic in practice?

For those interested, I found these lecture notes quite useful. They contain some example calculations.
http://weber.itn.liu.se/~vanan11/TNK080/Lecture1.pdf
http://weber.itn.liu.se/~vanan11/TNK080/Lecture2.pdf


texts: How do I build a bracelet that vibrates once every n minutes?

texts:
I intend to establish a few new personal habits that eventually become second-nature to me. To assist myself, I want to wear a bracelet that vibrates every, say, 5 minutes all throughout the day as a constant reminder to keep up whatever new habits I'm trying to establish.

Alas, no such bracelet exists on the market. I'll either have to design and build it from scratch, or somehow piece one together from purchasable parts. (I did think about using my mobile phone for this purpose, but I don't always keep it on my person and it's not waterproof.)

My requirements, in decreasing order of importance, are very simple:

The bracelet vibrates once every n minutes. n does not have to be configurable after the bracelet is assembled. Typical value for n is between 1 and 60 inclusive.
(Optional) The power source is either easily replaceable or lasts no less than 30 days with the bracelet always on.
(Optional) The bracelet is durable (i.e. it can take a fall) and waterproof (i.e. I can shower with it on, not necessarily go scuba-diving).
(Optional) The bracelet can be turned off and on at will.

I would prefer to build this thing from existing parts since I assume that'll be easier and faster, though as a result I understand I may not have as much control over the details. I imagine the end result will look something like this Adidas "ion loop" bracelet (basically, a regular bracelet with the vibrating component thrown on):

How should I go about building this thing? Is there a small, vibrating component I can buy and just attach to any old bracelet? Or is there perhaps something better I can build with a bit more of an investment?

Edit (after reviewing answers and doing more research):

To summarize what I've learned so far, I need:

A vibrating motor. I've chosen these two from Precision Microdrives to experiment with.
A coin cell battery. I bought batteries for both motors.
A timing element. This can be one of the following:

a microcontroller (e.g. PIC 10F200)
a 555 timer running in astable mode (plus the required resistors and capacitor)

A transistor.

Questions:

Do I have everything I need?
Which approach to generating the periodic pulse is easier to implement for the beginner? I'm not opposed to writing some code for the microcontroller, but I presume it also requires I download some software and purchase some means of loading the code into the chip.

Will I find that overall a more or less pleasant experience than meddling with resistors and capacitors for the 555 timer?

Finally, if there is a specific way I can make this question better (perhaps break it up into smaller chunks?), let me know.


texts: I want to find voltage across 5 ohm resistance by thevenins theorem

texts: i want to know that wether my answer is right or wrong and if it is where?


texts: Simple circuit, mesh method, can't resolve

texts:
I'm trying to resolve this for 3 hours now, I think I made some errors around the last part but can't figure out where.

I'm a beginner and I'm still learning.

If you want to try here is the circuit:

simulate this circuit – Schematic created using CircuitLab

I start by making 3 equations, put them in matrix form, make the inverse of the R matrix.

So in the start I had:
$$R * I = V$$
With the inverse matrix I'll have:
$$I = V * R^-1$$

In order to find \$R^-1\$ I'm using the formula:
$$1/detR * (R^a)^T$$
Where \$R^a\$ is the matrix formed by "algebraic complements" and \$(R^a)^T\$ is the transposed one.

The exercise requires to find the \$Vx\$ in \$R5\$ and basically to find everything... So:

\$Pg1 = ?\$

\$Pg2 = ?\$

\$I1, I2, I3 = ?\$

\$Vx = ?\$

(Vx as I said is the Voltage in R5 and Pg1, Pg2 is the Power delivered/absorbed by the generators)


texts:
I've got an AVR ISP MK2 that I'm going to program an ATmega328P with using ISP. This is the schematic of the 2x5 pin ICSP connector:

First: Does this mean that I am supposed to connect #2 to +5V and #{4,6,8,10} to ground? Why does the programmer need another power supply when it already has USB?

Second: My plan is to cut the 10-lead flat cable up and solder the individual leads for my prototype. How can I know which lead corresponds to which pin?


texts: How to prevent power overload when loads exceed a generator's capacity

texts:
How to solve the following practical problem that I currently have in my "food bike" design in a practical manner:

Power supply (AC):

Generator: 800W

Loads (AC, purely resistive, each controlled with its own thermostat):

water heater: 750W
syrup heater: 517W

Rules:

The available power may never be exceeded. If so, a breaker trips, which must be avoided.
The syrup heater load demand must always be satisfied.
The water heater load demand is allowed to be interrupted in order to satisfy the syrup heater load.

Edit 1:
Additional rules to narrow the solution space:

Human intervention is not allowed to achieve the desired result because the food bike operator is too busy serving his customers.

Edit 2:

I prefer to keep both heaters unmodified so their certification remains valid. Therefore both heaters (including their thermostats) are considered as "black boxes" with only their power cords as the "interfaces" to an external circuit.

Additional system details: This is a real-world problem that I try to solve in order to design a food bike for myself in order to have my own small business, in contrast to food-trucks, and in the long term to be powered with PV-charged LFP batteries. For now, I use a noisy and stinky generator. Each thermostat switches its heater on to keep it at a given temperature. Assume, for the sake of conversation, that this happens randomly at intervals of roughly a minute or so. The water heater is expected to demand power predominantly after the food bike operator washes his hands because that heater serves the hand-washing station. The budget to solve this specific problem is in the order of $100. Weight is an issue, so a lightweight solution is desired. Fictitiously, an "XOR" power strip with an configurable socket prioritization (the syrup heater socket would get priority) would solve the problem, by that I mean a pair of AC power sockets that mutually exclusive provide power without temporal overlap that would trip the generator's breaker. You could also see this as a "power strip with load-shedding".

Project's geographical location: California, USA (needed for appropriate certifications / regulations).


texts: USB GPIO board stops responding after high voltage relay with load is switched on

texts:
I'm using Numato 16 GPIO board to switch relays on 8 Channel Relay Module. Until no 220V load is connected to the relay all works fine and I can switch on/off relay using Serial port command to GPIO as many times as I want. But once I connect actual device (in my case pump) through the relay - relay switches on (or off) the device and GPIO board stops communicating through COM port. After reconnecting GPIO USB cable it works again one time. Is my micro bieng stung by arcs radiating? Do I need some sort of snubber?

Here is image of the current wiring:

Previously I had GPIO Board feeding from USB, but was experiencing exactly same problem. Thought maybe it's not getting enough power from USB so rewired to use external 5V supply as it is now.

I wonder maybe somebody had similar problem or has an idea what can be done to solve it?


texts: If I feed single phase electricity into a 3 phase input VFD, I know it needs to be derated on the output by about 50%, but how does it cope with the difference in voltage, as rectified 230v rms gives 1.414 * 230 = 325v dc, but rectified 415v gives 1.35 * 415 = 560 vdc. How does it produce the correct PWM wave form voltages?


texts:
Maybe this is a trivial question, but I am struggling with it for a while.

I have an alkaline AA battery which is consuming 80mA for 8 seconds each 30 minutes. I need to calculate how many days it will last before reaching 1.1v. I know it depends a lot on the battery type, but let's say it is a Duracell battery.

I have problems in calculating the "average" consumption per hour, as the battery is drained for just 8 seconds (80mA) each 30 minutes.

Thanks for any help.


texts: dsPIC33 Simple External Interrupt problem

texts:
This will be laughably easy for someone who has worked with the dsPIC33 and XC16 compiler, but has already cost me a day. Hopefully someone can save me any more wasted time!

Could someone please tell me what I have done wrong here? All I am trying to do is shut off some LED's using an external interrupt.

/* Device header files */
#include <stdlib.h>
#include <xc.h>

int main(int argc, char** argv) {

// setup internal clock for 80MHz/40MIPS
// 7.37/2=3.685*43=158.455/2=79.2275
CLKDIVbits.PLLPRE=0;        // PLLPRE (N2) 0=/2
PLLFBD=41;                  // pll multiplier (M) = +2
CLKDIVbits.PLLPOST=0;       // PLLPOST (N1) 0=/2

ANSELE = 0x0000; //set all of port B as Digital
TRISE=0xF0;//configures part of port B as output
LATE=0x0F; // writes data to port B

RPINR0= 0x5400;//set pin 1 as interrupt 1
INTCON2 = 0x0000;   /*Setup INT0, INT1, INT2, interupt on falling edge*/
IFS1bits.INT1IF = 0;    /*Reset INT1 interrupt flag */
IEC1bits.INT1IE = 1;    /*Enable INT1 Interrupt Service Routine */
IPC5bits.INT1IP = 4;    /*set low priority*/

//Main Program
while (1);
return (EXIT_SUCCESS);
}

//_INT1Interrupt() is the INT1 interrupt service routine (ISR).
void __attribute__((__interrupt__)) _INT1Interrupt(void);
void __attribute__((__interrupt__, auto_psv)) _INT1Interrupt(void)
{
   LATE=0x00; // writes data to port B
   IFS1bits.INT1IF = 0;    //Clear the INT1 interrupt flag or else
   //the CPU will keep vectoring back to the ISR
}

Thanks in advance!!!


texts: MIPI DSI-2 contrast control and buffers for 3d printing

texts:
I've got a 3d printer, and it uses a mipi-2 DSI LCD.
The display is driven  via an HDMI to MIPI adapter board.  Unfortunately, HDMI does not contain ways to adjust display contrast, and the adapter board has undocumented chips and no working communications interface.  Mipi-2 doesn't have a contrast voltage PIN, but somehow adjusts contrast through commands send over the serial line; so I don't see how to hack the contrast by adjusting voltages.
I've google searched for products that I can replace the adapter with, and I'm having no luck in finding a HDMI to MIPI-2 DSI board which advertises the ability to adjust contrast and display 2560x1440 still images (Black and White).
I'm basically needing something that can display static images on a MIPI-2 DSI compliant display.
I'm hesitant to try an program a CPU or other device (myself) because
The MIPI alliance doesn't explain how their protocol allows contrast adjusts UNLESS you join them as a member.  So, I don't have the data I need to be able to upgrade the 3d printer, myself, and would need some guidance from an expert.
For example; I see on a 15 pin MIPI-1 connector that it has an I2C bus as well as two data channels and a clock channel.  I suppose the MIPI-2 connector has the same features, but more data channels.  Q1: I suspect the adapter sends setup commands to the display, and then just sends data afterward.  Once the display is running, is it possible to steal the I2C lines from the dumb video adapter -- while it's displaying video -- and send contrast adjustment commands over I2C?  Or does a MIPI-Driver typically require the I2C during live streaming of video and so stealing the I2C would crash the device for sure?
I'm even willing to FAB a PCB, and solder surface mount components of fine pitch ; but I only want to try things that have a decent chance of success.
As far as alternate solutions:
I've seen USB to DVI and HDMI dongles; and I like that these devices are basically a frame-buffer + video driver wired into a USB dongle.  That's pretty close to ideal ... except that they don't support MIPI.
I haven't seen anything similar for MIPI displays that has sufficient resolution.  ( 2560x1440 ).
For example, this adapter only does 1080P.
https://hackaday.io/project/364-mipi-dsi-display-shieldhdmi-adapter
But -- I'd like to use either I2C, USB, or the GPIO on a device like a raspberry pi to talk to a frame buffer chipset and especially adjust contrast.
Alternately, since raspberry PI has a MIPI-1 DSI connector, has anyone come across a chipset or wiring adapter or other product that can take a 12-14 pin MIPI-1 port on a Raspberry PI and operate a 60 pin MIPI-2 device from it?
I only need two colors, on and off -- 100% saturation, so I suspect the bus speed isn't the issue.  I would think that since I only need 1 bit per pixel, even at 60Hz refresh ... that would be in the 2560x1440x60 ~= 225 megabits/second range.
MIPI-1 can do ~200Mbits in low power mode, and 1Gb in HS mode ...
So, even a MIPI-1 port is capable of sending the data ... If I only knew how to wire it up to a 60 pin mipi-2 connector.
Thanks.


texts: Resistor's behaviour at high frequencies

texts:
Looking at the impedance vs. frequency graph

1) At low-frequencies Z=R and hence it would be a straight line.

2) For mid-frequencies, Z decreases possibly due to capacitance, but I'm not sure exactly why.

3) The inductor characteristic jwl would dominate and hence it would continue to exponentially increase.

What I am confused about is the midsection here. Why does Z dip down to form a minimum and then rise?


texts:
I turned it on and nothing happens.

Now what?


texts: Looking around at various PSUs and I see 12VDC show up pretty commonly, both for PSUs and motors they drive.  Can anyone tell me some of the history and/or rationale behind this?  E.g. is that a particularly efficient voltage to work with for some reason, do most of the more power-heavy motors commonly need that particular level, etc.  New to power electronics.


texts: Uart serial communication failing to echo back Atmega16a

texts:
I am new to the avr (8bit uc) and recently I ran into a problem using serial communication (uart) with PC. Microcontroller fails to  responsd in  putty  terminal where it should echo back whatever I have sent.

Thank you for your response everyone .

I am sorry for the corrupt code I had no idea what I was doing since I am newbie to this code indention in stack exchange.

The new code is attached below please kindly suggest

#define F_CPU 16000000UL
#include <avr/io.h>
#include <avr/interrupt.h>

volatile char data;

void USARTInit(uint16_t ubrr_value) {
    UBRRL = ubrr_value;
    UBRRH = (ubrr_value >> 8);
    UCSRC = (1 << URSEL) | (1 << UCSZ0) | (1 << UCSZ1);
    UCSRB = (1 << RXEN) | (1 << TXEN);
}

void USARTWriteChar(char data) {
    while (!(UCSRA & (1 << UDRE)))
        { }

    //Now write the data to USART buffer
    UDR = data;
}

void main() {
    sei();
    UCSRB |= (1 << RXCIE);
    USARTInit(51);

    while (1) {
        if (data == 'a') {
            USARTWriteChar(data);
        }
    }
}

ISR(USARTRXC_vect) {
    data = UDR;
}

so here foo just represents my data='a', unfortunately avr is not responding to my inputs .
when I type "a" .


texts:
Im not much of an audiophile or audio technician and Im pretty much ok with the sound my car has, except the low frequency output. I don't want to mess up with wiring and speakers or change the head unit,  what Im trying to do is somehow inline an active sub to the rear speakers, like connect the amplifier to the speakers (1 or both, series or parallel, no idea) because the head unit (basic bmw e39 becker casette radio with a headphone amplifier aux port added) obviously doesn't have a sub output (does it?).

Im just curious what happens if I add the amp to the wires of the rear speakers as a diy (power/safety wise) or should I stop fooling around and get someone who knows their job to do this?


texts: Help me understand capacitor discharging

texts:
Made this question in physics stack, but maybe I'll get a better answer here.

If we apply loop rule while charging the circuit we get:

$$\varepsilon -iR-\frac{q}{C}=0$$

The way I understand, we follow through the circuit just before the battery, as we move through the circuit there is a increase in potential so \$+\varepsilon\$. Then we go through the resistor, since we are moving in the direction of the current, \$-iR\$. In the capacitor, there is a drop in potential, so \$-\frac{q}{C}\$.

The problem starts for me in the part of discharging the capacitor. Now the battery acts like part of a wire, \$\varepsilon=0\$. The top plate of the capacitor is at a higher potential. Current will flow from the top plate to the circuit in the direction of the resistor (opposite of what it was). Now loop rule would stand for (starting from just before the down plate):

$$\frac{q}{C}-iR=0$$

Because capacitor's top plate is at a higher potential, there is a increase in voltage. Loop rule is applied in the same direction of the current, so \$-iR\$.

But the equation resulted in the loop rule application when discharging a capacitor is given by:

$$\frac{q}{C}+iR=0$$

Why? What is the mistake in my reasoning? Please, help me understand. Excuse my bad english. Happy 2016.


texts: brushless for outboard of a 4 meter boat

texts:
SK3 - 6364-190kv Brushless Outrunner Motor ... this motor has a nominal voltage of 37 V with a maximum current of 65 A, Can I supply this motor with a voltage of 24 V, with a current of 30 A? how much couple do I lose?

thank you all for the clarifications. In your opinion, to move a 4-meter boat at a speed of 5 nodi, is a torque greater than 10nm needed?


texts:
I've made this simple charger circuit and I've added a resistor and a Schottky diode at the end of the circuit (pin 2). I was wondering if I could add a LED indication so it could give me an idea of the intensity of current that is flowing through the circuit. I've tried simply connecting a LED in parallel after C2 and it did work (the light did get less bright as the the battery voltage increased).

I'm wondering if this type of indication would work - would the LED eventually go out when the current reaches 0? If it does work, would there be a voltage drop caused by the LED that I need to consider? If the indication works, would I need to add a resistor before the LED and would its value play a roll in setting the current threshold for the LED? The charger is set at 5.8V/200mA, if that helps.


texts: Thermal power dissipation for a diode with heatsink

texts:
I have a circuit that has a diode that needs to support 3A through it.  The supply is at 7.2V and is therefore ~22W.

I have currently selected a schottky diode show here.  Key specs are it can support up to 5A, has thermal resistance junction to case of 12K/W, and a max junction temp of 150C.  The heatsink I plan on using has a thermal resistance of about 3C/W.

I am trying to do some thermal calculations to make sure the device can support my usecase.  I am using an online calculator such as this one and input the specs from above.  Two things I have questions on:

The units are in K/W.  Looking online, it seems people treat C/W and K/W the same, and I am not sure why as they are different units; however if you convert the K to C values, you will get all negative values.  Once again more confusion.
What do I use for power here?  Using 22W (system power) gives ridiculous results and states that the heat sink will not work, so I am assuming that I use the max forward voltage at max current (~.36V) times the current I plan on running it at (3A) and take .36 * 3 = 1.8W.  This then was input to the calculator showing a junction temp lower than what the diode is spec'd to (i.e. I can use it).  Am I correct using this power?


texts: Biasing MOSFET with Constant Current Source

texts: In the course of researching tube amplifier designs, it seems like a common technique to bias a MOSFET in an output stage using an LM317 configured as a constant current source, such as is given in the schematic on this page. How does this method of biasing work? Why is this a preferred method?


texts: Oscillator with CMOS inverter - calculate elements

texts:
I am trying to make 125 KHz oscillator based on CMOS inverter and feedback circuit consisting of Pi C-L-C section, as shown below. Since I need sine wave I will ommit the second inverter.

Before starting, I thought that this circuit will oscillate for every combination of L and Cs, but unfortunatelly it is not like that. So, my question is how to calculate L and C in order to make this work at 125 KHz?

The values shown in the figure are not relevant for 125 KHz frequency.

So, I decided to start from the begining and to solve somehow this circuit.
In the first step I want to recognize the vital parts of the circuit, but I am not sure how to do that actually. Here we have:

Amplifying element is inverter with negative transconductance.
Feedback loop consists of an inductor.
C2 is load capacitance
For C1 i am not able to say what is it

Having this in mind, the type of feedback must be Shunt - Shunt, but the logic says it should be Series - Series.

My question is how to start with solving this circuit?


texts: DDR UDQS and LDQS into one DQS controller

texts:
I have one x16 memory chip () that has two Data Strobe pairs (UDQS and LDQS), on the other hand, I have arm chip (i.MX6 ULZ) that has one Data Strobe pair (DQS). Is there any way of connecting them, I'm concerned about connecting them together because they are bi-directional.
Will a solution like this work? (Just ignore length matching)


texts:
I am asking because I am confused.  I cannot resolve this issue since yesterday and I am still learning.

I was reading  article about Input DC-DC buck filter. Each of the two articles say something different.

https://www.eetimes.com/choosing-the-right-input-caps-for-your-buck-converter/

The first confusion is about VESR.

https://www.eetimes.com/wp-content/uploads/media-1054716-gif3.gif

During 0 and \$\Delta t\$ the input capacitor current is negative, how is it that the VESR curve is positive? Is it a mistake from the article?

The second thing really really confusing. I do not understand why we do not have the same current in the ESR resistance ESL inductance with capacitance.

https://www.eetimes.com/wp-content/uploads/media-1054717-gif4.gif

As you can see equation 1 in the ESR and ESL we have the current

\$I_O-0.5  I_{RIPPLE}\$

and in the capacitance

\$I_O-I_{IN}\$

But why? Is there something I do not understand with series component, I mean it should be the same current in the 3 components?

In my point of view, between 0 and \$\Delta t\$ the current

\$i_C(t)= I_{input}- I_L\\
=I_O D -(I_O - \Delta IL/2 + \Delta ILt/(Dt))\\
= I_O D -  I_O + \Delta IL/2 - \Delta ILt/(Dt)\\
= (I_O (D-1)+\Delta IL(1/2-t/D*T)\$

Am I right?

If we do the average of that we do not at all what we have in equation 1.

Thank you very much.


texts: Has anyone got a diagram of the layout of the Robosapien v2?


texts:
I try to make controller for 12V fan, where I can vary voltage from 3V to 12V on this fan. It works OK, but it makes electrical noise on 12V power line.
How could I get rid of it? How to filter it, or how to modify my circuit?

this is the noise:

UPDATE:
Fan draws 220mA @ 12V, 60mA @ 3V.
This is the modified circuit, according to answers. Noise is lowered down to ~20mV peak-peak:
Added 100nF across pins 1 and 2 of opamp, 100nF cap across power pins of opamp, 2200uF cap from 12V to ground.

UPDATE2:
I put 3k resistor from Q1 emitter to ground and removed capacitor that was directly on fan connector (there is just 2200uF on 12V line). This lowered noise once again.


texts: Is there a way to determine which antenna connector is for which radio on a cellphone?

texts:
I have a cellphone mainboard from a Sony Z Ultra:

There are 4 antenna connectors on the board, 3 of them unconnected (marked with red dots).
One of them is connected (green wire), that might be the GPS antenna.
The big blue rectangle is the headphone jack connector, and my intention is to find if any of those antenna connectors (red dots) can be used for adding an external antenna for the FM tuner.
(I know that FM tuner usually uses the headphone jack as antenna - but I'd prefer using a small connector if possible)


texts: How to tune period for MOSFET IRF3205 with gate driver optocoupler PC817?

texts: I want to test 100W power output using coils for wireless power transfer project. I used 2 IRF3205 MOSFETs with 2 gate driver optocouplers PC817. I used Arduino for optocouplers. The problem is I don't know how to tune the turn-on and turn-off time for the MOSFETs. The frequency is 80kHz and duty cycle is 50% so the period is 12.5 us and each turn-on and turn-off time is 6.25 us. But when I test the resistor 10 ohm in the receiver side, there is no current output. Can someone help me for this problem?


texts: Boosting power transmitted by 433MHz module from 5v to 12v

texts:
I have one of these transmitter modules attached to an Arduino Mega and currently powered by the Arduino Mega 5v pin.
I have locations that cannot receive the radio transmission because of lack of power so I need to boost the power transmitted and wish to transmit using 12v power supply.

It would have been easier to append this question to this post. However I can't do that because I don't have enough points.

Questions;

I see that this circuit will work. Can someone recommend a specific component / characteristics for the transistor. T1 NPN seems to me a genetic type.
Can someone recommend a specific (240vac to) 12v supply. (I can remember V=IR and the basics of Ohms law but can't remember what determines how much current is drawn by a load).
It seems to me that a mains powered 12 volt supply and arduino board ground should not be mixed, so how do I wire this up? Is it a case of simply attaching 12v -ve terminal to GND as shown in the circuit?

ps for switching speed considerations, my Arduino transmission pulse/ pin is typically 275uSecs HIGH then 115uSecs LOW (or in reverse order). Mostly I shoot 25 of these sequences at once. Then I have some slower pulses at 1168uSecs HIGH and 397uSecs LOW.


texts: 12 V car battery short circuit with a wrench that has resistance of 0.5 ohms, how much current?

texts:
ANSWER/ERROR FOUND: resistance of the leads of the multi-meter is the culprit. The true resistance of the wrench cannot be measured using a basic multimeter.
The resistance of the wrench is more so roughly around 0.000016 ohms.

I searched quite a number of websites for an answer, but no joy as yet..(for this specific question).

If a car battery is short circuited with a wrench that has 0.5 ohms resistance, then theoretically using Ohm's law the current = V/R = 12.65 volts / 0.5 ohms = 25.3 amperes.

Many people (even on this site here) claim that 100's to 1000's of amperes will flow through the wrench and weld it to the terminals.

How is that possible when only max 25.3 amperes can theoretically flow through that wrench of 0.5 ohms using 12.65 volts?

NB: I measured the resistance of the wrench using a home "basic" use multimeter and it shows that best resistance of the wrench is 0.5 ohms. I hope that I  measured this correctly. :)


texts: What is the standard procedure to design a Synchronous Machine?

texts:
I have Modelled an IPMSM based on the innovative idea i got. I have also decided on the rating of the machine, torque to be produced, Required Rated RPM, but after this i have so much doubt. whether should i hire someone to make a model in Ansys maxwell and Analyse it from there or should i have to calculated other parameters like dimension of the motor, resistance per phase, Inductance, grade of magnet to be used, grade of Copper to be used etc.
Experts in IPMSM design or just any electrical motor design. Teach me the Professional Workflow.


texts: How do you properly test for a bad solenoid?

texts: As a sidebar to this other question, how do you properly test a solenoid? The resistance is within spec, could a solenoid fail in ways that still show the normal internal resistance?


texts:
I ordered a bunch of infrared detector diodes (aka IR diode) and infrared transmitters. luckily the detectors are blue (and don't respond to normal room light).

I am planning to order a bunch of infrared detector transistors (aka IR NPN) because I heard they respond to transmitters farther away. I understand that IR diodes respond faster than IR NPN's but when I read the datasheet of the IR NPN, I can put up with several milliseconds of waiting time in my application.

I have heard of transmitters and detectors modulating their data over 38Khz. Since I connect my IR components to a microcontroller, I should be able to create a custom modulation all within a microcontroller with no problem.

For a standard LED, there's a "Max DC forward current" and a "Peak DC forward current". The value of the former (normally 20 to 50ma?) is lower than the latter (150ma?). I tend to limit my current to all my LED's to the Max DC forward current to eliminate burn-out.

I'm curious...

Do IR circuit designers modulate data over a fixed frequency (such as 38Khz) in order to give the IR transmitter (diode) the "Peak DC forward current" instead of the "Max DC forward current" as an attempt to maximize range without blowing the part up?
Why was 38Khz chosen as a standard frequency to modulate IR over? Why not 1Mhz or even a few hundred Hz?
If the answer to question 1 is yes, then could I get away with sending a one-time short burst of raw data (byte switches every millisecond) to an IR transmitter (diode) with using the Peak current instead of the max current?

I just feel that if I leave any type of LED or photo diode on for too long at peak current, it will blow up. I may be wrong. I'm tempted to use peak current in a photo-transistor and photo-diode in order to maximize IR range but I don't know if I'm on the right track.


texts: How to read /debounce an illuminated switch using only two wires?

texts:
I'm using the switch below as a replacement boor bell switch. The LED requires 12V AC/DC and the switch has change over contacts.  Datasheet.

For aesthetic reasons I have to reuse the existing wiring which is only two cores and ~11m long. So the way I see the switch operating is:-

Normal case - LED lit and current (~10mA) flowing through wires.
Button pressed - LED off and no current flow.

The above means of operation is possible as you can wire the LED via the switch terminals.  Clearly though it's not just a simple case of the traditional pull up resistor on the input pin to a micro controller.  I'd like the circuit to be resistant to EMI spikes as well as hardware debounced.  I think that I can handle over voltage spikes with a couple of Schottky diodes plus resistor. I looked through a guide on debouncing (Fig.2) and some application specific debounce ICs but they don't seem appropriate for a two core LED style switch.  Plus I can't do surface mount. Does this require some form of current detection?  An on-board ADC is available.  A belt and braces approach will keep my granny happy not having to run to the door every time a car passes by or it thunders.

I think that this might be an original question as others utilise enough cores to separately light up the LED such as:-

Read the state of a 12v illuminated switch from an Arduino Uno

Using a 12V lighted toggle switch with an Arduino


texts: 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.


texts: Is it possible to spoof a microSD FAT32 filesystem?

texts:
I have some hardware outputting data to a MicroSD. I can't control this process and instead of it outputting data to a MicroSD, I want some sort of spoofer I can insert into the MicroSD slot that allows the data sent to the microSD to be intercepted by, say, a microcontroller, who in turn saves it on its own microSD.
I have found this piece of hardware, which I feel is somewhat in the direction of the solution I'm looking for. The problem now is with spoofing the filesystem of MicroSD's so the hardware thinks it has a regular microSD inserted.
To what extent is this possible? It comes off as fairly straightforward to me, but I'm sure I haven't foreseen many issues. My idea is that I just hook up the breakout to pins on a Raspberry and get it over with. I'm pretty sure the hardware checks for a valid formatted storage first, but that's what the extra card slot is for. Effectively I'm duplicating the data this way.
I haven't found much information on the internet on this topic.
Similar question: https://stackoverflow.com/questions/13699203/sd-card-emulator


texts: Unable to re-flash firmware on USB host using and UNO and ds30 loader

texts:
I didn't think the Arduino stack exchange was good for this because I'm only utilising the arduino for its USB to UART capabilities but nothing else.
Anyway, a long while ago I bough a USB Host from HobbyTronics. I didn't end up using it until now where I needed a USB host and remembered I had bought one already. The issue is I bough it pre-flashed with the serial firmware, not the memory stick firmware. I thought this would be ok because I remember it supported re-flashing the firmware.
On the site they recommend an FTDI breakout board but I don't have one so I decided I'd use my UNO instead because it works the same way.
I drew up a quick schematic of how I connected them.

D0 is RX, D1 is TX. Reset is tied to ground so the chip does not initialise.
I booted up ds30loader and set it to COM3 (the UNO). I set the firmware file to the one you can download on the flash drive version of the USB Host (and set the chip type to PIC4FJ) and then I clicked write. On the site it says you need to hold down reset on the usb host before clicking write and let go after to initialise the boot loader. I did so and all that happens is it times out and is unable to upload.
The "L" light on the UNO doesn't do its flash pattern when powered up so I assume the chip is not initialising (which is what I want it to do). The RX light on the UNO does flash but it just doesn't connect/upload to the usb host.
Is there something I am doing wrong?


texts: I've done breadboards and programming, where is a good place to move on?

texts:
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.


texts: What is the meaning of "ΩK" on a wirewound resistor?

texts:
Generally I see the letter "K" as "kΩ" and it means 1000Ω on a resistor. On this resistor iswriten 10 ΩK. The image of resistor is this:

What is the meaning of 10ΩK?

I want to replace it with one of the 10ΩJ resistors I have. Can these resistors (10ΩJ), take the place of a 10ΩK resistor?

The wattage of the resistors I'm going to replace is a bit bigger, I think wattage won't be a problem, am I right?


texts: How can I remove a heatsink that is stuck to a component soldered onto the PCB?

texts:
I am modding a wireless router, and one of the problems I have is that it overheats, so it restarts every hour or so I am trying to replace the heatsink.

However, I simply cannot get it off. It seems to be glued on to the board or something, or they have used awful thermal paste! I have tried using a flathead to lever it off and scrape the paste away, but it is solid, and is impossible to remove.

Here are some images (sorry about my terrible photography!):

So, how can I remove a stuck heatsink? I don't really feel comfortable using heat guns or trying to melt it off, as I am worried that I will cause damage to the PCB.

The processor is soldered to the board as well, so I can't remove it and work it loose by pulling it apart by hand either.


texts: Recommendations for On-Hand 74xx (and others?) ICs

texts:
I've been learning about logic gates (from Ben Eater's videos, etc.) and I find myself constantly having to order more ICs, especially 74xxs. Is there a list of ones I should keep on hand to help avoid unnecessary delays from ordering.

This question helped a lot but it didn't seem to cover logic gates.


texts: How to Calculate maximum distance between transmitter and receiver in wireless communication

texts: how to calculate maximum distance between transmitter and receiver in free space radio communication by having transmitted power, antenna gain and noise-to-signal ratio ?


texts: Is there a minimum clock rate specified by I2C? I know the most widely used clock rate is 100kHz and there is a "fast" mode of 400kHz supported by some devices, and a faster yet mode supported by other devices (I think 1MHz?). Since the SCK signal is generated by the master I presume one could operate at a much slower speed than  any of those - is there a lower bound in practice? To what extent do slave devices care about the clock rate (e.g. is it common for them to have short timeouts)? The reason I'm asking is that I'm wondering if could possibly run I2C over a longer distance (e.g. 20 feet) to program I2C EEPROMs reliably in a production tester setup. I'm assuming it won't work reliably over that distance at the standard data rates. Am I off-base entirely in thinking that slowing down the clock speed will improve reliability over longer distances (e.g. is it really a question of drive strength and rise/fall times)?


texts: VHDL 2 segments coding style sensitivity list issue - std_logic_vector at X value

texts:
I'm having trouble with a counter update in my FSM.
I have a counter being incremented inside a state: the state must change when the counter hits a constant value N.
I try to slim down the code to a minimum example.

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity int32_ctrlFSM_debug is
 port (
  clk      : in std_logic;
  reset    : in std_logic;
  trigger  : in std_logic
 );
end int32_ctrlFSM_debug;

architecture arch of int32_ctrlFSM_debug is
type state_type is (state_1, state_2);
constant N           : integer := 4;
signal counter_reg   : std_logic_vector(N - 1 downto 0);
signal counter_next  : std_logic_vector(N - 1 downto 0);
signal state_reg     : state_type;
signal state_next    : state_type;

begin
-- FSMD state & data registers
process(clk, reset)
begin
  if reset = '1' then
   state_reg    <= state_1;
   counter_reg  <= (others => '0');

 elsif (clk'event and clk = '1') then
   state_reg   <= state_next;
   counter_reg <= counter_next;

 end if;
end process;
-- next-state logic & data path
process (state_reg, trigger)
begin
-- default values
state_next    <= state_reg;
counter_next  <= counter_reg;

case state_reg is

  when state_1 =>
    if trigger = '1' then
      counter_next <= std_logic_vector(unsigned(counter_reg) + 1);
      if unsigned(counter_next) = N-1 then
        counter_next <= (others => '0');
        state_next   <= state_2;
      end if;
    end if;

  when state_2 =>
    if trigger = '1' then
      counter_next <= std_logic_vector(unsigned(counter_reg) + 1);
      if unsigned(counter_next) = N-1 then
        counter_next <= (others => '0');
        state_next   <= state_1;
      end if;
    end if;

end case;
end process;

end arch;

Here a testbench

library ieee;
use ieee.std_logic_1164.all;

entity int32_ctrlFSM_debug_tb is
end int32_ctrlFSM_debug_tb;

architecture tb of int32_ctrlFSM_debug_tb is

component int32_ctrlFSM_debug
    port (
      clk           : in std_logic;
      reset         : in std_logic;
      trigger : in std_logic
          );
end component;

signal clk           : std_logic;
signal reset         : std_logic;
signal trigger : std_logic;

constant TbPeriod : time := 100 ns; -- EDIT Put right period here
signal TbClock : std_logic := '0';
signal TbSimEnded : std_logic := '0';

begin

dut : int32_ctrlFSM_debug
port map (clk           => clk,
          reset         => reset,
          trigger => trigger);

-- Clock generation
TbClock <= not TbClock after TbPeriod/2 when TbSimEnded /= '1' else '0';

-- EDIT: Check that clk is really your main clock signal
clk <= TbClock;

stimuli : process
begin
    -- EDIT Adapt initialization as needed
    trigger <= '0';

    -- Reset generation
    -- EDIT: Check that reset is really your reset signal
    reset <= '1';
    wait for 4 * TbPeriod;
    wait for 1 * TbPeriod/2;
    reset <= '0';
    wait for 10 * TbPeriod;

    -- Stimuli
    wait for 10 * TbPeriod;

    -- send 4 rx_done pulses
    for i in 1 to 8 loop
      trigger <= '1';
      wait for 1 * TbPeriod;
      trigger <= '0';

      wait for 10 * TbPeriod;
    end loop;

    -- Stop the clock and hence terminate the simulation
    TbSimEnded <= '1';
    wait;
end process;

 end tb;`

The problem is that my counter never starts. Here's a scrrenshot from Xsim (vivado 2018.3).

I am doing all of this (counter_reg and counter_next) in order to avoid latches.
Any help would be appreciated.

Andrea


texts: Transistor noise figure in common base / common gate configuration

texts:
My question regards BJT and JFET devices.

Noise figures for transistors are usually given along with specific signal source resistances and collector / drain currents.

How can one apply these figures if the device is in common base / common gate configuration? What is the signal source resistance in these cases?


texts: How to simplify a multiplicator that currently consists of many adders?

texts: I have created a circuit with 64 AND gates, 77 1-bit adders and one OR gate. I am trying to create a 8 by 8 multiplier. How can I simplify this circuit, especially using the 8-bit adders?


texts: What connectors are best for mass production? Is it cheaper to not use connectors at all?

texts:
I'm in the middle of designing a circuit with hopes of going to mass production (> 5000 units). I'm trying to think ahead in my part selection a little bit for reliability and cost effectiveness. My only metric is the cost on Digikey (or like distributors) and how much they cost when a reel is purchased.

If I have multiple PCBs (4x) in different locations in the product that need to be connected, are connectors still cost effective? There will be the connectors on the boards and wire harnesses would need to be made with the mating connectors. From an assembly standpoint, connectors make sense but of course increase the BOM cost. The other option would be to just have pads on the PCB and solder wires to connect from PCB to PCB. I would think the latter would be cheaper but a PITA for assembly.

Does anyone have any experience with this?


texts: Converting an analog signal of varying maximum and minimum values to a series of pulses

texts: I have a situation where I need to convert an analog waveform into a series of pulses. The generated signal will be coming from an IR LED/photo-transistor pair that will output a signal whose maximum and minimum value will depend on the person whose finger between the IR LED/photo-transistor pair because of varying values in systolic and diastolic values of blood pressure among humans. I can't use a Schmitt trigger because I can't define a specific value to be the threshold limit above which the output is a logic level HIGH, and I can't use a peak detector because it would simply hold the highest value of the waveform which was sensed. Can someone please make a recommendation that would help me resolve this issue? Any help would be much appreciated.


texts: Confirmation on Diode in parallel with a Resistor

texts:
In a circuit with a resistor parallel to a diode/resistor, will the voltage across both resistors be the supply minus the 2v drop of the LED?

Meaning you would calculate it still by using resistors in parallel:
1 ÷( 1/r1 + 1/r2). And then use supply minus 2v ÷ R to get the total current? Is this correct?

I am trying to teach myself electronics and find it very hard to find definitive answers on the things I am trying to learn. Therefore I am wanting to just try get confirmation on a question if I can.

I get confused as in a parallel split the voltage is unchanged on each wire, only current is halved. But since one lane has a voltage drop I initially assumed they would rejoin with different voltages which wouldn't make sense. And I have learnt that if there is 2 diodes  it would only activate the one with the lowest forward biasing voltage and the other would stay off. .

I have done a few tests and found that seem to imply this is the case but none seem to definitively say it. If someone would be and to assist in confirming that this is the case that would be appreciated.

I have been learning about diodes and LEDs but keep running into problems that tutorials haven't discussed so it's tricky to find all the information. Apologies if I'm not posting correctly this is my first post. Also I know there is a circuit editor but I can't seem to see it in mobile. Thank you

EDIT: Schematic for a comment.

simulate this circuit – Schematic created using CircuitLab


texts: Electrical device that can generate a constant amount of steam until the device is switch off

texts:
May I know if such a device exist? The device can generate a constant amount of steam (given water and electricity) until the device is switch off. After switch on, it will generate the steam again.

The expected location of this device will be placed in a room where extreme cold air will surround it. (This is a experience in a lab)


texts: Hi I'm trying to follow through on a lab assignment and I cant find one LT Spice symbol that the instructor is using to model a perfect transformer. The picture of the symbol is given in this post. I just need to know what name it has so i can look it up.


texts:
Can I indefinitely charge NiMH batteries through a current source that limits just below the battery voltage?
More specifically, the battery is a 400mAh 14.4V pack and the supply is 15V but after a small resistance (25 ohms DCR of an inductor), the current source pass transistor and a Schottky diode the current source will stop supplying current when the battery terminal voltage reaches ~14.2V. Meaning the current source will supply about C/11.8 (34mA) until the battery charges enough to where Vbe of the pass transistor decreases such that current settles on something that maintains some voltage (hopefully in the upper 13V range but I'm just doing LTSpice at this point).
So can I leave the battery under the above described condition indefinitely or will the slight positive pressure reduce battery life?


texts: Spikes on a square wave of a oscilloscope reading

texts:
This question is not really a problem i am having but a thought that want to get off my mind.

Usually on a reading on a oscilloscope especially on a square wave and sometime triangle waves, there are these spikes or ringing.

See sample images from google below

I too have sometimes observed this when i am using an oscilloscope but i pay it not mind. From what i read it would seem that this is sometimes caused by bad probing. It got me thinking is this a oscilloscope specific phenomenon? if its caused by probing that would mean that whats actually happening on those lines are very clean signal (maybe not as steep voltage change but there is no ringing)


texts: Powering Arduino with 5V regulated power into VIN

texts:
I can power my project using a 9V battery going to VIN/GND on an Arduino Nano.

But if I try to put a 5V Power supply module inbetween the battery and the arduino then the project gets power but does not function correctly.

Why is this the case?

I read somewhere that you cannot supply regulated power to VIN, but can not find the reason why.


texts: Decoupling caps in circuit schematics difference

texts:
I want to ask if there is differences between this two circuits:

I ask this questions becouse in different schematics like this:

There is two decoupling cap of 0,1uF, it's a mistake or are necessary 2 decoupling capacitors? They seems to be in parallel.


texts: Difference between a circuit developed using lumped elements and microstrip elements (transmission line)

texts:
As the title implies, what is the difference between lumped elements and microstrip elements? According to my understanding lumped elements are discrete elements but I don't understand what is the meaning of microstrip elements and how they are used to represents inductors, resistors and capacitors ?

As an example this is a circuit designed using microstrip element on ADS software , please someone explain it to understand how microstrip elements give rise to C,R and L .

Thanks in advance


texts: What is the difference between a 12V and 24V DC motor?

texts: I was buying DC motors for making robots. I wanted to ask whether the voltage written on the motor, e.g. 12V or 24V, matters. Whether a 100 RPM 5kg/cm torque 12V DC motor is any different from a 100 RPM 5kg/cm torque 24V DC motor. If I give 24V to a 12V motor, then would it be a problem, or would it not accommodate 24V and finally perform as it would have performed on a 12V power supply? Or would a 12V motor perform better on 24V than it does on 12V?


texts: Circular polarized micro-strip patch antenna

texts:
Circular/ Elliptical patch antenna design after a bit more research I realized what my mistake was, after a user pointed it out. As such my new post.

I have come across a CIRCULAR POLARIZED PATCH ANTENNA DESIGN (FINALLY!). Which is shown below. However, as you can see there is very little data that is shown on how to exactly construct such an antenna. My frequency is 915MHz, input impedance is 50 ohm.

My questions are (i.e. what are the equations?):

The patch design is easy as I know of many resources that can assist me. But how do you calculate the width of the microstrip feed?
How do you calculate the position of where the microstrip intercepts the patch antenna?
How do you calculate the exact position of where the second feed line braches of the main feed line to form the 90degree out of phase feed line?