I am using an ST STM8AF5288 microcontroller powered by 5V in one of my projects (, ). Is it possible to directly sense a +12V signal input by port pins?  I am using a current limit resistor in the input. All the port pins in the ST STM8AF5288 microcontroller have clamping diodes. Will I able to sense a +12V signal input? Below is the circuit used in my project:
122477
I have 12V, Use these 12V to power a device (that has a 12V output signal) and to power a 7805. After the 7805 there is a pic microcontroller where I would have to connect the output from my device. I was thinking of having 2 resistors in a 3/1 ratio in order to have about 4V at the pin of the pic. Can this be done, given that the ground is common, or will it give some sort of problem with the lm7805?
43420
My computer's motherboard uses all four pin fan connectors with no support for speed controlling the older three pin fan connector. The problem is, all the PC fans that I have use a three pin connector. As fan as I know there are no premade solutions available, so I was thinking of building an adapter that sits in an unused drive bay.   I can't seem to find much information on how the four pin fan connecter works. Apparently, it looks something like this:   12 V 0V Tachometer PWM   The three pin header is numbered similarly:   Vcc 0V Tachometer   Could I simply use a logic level MOSFET to do the following?
37647
I am having trouble understanding the following portion of schematic from AT89C2051 programmer circuit. Please help me comprehend what is going on here.   Here is what I understand:   A1 directly controls the 12V going to AT89_RST pin When A1 is low,    If A0 is high, AT89_RST pin sees high. if A0 is low, AT89_RST pin sees low.    So why is the 5V added there with the diode? I suspect it might be one of the following two reasons, but I really don't understand why.   To pull up AT89_RST to 5V. But A0 can be driven both high and low. Why pull it up? As some form of protection to prevent A0 from getting roasted with 12V? I think it might be the case, but I don't understand how it works to prevent that.   Notes:   AT89C2051 Programmer's . A0 and A1 are being driven by arduino (5V logic).
106008
is the datasheet of the driver IC I am working on (LM5112).  Following is the application diagram of the module.    Basically this is the GATE driver circuit for the MOSFET with PDM signal as the input. I am looking for how to calculate value of the MOSFET input resistor (R3) ?  MOSFET input voltage (VDS) = 10V Output power required is 200W.  Questions:  1) How to calculate the MOSFET input resistor?  2) What are the factors affecting the MOSFET input resistor calculation?  3) What will be the maximum, minimum resistor value possible and effect in the circuit if the resistor value is changed (Increased or decreased) ?   Please let me know if any further info is required.
27898
Say you were wanting to measure a signal with a higher voltage than the ADC could handle. Is there some best practice or commonly used circuitry that goes beyond a simple voltage divider to protect the ADC?   Or is it common for professional designs to simply rely on a voltage divider?
112831
I would like to use an ATtiny2313 to emulate a Super Nintendo controller because I have an ATtiny2313 but I do not have an input shift register and I don't feel like soldering wires onto an existing SNES controller board.  This application requires 12 inputs (bits 13-16 are always 1) and a latch, clock, and data out pin.  Do you have this code lying around? It can't be more than 20 instructions.
120915
I want to understand the concept of open-drain ports like port P0 of the 8051 microcontroller. Why do we need to connect pull up resistors to the port P0?   I have basic knowledge of MOSFETs and other electronic devices.
1040
I have a front end module that generates an (ECG) signal that varies from +/-2.5 V. I want to shift this signal to 0 - 5V. What is the best way to do this? Would a summing amplifier like the below circuit good enough? With R1 = R2 and V1 = 2.5V, V2 = my signal, V3 = V4 = GND
114558
I am trying to repair circuit boards that fried on my hydraulic anchors (Power Poles) on my boat.  Both have the same resistor fried. I have found the same one elsewhere on the board, see pic.  I tested on my multimeter and get .9 ohm.  The only marking on it is TP.  Anyone know where I can get these?
81403
I'm new to EE so my theory isn't that strong. I want to trigger a  5v relay with my Arduino using a PN2222 transistor and a flyback diode. I plan on using the schematic below:         &ndash; Schematic created using   Now my question is: If I'm powering the Arduino via USB, will the current draw be too much for the Arduino's Vcc pin, thus requiring external power? I believe I'm reading that the relay will draw ~90mA and the Vcc pin from the Arduino can handle up to 200mA total. However, the transistor drives how much current is actually drawn, correct? Which is a function of the digtal pin voltage, R1 and the Hfe rating of the transistor? So if you were to mess that up, the current flowing to the relay would be incorrect and would not trigger it?   Thanks!
45108
If I use the internal 1.1V reference for the ADC, and my Analog input exceeds 1.1V, lets say 2.5V, is that harmful to my microcontroller? Or will ADC value simply clip (to 0x3FF) at 1.1V?  For convenience, I am including an excerpt block diagram from the ATMega328 datasheet.
52674
Before I ask my question, I should say that I am very new to working with electronics and I may not quite know how to describe my problem.  I am trying to use a pin on my msp430 microcontroller I have as a replacement for a pushbutton on a device. The msp430 is 3.3v and the device I am switching is 5 volts. I was under the impression I could use a 2n3904 transistor in place of the button by applying current by turning on the pin on the msp430 which would let current go from the collector to the emmiter, and hopefully "push" the button.  This is my current setup    However, turning the pin on does not activate the circuit. When I connect the jumper for the onboard LED, I can verify the pin is working. also, when I connect the 5v from the collector to the base using a wire, I can activate the transistor.  What other information am I missing to solve this? Thanks in advance  EDIT: After reading the comments, adding a 4.6k resistor between the base and IO pin and connecting my 3v ground and 5v ground allowed me to control the transistor without any noticeable problems. Thank you!
113730
I have built my own board with STM32F7-45VGT6. I have successfully programmed it with ST-LINK v2 (not the original one though) and now I cannot even connect with MCU.  I use ST-Link Utility from ST and SWD interface. It can be the case that I use SWD pins as output and in my code I set them as GPIO output. Can it be the case?  Nevertheless, I connect my reset pin to GND and set "Connect under reset" option in ST-Link Utility but it doesn't work... What can I do?  On the Internet, I have found something about using BOOT0 Pin, but I don't know exactly...
105752
I am creating a controller for a 12 V system using an Arduino Uno microcrontroller. For the outputs I am using a relay shield to switch the 12 V components. I have a 12 V toggle switch that turns on some 12 V components in the system and I want to use a trigger signal off of this same switch to send to an Arduino digital input. I know that the Arduino can only handle 5 V max. What would be the best way to step down the 12 V coming off of the switch to the 5 V for the input?  EDIT: The system is for use in a car. Would the amperage of the car battery need to be lowered somehow as to not blow up the components?
66767
On my multimeter I have two current measurement connection. One for the mA and one for the A.  On the ampere one there's a time limitation but not on the mA one. Also they mention in the manual a kind of "cooldown time" after the measurement for the A one. So, basicaly, probing with this input can really slow down my project. (max 15 sec every 5 minutes)  My question is, I have to switch to that A one for a 600-700mA current (mA input is 500mA), as it's not a "big" current, can I bypass this limitation ? Is it design for higher current only or any measurement done on that input ? It's a middle-end multimeter but even the online datasheet is not complete about what. (Was excepting a kind of measured current/cooldown time graph)
29214
There are two aspects here. The first question is related to R1 below:    The datasheet says: "R1 must be sized to ensure VIL and VIH of the devices are met" but gives no formula. So first question:  (1) How does one determine value of R1?  The datasheet gives maximum SPI SCK frequency for this device as 10MHz for 5V supply as given in Tables 1-1 and 1-2. However, for the read operation on the device where the SDI/SDO are multiplexed, the idea is different because:    The point 2 under the Table above says that the max SCK can be increased by using a pull up resistor. About these things I am wondering the following:  (2) Why is max SCK frequency lower for multiplexed SDI/SDO read operation only? (3) If I connect a pull-up resistor it will certainly form a voltage divider with the R1 in the first picture. How do I determine the value of both of these resistors then?  Finally, since the Table 1-1 and 1-2 give SCK Input Frequency for voltage 1.8V to 2.7V as 1MHz rather than 10MHz which applies to 2.7V to 5.5V.   (4) Why is the max SCK lowered at lower supply voltage?
52968
I've got an MCU with a 3.3V DAC onboard and I'd like to convert the 0-3.3V signal to a 4-20mA output. Any ideas on how to do this?