hybridfree/eevblog-posts huggingface dataset:
Problem with Subtractor Opamp simulation - Page 1
Forum section: electronics / beginners

author: anvieng
author_rank: Newbie
timestamp: October 28, 2017, 03:19:30 am
content: I've just started learning Opamp in school and have been messing around in LTSpice with a subtractor circuit in the attached file. V3 is stepped from 0, Opamp model is LT1007A (chosen arbitrarily). Vout is supposed to be V1 - V2 -V3 from my analysis. However simulation result only agrees with my formula for a certain range of voltage.And I checked the voltage differential at input terminal and it also no longer become 0 at a certain V3 voltage. Can anyone tell me why this is the case? It's not driven to saturation, and I've tested different models of opamp with about the same result.I tried replacing the resistors with value 10 times larger (so 1k and 2kOhm) and get the correct result. Does that mean current has something to do with the result?

author: MrAl
author_rank: Super Contributor
timestamp: October 28, 2017, 10:07:51 am
content: Hello,Do an analysis at the point where you see it start to fail, then calculate the current output from the op amp.The op amp must be able to put out the current needed to zero the differential. If it can not, it will not work any longer the way you expect it to.For example, with all inputs zero except V3=10 volts, the op amp must be able to put out -10 volts at the current required, and the current required is given by the value of the resistors. 10/100 is 100ma, and that's a lot for most general purpose op amps. If the two resistors were increased to 1k each, then it would be 10/1000 which is only 10ma which many op amps can handle, and if the two are increased to 10k then the current would be 10/10000 which is just 1ma which almost all op amps can handle easily.So check your current as the circuit just starts to fail, then look up the spec's for the op amp output current and compare.
Problem with TekPower TP3005T Linear Power Supply - Page 1
Forum section: electronics / beginners

author: GMV
author_rank: Newbie
timestamp: June 11, 2024, 05:50:28 pm
content: Used my TekPower TP3005T Power Supply one time. 6volts 2 Amps with Overcurrent protection on to power up the computer on an exercise bike. Now the power supply is not connected to any load and will power up for a couple seconds then power down.I am just getting into electronics and fairly basic as far as skills go. Tekpower has absolutely no customer support to my knowledge. Am I just making some beginner mistake in powering up this supply vs trashed it already. Help would be appreciated. Gene

author: JustMeHere
author_rank: Frequent Contributor
timestamp: June 11, 2024, 10:56:34 pm
content: Look for a burnt fuse and any possible air flow obstruction.

author: BillyO
author_rank: Super Contributor
timestamp: June 12, 2024, 12:21:31 am
content: Quote from: GMV on June 11, 2024, 05:50:28 pmWhat did you set the over-current protection to? It may be possible that poor firmware allowed you to set it to a level that can't be avoided at start up. Perhaps there is a way to reset the controller internally.

author: aliarifat794
author_rank: Regular Contributor
timestamp: June 13, 2024, 09:49:21 am
content: If you are skilled enough to open the power supply, you can check for blown fuses, damaged components, or loose connections.

author: MathWizard
author_rank: Super Contributor
timestamp: June 14, 2024, 02:55:49 am
content: Here's a teardown video, I think the same unit. It looks like a pretty small circuit, so it should be pretty easy to find what's not doing it's thing.If the resetting is like like clock work, it's probably some chip sensing the problem, and resetting on a timer.With it unplugged, and a DMM, you could check some basics like the power switches, fuse, diodes, transistors, check for shorts on capacitors, that type of stuff.If most things test ok, (usually not everything will test good in circuit to resistance, capacitance or diode checks), then try checking some voltages with the power on. Time is no big issue for me, so I usually map some or all of the circuit, and solder on a few wires in key spots.Like on a 750W computer PSU I fixed today, I had 7-8 wires soldered onto 1 of the main capacitors, some pins on the opto-couplers, and a FaultProtectionOutput pin. Turns out it was just a dual diode that failed, and 1 of the main chips was not getting power, and only the 5Vstby could work.If you go unsoldering wires, unless you have perfect memory, keep track of what goes where. Sometimes it easy to remove a whole PCB, and power it, or part of it, off a another PSU, like a 5 or 12V powerbrick. The less I have to worry about Mains voltage, the better.

author: BillyO
author_rank: Super Contributor
timestamp: June 14, 2024, 03:09:22 am
content: "Tare Down"!Awesome name for a diet program!Or a dead weed.
Problem with transimpedance amplifier using single supply - Page 1
Forum section: electronics / beginners

author: elki
author_rank: Regular Contributor
timestamp: March 03, 2024, 10:04:33 am
content: Hi everyone! Trying to simulate a basic transimpedance amplifier circuit with OPA656 using a single supply. In a dual supply configuration things work fine, but the single supply option does not seem to provide any working mode. Tried with other op amps with a similar conclusion. What could be wrong with the circuit below?

author: Vovk_Z
author_rank: Super Contributor
timestamp: March 03, 2024, 10:17:33 am
content: Possibly you need an opamp with input rail-to-rail capability. You don't really need both rails, you need only 'ground capability'. Now you try to work with one input tied to ground but this exact opamp can't work like that.You may try LM358, LM258 etc.

author: elki
author_rank: Regular Contributor
timestamp: March 03, 2024, 10:32:19 am
content: Found ADA4625, which seems an ideal choice for transimpedance amplifier when working with single supply. However, still not getting the proper functioning.

author: RoGeorge
author_rank: Super Contributor
timestamp: March 03, 2024, 11:06:14 am
content: Most Analog Devices models have a demo/test schematic that comes with LTspice, provided by ADI, and guaranteed to work.Start a new schematic, place only an ADA4625, then right click on the symbol and press the buttonOpen this macromodel's test fixture. A complete schematic will open, with a test circuit for a photodiode amplifier. Use that as a starting point. Run it as it is, to check if it works on your install.If it works, change the negative source V2 from -18V to 0V. With single supply it will take a little more to enter the normal working regime. Simulate 60us instead of only the first 6us. Then to remove the 2 at the end of the pulsed current source Id (so to generate a continuous train of pulses instead of only 2 pulses). You may want to limit the max time step to 1ns (now it is not specified) in case the time steps are not fine enough for 60us., so to make it single supply, and start tweaking from there.

author: sharow
author_rank: Contributor
timestamp: March 03, 2024, 12:31:25 pm
content: look at Net-Name carefully. you have "+10" and "+10V".

author: elki
author_rank: Regular Contributor
timestamp: March 03, 2024, 12:39:21 pm
content: Good catch!Quote from: sharow on March 03, 2024, 12:31:25 pm

author: elki
author_rank: Regular Contributor
timestamp: March 03, 2024, 12:40:11 pm
content: Thanks a lot - this is indeed a reassuring approach for not getting into trouble for missing some of the recommended settings.Quote from: RoGeorge on March 03, 2024, 11:06:14 am
Problem with variable current source/mirror (?) - Page 1
Forum section: electronics / beginners

author: AxleD
author_rank: Regular Contributor
timestamp: March 19, 2015, 09:36:20 pm
content: Hi,I have a simple current mirror feeding a common emitter which has a voltage regulator as a load. The circuit seems to work fine - current is controlled or "programmed" through R5, which is then fed fed into the base of transistor Q8. The problem i have is that the current limit which i measure through R7 is allot lower than expected. My understanding is that Ic is roughly equal to beta x current into the base. This transistor has a beta of 200 so i would expect around 200ma through R7 and not the 150ma.Is this simply due to due to the fact that the beta x Ic is an approximation or am i missing something?Thanks

author: krivx
author_rank: Frequent Contributor
timestamp: March 19, 2015, 11:14:36 pm
content: Bf in the transistor spice model isideal maximumcurrent gain. It will vary with collector current and Vce (so will the real thing!)Here's a summary of some of the model parameters. If you need 200mA then try a different transistor, a 2n3904 maybe.http://www.nxp.com/models/simkit/bipolar-models/spice-gummel-poon-sgp/explanation-of-most-significant-spice-parameters.html

author: atferrari
author_rank: Frequent Contributor
timestamp: March 20, 2015, 11:39:49 am
content: Quote from: krivx on March 19, 2015, 11:14:36 pmIsn't too much the power the 2N3904 will dissipate? 18-5 *0.2 > 1 W if I understand this right

author: krivx
author_rank: Frequent Contributor
timestamp: March 20, 2015, 12:07:00 pm
content: Quote from: atferrari on March 20, 2015, 11:39:49 amQ8s collector is at only ~4.3V (one Vbe below the base voltage of Q1), if Ic is 200mA then emitter voltage is ~ 2v, so a 2n3904 should be fine for Q8. Q1 will need something beefier though.

author: krivx
author_rank: Frequent Contributor
timestamp: March 20, 2015, 12:08:31 pm
content: I just realised I left a link out of my earlier postIt looks like U1 and Q1 are supposed to operate as a 5V regulator, I don't think that's the case.

author: atferrari
author_rank: Frequent Contributor
timestamp: March 20, 2015, 11:30:40 pm
content: Quote from: AxleD on March 19, 2015, 09:36:20 pmHola Axle,Could you post the .asc file? I think you should add an extension like ".txt" to upload it here.Gracias.

author: AxleD
author_rank: Regular Contributor
timestamp: March 22, 2015, 07:18:16 pm
content: Hi all,Thank you all for the replies. Great, i thought it was because Hfe might be different to the model parameters listed but was not sure.Also, I redid the schematic but this time left it as the default "vanilla" transistors you get when you add the component for the first time (rather than choose a specific part such as 2n2222). As soon as i did this everything seemed to work out fine with these "vanilla" transistors having a stable beta/hfe of 100.I will try and post the file later.Cheers
Problem with VHS-C SABA VM6993. - Page 1
Forum section: electronics / beginners

author: Exzprez
author_rank: Newbie
timestamp: November 26, 2024, 01:48:41 pm
content: Hey everyone. I need help with my SABA VM 6993 VHS-C. It turns on normally. I got a problem with recording. Screen shows that its recording but when i try to see what I had recorded its just snowing in the screen. I checked cassete recorded on another VHS-C cam and it shows normally. What could be the problem here? Thanks.
Problem with write Atmega64 (Tl866ii plus)  - Page 1
Forum section: electronics / beginners

author: Pede11
author_rank: Newbie
timestamp: May 12, 2019, 05:15:45 pm
content: Hello guys I am new in this website, I have problem with flash atmega64a a use ISCP connection Programmer cant read chipID. When I unclick option "check ID" I can read the chip. I try 100times different options but nothing I cant write the chip same error code.

author: rstofer
author_rank: Super Contributor
timestamp: May 13, 2019, 04:20:13 pm
content: Lock bits?You said you could read the device but you didn't give an example of the output. If it was all 0xff, it may be that the memory is locked from external access.The only way to resolve lock bits which prevent reading/writing flash is to do a complete chip erase.Does that 'ICSP_VCC Enable' check box mean anything?Have you ever programmed this chip? Is it new or recovered from something. Most commercial products will have the flash read/write protected.

author: Pede11
author_rank: Newbie
timestamp: May 17, 2019, 07:12:30 am
content: Yes you have truth I mean chip atmega64 in circuit (x-prog) clone. Chip is erased probably complete, I set lock bits low byte boolevel=0, boden=0,suto=0, high byte: spien=0, ckopt=0,bootsz1=0,bootrst=0. And Lock bit byte LB=0 lb1=0. It is correct? Thanks
Problem/Question custom breadkout board EC AFE AD549x - Page 1
Forum section: electronics / beginners

author: chrisp87
author_rank: Newbie
timestamp: February 01, 2025, 09:31:35 pm
content: Hi everybody,I am currently working on a project to realize an electrochemical (CE) AFE breakout board for a wearable based on the AD549x series from AD.My design is mainly based on the reference design (https://wiki.analog.com/resources/eval/user-guides/eval-ad5940/hardware/eval-ad5941elcz) provided by AD for the AD5491 chip and other sources (https://github.com/IMTEK-FreiStat/FreiStat-Hardware) described in academic literature.Currently, I am using an Arduino MEGA2560 (size of AD library for this IC is rather large) to interface with the AD5491 since a descent port of the firmware lib from AD is available.With my current design I am able to interface with the AD5491 EC AFE via SPI and can do things like check the chip ID and so forth.However, running actual measurements is currently not possible with my breakout board. I identified the error being that the Arduino is not receiving a signal via the GPIO0 of the AD5491 to the hardware interrupt pin of the Arduino, which is telling the firmware on it that their is data in the FIFO to be read.After further testing I noticed, that even after removing the power source provided by the Arduino to the PCBA, it was still powered by the SPI lines. Thus, I guess the problem must be with the PCB layout itself? Never run into such an issue with other design e.g. were sensors were interfaced via SPI before.I use a 4 layer board with the stack up: SIG, GND, PWR, SIG.Schematics and images of the PCB are provided.I am grateful for any input/feedback

author: ahsrabrifat
author_rank: Regular Contributor
timestamp: February 02, 2025, 09:48:29 am
content: Check if check if SPI signals are anywhere overlapped with power planes.

author: hiepss12
author_rank: Newbie
timestamp: March 20, 2025, 03:46:16 am
content: Hi chrisp87,I'm currently working on a similar project. Specifically, I configure AD5940 to measure 4-wire Impedance on EVAL-CN0565-ADRZ using Wemos D1 (Arduino IDE). But when using my oscilloscope to display the waveform at CE0 (in the picture below), there is no waveform. My Write to and Read from registers functions work properly. I don't know if the issue is in hardware or firmware.

author: chrisp87
author_rank: Newbie
timestamp: March 20, 2025, 08:57:12 pm
content: Hi hiepss12,I could only solve my problem by switching to a completely different MCU instead of the using Chinese knockoff board of the ATMEA 2560 I was using.I am currently using a Nucleo-F411RE board from ST and now the interrupt via GP0 pin of the ad594x is working correctly. Did you check in the firmware if the Wemos D1 board is getting the interrupt from the ad594x if enough data is in the FIFO?
Problems Finding Equivalent Part In UK: Vanguard Power MOSFET VS30P90AD - Page 1
Forum section: electronics / beginners

author: Timmox
author_rank: Contributor
timestamp: November 22, 2022, 08:32:41 am
content: Hi,I am trying to fix a jump starter pack that also has a an inbuilt air pump. The MOSFET that controls the pump has failed and I'm struggling to find a suitable replacement in the UK. I have emailed various suppliers on ebay and they don't carry equivalents.I have attached the only DATA sheet information I could find and a picture of the item in question.If anyone could suggest an equivalent that can be purchased in the UK I'd be very grateful.Vanguard Semiconductor Power MOSFET VS30P90ADThanks in advance,Tim.

author: Terry Bites
author_rank: Super Contributor
timestamp: November 22, 2022, 09:25:38 am
content: You haven't specified a package type. My best guess is this is a 30V 90A P-channel mosfet. I think the datasheet attched is for a similar device, I may be wrong..... others will clarify I'm sure. If that guess makes sense in your circuit, you might try a IPD90P03P4L04ATMA1Many MOSFETS will work as long as they are rated for at least 30V and 90A eg IPB120P04P4L03ATMA1 or a FDD9509L-F085 or a SUM110P06-07L-E3You probably need to reverse engineer the cicruit to work out what gate voltage is being applied. This will help narrow down your selection.Use a supplier's parametric search egwww.digikey.co.uk/en/products/filter/transistors-fets-mosfets-single/278?s=N4IgjCBcoGwAwyqAxlAZgQwDYGcCmANCAPZQDaIAzABwCsYclIAukQA4AuUIAyhwE4BLAHYBzEAF8i8akhCpImXIRLlwYACwaaIIgCYAnAdoG4ukIeMGIRSnE13zdymGp7zMOnAMe6DcwDscMFMREHUlD5hYLTwgXpwJoEBejChIAHU1N7mEZkBuZSZskTWdlEgBhq0WuYMwaks7FyQvAIi4lIWCLLQIJzcAKrCghwA8mgAsngYOACu-Hjmc9wAauYAtiLcjl0AtO59CgJzKqSQFLQsEl2IfYIAJtx7DDb9LSDmHACebEuts1QNyAAorwww.mouser.co.uk/c/semiconductors/discrete-semiconductors/transistors/mosfet/?id%20-%20continuous%20drain%20current=90%20A~~545%20A&number%20of%20channels=1%20Channel&technology=Si&transistor%20polarity=P-Channel&vds%20-%20drain-source%20breakdown%20voltage=30%20V%7C~33%20V~~36%20V%7C~39%20V~~40%20V%7C~45%20V%7C~50%20V%7C~55%20V~~60%20V%7C~65%20V%7C~70%20V%7C~75%20V~~100%20V%7C~120%20V%7C~150%20V&rp=semiconductors%2Fdiscrete-semiconductors%2Ftransistors%2Fmosfet%7C~Vds%20-%20Drain-Source%20Breakdown%20Voltage%7C~Id%20-%20Continuous%20Drain%20Current

author: Timmox
author_rank: Contributor
timestamp: November 22, 2022, 10:14:23 am
content: Hi Terry,Thank you! The information you provided was really helpful. I'm now confident I can find something that will do the job.My apologies for missing some info. The attached DATA sheet is for the actual component on the board that switches the compressor motor for the tyre inflator that's built in to the jump starter pack. It is a TO-252 but it's my own jump start pack so I'm quite happy to "bodge in" whatever package I can get hold of.Once again thanks for your time, it's much appreciated.Cheers,Tim.
Problems level shifting with NPN & PNP transistors - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: July 01, 2013, 10:14:42 am
content: This is really wired, I have my arduino output PWM signal that I need to level shift to 24V PWM signal to drive a brushless motor. I have a PN2222A NPN transistor being driven by the output via a 1K resistor, then I have the emitter/base of the PNP transistor going into the collector of the NPN via a 10K resistor. Now on the collector of the NPN i have my PWM signal, at the other side of the resistor i have constant +24V, what the ? i thought this was a basic configuration what have i missed ?

author: free_electron
author_rank: Super Contributor
timestamp: July 01, 2013, 10:18:06 am
content: Looks normal to me. The emitter base of the pnp is a diode. If you measure there you will always see vsupply -0.7 volt.If you were to measure the current you will see the pwm signal. If you measure voltage you will see vsupply -vbe

author: Simon
author_rank: Unknown
timestamp: July 01, 2013, 10:24:55 am
content: Yea your right of course, so problem is my PNP is not switching off because i always get 24V from the collector, do i need a resistor from the emitter to base on the PNP ? (mosfet style)

author: Simon
author_rank: Unknown
timestamp: July 01, 2013, 10:32:25 am
content: my PNP collector only goes up to 10V on the high state not 24V so suggests that current is always passing in the PNP base (via the NPN collector) which keeps it on.Is there any way current can backflow though the base of the NPN and into the arduino pin that is connected to ground ?

author: Simon
author_rank: Unknown
timestamp: July 01, 2013, 10:47:27 am
content: I had the NPN back to front ! duh stupid me. so colector and emitter were swapped

author: Andy Watson
author_rank: Super Contributor
timestamp: July 01, 2013, 10:50:44 am
content: Quote from: Simon on July 01, 2013, 10:24:55 amI would, something like 1k between B-E. This will lower the impedance and speed-up the switching. You don't say what sort of load you're driving but if it's >100mA you might want to take the hfe of the PNP in to consideration and adjust the value of the 10k accordingly.

author: Andy Watson
author_rank: Super Contributor
timestamp: July 01, 2013, 10:52:27 am
content: Quote from: Simon on July 01, 2013, 10:47:27 amThat wouldn't have been helping the situation

author: Simon
author_rank: Unknown
timestamp: July 01, 2013, 10:52:59 am
content: as per above - fixed, I have my fan running at a very steady 934 rpm. The PNP is just supplying a PWM signal to a brush-less fan motor with over 100K input impedence so no load problems

author: Simon
author_rank: Unknown
timestamp: July 01, 2013, 10:53:29 am
content: Quote from: Andy Watson on July 01, 2013, 10:52:27 amIndeed
Problems pulling up inputs of CMOS higher than Vdd?  - Page 1
Forum section: electronics / beginners

author: rbm
author_rank: Regular Contributor
timestamp: March 18, 2015, 09:18:24 pm
content: I'm using a CD4511 "BCD to 7-seg decoder" in a vehicle application, supplying the circuit between 12V-14V. Vdd on the CMOS chip is connected to Vbatt as well as 10K pullup resistors to three of the four BCD inputs (A,B and C). I'm having heat related problems with the current limiting resistors to the LED display and would like to reduce Vdd to 5V to solve those problems. Just wanted to know if I'm heading for trouble if I don't also tie the pullups to +5V?Thanks for helping.

author: wraper
author_rank: Unknown
timestamp: March 18, 2015, 09:55:47 pm
content: Current will flow to Vdd through protection diodes in the IC.

author: rbm
author_rank: Regular Contributor
timestamp: March 18, 2015, 11:45:42 pm
content: Doesn't sound good. Right?

author: Delta
author_rank: Super Contributor
timestamp: March 19, 2015, 01:38:47 am
content: Quote from: rbm on March 18, 2015, 11:45:42 pmCorrect. It's not good.If you're throwing in a 7805 or similar, why not just tie the pull-ups to the 5v rail?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 19, 2015, 10:30:39 am
content: "Vbatt"You mean... properly filtered, transient protected, and voltage limited, Vbatt, right???Cars are not gentle environments; be very careful with what you power from automotive supplies!As for CMOS, it's generally okay to source/sink a few mA into/out of a pin (i.e., current coming from a voltage above VDD or current sinking to a voltage below VSS). The outputs are slightly more robust as they have bigger transistors (one or the other of which is usually active at all times), whereas the inputs just have lossy diodes. I would rate 74HC, LVC and such as having higher capacity than CD4000 or 74C chips, but I still wouldn't suggest going over 10mA DC / 20mA peak with those. Size the pull-ups/downs accordingly, or run them from respective supplies.Note that, if you use a 7805 to make the 5V rail from Vbatt, you're only moving the problem from the resistors to the 7805. If heat is a problem, use a switching regulator. And speaking of heat -- if operating temperature is also a problem, mind that bog standard 7805s turn off at a paltry 100-120C -- with fairly weak RthJC and even weaker Rth of the heatsink, you can easily blow this spec from just a few watts on a hot, sunny day, in which case the regulator will turn itself on and off repeatedly, until it eventually pops.Tim

author: dannyf
author_rank: Super Contributor
timestamp: March 19, 2015, 11:01:38 am
content: QuoteDepends on the design.

author: rbm
author_rank: Regular Contributor
timestamp: March 19, 2015, 12:17:36 pm
content: Thanks for the replies. I guess I'll look at alternatives to the 7805; it's just that I had them in my parts drawer.

author: wraper
author_rank: Unknown
timestamp: March 19, 2015, 12:25:27 pm
content: Quote from: rbm on March 19, 2015, 12:17:36 pmThere will be no difference, unless it is some kind of DC/DC converter.
Problems regarding audio amplifier signal on output of TDA2030A chip - Page 1
Forum section: electronics / beginners

author: Electricolin
author_rank: Newbie
timestamp: February 11, 2022, 09:02:15 am
content: Dear users,For my first electrical engineering schoolproject regaring an audio amplifier, I am experiencing the following problem:When I connect a 1000Hz 0,6V signal from my signal generator, I receive a very thick sine wave on the output of the amplifier (See image). I used the the test circuit from the datasheet (See image) however I didn't include R4 and C7; because when I did include them in my circuit a few weeks ago, the resistor burned out. Does adding these two components fix my problem, if yes why? And when I should include them, why shouldn't this low resistance resistor burn out in the first place?Please help, I cannot find the answer that I am searching for online.Many thanks,- Colin (First year electrical engineering student)

author: wraper
author_rank: Unknown
timestamp: February 11, 2022, 09:07:03 am
content: Without those components TDA2030 usually will oscillate at least in some conditions.https://www.eetimes.com/ic-audio-power-amplifiers-and-zobel-networks-one-size-does-not-fit-all/

author: Vovk_Z
author_rank: Super Contributor
timestamp: February 11, 2022, 12:51:58 pm
content: Resistor burned because of powerful parasitic HF oscillation. Usually that circuit helps and it is needed to improve stsbility of an amplifier. If it doesn't work that may mean something done wrong in an amplifier design.

author: rpiloverbd
author_rank: Regular Contributor
timestamp: February 11, 2022, 01:22:58 pm
content: My humble suggestion is to recheck the circuit. Please check it part by part. Specially, check if any short circuit has occurred.

author: CaptDon
author_rank: Super Contributor
timestamp: February 11, 2022, 01:57:26 pm
content: The circuit is unstable probably due to layout. You may want to put some sort of mild load resistor on the input like 10K. Since the circuit is an 'amplifier' it is prone to feedback if there is any sort of leakage from output to input including poor filtering on the power circuits and loads that cause unusual phase shifts. Sometimes output load impedance can also cause oscillations. The oscillations are typically 30Khz to 50Khz range.
problems with 74HC165 PISO Shift Register - Page 1
Forum section: electronics / beginners

author: King_bob
author_rank: Newbie
timestamp: February 08, 2014, 10:12:55 pm
content: Hi,I am having issues reading the data out of a 74HC165 shift register. Initially I had it hooked up to an attiny85, but I couldnt seem to get the correct reading, so I broke it down to the most basic possible schematic. I am completly a newb at electronics so dont hurt me too much(resistors in image are 10k not 220)The output (Q7) on which the led is connected flickers randomly, when I dont press anything. also pressing the PL and CL as follows:PL:HIGHPL:LOWPL:HIGHLED should show DIP 1CL:HIGHCL:LOWLED should show DIP 2does not deliver the expected results, but allways delivers random results each time.Any ideas on where the problem ist?I solved the flickering by adding a pulldown on pins 1&2, but the data is still not coming out quite correctly.

author: grumpydoc
author_rank: Super Contributor
timestamp: February 08, 2014, 11:07:26 pm
content: Some things, one of which you have discovered:74HC inputs are very high impedance and will pick up random rubbish if left unconnected. Pins 1&2 weren't connected to anything unless the switches were pressed - this is why you needed to add resistors.PL (pin 1) is active LOW so you need to pull it UP and have the switch ground pin 1You don't have any debounce - when you push the switch the 74HC165 will actually see several pulses. Google switch bounce or look through the forum as there were some threads recently on this subject.Oh, and you don't have any decoupling which is probably not significant but it never hurts to add 0.1uF or so close to each IC between VCC and ground.

author: mariush
author_rank: Super Contributor
timestamp: February 09, 2014, 12:24:34 am
content: Probably Fritzing :http://fritzing.org/home/

author: King_bob
author_rank: Newbie
timestamp: February 09, 2014, 12:56:11 am
content: yes the picture is made with fritzing, as for the switch bounce, I have the problem regardless wheather I use buttons or attiny85, one strange issue is that when D0 gets set to HIGH Q7 (data out) also goes high, regadles of the load or clock.EDIT: Problem has been solved, Thanks

author: grumpydoc
author_rank: Super Contributor
timestamp: February 09, 2014, 09:34:28 am
content: QuoteAnd the problem was.....?

author: King_bob
author_rank: Newbie
timestamp: February 09, 2014, 12:01:44 pm
content: switch bounce was the first problem, then after attachting the attiny again, I had a small code issue, unfortunately pin 8 is still a problem, but that is something that I can ignore.
--- - Page 1
Forum section: electronics / beginners

author: marzig
author_rank: Newbie
timestamp: April 20, 2015, 09:20:11 pm
content: -

author: albert22
author_rank: Regular Contributor
timestamp: April 22, 2015, 12:25:18 am
content: R and L are correct on the equation but they are reversed in the description.IMHO many steps are required to get eq. 1. Which looks like a small signal AC model of the PWM. Implying a linearization around an operating point.This linear model is required because otherwise you cannot apply the laplace transform and get eq 2. Which is not the "motor transfer function". The author is modeling just a winding of the motor (given its inductance L and its resistance R). That is just an RL circuit excited with a PWM. And the transfer function refers to the input: duty cycle, to the output: winding current."u" then in not a voltage is the duty cycle, it is a ratio so it is dimensionless.The PI loop should output u as a value for the duty cycle.

author: albert22
author_rank: Regular Contributor
timestamp: April 22, 2015, 04:54:24 pm
content: To get a linear ac model for the pwm, you need to write the equations for the average voltage applied to the RL circuit. This gives the operating point around which you apply a small perturbation signal. In this case a small perturbation of the duty cycle. The resulting eq is linearized by discarding high order terms.Here is an example:http://www.planetanalog.com/author.asp?section_id=3049&doc_id=563779the function:int CalcPI1(int currentReference,int currentMeasurement)...return PI_out1; //controller voltage outputSays it returns voltage. I think that to be sure of what is the output of the PI controller you need to know the units of the gains G0,p1,p2...Ultimately the DsPic output is a pwm pulsed output. There is no voltage control, only duty cycle is varied. Somewhere in the source code a conversion from PI_out to duty cycle should be done. I didnt find it in a first read may be I can take a second look later.

author: albert22
author_rank: Regular Contributor
timestamp: April 22, 2015, 05:05:42 pm
content: update:Quote

author: albert22
author_rank: Regular Contributor
timestamp: April 23, 2015, 11:52:41 pm
content: Duty cycle is typically from 0 to 1.Seems like that the author used that for the model. Anyhow the eq of the linearized model are only valid for small perturbations around the operating point. I am not sure that you can go thru the full range on your simulations.The system will be non linear for large variations and that is partially handled by the anti windup mechanism.A fixed point implementation of the discrete controller, as mentioned in eq 6 will have different gains and probably a scaled duty cycle. Which no longer go from 0 to 1.You need to read very carefully the source code to understand what is happening there.Good luck
problems with arduino code - Page 1
Forum section: electronics / beginners

author: little_carlos
author_rank: Regular Contributor
timestamp: April 01, 2015, 02:53:04 am
content: helo guys, ive done a code for a arduino to display the status of a water pump into a lcd, ive done it so that it reads if the motor is on or off, and display it into a lcd, the problem is that it always read as if the motor is on and it always displays de the message "bomba encendida" (it means pump on in spanish).i havent done it on physical, just on proteus, what is wrong with the code? when i compile it it says its ok, no error messages#include <LiquidCrystal.h>LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);int bomba = 1;int val = 0;void setup() {lcd.begin(16, 2);lcd.setCursor(0, 0);pinMode(bomba, INPUT);}void loop() {val = digitalRead(bomba);if(val = HIGH){lcd.write("bomba1 encendida");}else{lcd.write("bomba1 apagada");}}

author: Mr.B
author_rank: Unknown
timestamp: April 01, 2015, 03:00:04 am
content: Tryif(val == HIGH){

author: little_carlos
author_rank: Regular Contributor
timestamp: April 01, 2015, 03:06:10 am
content: Quote from: Mr.B on April 01, 2015, 03:00:04 amwould "val" work if i use it for more inputs or i have to declare another one?

author: Mr.B
author_rank: Unknown
timestamp: April 01, 2015, 03:10:10 am
content: Your original code isif(val = HIGH){In that line you are assigning the value of HIGH to the variable val.Your code should look like thisif(val == HIGH){Note the double =This is a test to see if 'val equates to HIGH.basically your C syntax is wrong.

author: Mr.B
author_rank: Unknown
timestamp: April 01, 2015, 03:12:14 am
content: Quote from: little_carlos on April 01, 2015, 03:06:10 amval is declared as a 'global' variable and can be used anywhere you like.Yes, you can use it for more inputs, just make sure you are setting the variable correctly before you test it.
Problems with battery current - Page 1
Forum section: electronics / beginners

author: jarleiceman
author_rank: Contributor
timestamp: December 21, 2013, 07:42:52 pm
content: Hello O0I have a headphone With an 3.6v AAA 500mA batery li-ion, reachargebal. ,and I want to put in a plug so I can recharge it. but if I use a USB Connection (5v) li-ion, what size shal my resistan has....I dont know what te battery can take..3.6v---4,2v...I dont know...and which plug shal I use on the earphhones ( BOSE SoundComford 15) I know U=R x I but what current shal I choose,what current does the battery take....jarleiceman

author: Hideki
author_rank: Frequent Contributor
timestamp: December 21, 2013, 08:04:57 pm
content: I can't find anything named "BOSE SoundComford 15". There is a model called "BOSE QuietComfort 15" -- is that what you're talking about?http://www.bose.com/controller?url=/shop_online/headphones/noise_cancelling_headphones/quietcomfort_15/index.jspAccording to the manual, it uses one 1.5V AAA alkaline battery. It actually says: "When a replacement is needed, use a AAA alkaline battery (IEC LR03). Note: Remaining battery life may vary when using rechargeable batteries. NiMH batteries, composed of nickel metal hydride, are recommended."Depending on the circuit inside, it might not like the high voltage from a Li-ion battery, but then again, it might also work fine.You should be able to trickle charge NiMH but never ever try something that silly with Li-ion unless you want your headphones to catch fire when you least expect itThose batteries need a proper charger.

author: Maxlor
author_rank: Frequent Contributor
timestamp: December 21, 2013, 08:19:39 pm
content: Building a battery charger is a bit more complicated than slapping together an USB connector and a resistor, since they need to be charged with constant current (but different currents during different charge states.) Ohms law won't help you much here since the battery's voltage and internal resistance change constantly.Btw, Dave has a video on the subject,.I'd recommend you start with a simple existing charger design, maybe this one:https://www.olimex.com/Products/Power/USB-uLiPo/open-source-hardware.Theschematicis available too, so you could build it yourself with a different form factor.
Problems with c code for pic16f628a(0-99 counter 7 segment display)  - Page 1
Forum section: electronics / beginners

author: little_carlos
author_rank: Regular Contributor
timestamp: May 28, 2016, 03:59:11 pm
content: hello guysso i made this counter, when i press ra3 the counter adds by one, from 0 to 99, the problem is that when i press the button, the counter doesnt increase, it does nothing, i putted the button part on other code and it does recognize it, it adds and increases, but in this code, no matter how many times i try it does nothing, i cant see the mistake i could possibly made since the button part works in other simpler codes. ive tried a timer counter adding 1 each 300 mili seconds and it works, so the multiplexing part is working finehere is the codeCode:int i;int j;int var;int conmutador;int oldstate;void main() {TRISB = 0;TRISA = 1;TRISA1_bit = 0;TRISA2_bit = 0;PORTA = 0;PORTB = 0;var = 0;i = 0;j = 0;CMCON = 0x07;conmutador = 0;oldstate = 0;while(1){if (Button(&PORTA, 3, 1, 1)) { // Detect logical oneoldstate = 1; // Update flag}if (oldstate && Button(&PORTA, 3, 1, 0)) { // Detect one-to-zero transitioni ++; // Invert PORTColdstate = 0; // Update flag}if(i==10){i = 0;j++;}if(j==10){j = 0;}if(conmutador == 0){RA2_bit = 1;RA1_bit = 0;var = i;Delay_ms(10);conmutador = 1;}else{RA2_bit = 0;RA1_bit = 1;var = j;conmutador = 0;}Delay_ms(5);switch(var){case 0 : PORTB = 0x3F;break;case 1 : PORTB = 0x06;break;case 2 : PORTB = 0x5B;break;case 3 : PORTB = 0x4F;break;case 4 : PORTB = 0x66;break;case 5 : PORTB = 0x6D;break;case 6 : PORTB = 0x7D;break;case 7 : PORTB = 0x07;break;case 8 : PORTB = 0x7F;break;case 9 : PORTB = 0x6F;break;}}}if any one of you could help me with this, i really would apreciate it

author: JPortici
author_rank: Super Contributor
timestamp: May 28, 2016, 06:53:03 pm
content: what is "Button(&PORTA, 3, 1, 1)" ?what compiler are you using?

author: little_carlos
author_rank: Regular Contributor
timestamp: May 28, 2016, 07:14:23 pm
content: Quote from: JPortici on May 28, 2016, 06:53:03 pmis an anti bouncing library, im using mikroc

author: Andy Watson
author_rank: Super Contributor
timestamp: May 28, 2016, 07:45:26 pm
content: Code:TRISA = 1;TRISA1_bit = 0;TRISA2_bit = 0;I could be wrong, but I think you have defined portA,3 to be an output. The first statement will set TRISA to 0000 0001.

author: EPTech
author_rank: Regular Contributor
timestamp: May 28, 2016, 07:54:19 pm
content: Hi there,Try getting rid of the space between the i and the ++. I have had a similar problem with another compiler compiling the code but not linking it.happy hunting.

author: little_carlos
author_rank: Regular Contributor
timestamp: May 28, 2016, 08:09:35 pm
content: Quote from: Andy Watson on May 28, 2016, 07:45:26 pmthanks! that was the mistake
Problems with circuit(shift an differential signal) - Page 1
Forum section: electronics / beginners

author: baksuz
author_rank: Newbie
timestamp: May 14, 2019, 11:33:11 am
content: Hiii guys,I am trying to shift an differential signal, up to get for example from -2.5 , 2.5 to 0,5 .I have found on Level Shifting Signals With Differential Amplifiers Texas Instrumentshttp://www.ti.com/lit/an/sboa038a/sboa038a.pdf(schematics of circuit is in attachment)The problem is I have bought all part, but I cant make it work , and the problem is that I have just one power supply( I think that is a problem), I will attacht schematics of my circuit and hope so someone will help me.Have nice day

author: David Hess
author_rank: Super Contributor
timestamp: May 15, 2019, 03:44:20 am
content: First you will have to define the problem because that circuit will not shift a differential signal. Do you actually mean differential signal?If so, do you mean shift the differential or common mode value?Leveling shifting a single ended signal just requires a summing amplifier although often this is done with an instrumentation amplifier as shown in your example.

author: akowalczyk
author_rank: Contributor
timestamp: May 15, 2019, 07:18:24 am
content: Hi!Can you clarify what U3 is? That will help determine what type of signal output it will have. Looks like some sort of encoder or resolverIf it's a resolver, I think your summing circuit is correct, but you might need both terminals of the device hooked upHope this helps!

author: pwlps
author_rank: Frequent Contributor
timestamp: May 15, 2019, 09:34:13 am
content: Quote from: baksuz on May 14, 2019, 11:33:11 amYes, quoting from the datasheet:POWER SUPPLYVoltage Range : Min ±5 Max ±15But in the document you cite they suggest :Quote

author: Zero999
author_rank: Super Contributor
timestamp: May 15, 2019, 10:02:48 am
content: I take it you want to convert a differential -2.5V to +2.5V signal to single ended 0 to +5V?All you need to do is bias the reference pin of the INA105 at 2.5V, which could be done with an op-amp and potential divider, assuming you have an accurate enough 5V power supply available.Note that the INA105, needs a bipolar power supply: at least +10V and -5V is recommended. It won't work off a single 5V power supply.
Problems with LT1719 - Page 1
Forum section: electronics / beginners

author: Caleb
author_rank: Newbie
timestamp: October 30, 2012, 09:50:34 am
content: Hello,does anybody know a pin-compatible type of comparator which fits to a LT1719 footprint?I have strange problem with the LT1719 ... i set a reference voltage by a 12bit DAC to -IN-Pin of the circuit ... the relevant range is from 240mV to 300mV. I supply the LT1719 a constant current/voltage and change the the DAC-value ... but in some areas the LT1719 behaviour is not linear =( The problem must be the LT1719 ... because the reference voltage of the DAC is absolutely linear all over the range. It seems that the LT1719 changes the potential of +IN-Pin in particular areas of the reference voltage. With another comparator (not LT1719) it is absolutely linear.Somebody else has seen such a problem?Sorry for bad english =/

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: October 30, 2012, 11:30:10 am
content: Your problem is probably the hysteresis in the comparator, this is what makes it a comparator, as opposed to a (not very linear) opamp.Its hard to explain but basically it is slightly reluctant to change state. So to flip the output you need to go a little bit past equal voltages on the inputs. Maybe 10mv-30mv it should be on the datasheet.Maybe an op amp would suit your purposes better. It is linear and has no hysteresis and as long as you dont use feed back it will go near to the rail.

author: Caleb
author_rank: Newbie
timestamp: October 30, 2012, 02:32:45 pm
content: Thanks for your reply.You could be right ... i tried it with another comparator ... a LT1671 (with no internal hysteresis) ... this one shows wonderful linear behaviour.I'll check your suggestions
process in vhdl.  - Page 1
Forum section: electronics / beginners

author: hatokay
author_rank: Newbie
timestamp: November 07, 2018, 11:43:58 am
content: can somebody here can please explain to me what "process" means is in vhdl?it almost drove me mad to find info on it on the web, all explanations are horrible.for example what dose "process" means in this architecture of an dff:process (reset, clock)beginif (reset = '1') then dout <= 0;else if (clock'Event) and (clock = '1') then dout <= din;end if;end process;also what dose clock event mean?thx ahead to all who help.

author: dmills
author_rank: Super Contributor
timestamp: November 07, 2018, 01:36:04 pm
content: A process block defines a set of internally 'sequential' operations (Where sequential mostly defines priority not time).SoCode:process(reset, clock)begin...end process;defines a sequence of operations that define some logic. The arguments (Formally the "Sensitivity list") define (FOR SIMULATION ONLY) the signals that cause the process to be reevaluated on change. Note that these do not apply in synthesis, so an incorrect sensitivity list will cause the simulation and synthesis results to diverge.Code:if reset = '1' then dout <=0; -- This is an async reset because if is outside the clock conditional.Code:else if (clock'Event) and (clock = '1') then dout <= din;Clock'Event is true on any change of clock state, so this evaluates to true on a clock state transition ending with the clock having a state of '1', a more modern (but with slightly different semantics in some edge cases) version is if rising_edge(clock).Assignments to signals happen AFTER the logic is fully evaluated not at the point they are written, and only the last assignment evaluated is applied.For example, considerCode:process (clk)signal d : std_logic :='0';beginif rising_edge(clk) thenif d = '0' then d <= '1';end if;if d = '1' then d <= '0';end if;end if;end process;A software type might expect the two inner if statements to cancel each other out if d is initially 0, but the assignment happens at the end of the process, so actually the if d = ... bit for both if statements is looking at the value of d when the clock went high.Conceptually if statements that do not involve clocks beget multiplexers, if statements that do involve clock events or equivalent get you registers, and for most FPGA architectures multiplexers and random combinatoric bits collapse to lookup tables on the INPUT side of flipflops.The ability to view the logic diagram is very helpful when learning to make sure you are describing the circuit you think you are describing.

author: james_s
author_rank: Super Contributor
timestamp: November 07, 2018, 04:59:08 pm
content: When I was learning I found the book Free Range VHDL to be very helpful, it should answer your question.http://www.gstitt.ece.ufl.edu/courses/eel4712/labs/free_range_vhdl.pdf
Processing, Arduino and water pumps question - Page 1
Forum section: electronics / beginners

author: benonez
author_rank: Newbie
timestamp: July 23, 2014, 03:07:38 am
content: I am running a sketch in Processing 2.0 that sends MIDI out. The MIDI drives my patch in Ableton Live. It sends three control change per "frame" (this is Processing I’m talking about, so the action in my code occurs in the draw() loop, so 30 times a second the program spits out this MIDI info). So, I just want to mention that I’m not running the Arduino.ino, and want to use Processing’s Serial library to communicate with the Arduino.OK, this is where you come in:For my project I need to control the speed of three water pumps with the Processing sketch. I think I’m going with 120V AC pumps like this one:http://www.ebay.com/itm/210-GPH-Submersible-Pump-Aquarium-Fish-Tank-Powerhead-Fountain-Water-Hydroponic-/251400348354?pt=LH_DefaultDomain_0&hash=item3a88a0e2c2One solution I thought might work was to pulse a digital out pin on the Arduino and connect that to a SSR connected to the pump but I also see tutorials on using the Arduino program with a triad and an optocoupler circuit.That’s the gist of my problem. My first question is:Is there a solution where I can just use Processing?Also, any ideas on pumps would be appreciated.Thank you,Ben
MIPI-DSI - Page 1
Forum section: electronics / beginners

author: Lowkus
author_rank: Regular Contributor
timestamp: October 07, 2024, 11:18:22 pm
content: I bought a Siglent SDS1104X-E over three years ago and I still haven't opened the box. My very first electronics project is off to a very slow start.I have recently thought more about resuming my efforts. I began looking for an LCD to use in my project and found the one linked below that seems like it might be a good fit. I was wondering though, when an electronics store shows an LCD pictured with a MIPI cable attached, does that mean the cable is included in the purchase? Would it mean the cable is permanently attached or are those cables always removable?Is it feasible for someone of low skill in electronics (but high skill in programming) to interface an Arm processor with an LCD using MIPI-DSI? Or will that effort be problematic without specialized/expensive test equipment?https://www.digikey.com/en/products/detail/nxp-usa-inc/RK055HDMIPI4MA0/16274141?s=N4IgTCBcDaIEoGkAMBWFAJAIgWQJIAVcAWbAQSRAF0BfIA

author: Benta
author_rank: Super Contributor
timestamp: October 07, 2024, 11:21:55 pm
content: Move to "chat" please.

author: brucehoult
author_rank: Super Contributor
timestamp: October 07, 2024, 11:56:29 pm
content: Hey, it means that when you get the right magical mood to dive into a project you won't have to wait days or weeks for it to arrive -- and lose the mood -- because it's sitting right there!