texts: Voltage step down from 12V to 3V3 for cDAQ module

texts:
I am by no means an electrical engineer, so I'm guessing that there is a pretty simple solution to this problem and I'm just being thick about it.

In general, I want to read the voltage of 4 different relays into cDAQ module NI 9402. This particular DI/O module has a voltage read limit of 5V, but since all relays will be operating at 12V, I'm wanting to step down to 3V3. Essentially, the NI module will read the voltage as either 3V3 or 0V thus providing info to the state (open or closed) of the power relay(s).

After some basic googling and looking through parts on digikey and mouser, I'm having a difficult time finding power converters that can handle 12V --> 3V3. Is this too large of a step-down for a single unit to achieve? Wondering if I'll need to go from 12V --> 5V --> 3V3? Help is much appreciated, Thanks!!

Don't think it's required information, but here is the particular relay that I'm working with: https://www.digikey.com/product-detail/en/phoenix-contact/2906224/277-14896-ND/5699611


texts: High gain photodiode amplification response time

texts:
So we are trying to detect very low levels of UV light using the circuit below. One of the problems I am having is that the response time for the output at "signal" is as long as 1-2 seconds. If we pulse our light at 10 Hz the output is 1.8 V but if we have the LED on constantly we are getting 5V. I assume this is becuase when we pulse the signal the output hasn't had time to rise yet.

From the research I have done so far it looks like a smaller capacitor is needed but with so much gain do I also need an op amp with a higher GBP? The AD820 has a GBP of 1.8MHz. Is there a simple calculation for what C45 should be or is the only one F = 1/2.pi.C.R?

Any advice/suggested reading material would be much appreicated.


texts: How do I deal with the high amps in this Arduino circuit?

texts:
I am a programmer by trade and I like to mess around with Arduinos from time to time. I recently purchased a BUNCH of 12V 5W DC water pumps (the 3x5 models shown here). I am currently evaluating how to best control these with my Arduino Mega. I found These little control boards that can handle up to a 12V external power supply while using the arduino for control signals. Cool.

I was talking to my friend about buying a bunch of these things when he mentioned that running motors simultaneously in parallel like that (I intend all motors to share the same power supply) will add up the amperage. I did some math (correct me if im wrong please) and If I wanted to run 6 motors at one the circuit would need to be able to handle 2.5 amps

I made a wire diagram to help me (and hopefully you guys) understand:

After what my friend told me I am now worried about burning out the control boards and/or my Arduino. The control boards can only handle .8 amps (I think, hard to find info on this thing) and from what Iv'e read the mega can handle .25 (maybe 1 amp? still, much too low). Does anyone know how I am supposed to deal with high amps? Or is my friend wrong, and the amps aren't an issue?

EDIT1: Someone pointed out I should not use the ground pin on my arduino. The controller boards now use the vcc pin for the + end of the power supply and the grnd pins are now hooked up to the - end of the power supply. Updated schematic


texts: How to drain power with pins for led matrix on atmega32 instead of using a led driver

texts:
I want to make a led driver without the tlc594 series.
I use the atmega32 of which I can use 1 PWM pin.
The PWM pin will be connected to the base of the transistors.
With the PWM pulse I can dim the leds.

My question is how to configure the pins so that:
1) Pin is high, led wont burn.
2) Pin is low, led will burn.

I added a simplified scheme, of the led driver with a led matrix, so you can understand my situation.

Thx for the help.


texts:
I was wanting to buy a 12v battery that could supply 8A for around an hour. I thought I knew what I was doing and so ordered the following 12v 10Ah Deep Cycle battery.

Yuasa REC10-12 BATTERY Deep Cycle Cyclic SLA 12V 10Ah

I chose deep cycle as from my understanding, they cope better with running the battery down low. And I chose 10Ah as I thought that meant it could supply 10 amps for up to an hour.

However, upon testing this, it lasted about 10 minutes :(

Having done a little more research, I have found out the the 10Ah stated is not as simple as I thought it was, and you have to consider the Nominal Capacity specs to figure out how long you'd actually get.

When I look at other battery data sheets, they specify this data clearly, for example here :

http://www.power-sonic.com/images/powersonic/sla_batteries/ps_psg_series/12volt/PS-1220_11_Feb_21.pdf

Nominal Capacity

 20-hr.    (125mA to 10.50 volts)      2.50 AH
 10-hr.    (220mA to 10.50 volts)      2.20 AH
 5-hr.     (400mA to 10.20 volts)      2.00 AH
 1-hr.     (1.5A to 9.00 volts)        1.50 AH
 15-min.   (4.5A to 9.00 volts)        1.13 AH

But having looked at the datasheet for the battery I bought, it doesn't show the Nominal Capacity? could anyone help me to understand from the datasheet, how I would work out the expected runtime at 8A?


texts:
I have a doubt related to back to back connection of PN diode....

Does back to back connection of PN diode works exactly as transistor?

It looks like a small doubt... But I want detailed information about it. So, can anybody explain about it in detailed manner?


texts: Need help identifying a connector and someone who sells it

texts:
I have an evaluation board I need to connect to, and the connector is one I have not seen before.

I believe it is a LS2-120-01-F-D-RA1: 2.00 mm Locking Hermaphroditic Terminal/Socket Strip

The connector on my board has two retainer clips, not one as in the SEMTEC drawings, but the dimensions overall seem to check out.

If it indeed is LS2-120-01-F-D-RA1, I'm having trouble finding anyone stocking it. I've tried Farnell, Mouser and DigiKey...


texts: I am designing a circuit to provide a logic high (5V) or logic low (0V) to a microcontroller. How can I incorporate an LED into the circuit so that it is on/off when the logic is high/low, while still providing the microcontroller with either 5V or 0V.


texts: A Drone 1900w led lightning flasher with a ssr problem. Help please

texts:
I'm a lighting technician that works in the UK film industry. I was really hoping some one could help me with a SSR switching issue.

I have built a led lightning flasher to simulate storm lightning for a film. This fixture will be attached to a drone and will be switched on and off repeatedly for up to 6 minutes in very short bursts  due tho the lack of heat sink.  I am using 250 W voltage booster and Constant current driver to power two 100 W LEDs these draws 5 A at 30 V. I have 10 drivers and 19 LEDs in my fixture. I will be using two SSRs to switch two separate circuits via a wireless dc controller system. One circuit will switching a load of 40 A and the second will be switching a load of 30 A.

I'm hoping to use a DC-DC SSR like this.https://docs-emea.rs-online.com/webdocs/10c9/0900766b810c9bee.pdf

I have learnt that I need to use a Schottky diode to protect my SSR. I am not an electrical engineer and I really need help in choosing the correct Schottky diodes for this project and where to put them. I have already killed two SSRs after 10 or so flashes and can't afford to kill any more!

I have attached a basic drawing and a photo of my build to help explain what I'm trying to do.

This is the basic set up for driving two leds.


texts: 555 IC Astable Mode - Does the voltage generally affect the frequency?

texts:
Sorry if it's been asked before, I'm asking to satisfy a curiosity.
I'm new to electronics, and I'm messing around with the perennial 555 IC. I've been introduced to the following formula which allows you to determine the frequency of the output when put in an astable mode:

f = 1.44 / (r1 + 2 * r2)C

I noticed how voltage is not part of the equation. However, wouldn't the VCC of the IC affect the frequency (generally speaking)? Internally, the IC creates a voltage divider and uses 1/3 and 2/3 of the VCC as references for the comparators. If VCC is 5V, and it takes x amount of time for the external capacitor's charge to build up and for the voltage to rise from 1.667V above 3.333V, would it not take longer if VCC were 9V? The references would now be 3V and 6V. If no components have been swapped (external capacitor, resistors), would it not take longer for the voltage to rise from 3V to above 6V? Or, does the increase in voltage charge the capacitor faster, and the effects cancel out?


texts:
I am using a MC33926 motor controller. Unfortunately, I am not extremely familiar with motor controllers and have a question. The circuit below shows the circuit that I am working with. The drivers datasheet is here. So I simply am pulling IN1 low and IN2 high and a PWM is driving D2.

This image is the driving PWM from an MCU.

This is my problem. The below signal is the signal on the output of the motor driver. When driving the motor control, if I drive it slow enough then the rise time is great but as in the picture below if I drive it faster(1.3kHz) then the rise time keeps getting worse. I have read through the data sheet and to my understanding I am driving it correctly and it says it can be driven at 20kHz. So if someone is familiar with this driver or same problems, am I driving the driver incorrectly?


texts: Unable to understand parallel resisitors

texts: In the circuit attached in the image,I am unable to understand why R1,R2,R3,R4,R5 are not in parallel even though different current flows through them, any help would be appreciated


texts: What kind of resistors do I need to use in this Canon remote switch, if it is possible at all with the P2N2222A transistor I have?

texts:
I'm a total electronics n00b set out to create an intervalometer for my Canon EOS 350D camera which seemed super simple from the outset, but I got a bit blocked with creating a switch using a transistor.

I don't fully understand the inner workings of the transistor and got lost with things like having to saturate it, using a shorting resistor, calculating voltage / current / resistance, etc to get the whole thing to act as a binary switch.

The camera circuit I want to switch is super simple and low powered (each switch carries about 0.5 mA at 3.3 volts):

(Source: http://www.covingtoninnovations.com/dslr/CanonRelease.html )

For now I only want to get the expose bit working as it seems I'll only need to duplicate that for focus.

For the controlling circuit I want to use an IOIO board, which is very similar to an Arduino being a programmable controller with a variety of I/O pins to interface with whatever you throw at it.

I have a bunch of P2N2222A transistors which even with my limited knowledge seem to be usable for this purpose and a resistor kit with 20 values, but I'm not really sure how to combine them or if I need to get a diode too to get this working.

So far I tried connecting the Canon circuit to the Collector and Emitter legs of the transistor and then connecting to the Base the 5V pin from a battery through a 2.2K resistor (which the transistor came with) hoping that it will just work, but nothing happened :) At the moment I'm trying to get it working without the IOIO just to simplify things and to not fry it if I do something wrong :)

I got the idea from this diagram by the way:

( Source: http://www.mayothi.com/transistors.html )

It seems strange to me though that the controlling circuit is not really a circuit just a one way thing, and reading about shorting resistors on other pages I guess I'd need to connect the grounds together somehow and use a higher resistance resistor in it? Or maybe even a diode? Please help!


texts: Debouncing circuit to count the pulses of a water meter with pulse emitter

texts:
I want to design a debouncing circuit to count the pulses of a water meter with pulse emitter (it behaves like a push-button). The microcontroller is the msp430g2553. I want to eliminate the rebounds completely by hardware, no software. I have considered the following circuit but unfortunately I can not test it with a real water meter. As the rate of sending pulses is several in a minute (very low) I have designed an RC with a time constant of about 1s. Do you think it is an appropriate design? Thanks in advance.

simulate this circuit – Schematic created using CircuitLab

Best regards,
Fran Martin


texts: What is cause my pantry LEDs to turn on slowly, and how can I mitigate it?

texts:
Recently I put an switched outlet in my pantry with a door jamb switch. A set of LEDs is plugged into that outlet.

When the LED set is plugged in, and I turn on an inline switch on the LED, the lights turn on instantly.

When I use the door jamb switch (with the inline switch on the LEDs turn on) the lights take a few seconds to turn on. This behavior can also be seen when just plugging and unplugging the power plug from a non switched outlet.

I'm thinking this tells me the power plug is what's causing the delay. It converts the standard 120 into 12v 1000 mA. Is there anything I can do (maybe replace the power plug?) to speed up it's response time?


texts:
For a lot of projects, I use a fairly common USB to serial dongle called "Prolific USB to Serial" which uses a PL-2303 TA chip to allow USB to 3V TTL serial (i.e. this kind on Alibaba).

I actually got it on Amazon though - but basically it's the same hardware.

Disclaimer

Before I go on, I'm aware from the Prolific website.

  Please be warned that counterfeit (fake) PL-2303HX (Chip Rev A) USB to Serial Controller ICs using Prolific's trademark logo, brandname, and device drivers, were being sold in the China market. Counterfeit IC products show exactly the same outside chip markings but generally are of poor quality and causes Windows driver compatibility issues (Yellow Mark Error Code 10 in Device Manager).

Now I don't see any warning triangle on the device manager and this is a PL-2303TX not HX chip -- but I'm suspicious that these probably came from the China market, i.e. Alibaba.

Anyway, end of disclaimer.

Issue

The dongles work fine, except for when sending a particular message I've discovered since we use MODBUS for a lot of communication. The message below is what I am sending using RealTerm.

0x01 0x03 0x00 0x1C 0x00 0x01 0x45 0xCC

The scope images were taken with probe directly into the dongle output - i.e. the  TX / RX / GND outputs were not connected to any hardware.

The problem is I only see this 50% of the time. Instead, sometimes I see the data below, when I don't change the message (just keep clicking "Send Numbers" on RealTerm):

Which is weird, and I have only seen it with these dongles. The even weirder thing is if I change the message to this:

0x01 0x03 0x00 0x1B 0x00 0x01 0x45 0xCC

(i.e. 1B instead of 1C -- ignoring changing the CRC i.e. the last two bytes of the MODBUS frame) -- it works 100% of the time!

I wonder if any one else has had any issue similar to this? -- and hopefully I haven't answered my own question with regard to the counterfeit issue. This issue doesn't appear to occur with an RS232 dongle that I have. Latest drivers for the PL2303TA don't appear to help. I was using 9600 baud , but saw the same problem with 57600 baud so is probably baud independent.


texts: SIM Cards are using a Microprocessor or Microcontroller?

texts:
I'm getting different answers on various websites (Wiki, Online University courses, fan pages, etc...) and can't get to decide. That would mean there are SIM with Microprocessors and some with Microcontrollers? If so, which ISO or reference does it follow?

Thanks


texts:
I am trying to detect how often 2 animals 'interact'. Say I have 4 cats, I am trying to work out how often each of the cats interact with each other.

I have considered using RFID tags attached to their collars. Ideally this would mean that every time each cat came close to another cat each tag would 'see' each other and that count would be recorded. So for example over the course of a week I would be able to see how many 'counts' each cat had with any other. Is this possible with RFID or is there another technology to do this I am unaware of.

Thanks in advance.


texts: Confusion in setting the bias point of an amplifier

texts:
I have a textbook that details the designing process of a common emitter BJT amplifier. When designing the biasing point, the text says to set the bias collector current so that half of the supply voltage is dropped across the resistors and half is dropped across the transistor. For example, if we had a supply voltage of 10V, we would assume that at the middle point of the load line there would be 5V across the collector-emitter junction and the other 5V would be distributed across the resistors. This supposedly gives the highest room for the signal to "swing" when input is applied.

But how does this make sense, since usually the output is taken to be the voltage between to collector and ground? So wouldn't we want to bias so that the voltage across the transistor AND the emitter resistor is equal to half of the supply? What am I missing here?


texts: Decoupling capacitors on bottom layer in non-BGA packages?

texts:
Typical advice on decoupling techniques usually gives highest priority to: always place the decoupling capacitors on the top layer, next to the pins.  BGAs of course are a separate issue; I'll come back to those.
I am working with the KSZ9131MNX, a 0.4mm pitch QFN-64 gigabit ethernet PHY/transceiver, and the lack of space is getting beyond critical.  For example:

Traces (from signal pins) are struggling to get out through the little space that the capacitors leave. Those traces are supposed to be kept as far apart of each other as possible to avoid cross-talk;  the resistor networks are supposed to be as close as possible to the signal's source (in this case, the pins of the chip at the top of the image), etc.
I'm questioning the wisdom in sticking to the "standard" strategy for decoupling capacitor placement.  For the top layer, the layout and compliance with signal integrity and transmission line constraints would be so much better if I just place those capacitors on the bottom layer.
With BGAs, we do that (because we have no choice, yes — but my point is:  if doing that really did not work from the electrical point of view, then BGAs would not exist).
QUESTION 1: Is this ok? Should I expect reasonable performance w.r.t. decoupling with caps on the bottom layer?
Assuming that it is ok, my next question is: how exactly should I implement them?  I see two seemingly-valid options:
Option 1: Place a via right next to the pin; on its way down, that via will connect to the VCC plane, then it continues to the bottom layer where it will encounter the capacitor. Conveniently enough (for that matter, more often than not the case), the exposed pad is ground, so the decoupling capacitor can then go to a big copper pour covering the EP's area:

Green is bottom layer, red/maroon is top layer.  Notice that the copper island on the bottom layer can actually be larger than the exposed pad, for example to the point where it's flush with the outer edge of the capacitor's GND pad.
Advantage: more compact, easier to implement, etc.
Disadvantage: the wave propagating out from the VDD pin when there's a spike in current demand does not encounter the capacitor on its way out.  Instead, it encounters the VDD plane first, so it escapes; then it continues and encounters the capacitor (a short to ground), so the wave, inverted, is reflected and subtracted from the other one;  but the other one had a head-start, so there will be a small "glitch" that travels and injects some noise the VDD plane (corresponding to the time of flight from the VDD layer to the decoupling capacitor and back).
Option 2: Put an anti-pad to the via so that it does NOT connect to the VDD plane on its way down.  Instead, it travels all the way down to the bottom layer, then to the capacitor's pad, and then on the other side of that pad, it connects to another via, which in turn connects to the VDD plane.  Alternatively (although very limited solution), to avoid the extra via, I could place a copper island of VDD around the EP's ground island.  However, this is limited because chips tend to have multiple VDDs (for example, this ethernet transceiver has FIVE independent VDDs, which are all supposed to be separated by ferrite beads).
Possible advantage: electrically better, as it seems to follow the pattern of the VDD pin encountering the capacitor before anything else; however:
Disadvantages: seems very difficult to implement cleanly, as there is no room for the additional via;  also, now there is more total inductance involved, since now there is the whole path to get to the decoupling capacitor, and then some more (additional trace + additional via) going from the capacitor to the VDD plane.
QUESTION 2: Which option should be preferred?  Is there a third, perhaps preferred, option?


texts: I found an audio circuit and I built it just fine, but I find it a bit too quiet. How do I amplify the output so that it is a bit louder?

texts:
I want to try something audio related and found the following circuit from technoblogy

I built it and loaded a sound clip. Everything works fine, but I found it a bit too quiet and I want to amplify it, but not entirely sure how.

The biggest problem is that I do not have access to an oscilloscope so while this does play sound clips just fine, I have zero idea what the waveform output looks like at the speaker, or even its voltage level (I'm assuming the peak to peak voltage is less than 3.7V) and because of that, I'm not sure how to amplify the output to make it more audible. Or is this even possible to amplify it due to the 3.7V constrain?


texts: Why would my signal from a piezoelectric device changes while using a voltmeter and electrometer?

texts:
When we apply a force to a piezoelectric material it produces some potential difference.

I was measuring with Keithley nanovoltmeter and Keithley electrometer 6514.

I am getting different output in both the devices when applying the same force to the piezo.

Please let me know which one is correct and why??
the change is not small and its from 10 to 100 times


texts: Determine if phototransistor is in cutoff

texts:
I'm attempting to determine if the following phototransistor HOA1870-031 is in cutoff.
The HOA1870-031 we have in stock have the cathode of the IR emitter tied to the emitter of the IR detector (phototransistor).
What I want to do is detect whether the phototransistor is in cutoff (the light between the IR emitter and IR detector is blocked).
To do this I'm reading the voltage with an analog input (PA1) which is connected internally to a comparator (COMP1) in the STM32F303VC.
When the phototransistor is saturated I read a voltage of ≈230mV after the voltage drop across the 10KΩ resister.
When the phototransistor is in cutoff I read a voltage of ≈2.9V (VCE ≈ VCC ≈ 3V).
I set the inverting input of COMP1 to VREFINT and the non-inverting input to PA1.
I'm also reducing some noise via the configurable hysteresis for the comparator.
I've tested it and things seem to be working as expected, when the light is blocked between the IR emitter and the IR detector the ISR I configured is fired.
Although I did go to school for EE I've been writing software for so many years that I've forgotten most of what I had learned (which really sucks).
I dug out all of my old text books which helped me come up with the circuit you see below.
My question here is, am I doing anything obviously wrong?
Is there a better way to accomplish this (detecting if the light is broken between the IR emitter and IR detector)?


texts: One-shot Monostable 555 with long trigger

texts:
I am building a one-shot monostable oscillator using 555 Timer. Trigger pulse is controlled by a pushbutton, and thus can be long. I don't want output pulse to stay high for that long (simulated by V2 and voltage-controlled switch in schematic below). For that reason, I want to use reset pin to reset cycle after,say, 50ms. I simulated circuit but I am not sure how to execute in reality control of reset pin (this is simulated by V3 in schematic).

Thanks.


texts: Please can someone give their opinion on my Cat water Dispenser circuit?

texts:
I'm trying to create an automatic water pump for my dear old pussy cat (I'm using her as an excuse, really I wanted a project of some sort)

I have the following Circuit:

R1 is the water itself
S1 is the water being conductive and completing the circuit through the water

When power is applied to the circuit all the opAmps are LOW, the MOSFET is allowing current to flow from Source to Drain and the motor/pump spins.

When a connection is made i.e the water from the pump fills the bowl to a certain level (R1/S1), 7mv goes to the non-inverting A input of the opAmp. This saturates the output (5v) due to open-loop gain, charges the Cap at C1 and also saturates the B output of the opAmp, shutting off the MOSFET.

When the connection is lost i.e the cat has a drink and the water level drops. The A opAmp goes low and C1 is allowed to drain through the 15k Resistor (R5). After the cap is drained (~seconds) the motor spins, the bowl fills up.

Eventually I am going to have an RFID tag on her collar which will turn on a relay to provide power to all this, but thats phase 2.

I know I would be better of using proper comparators, but this opAmp suffices. Like I said, this circuit is working as I expect, but are there any recommendations from anyone at all?


texts: Same priority for masters in a CAN network

texts:
I'm aware that messages on the CAN network are assigned priorities. I'm  working on a 2oo3 voting system, and if each of the messages by the three masters are given three unique id's, I'll be making masters among the three masters for the messages i.e. I'll be prioritising among the masters.

I have considered the approach where the slaves keep transmitting the data (either periodically or when they detect a change in the inputs), so that by this way all the three masters can receive the data at the same time and act on the same data. Or, another approach wherein the three masters decide among themselves who will request the slave and when the slave replies, all three masters will process the data at the same time.

I want to know if there is a way, by using a CAN network, I can ensure that the three masters are given the same priority without going with the slave sending approach as mentioned above, and making sure that the masters initiate all actions and not the slaves.

Note: I'm aware of how useful ID's are in arbitration. I just want to know if there a way by which this method is possible.


texts:
How could I make a circuit where whenever a push button is pressed, the output would be a single pulse ? The pulses duration has to always be the same regardless of how long the button is held down. What would be the simplest way of doing this (ideally only using discrete components, so no 555 timers) ?

Thanks,

Liam


texts:
Hi Im building a boombox and I am looking for ways to extend the power autonomy.

I am using this stereo(https://www.amazon.com/gp/aw/d/B0091V0A9U/ref=mp_s_a_1_3?ie=UTF8&qid=1514153185&sr=8-3&pi=AC_SX236_SY340_FMwebp_QL65&keywords=pioneer+stereo) and these speakers(https://www.amazon.com/gp/aw/d/B0081SRIFS/ref=mp_s_a_1_6?ie=UTF8&qid=1514153301&sr=8-6&pi=AC_SX236_SY340_FMwebp_QL65&keywords=pioneer+speaker).

I will put the boombox in the back seats of my car and it will be powered by 2 12v batteries(not the main car battery).

I assume that the specification of 200w is per 1 speaker, and 50 watts of the stereo is per 1 channel(so i doubled both because Im using 2 speakers and 2 channels)

I used I=W/V ---->I=[(200×2)+(50x2)]/12volts--->I=41.7 Amps

I got 2 12v 7ah lead acids so (7x2)/41.7=0.33 or 20 mins of playing the boombox at full blast. My questions are the following:

-Are my calculations wrong? If not, how is it possible that a little boombox uses so much power?

-How can I make the boombox play for longer? Add batteries? Lower volume? (I am trying to avoid using the main car battery). Thank you.


texts: What's the difference between a pot labeled SB250K vs B250K?

texts:
The mechanical on/off detent of the dimmer on a 120 volt, 100 watt halogen lamp failed (i.e.: lamp always on but would still dim/brighten). The failed pot was labeled SB250K and part of a diac & triac circuit I could figure out.

Using a digital meter, I confirmed my suspicion that the pot's resistance was ~250kΩ and was linear.
When searching for a replacement, I found identical mechanical layout (e.g.: diameter, shaft length, contacts positions, etc.)
Electrically, those replacements were also 250kΩ with linear taper and had five identical contacts: 3 traditional pot contacts (top of photo) and 2 on/off switch contacts (rear).
But in all cases, were labeled B250K (and not SB250K).
I took a chance, ordered one of these and it has worked fine.

Is it important that I could not find a pot labeled SB250K?
What does the letter S signify?


texts: How to check if IR receiver is dead or not ?

texts:
I have an IR Receiver , but I am not sure if it works or not,
I want to make sure weather it's burnt or not,  How can I test this with Multi meter ?
If it can not be tested with multi-meter, Is there any easy to test ?


texts: Verilog-A: pass an array without predefined size as input to a function

texts:
It seems fairly easy to pass to a function array if its size is already known:

analog function integer ArrayIsZeros;
input [7:0] array;
integer array [7:0] ;

But then the function becomes specific for arrays with 8. Is there any way to make it more universal, for any array with size not predefined?


texts: Will any rom file for a Z80 computer work with any hardware?

texts:
A few months ago I made up some PCBs for a Z80 computer using designs from allthingsmicro.com
Unfortunately their website has been down and there seems to be no way of contacting them.

I have had the boards laying around for a few months and finally decided I want to try and build the thing. Only problem is that I don't have the ROM file.

My question is that if I go and download any ROM file for a Z80 computer off the internet, will it work with the board? Will any firmware work with any Z80 computer.

From my understanding the board is pretty standard, using the Z80 CPU, SIO and CTC and 256k of RAM.

Thanks for any help!


texts: STM Prescaler - what happens if it's negative or too big?

texts:
I'm using an STM32

The osciloscope is showing really weird stuff and resetting all PWM parameters on STM doesn't help (for another board readings are okay).

What happens if I set timer prescaler (using __HAL_TIM_SET_PRESCALER) to some incorrect value, like negative number or too big one? Can it screw something up?


texts: I just recently started using a Sparkfun serial LCD. I am able to control it through an arduino, but I want to be able to control it through a terminal on my computer. To be able to move the cursor or clear the screen, you need to be able to send hexadecimal code to it, for example, 0xFE. I am unable to find an open source terminal program for Windows that will give me this functionality. An example of a program that works very well is Eltima serial port monitor, although it is rather expensive for just a student. I have a USB to serial FTDI breakout board to get the signal to the LCD. Any suggestions as for programs, under Windows 7, will be greatly appreciated.


texts: Can a ITS4100S-SJ-N High side power switch be used to switch AC/DC load

texts:
I have seen a PLC which uses the ITS4100S-SJ-N component to switch (just on/off) a 24V DC, 2A max. load.

I was asking if those components can also be used to switch 24V AC?

Datasheet:
https://www.infineon.com/cms/de/product/power/smart-low-side-and-high-side-switches/industrial-high-side-switch/ITS4100S-SJ-N/productType.html?productType=db3a30443a06def4013a2bc7fc9e28bd


texts: What is use of R41 (base to emitter) resistor in Transistor Relay Circuit?

texts:
I am controlling relay from arduino, using the following circuit.

I want to understand what is use of R41 (base to emitter resistor)?

Is it required for base termination?

How is its value calculated?


texts: How to model a repeating sinc pulse in LTSPICE?

texts:
I'm looking to model a repeating sinc pulse in LTSPICE, however I can only get it to fire once. I'm looking to delay it by x many ms, and trigger the pulse the again.

Is this possible with LTSPICE ?


texts: Finding a current by superposition theorem and a current-divider

texts:
I'd like to find \$i_s\$ for the following circuit, using the superposition theorem. First I zero the current source, which leaves me with a circuit whose resistances can be reduced, giving us

$$R_t = (5+10)\,\parallel\,5 = 3.75\,\Omega$$

This, in accordance with Ohm's law, yields us the current \$i_1 = \frac{10}{R_t} \approx 2.67\,\text{A}\$

My first question here is about passive configuration regarding current and voltage. The passive configuration is when the current reference direction enters the positive reference of the voltage (as in our image). In this case, we have Ohm's law as \$v = iR\$.

But when the current reference direction enters the negative reference of the voltage, Ohm's law becomes \$v = -iR\$.

So that means if \$i_1\$ goes in the same direction as \$i_s\$ in the figure, \$i_1\$ is positive (as per my calculations). However, the textbook writes \$i_1 = -2.67\,\Omega\$.

For the rule I explained above, is there an exception to sources, or have I misunderstood the passive configuration's consequence on Ohm's law?

The next step to solve for \$i_s\$ is to zero the voltage source, which gives us a circuit that looks like the figure below.

Why is it that the current through the \$5\Omega\$ resistor will be \$0\,\text{A}\$?

Textbook gives us \$i_2 = -0.67\,\text{A}\$, which can be calculated using the current-division principle on the \$10\Omega\$ and \$5\Omega\$ resistors, which are apparently parallel (I don't see it, considering the \$5\Omega\$ resistor).


texts:
I'm going to get this wire for a simple project, and I need to get some heat shrink for it.  My problem is that I can't figure out the diameter of the individual insulated wires.  There are going to points in the project where the cable is going to be split, and soldered onto LED leads.

The problem is that I can't figure out the diameter of the individual insulated wires.  I think it's .145", according to the datasheet.

I think this heatshrink will work, with the wire above, but I want to triple check before I order.


texts: How much is the permeability of this attached inductor core?

texts:
I want to use this inductor for AC line filter as line reactor. Its inductance value is 6 mH but I don't know the exact value of permeability of the material. It will be used with VFD at the input to remove the harmonics. The input current will be from 2 to 7 A.

Could you please tell me the exact value of the permeability of this material?


texts:
im trying to use ASF to schedule repeated tasks.

using TC4 and TC5:

in atmel start both using generic clock generator 0 (48MHz).
both are HAL:DRIVER:Timer

driver init.c is generated automatically by atmel start:

timer_1_init = TC4
timer_0_init = TC5

when i comment Timer_1_init() ..

timer0 task runs ok..
however, when timer_1_init is called.. the task in tc4 is not called.

i read about tc4 and tc5 have same gclk id so i did this (enable both buses and then enable gclk channel) .. but same issue..

if i comment init of tc4:
- tc5 code works fine
if i comment init of tc5:
- tc4 code works fine
if i dont comment inits:
- tc5 task works (even if i init tc4 before init of tc5)

========= edit section =========

int32_t timer_init(struct timer_descriptor *const descr, void *const hw, struct _timer_hpl_interface *const func)
{
    ASSERT(descr && hw);
    _timer_init(&descr->device, hw);
    descr->time                           = 0;
    descr->device.timer_cb.period_expired = timer_process_counted;

    return ERR_NONE;
}

note device->hw = hw in next func

int32_t _timer_init(struct _timer_device *const device, void *const hw)
{
    int8_t i = get_tc_index(hw);

    device->hw = hw;
    ASSERT(ARRAY_SIZE(_tcs));

    hri_tc_wait_for_sync(hw);
    if (hri_tc_get_CTRLA_reg(hw, TC_CTRLA_ENABLE)) {
        hri_tc_write_CTRLA_reg(hw, 0);
        hri_tc_wait_for_sync(hw);
    }
    hri_tc_write_CTRLA_reg(hw, TC_CTRLA_SWRST);
    hri_tc_wait_for_sync(hw);

    hri_tc_write_CTRLA_reg(hw, _tcs[i].ctrl_a);
    hri_tc_write_DBGCTRL_reg(hw, _tcs[i].dbg_ctrl);
    hri_tc_write_EVCTRL_reg(hw, _tcs[i].event_ctrl);

    if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT32) {
        hri_tccount32_write_CC_reg(hw, 0, _tcs[i].cc0);
        hri_tccount32_write_CC_reg(hw, 1, _tcs[i].cc1);
    } else if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT16) {
        hri_tccount16_write_CC_reg(hw, 0, (hri_tccount16_cc_reg_t)_tcs[i].cc0);
        hri_tccount16_write_CC_reg(hw, 1, (hri_tccount16_cc_reg_t)_tcs[i].cc1);
    } else if ((_tcs[i].ctrl_a & TC_CTRLA_MODE_Msk) == TC_CTRLA_MODE_COUNT8) {
        hri_tccount8_write_CC_reg(hw, 0, (hri_tccount8_cc_reg_t)_tcs[i].cc0);
        hri_tccount8_write_CC_reg(hw, 1, (hri_tccount8_cc_reg_t)_tcs[i].cc1);
        hri_tccount8_write_PER_reg(hw, _tcs[i].per);
    }
    hri_tc_set_INTEN_OVF_bit(hw);

    _tc_init_irq_param(hw, (void *)device);
    NVIC_DisableIRQ((IRQn_Type)((uint8_t)TC_IRQ_BASE_INDEX + tc_get_hardware_index(hw)));
    NVIC_ClearPendingIRQ((IRQn_Type)((uint8_t)TC_IRQ_BASE_INDEX + tc_get_hardware_index(hw)));
    NVIC_EnableIRQ((IRQn_Type)((uint8_t)TC_IRQ_BASE_INDEX + tc_get_hardware_index(hw)));

    return ERR_NONE;
}

==============

what causes this problem?


texts: How to get the crossover frequency from a Laplace oquasion

texts:
What is the fastest way to get the crossover frequency from a formula like this?

$$H(S) = \frac{1}{1+aS}$$


texts: Reference clock in FM receiver chips (si4735)

texts:
The datasheet is mentioning a 32678 Hz "reference clock" (RCLK) input.
It appears to be a well known thing in this type of ICs because it's highlighted in the list of features.
I guess because it's obvious to everyone they don't explain what this reference clock is used for. They mention some clocking mode (besides FM mode) it's used in, but it's not clear what it is.
What is the purpose of this reference clock (RCLK) signal?
Is it a PLL reference for the heterodyne?


texts: Help decode/identify/guess this blown ceramic capacitor?

texts:
My monitor's backlight died (can still see screen with torch).
Found a blown ceramic disc capacitor. The problem is it's partly exploded over the values. I'm hoping people here might have a better guess.
The monitor is the Philips BDM4065UC.
The capacitor is off the power board.

And for reference here are pictures of the board. Can't upload them here due to 2MB filesize. The capacitor is C9818 it's in the middle top of the top of the board picture and the middle right of the bottom of the board.


texts: I have a PIXAXE-20X2 and want to connect 65 LEDs as outputs! Is it possible?

texts: I have to make a traffic light for a school project and I decided to use a PICAXE-20X2 microcontroller which has 8 output pins. I have 10 LEDs for the red, amber & green lights, 10 also for the red and green man, 10 for the walk and the same for the wait sign. I have connected the 10 for each pin in parallel and a maximum of 20 LEDs will be on at a time. I want to know if this will work?


texts: STC3100 Gas gauge value reading 0x0000 or 0xFFFF

texts:
I am currently programming an STC3100 trying to read battery capacity. I am successfully able to read temperature, current, and voltage, however the value for the gas gauge battery capacity is either 0x0000 or 0xFFFF. I do not understand why. I have followed the datasheet's diagram exactly. What could my issue be?

Here's a link to the datasheet:
https://www.st.com/resource/en/datasheet/stc3100.pdf

Note that the value of Rcg is 0.050 ohms.

These are the only following writable registers for the device:


texts: Solid State Switch for magnet DC Generator

texts:
I'm using a flywheel-driven permanent magnet DC generator to charge up a bank of supercapacitors, 35 farad rated to 25V.   For safety I limit the max charge to 22V via a comparator and a zener reference.  Because I have no stable reference voltage at all in in this system, I rely on the zener for a reference.

This small generator, at my max. RPM, puts out 120V open-circuit and 2.5A short-circuit.     Charging up from cap bank at zero volts, indeed 2.5A flows into the cap bank and voltage climbs.  When the voltage on the cap bank reaches 22V, comparator U1 goes high.   U2 serves to invert this signal and turn on PNP Q3.  I want to use the signal at Q3's collector to drive some kind of switch to disconnect the charging current from the DC generator, in order to avoid over charging the cap bank.

My question is on Q1 and Q2, my hypothetical switch.   Does this approach make sense?   Starting from zero volts on the cap,  I expect Q1 to be on as its gate is connected to is drain through the 1M resistor.  As soon as Q3 pulls up Q2's Vg ~ 10V, I expect Q2 to pull down Q1's Vg to near ground and effectively shut off charging current to C1.   Due to feedback R7 & C2, U1 will not flip back again until ~ 20V.

Let's say that after charging C1 to 22V, Q1 goes into cutoff.   Also, the DC generator is at a stop, so Vds = -22V    Also, Vgs = -22V  .   I'm not sure if this condition will wreak havoc with Q1/Q2.  The part number ( IP8107N20N3 G ) is spec'd for Vds = 200V and Vgs = +/- 30V   but I'm not comfortable with that negative Vds on Q1.

Maybe I am going about this switching completely the wrong way.  I've already burned out an SSR, which used to be in place of Q1, because my amateur experience forgot that when the load is removed from the generator, its open-circuit voltage climbs to 120V and my DC SSR was rated to switch only 60V.

NEW VERSION (3/28/2013):

Incorporated the suggestions in the comments ( thank you Dave )   Updated circuit (3/28/2013) works better now with the following limitations:

-- When cap bank C1 is completely discharged, it presents a very large load to the DC permanent magnet generator.  Consequently, when Rs1 was not present,  Vaa never climbed above ~8V at full RPM and thus Q1 never turns on fully; Q1 dissipates enough heat to get smoking hot in a few seconds w/o heatsink.     I'm getting around this problem for the moment with a very large heat sink;  the part will survive 175C but I really don't want to get anywhere near that hot in the final design.

-- Added Rs1, 3 ohm power resistor. With this load in place, Vaa climbs almost immediately to ~17V when generator is at speed.  ( Generator is load-dependent & RPM dependent current and voltage source.)  So Q1 turns fully on.     But the tradeoff is now Rs1 limits the available current to the cap bank.   The charge time has increased for Vbb 0V-->5V  by about factor of 2.    Not nice.

-- I needed to add D3 to counteract Q1's built in body diode.    I am only 95% sure I need D3, but I didn't want to risk frying my power mosfet here.  If the cap bank voltage Vbb is limited to 22V ( by U1 & U2, working OK ) , and the generator is at standstill, that'll give me -22V looking from Vbb to Vaa, effectively reverse biasing the power PFET.

My next test will be to develop a subcircuit to short-out Rs1 once the cap bank reaches a charge level which will keep Vaa > 15V.  At this point I'm thinking another power NFET across Rs1's terminals.


texts: BTS441RG Chip Failure When Reverse Powered

texts:
I have this circuit that takes in two 24V power supplies and combines them via two BTS441 ProFETs. It then feeds either input A or B to a BTS6163 ProFET which provides protection and monitoring to a light bulb. The MCU will only turn on one input at a time based on which input is within voltage range.

While testing the short circuit protection capabilities with only input A (U1) connected, input chip B (U2) started smoking and now shows about 32ohm across the chip (pin 3 to pin 5) when removed from the circuit.

I can not fathom how chip that has multiple protection features and is completely turned off could pass enough current to blow up. Is it possible that current could flow in reverse from OUT to GND causing the damage? It did not happen until I shorted the output at X3 (connecting and removing the short multiple times in quick succession). I am powering this from a power supply set to 5A and the light only draws about 100mA. The BTS441 should be able to run 21A nominal and limits at 65A.

Everything else seems fine after the chip smoked, no damage to the MCU, circuit board or BTS6163. Replacing the chip restored function immediately. I have not tested repeated shorting again but it appears that the odd short here and there has no effect on the chip (U2).

I only have one chip left and don't want to blow it up. Any advice would be greatly appreciated.

BTS441 Datasheet: https://www.infineon.com/dgdl/Infineon-BTS441RG-DS-v01_21-EN.pdf?fileId=5546d4625a888733015aa9afe3e135e1

BTS6163 Datasheet: https://www.infineon.com/dgdl/Infineon-BTS6163D-DS-v01_00-EN.pdf?fileId=5546d4625a888733015aa3da01a1101e


texts: Is it possible to obtain very small Peltier modules with fast response times?

texts:
I have a thin 2x2 mm surface that I'm trying to cool by 5-10 degrees Celsius in 1 second or less.  Some very rough back-of-the-envelope calculations reveal that I need to remove ~50 mJ of energy to do this.

I've been thinking of using a Peltier module, but have no real experience with TECs, and therefore don't know exactly what to look for in terms of specs.  The speed of the temperature change is my primary consideration.  My questions:

Are there any manufacturers that sell very small Peltier modules that would roughly match my specifications, in prototyping quantities?
Are there any further considerations that I've missed?


texts: 100 LED chaser with multiple LEDs on at the same time

texts:
I'm sure this has been covered but I am not finding answers to what I am looking for.  Just getting back into electronics after well over a decade...so I'm a bit rusty.  :)

What I need is a 100 LED sequence broken down into 20, 5 LED segments, with LEDs lit in pairs as they chase.  Ideally 1/2 on, 3/4/5 off...1 off, 2/3 on, 4/5 off...1/2 off, 3/4 on, 5 off...1/2/3 off, 4/5 on.  Something like that (visually represented below).  Always 2 LEDs lit and 3 unlit for each 5 LED segment.  I've broken out my old lab kit (was shocked at the amount of dust on it) and to my surprise I found my packet of first gen blue LEDs.  I remember having to special order them and they cost me $10 each. That'll tell you how long it's been.  But I have all manner of parts and was hoping that using a 555 and 4017 (I have a tonne of these) as well as some combination of transistors or inverters is what I'm looking at here.  Chances are I have the parts on hand already.  But I'm straining my brain trying to figure out a workable and SIMPLE circuit that can drive that many LEDs in the pattern I'm seeking.  Bonus if I can regulate the speed of the chase.

Any advice, input or thoughts is GREATLY appreciated.

OOxxxOOxxxOOxxx

xOOxxxOOxxxOOxx

xxOOxxxOOxxxOOx

xxxOOxxxOOxxxOO

x=OFF
O=ON


texts: We can buy prototype board to program FPGA very easily. And we can also buy single FPGA to program. But I don't know any board to program multiple time a FPGA. I guess that whenever you want to program several FPGA, a special programming board has to be used, where you can easily replace the FPGA by another with some kind of slot. Am I wrong? And is that board FPGA specific?


texts:
I want to build a legacy product (Mockingboard for the Apple IIe).  I have built one on a breadboard using vintage parts.  I believe I can replace the audio chip (AY-3-8912) with a propeller.

But, I can't seem to find an alternative to the 6522 VIA IC.
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_43254_-1

Granted, it appears these are still made.  Maybe because nothing easily replaces them?

Anyway, is there a more modern alternative?  Something that is surface mount or just a smaller package?

The project I want to make would be very small quantities but the board space is minimal and these chips are ginormagantuan.

Thanks


texts: What is the technical description of 'sensitivity' in Lock-In amplifiers?

texts: While I understand that the sensitivity in Lock In amplifiers should be as close as possible to the range within which the signal to be measured lies, I could not find a more technical description of how exactly is this implemented. (Take, for example, the Signal Recovery 7265 (data sheet here) Lock In).


texts: How to build LED dimmer for room illumination - PWM, low pass filter?

texts:
I want to illuminate a room. This will be done by two LED strips 60led/m, each 5m long, located along the tops of opposite walls.

In order to get full light power, they together consume 4A@12V. There's also additional 4m of cable needed to power each of these strips. In total, I get 18m of cable around the room.

Then, I want to have a dimmer. The simple way is to have uC switching a transistor with PWM. But having such a large antenna pulsing with 48W seems to be unwise.

What I learned, is that I could use an LC low-pass filter, to flatten the PWM on +12V line to a lower voltage.

EDIT: This is the latest diagram of the circuit. The only things left are uC and dimming potentiometer. C2 and L1 are calculated for 5kHz PWM.


texts:
I am trying to get a better understanding as to what can cause a car battery to corrode at an accelerated rate.

My friend's truck has developed an electrical issue and we noticed that the terminals on the batteries corroded about 2 days after cleaning them. The batteries are fairly new. The truck has two batteries and we noticed that one battery has the negative terminal corroded and the other has the positive terminal corroded.

Is there a specific reason why they would corrode in such a short amount of time? Is there a difference as to why the negative terminal corrodes versus the positive terminal?

Thank you.


texts: I'm trying to identify this WiFi / Microcontroller without any luck

texts:
I purchased these TanTan Smart electrical outlets with the hopes of finding an esp8285 or esp8266 within them.  When I opened one up I was greeted by  something different, and am trying to determine what it is before exploring further.

The model numbers and QR code on the chip have turned up no results:

Exploring the rest of the smart socket I'm presuming the chip is a combined Wifi + Microcontroller + ROM, as the rest of the product appears to be simple components--a relay to switch the power, a switch and LED for user input/output, and a handful of capacitors, resistors, a thermistor, etc--no other ICs or chips.

The keywords I've tried are things like:
T201-V1.0
109-002-0029
Model: WP3-B
ZG PCB
ZG PCB Logo
2.4ghz WiFi WP3-B T201-V1.0

None have provided any relevant results.  So, I'm hoping to get an identification, or at least a strong lead.  What chip is this?

PS: Here's a peek at the rest of the product


texts: Why is this multimeter power supply short circuit when off

texts:
I have just been following some traces around inside an old digital multimeter (AVO DA116). I was poking around at the LCD driver chips (MC14543CP) when I noticed that the power supply was short circuit. (There was about 1 ohm between the VDD and VSS pins).

The main power switch is a rotary switch with many contacts arranged on the PCB. The power switch is also a mode switch. It has four positions, three are on (three different modes) and one is off.

After more poking around and referring to the schematic, I found that the power switch will short circuit the power supply for this chip when it is in the off position.

When I turn the power switch to any of the three on positions, the short circuit disappears (yes I am testing without batteries installed). The schematic agrees that this switch is directly short circuiting this supply when it is in the off position.

I was wondering why this might be and the only theory I have is that it is useful for lining up the switch mechanism with the knob. The knob is part of the case and is the section with the endstops that limit the switch rotation. The switch contact assembly on the PCB can be inserted in several different orientations and so perhaps in the factory, the switch assembly was turned until the power supply was short and then the knob was turned to the off position before the two were joined to ensure the correct orientation was selected.

Is there another possibility? Is this some design practice I don't know about? Is it a bad idea or a good idea?

-- edit --

Here is the schematic, the red arrows point to the contacts on the switch, I highlighted the traces that go to the power supply in blue. The power supply is on a different board and connects via the connector at the bottom of the schematic (SK4, 15 pin header) the image is a little blurry but I added in the voltages that were annotated near the bottom.

Bigger picture here: http://i.stack.imgur.com/at75d.jpg

High res scan here: http://bitofahack.com/images/other/AVO_Schematic.jpg


texts: How to build a node sensor network with a base unit to publish to the web

texts:
Conceptually what I'm trying to build (using arduino) is a network of X number of nodes that include a number of sensors in each. Each node wirelessly reports their data back to a base unit, which does 2 things:

controls a solenoid
publishes the data to the internet

What is the best way to accomplish this? I'm thinking of using xbees for each of the nodes to report back to the base unit. Does each node require an individual arduino or is there a simpler way? Maybe RF? Bluetooth?

Then in the base unit I have an arduino, relay to control the solenoid, and a wifi adapter to send data to the web.

Conceptually is this the right approach? Technically how difficult is it to implement?

Also, I would like the setup process for someone else (after I build everything and get it ready) to be as simple as possible. Should be plug in + turn on simple if possible.

Lastly, is it possible to have a "mesh network" for the xbees to communicate if some of them are too far away from the base?


texts:
I need to connect two Si114x light sensors to one I2C bus. I don't have them physically yet. Every sensor has the same I2C address, so connecting them with the default settings would mean a conflict. However, the datasheet (http://www.silabs.com/Support%20Documents/TechnicalDocs/Si114x.pdf) mentions a BUSADDR command which modifies the address, and the default value of the modified register is 0x00 (not 0x5A which is given as a slave address, that's a bit weird).

My question is: does the sensor keep the address in a non-volatile memory? The datasheet doesn't say it explicitly. Can I just connect one sensor first as the only sensor to the bus, reprogram its address and then add the second sensor? Is it some kind of pattern in I2C devices? If not, the address modification command wouldn't make sense to me.


texts:
simulate this circuit – Schematic created using CircuitLab

In an earlier question I asked help building a simple RF receiver/amplifier. Thanks to help from Andy aka I was able to build the circuit above.

I'm using a function generator and a long piece of wire to transmit. To the input of this receiver I've connected another piece of straight wire. I connect my oscilloscope between the negative terminal of the battery and the transistor collector.

I turn on my function generator, touch the positive lead to the long wire and I see a nice amplified sine wave on my oscilloscope (the function generator and this receiver are a few meters apart). I also tried connecting the output to a bridge rectifier and I was able to blink an LED nicely.

So everything works nicely except one thing: It only works with a frequency of around 3.8Mhz, even with no kind of tuning circuit! It's quite selective: at 3.7 or 4 MHz the output is almost nothing.

Then I tried to use the function generator directly as an input: Now the problem is gone. Any frequency is amplified and with the rectifier connected I can blink the LED.

The transmitter antenna is a piece of wire around 4-5 meters long hanging from the ceiling. The receiver antenna is another piece of wire, around 1 meter long. I've tried both building the circuit on a breadboard and soldering it to a perfboard. I've checked my setup many times, I don't think I've made any mistake in setting up this experiment. I've also tried a loop antenna (around 7 turns of cable around 30cm in diameter). It also has the same selectivity at 3.8Mhz.

So my question is: How is the circuit showing such unwanted selectivity? I've also tried tuning it with an LC circuit, but it simply attenuates the 3.8Mhz frequency as well. Another thing to mention is that the circuit at 3.8Mhz also works only when the oscilloscope negative lead is connected to the ground of this circuit (regardless whether the positive lead is connected or not).

EDIT: Here are pictures of my setup. This quality is the best I could do. Please excuse my poor editing skills. This circuit on the perfboard has the amplifier as in the schematic connected to a rectifier whose output is connected to the small breadboard and the LED. This setup works very well on 3.8 MHz.


texts:
I have a project based on a Raspberry Pi. It is intended to work outside, but I thought that humidity will destroy the Pi and the electronics board. I thought about creating a perfect waterproof enclosure for the electronics, but it's very hard.

Therefore I want to know: Is there any problem to put the Pi and the board in a container full of mineral oil?

It seems to me that mineral oil is an electrical isolator and it will block humidity from the environment from reaching my Pi. Any suggestion about that idea?


texts:
I have a trouble in understanding one of the current equation in the following example:

https://www.circuitlab.com/textbook/dependent-source-feedback/

To me

i3 = (Va - Vb)/R2 which yields:

Va - Vb = 10*i3

But the example says:

Vb - Va = 10*i3

Am I wrong or the example?


texts: Why does the capacitance on a line disappear when properly terminated?

texts:
Came across an Adafruit interview with the one and only Paul Horowitz and he said something interesting. Part of interview thats related to this question

He said in more or less words that the capacitance of a line disappears when the cable is terminated.

Why does adding resistance "removes" capacitance  ?  If this is not what is implied in the video, then an interpretation of what he meant and small explanation would work. The focus of this question is about the capacitance.

And it's not that the resistance dominates, so capacitance is negligible, he says its actually gone. Magic.

Can someone call Howard Johnson about this ? Paul Horowitz is dabbin in black magic.


texts: FT2232H on custom PCB not recognized by PC

texts:
I am using a FT2232H on a custom PCB and I cannot get it to be recognized either by Windows or by FT_Prog. Images of the schematic are attached. I have probed all the power pins and they read the expected voltage (either 3V3 or 1V8). I can see the 12MHz on the OSCI pin 2. Output pins 36 (SUSPEND#) and 60 (PWREN#) read as high (3V3).
I based my schematic on a demo board that I have for the chip I'm interfacing with the FTDI. I have no trouble with the demo board with either Windows or FT_Prog.
I've tried tying pin 59 to 3V3 in case it was configured. I've tried changing R68 to 12.4kohm. I have the ability to power the board through an external +5V or through the USB. I've tried both. I've tried lifting the power pins of the FLASH and EEPROM connected to the FTDI in case they were causing some sort of error.
On the original version of the board, pin 49 was tied to the 3V3 net, so I had to cut a trace and blue-wire pin 49 to the net connected to the 1V8 inputs (12, 37, 64).
I'm not sure what to try next. Any ideas of what could be wrong?

EDIT:
Here are scope measurements of the 12MHz signal and the 3V3 power on the FTDI side of the FBs. The supply side looks the same.

EDIT 2:
I've corrected the 1V8 supply issue and changed the REF resistor to 12.4k. I changed the USB cable I was using and now I can generally get Windows to recognize the board. However, I get the following error in FT_Prog.

The usbview utility shows this:

The marked items appear in Device Manager when I connect the board:

So far, twice I've been able to get this through a mixture of unplugging, replugging, and rebooting:

but I do have EEPROM connected and programming the device fails.


texts: What are the materials needed for boiling milk alarm sensor?

texts:
I have recently bought raspberry pi to start working on it. I have never ever used it before. I am thinking of doing very basic task of led bulb on/off for getting into it. I am curious on developing the system which senses for milk boiling so that I can develop a temperature alarm. It continuously measures the temperature of the milk and sounds an alarm when the milk is about to overflow from the stove.

What should I be equipped with to achieve the above project besides programming? Can anyone please guide me?


texts:
I want to drive a DC shunt motor like in the picture below. The PWM circuit with optocoupler, mosfet driver etc. is not shown. This circuit works fine on 12V DC motors. It even worked when tested on the DC shunt motor at 200V. But when tested at more than 300V, the IGBT broke. Does anyone have some advice on what I can improve on this circuit? After reading the question at Controlling a very small DC motor with PWM?
I realised that I should move C1 into parallel with R2 and that D1 should be fast switching. Do you think this would solve the problem? I noted that when increasing the PWM, there are big spikes momentarily during the adjustment. I believe that one of those spikes broke the IGBT. I am going to implement a controller on the nucleo that I use for the PWM that allows the PWM to go up gradually, even if the potentiometer is instantly turned to 100% duty cycle. But I don't know if that would fix the problem? Thanks! Note: The diode at D2A is a BYV34X-600


texts: How does one arrive at the following transfer function for a certain circuit?

texts:
I'm trying to understand the derivation of the transfer function for the following electrical system:

Where \$k\$ is some forward gain element and \$G_{s}\$ is the transfer function of some plant. According to an instruction video, the transfer function for this whole system is $$T(s) = \frac{Y}{R} = \frac{k G_{s} }{1+kG_{s}} .$$

I am wondering how this expression for \$T(s)\$ can be derived. It probably has something to do with the control mechanism, but I am not an electrical engineer so I'm not sure how to derive this expression. I do have a background in mathematics though, so maybe you can take that into account in your answer.


texts:
OK, so the uA741 is 42 years old now. For its time it may have been a great opamp; the requirements weren't as high as today, and there was far less competition. But I was wondering what's the 741's appeal today.

  it's slow. GBW 1MHz, slew rate < 0.5 V/us
  it's not low power, nor low voltage
  it doesn't have low bias current FET inputs
  it doesn't have rail-to-rail inputs or outputs
  it's not low noise
  many more modern opamps have comparable price

Why is the 741 still used today?


texts: How to share function or variable address between c and assembly filese in same project using GCC compiler on ARM Cortex M4

texts:
I am using a micro-controller with ARM Cortex M4 processor and GCC - GNU ARM compiler.

Some functions are written in c in .c file and in assembly in .asm file.

My questions are as follows :

How can I share the addresses of the functions/variables between c and assembly files?
How can I call c function from assembly and vice-verse?
How can I pass function arguments in above cases?


texts:
I was going to start learning how to use a 555 timer as an oscillator, however am greatly confused in the pin configurations example schematics provide me.

To show visually what I mean, A random wikipedia schematic on the main 555 page shows this:

My Eagle CAD software shows this:

However the "actual?" chip package pin diagram is much less confusing:

Can I assume that most of the 555 chips from different manufacturers  are interchangable (same pin configuration), however the programs/diagrams have pins that way just to look simpler?

I can always route my own weird ways on the actual chip to match the configuration in the schematics, however that is confusing due to it changing each time.


texts:
I'm currently trying to learn how multi shifting is working and have therefore started a project where I wanna drive 2X 8x8 LED matrix with an Arduino. I have found it that I should work with the 74HC595 chip.

This is the schematic I'm using to try out how the chip works.

But when I use this with the following code, it doesn't light every LED up and some of them are less bright than the rest.

#define DATA 10
#define CLOCK 11
#define LATCH 12

void latch();
uint8_t pic[] = {250,250,250,250,250,250,250,250};

void setup() {
  pinMode(DATA, OUTPUT);
  pinMode(CLOCK, OUTPUT);
  pinMode(LATCH, OUTPUT);
}

void loop() {
  for (int i=0; i<8; i++) {
    shiftOut(DATA, CLOCK, LSBFIRST, ~pic[i]);
    shiftOut(DATA, CLOCK, LSBFIRST, 128 >> i);
    latch();
    //delay(100);
  }

}

void latch() {
  digitalWrite(LATCH, HIGH);
  delayMicroseconds(10);
  digitalWrite(LATCH, LOW);
  delayMicroseconds(10);
}

What can cause that? Do I have bad wiring? or bad code?

UPDATE

I have tested my LED matrix with the code from @vicatcu. First I found a lot of bad connections they are now fixed, I hope..

Now I have found 2 full columns, 1 full row and a couple of other LED's that don't light up, the middle row where there are 3 LED's that don't light up is light up when I set everything to 0 instead of 250.

If I remove the "~" from the code then I get this:

Update 2

I tried @James idea and moved the resistors from the columns to the rows, but that didn't fixe the problem rather it just moved some of the on light pixels


texts: How do I read these graphs on the datasheet for an ssr?

texts: Specifically, I do not understand how to use the graph on the right. The full datasheet can be found here


texts:
I'm a bit confused on the uniqueness of each passive RFID tag.. are they unique globally?

Meaning, every RFID manufacturer (no matter if based in USA, China or India) never creates a tag with the same unique id?

So if I buy a batch of China Generation 1 Class 0 RFID tags and then buy another batch of Generation 1 Class 0 RFID tags from India, I'm sure that the Generation 1 Class 0 RFID tags' UID will never collide?


texts: Automotive ECU Flash and EEPROM memory mapping

texts:
I'm trying to access data stored in the eeprom of an automotive ECU and I'm short on experience.

My question is how flash and eeprom are mapped and accessed by the micro.  I haven't looked at the datasheet for the flash yet, but the eeprom is serial via SPI.  Would I be correct in assuming that typically the flash would be mapped in to an address range on the micro, but the eeprom would be accessed by moving blocks in to ram on the micro working with them and then writing them back if needed?  In other words, the eeprom doesn't have a address mapping per se, but portions can be read and worked with in ram.

I hope the question is clear.

If it helps the specific ECU is a Bosch Motronic 7.8 it has 2 Infineon C167xx processors (not sure the exact variant yet) and 800BB (1MB) flash and 95320 (32Kbit) eeprom.  TIA


texts: Bluetooth Low Energy Proximity sensing less than 2 feet?

texts: I am working on a project where I need a TX and RX to be able to sense if the modules are within 2 feet of one another. Ideally, we would like to only utilize BTLE 4.0 for both devices since power consumption is critical in the design. This is why BTLE was the ideal choice. However, it appears that within ranges less than 10 feet, BTLE becomes very inaccurate regarding proximity using path loss. We have been able to get it to detect within the short ranges we are looking for, however, to compensate for the inaccuracy we have to use averaging which makes it accurate but creates big delay times. We were looking at using IR but because IR is line of sight, this can be problematic for our use case. If anyone has any recommendations on how to perform proximity based services using BTLE within a 2 foot range with fast response times, i.e. within 1 second, it would be greatly appreciated. Please keep in mind that I am new to this technology and a novice at best. Thanks!


texts: Discharge Characteristics of Lithium Ion Battery

texts:
I am doing a simple experiment to analyse the discharge characteristics of a Lithium Ion battery to see how long it takes to discharge.

I have a 12V 4000mAh battery. Once charged, using a voltmeter I find that it has about 12V across it. I then put it in a simple circuit with a 6 ohm resistor. I estimated that this is the resistance that would cause it to discharge in 2 hours. After 10 minutes the voltage has dropped to 5V. This seems wrong and I may be doing this incorrectly.

Can anyone suggest a better way to measure the discharge characteristics of this battery.


texts: How can an IAR ODE system be dynamic and LTI at the same time?

texts:
I'm currently studying a course of systems and signals. we talked about IAR ODE systems and their properties, and I have a question about something I don't quite get - how can an Initially at rest ODE system be dynamic (time dependent) and time invariant (doesn't change in time) at the same time? can anyone please give me an example?

thank you for your time and attention!


texts: PIC18 High Priority Interrupt doesn't Interrupt the Low one (xc8)

texts:
I was trying to learn and implement the priority property of interrupts on PIC18F46K22 uC. I use MPLABX and XC8 compiler.

In my code (transformed from a sample code), I have one external interrupt (INT1) and one USART receive interrrupt (RC1IF). External input is a LED driver and USART is a simple echo program driven by a PC terminal.

Some parts of the code are provided below, with comments.
Code builds succesfully. But with this "high-low" combination, when USART is active and program succesfully echos text to terminal, I cannot interrupt the transmission with external interrupt which has given by a pushbutton.

Here are ISR's.

void interrupt low_priority USB(void)
{

if (PIR1bits.RC1IF==1)  // check if receive interrupt has fired
{
    t = RCREG1;      // read received character to buffer

    // check if received character is not new line character
    // and that maximum string length has not been reached
    if ( (t != '\n') && (rcindex < STRLEN) )
    {
        rcbuf[rcindex] = t; // append received character to string
        rcindex++;          // increment string index
    }
    else
    {
        rcindex = 0;         // reset string index
        USART_puts(rcbuf);  // echo received string

        for(int x=0; x<STRLEN+1; x++){ //clear
                rcbuf[x] = 0;           // any leftover
            }                           // from
        RCREG1 = 0x00;                  // last
        TXREG1 = 0x00;                  // transmission
    }

    PIR1bits.RCIF = 0;      // reset receive interrupt flag
}
}

and

void interrupt high_priority inticik(void)
{
if(INTCON3bits.INT2IF==1)
{
    LATAbits.LA1 = ~LATAbits.LA1;
    __delay_ms(20);
}

INTCON3bits.INT2IF = 0;
}

This is the interrupt configuration function;

void interrupt_config(void)
{
 //interrupt main configuration
RCONbits.IPEN = 1;        // interrupt priority mode enabled, H or L interrupts
INTCONbits.GIE_GIEH = 1;  // high priority interrupts are enabled
INTCONbits.PEIE_GIEL = 1; // low priority interrupts are enabled

//pin interrupt 1&2 enable + priority assignments + edge selection
TRISBbits.TRISB2 = 1;
ANSELBbits.ANSB2 = 0;
INTCON3bits.INT1IE = 1; // int1 is enabled
INTCON3bits.INT2IE = 1; // int2 is enabled
INTCON3bits.INT1IP = 1; // int1 is high priority
INTCON3bits.INT2IP = 1; // int2 is high priority
INTCON2bits.INTEDG1 = 1;  // rising edge
INTCON2bits.INTEDG2 = 1;  // rising edge

//EUSART interrupt enable + priority assignments

PIE1bits.RC1IE = 1; //receive interrupt enabled
PIE1bits.TX1IE = 1; //transmit interrupt enabled
IPR1bits.RC1IP = 0; // receive is low priority
IPR1bits.TX1IP = 0; // transmit is low priority
}

And here is the main function.

int main(void)
{
TRISAbits.TRISA1 = 0;
LATA = 0x00;
interrupt_config();

USART_init();

USART_puts("Init complete!\n");

//main loop
while(1)
{
    Sleep();
}

return 0;
}

Other parts of the code such as USART functions and "config.h" conf. bit headers are not provided because of irrelevancy.

Thank you.

Edit

I forgot to mention, when i change the,

"void interrupt low_priority USB(void)"

statement to

"void interrupt high_priority USB(void)"

program succesfully works and echoes on terminal. But when set as "low_priority", USART module does not work on terminal. Only external interrupt runs successfully.


texts: BJT Puzzler: Common Emitter or Emitter Follower?

texts:
A few high-reputation members have disagreed on this in the context of other questions, so I thought I'd post it as a separate question.

Question: Is the NPN BJT in this circuit configured as common emitter or common
collector?

Note that, perhaps unusually, the S+ node is ground and the S- node is the
output. 'S' here stands for sense, but for present purposes can be interpreted as \$V_{out}\$.

This is part of an DC Bench Power Supply circuit, and looks like this at the
block level. Note the op amp-ish looking symbol represents the entire amplifier, not the LF411 op amp specifically:

Abstracting out the op amp to a signal voltage source, I believe these two are
each alternate layouts for viewing the circuit. I've purposely laid them out in forms reminiscent of classic common emitter and common collector (emitter follower) respectively.

I don't want to spoil the fun for anyone, so my own conclusion is in the spoiler bar below. Roll your with your mouse to see if you like. This represents my best working conclusion. I still have a shred of doubt in my mind :)

   Common emitter, more specifically, grounded emitter. The BJT adds gain to the circuit, proportional to the load resistance.

Answers should state the rationale for their conclusion. I think one of the cool features of conundrums like this is it forces one to dig for what is essential in the form, not just recognize it in classical form :)


texts: PartSim Simulation for Transient Step-Response (RC Circuit) Has Unexpected Result

texts:
this is my first question on stackexchange, so forgive me if my format is not ideal.

I am currently trying to simulate a RC circuit, and producing a step-response graph that should look similar to this:

However, with my circuit set up like this:

I am not getting the transient response I expected, as they stay constant, even though I am setting the initial condition of my capacitor to be 0 V.

From what I'm understanding, it seems like it is reading it to be a steady state response instead of the step response that I am looking for, but I thought that was taken care of because I set the initial condition of the capacitor's voltage to be 0. Can anyone try to send me in the right direction? I have been stuck at this for quite a while now.


texts: How is the ac load line for the following amplifier derived?

texts:
So I am trying to derive the ac load line for the following class A power amplifier

First I considered the reflected load/equivalent resistance of the transformer, this becomes
$$R'_{L} = (\frac{n_{1}}{n_{2}})^2 R_{L}$$
This means the voltage drop across the equivalent resistance must be
$$i_{c}R'_{L}$$
So
$$V_{ce} = V_{cc} - i_{c}R'_{L}$$
However this is not the correct ac load line and I wanted to know what am I doing wrong?


texts:
MCU: Pic16F886
Programmer: PICkit4
IDE: MPLAB X IDE v5.40
Assembler: pic-as v2.30 (xc8)
Circuit:
A LED with 270 ohm resistor on RA0.
3,3k ohm resistor pullup resistor on MCLRE.
Vdd on pin 20.
Vss on pin 19.

This is the test code I want to debug and step through instruction by instruction:
PROCESSOR 16F886
PAGEWIDTH   132
RADIX DEC

#include <xc.inc>

config DEBUG = ON, LVP = OFF, FCMEN = OFF, IESO = OFF, BOREN = OFF
config CPD = OFF, CP = OFF, MCLRE = OFF, PWRTE = OFF, WDTE = OFF
config FOSC = INTRC_NOCLKOUT, LVP = OFF, BOR4V = BOR40V, WRT = OFF

    PSECT   StartCode,class=CODE,delta=2
    global  Start
Start:
    movlw 11000000B  ;set option register
    movwf OPTION_REG

    movlw 00100000B  ;set the status register (select bank 1)
    movwf STATUS

    movlw 11111110B  ;everything to input except for RA0
    movwf TRISA

    movlw 00000000B  ;set the status register (select bank 0)
    movwf STATUS

    bcf PORTA, 0  ;clear bit zero in PORTA register

    sleep

END Start

When I run the project the code works as expected.
But when I set a breakpoint and hit "Debug Main Project" I get the error: Reception on endpoint 129 failed (err = -10121)
Or it stays in the "build, load" state for minutes until I quit the process if I play around with config settings.
The PIC16886 has an "in-circuit debugger (on board)" according to page 1 of the datasheet and the block diagram.


texts: What are examples of complex communication protocols that do not need a 7 layer OSI model to describe them?

texts:
I am trying to dissect an existing design of a custom communication protocol that shall make use of infrared pulses to communicate between only 2 devices. The design is architected in such a way that there are dozens of small RTL modules but no clear grouping as per the OSI model.
I know that every communication protocol is not so complex such as to need a 7 layer model to be described.
What are examples of complex popular communication protocols or stacks that are not described using a 7 layer model but with fewer layers. Since some layers are redundant, they are never needed in conceptualizing the communication system. I will study them to get an idea of how a communication protocol can be described using less then 7 layers.


texts: Why is maximum flux attained in transformer when off load?

texts:
Can anyone explain to me why the maximum flux in a transformer is attained when off load?

What happens to the flux when on load?  Are the flux from the secondary load current and primary load current just leaking out into space?  Or are the magnetic particles somehow being canceled or destroyed?   Does anyone have an answer instead of just pointing at conditional math equations that don't explain anything?

Another user claimed the load current flux somehow cancels the primary current flux, but this is inadequate as "canceling" doesn't explain what's happening.  Two opposing fluxes should both contribute to a lowered permeability of material.  If they don't, then why is this?  One would have to conclude that the particles or virtual particles (whatever a magnetic field consists of) are literally being transformed/destroyed/significantly altered or something drastic.

The simplest conclusion is that the vast majority of flux generated while a transformer is loaded should be leaking out into space around the core. But I haven't heard anyone say this. I've certainly never run the experiment myself.  Does anyone know if the magnetic field around the outside of a core goes sky high when you put it on load?


texts: I am looking for a good oscillator to implement in a circuit. I was trying to simulate a Wien Bridge oscillator in LTSPICE but I have no success as my output is always 0 V. Is there a special parameter of simulation I should use? Here's the schematic I am using:


texts:
Does the AC ripple voltage at the input of a linear regulator like LM317 affect its regulation ?
I had a circuit where I found that the output of the LM317 was dipping under higher loads(15V,1A).The load is a continuous load and not pulsating.I had had a 47uF cap at the input , and the problem was solved by changing it to a 1000uF cap.
Is there any way to calculate the maximum input ripple allowed,or is sufficient to ensure that the ripple does not go below the drop out voltage ?


texts: How exactly does a series voltage divider work?

texts:
I apologize if this comes down to a lack of fundamental understanding of electrical flow, which it probably does.  When I look at this:

I don't understand why Z2 is factored into Vout - as far as I can tell the current should branch out before getting to Z2.  Does current go straight from input to ground, and then bound back and spread out?


texts: BCD Bi-directional counter with variable counting speed in proteus

texts:
I am working on a project. And its description is:
Design a 3-digit counter which should has 4 buttons (up, down, right, left).
with pressing the up button the counter should up-count for 5 seconds (each count last 1 second) and after the 5s the counting speed should be doubled and this continues doubling the speed after each 5s till the operating speed reaches 128 then it operates with 128x to the end (for example if we start with 1Hz the final frequency should be 128Hz).
With pressing the down button the above scenario will be reversed (if start with 128Hz we should end up with 1Hz).
with pressing the right button the counter should up-count one-by-one normally.
with pressing the left it should acts opposite to the right button.
I started with 74ls192 counter, a frequency doubler (https://i.stack.imgur.com/ViirF.png), frequency divider, etc.
The left and right buttons are trivial. However i had problem with implementing the up and down buttons. i'm thinking of placing a clock generator before them and place a frequency doubler after it then connect it to up-pin in 74ls192. and for down- button we place a frequency divide by 2 circuit then connect it to the IC. I dont know how to manage them with 5seconds.
I implement the following:
COUNTER FULL
the problem is it does not work? where i doing wrong?
and inside each Block is something like this:
74ls192
So could you please guide me to solve this problem? Or how to start tips.
P.S: it is also required to design every single function with only logical gates. (so i have implemented 74ls192 by gates myself from http://www.datasheetcafe.com/sn74ls193-datasheet-pdf/) and even flip flops (which took a lot of time )
Any help will be greatly appreciated.


texts:
I have a high current low voltage MOSFET I'd like to drive with a higher voltage and a micro to reduce power losses through it. I built this circuit based off the typical level shifting designs. The MOSFET does not turn off. The circuit has been reconstructed twice, and both times the MOSFET works fine before and after, so I don't think I'm breaking anything. Any ideas as to why its not working?

simulate this circuit – Schematic created using CircuitLab
I am a bit new to circuits, so please correct me if I've made some very silly mistake.
edit: source and drain of the 2N7000 should not be connected together like they are in the picture, not sure what happened there - source should connect to the logic signal, drain should connect to the power mosfet


texts: Efficient Single Phase Motor Speed Control

texts:
Usually triac based speed control vary the phase angle of firing to reduce the amount of power goes in to motor, and hence control its speed. this is not very efficient method, also it may not be good for health of motor depending upon its built.

There are some suggestions that, if we can switch whole cycle on-and-off instead of part of cycle ( i.e. phase angle ), it may be more efficient and easy for motor. I would like to build and try that, and see if that the case. I am newbie in to power electronics, and did search on internet but not found any particular circuit for this.

Any suggestion on circuit of doing the same ? Due to cost and reliability, I would like to try it without micro controller.

EDIT: The common name for this method is , "integral cycle control". There are many circuit also available on net, but still, if micro controller less circuit is possible, that would be cool.


texts:
I am using PIC32MX795F512L. Using Peripheral library to generate timer interrupt. Following is the code I am using:

//PIC32 is running at 72MHZ
#define FCY 72000000UL
#define FPB (FCY/2)
#define BAUDRATE    9600

#define PB_DIV 2
#define PRESCALE 256
#define TICKS_PER_SEC 4
#define T1_TICK_RATE (FCY/PB_DIV/PRESCALE/TICKS_PER_SEC)

#pragma config POSCMOD=HS,FNOSC=PRIPLL //FNOSC=PRIPLL
#pragma config FPLLIDIV=DIV_2, FPLLMUL=MUL_18, FPLLODIV=DIV_1
#pragma config FPBDIV=DIV_2, FWDTEN=OFF//, CP=OFF, BWP=OFF

#include <stdio.h>
#include <stdlib.h>
#include <plib.h>

int main(int argc, char** argv)
{
TRISDbits.TRISD9 = 0;
OpenTimer1(T1_ON | T1_SOURCE_INT | T1_PS_1_256, T1_TICK_RATE);
ConfigIntTimer1(T1_INT_ON | T1_INT_PRIOR_3);
INTEnableSystemMultiVectoredInt();

while(1)
{

}
return (EXIT_SUCCESS);
}

void __ISR(_TIMER_1_VECTOR, ipl3) Timer1Handler(void)
{

mT1ClearIntFlag();
LATDbits.LATD9 = 1;
}

This timer is running at 250ms speed but I am not sure. As I am beginner in timers, I don't know how to calculate values. Lets say if I want to run timer at 100ms what values should I use for PRESCALE   and TICKS_PER_SEC
Please help
thanks.!


texts:
I am have defined a subcircuit header as:

.SUBCKT RELAY_SPDT_BHV coila coilb no nc com T_make=20mSec T_break=10mSec I_pull=35ma I_drop=25ma R_coil=100 L_coil=5mH R_open=100MEG R_close=.05

and I am calling it as:

X1 6 1 4 7 8 RELAY_SPDT_BHV 6 1 4 7 8

however, I got error:

Error: unknown subckt: x1 6 1 4 7 8 relay_spdt_bhv 6 1 4 7 8

but I already successfully created another subcircuit for a pot as:

.SUBCKT pot 1 T 2 VALUE=1K SET=0.5

and called it as:

X2 15 16 17 POT VALUE=1000 SET=0.005

and it worked perfectly, so why it doesn't work for RELAY_SPDT_BHV above?


texts: Why are circuit results different from theorised?

texts:
From the following circuit:

I got the following results in comparison to my theorized calculations:

Why were my result different to my calculations?

Here is my calculations:

Equipment used:

Agilent E3630A
Agilent 33210a
Agilent MSO-X2012a
Agilent U3401A


texts: I have a five 12 V DC motors and I want to use an SMPS instead of lithium battery

texts: I have five 12 V, 3 A DC motors and a lithium battery pack, 12 V, 30 Ah and an SMPS, 12 V 30 A. Can I use the SMPS as the motor power supply instead of batteries?


texts: Design tips for a limited run-time motor circuit

texts:
I'm building a small 'explosion simulator' for my son's trench warfare diorama. I'm going to have a pushbutton momentary switch, a white LED, and a small hobby motor with an asymmetrical load, so that it rumbles. That's all fine, but I'd like to have only a sec or two of the rumbling and the light per button press (even if the button is held).

What's the best way to make the circuit operate for only a short time? I haven't had luck with adding a capacitor in series (as it charges, it reduces the voltage across the LED and the motor, causing them to stop). Other ideas?


texts: How to calculate the thermal rise of the MOSFET?

texts:
Following is the MOSFET I am using in my power supply ( Topology - forward converter): PSMN1R8-40YLC
Estimated power dissipated in the MOSFET (including the switch losses) is 4 W

My intention to calculate the temperature rise in the MOSFET due to the power dissipation in the MOSFET.

Basic understanding, Tj = Ta + RΘja * Pd           --------------         Eqn  (1)

Tj = Junction temperature

Ta = Ambient temperature (Taking as 25 °C)

RΘja = Junction to ambient thermal resistance

Pd = Power dissipated in the MOSFET

Following are the only thermal information available in the datasheet,

Information available is thermal resistance from junction to mounting base.

Q1) Can I calculate the junction temperature (using Eq(1)) using thermal resistance from junction to mounting base?

Q2) I understood that thermal resistance from junction to ambient is more related to PCB area and other factors, But still can we calculate the thermal resistance from junction ambient using thermal resistance from junction mounting base?


texts:
I have a question regarding the implementation of MMSE-DFE. Here is the conventional block diagram:

The signal y shown in the pic is, for clarification, y(kT) i.e. the signal y(t) coming out from the matched filter (not shown in the pic) sampled at times t=kT with T the symbol period.

Now, suppose I have a vector of N samples [y(0), y(T), ... , y((N-1)T)] as the input of the feedforward filter (FFF), and let the FFF have length M, then the output of the FFF will be a signal of length N+M-1 (convolution of 2 signals of lengths N, M).

So I'm expecting a signal of length N+M-1 as the input of the data detector block, but since I must only detect N symbols... it looks like I must discard some of the samples (actually M-1 samples) that go into the detector. Which ones must be discarded, and why?

Thanks in advance!


texts: Can a piezo disc be connected directly to a op amp?

texts:
I'm trying to use a piezo disc as a sensor do detect slight vibrations, I see the signal on an oscilloscope, it needs to be amplified. But I can't manage to amplife it.
For this, I wanted to use a simple inverting op amp circuit :

I also tried by replacing the power supply by two 9V batteries and using the the middle as a virual ground. without much more sucess.

Is there something I'm missing ?
Do I need to add something ?
Will the version exclusively powered by the esp32 work ?

Thank you very much in advance.


texts: Magic smoke released from DIY PSU... but why?

texts:
I'm starting to learn what I can about electronics, and recently decided to follow this (and similar) guides to building a bench power supply out of an ATX PSU:
http://www.instructables.com/id/Convert-A-Computer-Power-supply-to-a-Bench-Top-Lab/step3/Presenting-The-Power/
In this guide, there is a schematic to take the +12V and -12V lines and combine them with a potentiometer to output a range of voltage up to 24V.

(source: instructables.com)
I followed the guides and built the circuit as shown (using an LM317 voltage regulator) and the potentiometer shown here: http://www.amazon.com/gp/product/B009QFU9H4/ref=oh_details_o03_s00_i00?ie=UTF8&psc=1
Each of the 3 power rails (3.3V, 5V, +12V) are connected to a fuse, then to a binding post, while the negative binding posts go to ground. As an extra feature, an LED is wired in parallel with the binding post (and a current limiting resistor) so I have a visual indicator as to whether the fuse is blown. For the variable 24V output, there is an LED (with current limiting resistor for 12V) tied in parallel off of the +12V line used for the variable voltage. My questions are regarding the 24V output and... what I apparently screwed up.
Upon testing the circuit, I connected a voltmeter to the 24V output and ramped up the potentiometer. It released its' smoke about halfway up, so I aborted the test and connected the leads that went to the (now dead) potentiometer to an ammeter. I figured maybe there was too much current for the potentiometer. Shortly after powering on the supply again, the voltage regulator in the circuit below fizzled out of existence and I killed the power before any further damage could take place.
My theory is that I'm not understanding how this 24V is being produced properly, and that perhaps the ground from the LED on this connection is somehow causing everything else to fail. Or, that the potentiometer couldn't handle the amperage, and perhaps the LM317 died because there was no heat sink and it simply overheated. I'd like to know (a) if my theories are correct, and (b) if there is a way to fix this and allow it to function the way I am expecting. It's hard for me to understand how the 24V variable line is not grounded and can still work properly, and perhaps I shouldn't be attempting to build a circuit I don't completely understand.
If I can provide any more details that will help, please ask away! I'm assuming that if I can't make this function properly, I could replace the potentiometer, remove the variable circuit below and simply use the +12V rail with the potentiometer in line to regulate from 0-12V. (I don't have anything that I could immediately imagine using 24V for anyway).
Thank you very much for your time and insight!


texts:
There are two power supply sources in the following diagram - USB and 12V. Only one power supply can be connected at the same time. I am trying to disable power to FT232 whenever 12V is plugged in. In that case FT232 should not be powered, but MCU will be powered. However, when USB is connected, both FT232 and MCU should be powered. I tried to use Schottky diodes(BAT54C) but I'm not sure if this is correct way.

Also - would USB power harm voltage regulator in the second case?


texts: How to find lower 3dB and upper 3dB from PSPICE frequency response

texts:
I have simulated the frequency response of an amplifier circuit. Frequency range is from 10 Hz to 2.5 MHz. It gave me a plot with a y-axis range going from -50 to 50. I assume these are dBs but I am not sure.

I need to find the bandwidth of the amplifier. To do this, I know that I need to find the lower 3b and upper 3b point. But I am not sure how to find them. I know I have to multiply something by 0.707 but I am not sure what. Is it the dB value at the peak of the plot that I need to multiply by 0.707, and the result would be the corresponding dB value for the upper and lower frequencies?

Thank you.


texts: What makes OLEDs optimal for flexible displays or wearable displays?

texts: Anytime I come across a flexible display technology, OLEDs are always mentioned there. What specific properties of this device makes it so popular in such type of displays?


texts:
I'm breaking my head over this. I've got 1200 samples of true RMS current using a BK Precision 5492B over a period of 10 minutes (this means a sample every 0.5 seconds). I'm using a power factor of .8 for this calculation.

P (apparent) = Irms x Vrms

P (real) = P (apparent) x Power Factor.

If I sum all of my 1200 samples of P (real) I get 0.8523W

Now, since I took samples every 0.5 seconds, that means in 1 hour there are 7200 samples, so if I divide that number by 7200 I get: 0.000118385kWh

Am I correct in my calculation?

I'm trying to figure out the cost of running this device for 1 hour.


texts: I'm trying to make MOT tesla coil and would like to connect secondary coil in series. The low voltage end of secondary is connected to the body of the transformer. I don't particularly want to disconnect this as it may be useful for some other projects. Is it bad to connect the secondaries in series with secondary low end attached to transformer core but not connect the core to earth ground?


texts: Why does digital-to-analog converter become unusable?

texts:
I am doing an experiment to build and test a 4-bit Digital to Analog Converter based on an R/2R ladder network. I build the DAC that looks like based on this schematic:

This circuit was hooked up to the counter chip and function generator which was set to generate square wave and 10 kHz frequency. Then I connected the DAC to an oscilloscope to test the result. The oscilloscope shows a staircase shape. As I increase the clock frequency, the edge of the stair steps becomes rounded and no longer reaches the 0 volt line on the oscilloscope (why does it no longer reach 0 volt line?) and the DAC becomes unusable, why?


texts:
Formally, the entropy of a normal distribution is:-

$$ \frac{1}{2} \log(2 \pi e \sigma^2) $$

So if you're sampling a random (normally distributed) signal, that would seem to be the rate of entropy generation. I take it that if the logarithm is base 2, then the entropy would be in units of bits. So a process with a standard deviation of 1V creates 2.05 bits of entropy /sample.

My problem is with the rate calculation.  I thought that the entropy rate would be governed by the precision of the samples.  A 16 bit ADC must by definition create more sample data than an 8 bit ADC if they both cover the same voltage range. Intuitively more precision suggests more data. More data suggests more entropy.

My question is why does the entropy formula above take no account of sample precision?

Note. I suspect that this is not the appropriate formula for ADCs.

Edit. It's not. I think that I can manage to formulate the min.entropy for a normal distribution.  Min. entropy is used in cryptography and randomness extraction and would be good enough.  I get:-

$$ H_{min}  = -log_2 \left[ 2 \Phi \left(\frac{V_s - \mu}{\delta} \right) - 1 \right] $$

where \$ V_s \$ is half of the minimum ADC voltage step, as:-

$$ V_s = \frac{V_{range}}{2^{N+1}} $$

for an \$ N \$ bit ADC digitising a range of \$ V_{range} \$ volts. And generally, for any distribution such as a (asymmetrical) log normal that you might get sampling a diode's avalanche noise:-

$$ H_{min} = -log_2 \left[ CDF(v'_{max}) - CDF(v'_{min}) \right] $$

where \$ v'_{max}, v'_{min} \$ are the two quantized  max. min. boundaries of the smallest ADC step based on \$ V_s = \frac{V_{range}}{2^{N}} \$ and which bound the mode.

Thus I think that I had totally the wrong equation...


texts: I have a V9958 NDIP (Narrow DIP) chip that I would like to use with a breadboard, is it possible to somehow convert NDIP to DIP or use an external adapter?


texts: LC Tank Tuner for Super Regenerative Radio

texts:
There seems to be very little literature to explain the practical construction of a radio and how a super regenerative circuit actually act as a selector, amplifier, how a antenna is actually to be connected etc. I have a circuit that I have built which goes like this

When my circuit did not work (I used a BF199), I did a check on the LC tank circuit that is supposed to select the frequency. An important part of that was the coil. My calculations looked like this

As per my calculations, if I want to tune in to a 1 Mhz frequency, my capacitor will need to be of 3.38 x 10^-21 F. The circuit diagram has a Trimmer Capacitor 3-22pF. I tried calculations for different frequencies and it seems that such a circuit will only be able to tune into about 50Hz or so. I would like to know what is happening here. How will this tuner circuit work as according to me it needs to oscillate at desired frequency we want to tune it to? I checked my calculations a million times I can't see what is wrong. Please help!