texts:
I am working on a costume prop that utilizes a triangular cut sheet of emergency blanket spined with a single 12" long, .04" dia piece of nitinol wire that has a transistion temp of 115deg F. My plan is to have this mounted on my wrist between two sleeves. When I hit a button the wire is intended to warm up unwrap like a sail and extend to its full length. If anyone has ever seen the show Fullmetal alchemist then you know exactly what it is Im looking to accomplish.
So heres where I need some help. the wire I have is too thick I guess for a simple 9v to cause it to extend at all. I am at less than a week to get this finished and the reason for the wire method has to do with space, concealment/surprise and safety for those around me. I am looking for anyone who might have good experience working with batteries and nitinol wire that might be able to assist me with just finding a wire/method that would be easy and quick to accomplish. I have been on many youtube sites and the all show things working but little to no explination or they use flexinol which does the opposite of what I need it curves when charged. Can anyone help?


texts: Zirconium oxygen sensors for car exhaust for use in low temperature environment

texts: I am looking for a cheap oxygen sensor for application in a gas analysis system. The cheapest I can find is a Zirconium based car exhaust sensors, which require extremely high operating temperatures to produce significant output voltages, approximately 600 degrees centigrades. I am looking to enclose it in a plastic container, but the very large operating temperature is worrying me. Have any of you dealt with such a sensor? If so, do you think it's heat isolated enough for my application, to be enclosed within a plastic container? This is an example of a sensor I was thinking of.


texts: Environment effect on slew rate of operational amplifier

texts: Is there any environmental condition that will affect the slew rate of operational amplifier? I have been searching on it but there is no solid answer.


texts: How to implement a Muller C-element in a LUT4 of a FPGA?

texts:
I am practicing Asynchronous circuit design, and I would like to have some simple experiments by building simple circuits using a Spartan-3 FPGA.

I am wondering how one can implement a 2-input and 4-input Muller C-element into a FPGA using LUT4 primitives?

Will it be hazard free?


texts: DCDC converter load step and phase margin

texts:
When applying load step to a DCDC converter we can approximate the phase margin from the presence/absence of oscillation and the crossover frequency as well from the response time.

The question is: as the transfer function of the open loop is load dependent, which crossover frequency and phase margin can we see from the step load? To make a big difference let's step from no load to heavy load. Which crossover frequency dominates the response, the no load transfer function's or the heavy load's?


texts: What should I do if an ADC is communicating over SPI differently than in the data sheet?

texts:
I am trying to get a voltage reading from a MAX1142BCAP+ with a Raspberry Pi 4B. I am just using the default circuit at the bottom of the datasheet and this code for SPI in Python:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import spidev

# ams or aquisition mode select can either be 0 or 1, 1 being long, 0 being short

spi = spidev.SpiDev()

def adc_spi(ams):
    spi.open(0, 0)
    spi.max_speed_hz = 500000
    spi.mode = 0b00
    spi.writebytes2([0b11100000])
    pressure = spi.readbytes(6)
    print(pressure)
    spi.close()

adc_spi(0)

When I run this code I get these outputs in console without changing the voltage on Ain.
pi@gauge:~ $ python3 adc1.py
[40, 0, 0, 0, 0, 0]
pi@gauge:~ $ python3 adc1.py
[64, 0, 0, 0, 0, 0]
pi@gauge:~ $ python3 adc1.py
[64, 0, 0, 0, 0, 0]
pi@gauge:~ $ python3 adc1.py
[80, 0, 0, 0, 0, 0]
pi@gauge:~ $ python3 adc1.py
[80, 0, 0, 0, 0, 0]

When I analyze the digital outputs with a logic analyzer I get outputs like these:

These outputs change each time I run this but the values don't match the voltage I give Ain. These outputs don't match what the datasheet says I should get, either.
Some things I think the problem could be:

The fact I am not resetting between runs maybe.
The SPI mode although I have read the datasheet quite a few times by now.

Other then that I have no clue.
I have reconnected everything several times and tested each of my jumpers. I have tried another chip just in case this one was broken. I know this is a noob question this is my first time using SPI any insight you could give for trouble shooting this would be appreciated. Or if you think its probably a lost cause and I should just buy a I2C ADC that would be helpful too.
This is the datasheet I am using.


texts:
What do you think of my 80m band radio transmitter I designed? Originally I though about using an Armstrong oscillator, due to its simplicity and sine wavyness, but I heard that crystals are better, what oscillator circuit to use?

I decided to use tubes because I have around 40 of them laying around and I want to make the old guys at the ham radio club happy.


texts: DC motor operation with a varying voltage

texts: So I was studying PWM control of DC motors and it got me confused.Here the input is pulsated.This will obviously turn the motor fully on or fully off.Wouldn't this create vibrations?I know pulse waveform has an average value but the instantaneous value (it falls to zero in between pulses) is getting me confused..


texts: 3.3V Logic to 12V Logic (Uni-directional and Bi-directional)

texts:
I'm looking to understand how to convert between 3.3V logic and 12V logic, in each direction individually and bidirectionally. I know this question has been asked before, but I'm overwhelmed with the wide variety of possible answers. It seems like each of these have several different solutions.

Please consider that I'm using a 3.3V microcontroller (BeagleBone Black) on one side, and 12V relays on the other. This is not an automotive application. There will be about 50 different connections between these logic levels.

Ideally, a HIGH signal on one side would result in a HIGH signal on the other side. That is, I'd like to avoid inverting the signal.

3.3V to 12V

TIP120 Transistor
MOSFET
Smart Highside Power Switch

12V to 3.3V

Voltage Regulator
Resistors + Diodes
Optoisolator
Use one of the relays to simply switch the 3.3V signal

Bidirectional 3.3V ↔ 12V

Here it starts to get even more complex. I'd like to find a solution such that when either the 3.3V side or the 12V side is high, the other side goes high too. That means if the 3.3V side is logic 1, the 12V side will be logic 1 to match. When the 12V side is logic 1, the 3.3V side will be logic 1 to match. If either side is high, they are both high. If they are both low, then they'll stay low until one side changes. Almost like a logical OR.

Some combination of the above.
Specific bidirectional translators:

First Example
Second Example

2 MOSFETs + Resistors per this application note

Maybe this could be the MOSFET?

Which option(s) should I choose?

My head is spinning from all these options. I don't have enough knowledge to weigh these options against each other. I'm trying to avoid destroying the BBB by sourcing too much current. I'm also trying to be reasonable about cost (in terms of components and board space).

update:

It was clear from the feedback that I needed to provide more information. I thought it might be easier to correct a bad design, than to address this vague question.

I've created a "solution" to this problem here. I've requested feedback in that question. Any feedback there will address the intention behind this original question.


texts: Is a fuse the right way to measure current

texts:
I saw my friend in a workshop use fuses to measure current of a generator and he said that a fuse is more accurate than connecting a light bulb because the light bulb works in current range.

My question is : is he right? (that is more accurate to use a fuse instead of a light bulb to measure generator current? )  does fuse consider a load?  Is it a proper way to measure the current of generator?

is Kill-A-watt meter ( like this device: https://www.amazon.com/gp/product/B00009MDBU/ref=ox_sc_act_title_1?smid=ATVPDKIKX0DER&psc=1   )  accurate way to measure current of generator ?


texts:
Given a 9V battery as the only voltage source for a circuit, where is the Ground usually put? Is there a standard, for example, that puts the negative terminal at 0 and the positive at +9?

Does it every vary, or are there usually hard-set rules for grounding?


texts: How to "read" SSD LED display by sniffing it's i2c communications with master?

texts:
Firstly I apologise if this question is more of a Raspberry Pi/Linux question but I've scoured the Raspi/Linux stack exchange boards and googled until my fingers fell off so I'm trying here in the hope of some assistance!

I have a custom built device which displays certain numerical values on an custom seven segment LED board (6, 6 and 3 segments if it matters). The device is controlled by its master board using the I2C protocol. It is my aim to be able to "listen in" on any commands being sent to the LED board and use the numbers elsewhere. My goal is to have a headless Raspberry Pi acting as an internal web server which will be able to display the values on the LED board saving our engineers a walk every time they need access to the readouts.

The device manufacturer is a bit reticent with information but I am informed that the I2C address of the LED board is 0x88 which is in the reserved range of I2C addresses and therefore I cannot get programs like i2cdetect to successfully query the board.

So my question I guess is: is it possible to listen in to all communications over I2C and extract the useful data? I only want to "read" and not to "write". If I can somehow get the stream of data then I'm sure I'll be able to decode it. Or would it be possible to somehow set up the Pi to also pretend it's a device at address 0x88?


texts: What kind of electronic part is this on the circuit board?

texts:
I've a guitar amp with a little problem, spinning the volume controll, the amp starts craking.
All information I've got are:

Item list on the internet: https://www.manualslib.com/manual/522355/Ibanez-Tb25.html

My questions:

What means 09HBF25?
What kind of part is this? I don't think that it is a resistor, maybe a capacitor?
What could be a alternativ item to change them?


texts: How does this BJT oscillator work step by step?

texts:
Just in case, the collector of Q1 is connected with the base of Q2 (with the point Vo), I'm specially interested on how the Vo2 Output behaves (details will be appreciated).

Also I would like to know if this kind of circuit has an specific name and what's the approach for calculating its pulse frequency?


texts: Substitute a MOSFET in a motor controller

texts:
I'm trying to build a CoffeeBot from MAKE magazine, and I had a question about one of the components. The circuit is pretty simple; it uses an Arduino to control a gear motor via a MOSFET transistor. The Arduino is using a digital pin which I believe is capable of PWM, but in the code provided it merely turns ON/OFF.

So my question is about the MOSFET. I understand the basics of transistors, but why this particular part? The part listed is a 12N10L Logic Level MOSFET. What makes a MOSFET in this instance better than a regular NPN transistor? Is it the current that it can handle? Or is it somehow better at high frequency switching, were I to use PWM to control speed?

Also, if it is the current/heat capabilities of the part that makes it ideal for this job, what advantages would it have over something like a TIP31 or a TIP120 transistor?

Edit: People have rightly noted that I forgot an important detail, the current required by the motor. This is a small gear motor GM8 that seems to stall out at 400mA. Does that change the issues with the TIP120?


texts: How to Design Arduino Voltage and Current Sensing Shield

texts:
I am trying to design an Arduino shield that measures raw voltage and current of a small refrigerator (115V, 60W). I have an Arduino Mega board. To one of the ADC inputs I have connected a (non-split) AC current transformer sensor with an 1M resistor in parallel. The value of the resistor, I have chosen such that voltage range is within approx 0 - 3 V. so I can maximize the ADC precision.

This works fine and I manage to sample at 200Hz and although the current is not a sine (not surprising as the load is an AC motor), it seems similar to what I see with a scope.

My question is how to also get the voltage. I was thinking of some kind of a voltage divider, but I am reluctant to do it for the 115 V. I am learning how to design these things, so any pointers would be welcome. Also is there a better way to get current readings? I was thinking of using a small resistor and measure the voltage drop, but then I would get into a electrical safety problems and the accuracy doesn't seem to be much better than when using a transformer.


texts: Calculating Amperage After Boost In DC-DC Circuit

texts:
To keep this simple, I am trying to figure out what happens to the amperage when having the voltage boosted in a DC-DC circuit.

For an example here, Lets assume that the power source is a 26650 battery which would be capable of 65A @ 3.7V Peak with something like 40A working rate and it is powering a 12VDC light that is 100W, 2.5A. If we were to attempt to use a 3.7VDC to 12VDC booster with ~90% efficiency how is the amperage affected?

If 3.7V->12V and 2.5A-> X what is the amperage draw on the battery side, X?

Thank You

EDIT: Lets assume that the power source is a 26650 battery which would be capable of 65A @ 3.7V Peak with something like 40A working rate and it is powering a 12VDC light that is 100W, 2.5A. Would the draw on the battery be ~9A? or am I going about the wrong way of sorting this... – Traptmark just now   edit


texts: Wired communication from 1 atmel to many nodes

texts:
Right now i am looking for a better way to communicate to our wired nodes in a project that we are working on.

Currently there is 1 main node that all other nodes talk to that in turn handles all data back to a single computer. The nodes talk to the main node via Full Duplex 485.

I can do 4 nodes this way by having 4 separate 485 drivers sharing the same serial port to provide information to the nodes via the RS-485...

Topology goes as follows:

computer ----> main Node--> rs-485 --> daughter node
                       |--> rs-485 --> daughter node
                       |--> rs-485 --> daughter node
                       |--> rs-485 --> daughter node
                       |--> rs-485 --> daughter node
                       |--> rs-485 --> daughter node

(there are up to 12 nodes at this time that i need to communicate with, but more will eventually be created)

the rs-485 on the main node shares the second serial port on the device that is being used (there are 2 serial ports the other is being sent to the computer).

If i put a 5th device on the port that is live the signal on the serial port at the atmel device gets pulled from ~4.2V to about 2.9-3V for a digital high signal not including any extra noise from the multiple cable runs.

The length of the cables vary from 60Ft to 200Ft.

each node has a dedicated cable run that is terminated at the end of the run.

What is a recommended way of doing the communication between a single main node to many daughter nodes and allowing the daughter nodes to talk to the main node, but not to one another.


texts:
That an arduino can power some simple led's is basic knowledge. But what about an SMD RGB LED. I cannot find some datasheet for the module I purchased from ebay

(I want to use this LED for Notification purposes like the LED on android devices, eg: Green: Bootup, Green Blinking: Everything OK, Blue: Sending a Signal, Yellow: Receiving a signal, RED: Alarm state ... etc.)

Can this module be driven without the need of some extra Transistors? Do I need extra resistors or are theese little black things on the module already resistors? I am using an Arduino MEGA 2560 and want to connect the leds to the PWM Pins ~46-49, I think it was.


texts: Current values after power factor correction

texts:
I am a student tasked with correcting the power factor of an RC circuit to unity with a parallel inductor...
Vrms = 240V, 50Hz
R = 12ohm
C = 220uF.
I have calculated the inductor value by calculating the reactive power.
I simulated the circuit and the voltage and current are now in phase so I am happy it is correct.
Before the power factor was corrected the current waveform had a peak of 18A and a negative peak of -18A.
As can be seen in the image the current waveform now has a peak of 25.42A and a negative peak of 2.37A, with an rms value of 16.07A.
I just don't understand how these values are correct for the current. Can anybody explain why they are.


texts: Can I somehow make the LM7805 work hand in hand with an N-channel MOSFET to get more current out of the regulator?

texts:
I've seen the circuit with the LM7805 being used hand in hand with a PNP to provide more current.
My problem is the heat that comes with said configuration. Isn't there a way to make a linear regulator that uses a MOSFET to enhance the current capabilities?


texts:
I am trying to connect to a CAN bus network with my BeagleBone Black and SN65HVD230. I've connected it like in the picture.

I am running:

root@beaglebone:~# cat /etc/dogtag BeagleBoard.org BeagleBone Debian
Image 2014-04-23

I loaded kmodules:

sudo modprobe can
sudo modprobe can-dev
sudo modprobe can-raw

Checked it:

root@beaglebone:~# lsmod |grep can
can_raw                 4733  0
can_dev                 7957  0
can                    21085  1 can_raw

And then commands:

root@beaglebone:~# sudo ip link set can0 up type can bitrate 500000
Cannot find device "can0"

The command fails. How could I fix this problem?

There are some overlays thing that needs to be set up, but one of the capes (SerialCape) documentation says that latest Debian doesn't have to do any changes, and it is all incorporated already. I am not using cape, but the only difference is that I've connected to my pins directly with the driver itself.


texts: How a PC with an RS232 port read serial data coming from a device with an RS-485 output?

texts:
We have a program in Windows OS which is capable of reading serial data from an RS232 port or USB ports. We have a device which is only using RS485 communication (2 wire-half duplex).

Is there a way to use DB9 cable for reading data or should we convert RS485 to RS232 or USB? And if we do it is that enough for the program to read the data?


texts:
I'm trying to simulate a simple full wave rectifier in LTSPICE. The output I am getting is not what I am expecting. In the picture below, the green line is the voltage output from the + terminal of the sine wave, the blue line is the - terminal of the sine wave and the red line is the output directly from the bridge rectifier (just prior to C1).

It looks to me as if there is a problem with the sine source, in that it's increasing. I've deleted the circuit several times and redrawn, and I've restarted the whole schematic file again several times. If I just place in a single sine source connected to ground and nothing, I get the expected output (cycling between +/- 34V) but as soon as I connect the - output to a circuit, it all goes crazy.

What am I doing wrong?


texts: Capacitor measurement with specific conditions to understand that the capacitor is in a working condition

texts: I have a multimeter with maximum value of 200uF. I want to measure a capacitor which is 420V 330µF. Can it be understood whether the capacitor works or does not (its working condition) even that measurement is not so precise?


texts:
I'm trying to find a good stepper driver with low vibrations and low noise. So, I observed wave form between current sensing resistor of few stepper driver using my oscilloscope.
The voltage between current sensing resistor is proportional to current of the motor phase. Because of that I should be able to observe a wave form shape like as describe in the datasheet without negative half.( I can observe that negative half as positive half.because of there is no current direction change in the resistor)

When I observed the wave for I got like below,

Described wave form in the datasheet,

This is different from wave form shown in datasheet. Micro-stepping is perfectly work(Green is step pulse and yellow is current sensing resistor voltage)

Hope you can understand my observations. My question is why can't I get waveform as datasheet. I got a same as datasheet using another stepper driver that has TA8435HQ. But, Using TB6600 I couldn't get the clear wave form as datasheet.


texts: How to send commands (strings) from an Android device over to an ESP8266?

texts:
I have an ESP8266 hooked up to an MCU on a PCB.

I would like to send commands (strings) from my Android phone over to the ESP8266 so it can, in turn, transfer them to the MCU so it can perform various tasks.

How can this be done? I am looking into creating an app for the Android device using MIT's app inventor.


texts: design suggestion for serial to ethernet bidirectional connection

texts:
I am working on a project.My requirement is to enable communication between one serial interface(DB9-RS232) with an Ethernet interface(RJ45), via a microcontroller. after searching a lot, the most economical way I ve found is using an Freeduino board(which uses an avr328 ) alongwith accessory boards for ethernet and RS232 implementation.

http://www.embeddedmarket.com/products/Freeduino-UNO-With-Female-Headers/

or

http://www.embeddedmarket.com/products/Arduino-Compatible-Freeduino-DU/

http://www.embeddedmarket.com/products/ENC28J60-Ethernet-Module/

http://www.embeddedmarket.com/products/RS232-to-TTL-Converter/

I am not sure if it is possible, kindly advise/guide if this is the right way to go? or some better way is possible?

link to origin question

Ethernet RJ45 interfacing with microcontroller


texts: Does each code of an ADC have a DNL value?

texts:
DNL error is defined as the difference between an actual step width and the ideal value of 1LSB
DNL is specified after the static gain error has been removed. It is defined as follows:

DNL = |[(VD+1- VD)/VLSB-IDEAL - 1] | , where 0 < D < 2N - 2.

Further information at this link.

So, it means that for each step, there is a different DNL character?


texts: Can the power supply be replaced on these powered audio speakers?

texts:
I have 2 studio monitors (i.e., "speakers") and one subwoofer, all having 120v amplifiers built in. There is no voltage switch on them, and of course there are no "user serviceable parts". Is there a way to replace the power supplies with 240v units? The manufacturer says they will not do it for me, but they didn't say whether it is possible. Here are the manuals, which include circuit diagrams in the service manuals:

Monitor Owner's Manual
Monitor Service Manual
Subwoofer Owner's Manual
Subwoofer Service Manual

According to the service manuals, there is a "power transformer" unit that is replaceable (separately from the circuit board it is mounted on), but the Yamaha parts department does not sell it separately. If I find a way to get the 240v transformer, how I can know whether it is safe to install it? Are consumer electronics generally built with a single unit that handles input power, such that the other electronic components are not dependent on factors like input voltage?

The alternative is to use an external step-down converter, but these are either unreliable or unreasonably expensive. They are also noisy, which is not great for a recording studio.

Note: I'm not actually sure if this StackExchange site is the right place for this kind of question. If not, please tell me what you suggest. Thanks.

UPDATE

The external converters are in fact the best solution for this. It requires doubling the capacity of the device, because the converters advertise a max wattage that is possible but not sustainable for more than about 20 minutes. So I got 3 separate converters, 2 @ 200W and 1 @ 500W. These work great, and they are silent (except for one that will hum if resting on one particular side).

The cost of the converters is a separate problem. Since I am using U.S. equipment in Europe, there is no market for the corresponding converters here, and hence the prices are exorbitant. So it's just a matter of looking elsewhere. Sellers on eBay often market worldwide and price according to the best markets, so I can get U.S. prices on U.S. converters with no extra charge for delivery to Europe. The only drawback: 45 days shipping from China! But they all got here, and they all work, so no big deal.


texts: Lowest noise, low frequency, cheap photodetector configuration?

texts:
Currently we are measuring the position of a mechanical beam by illuminating it with light from an IR diode and using two phototransistors to measure the difference between light passing over and under it. The combined signal then feeds a PID loop which holds it in position.
We are using phototransistors (OP803SL) configured like this:
With T1 and T2 going to a differential amplifier
Frequency response is under 50Hz. I am looking for a lower noise alternative, either in terms of parts (eg photodiode) or configuration.
Any suggestions?


texts: When do I twist the wires going to transformer winding terminals, and why do I do it?

texts:
I sometimes see the wires of winding are twisted outside of the transformer (or inductor), as seen in the images below. What is the purpose of this? When should I twist winding wires and when shouldn't I?

As two conductors come closer and closer to each other, the capacitance between them increases. Wouldn't this parasitic capacitance between the wires cause problems at high frequency ferrite core inductors and transformers? Driving them will be the same as driving an LC tank circuit. There will be overshoots and ringing fluctuations. What trade-off does make us accept these side effects?

(Note: This is not about using multiple twisted wires as a single wire inside a winding (i.e.; Litz Wire).)


texts: Determine suitable resistor for the base of transistor as switch (NPN)

texts:
I have designed a program to count the frequency and time period of the pulse generated by a 555 timer IC using PC Parallel port. I’ve connected a base of BC547 (NPN) transistor to the output pin (no. 3) with a resistor of multiple values to the IC and its emitter to the common ground. Parallel port Input pin is connected to the Collector and its ground pin is also connected to the common ground.
As shown:

R1 = 1440 Ohms;
 R2 = 3.3 M Ohms;
 C1 = 1 micro farad.

So the; time period of ON pulse = time period of OFF pulse = 2.2 sec.

When I connect LED to output pin it shows right value but when I connect transistor it displays wrong values. In this ratio:

Greator Resistor = Greator Time period; Lessor Resistor = Lessor Time period.

I don’t know how to connect right resistor to display the right values.

The circuit is powered by 6volt @ 250mA power supply.

If there is any equation for this purpose please provide here.


texts: Developing an intuition about this circuit

texts:
I am trying to gain an intuition with circuit analysis by going through MIT's free course on intro to electronics.  Question S2E3 presents the circuit below.  I solved the problem (find all currents at nodes and voltages across elements) by applying KCL and KVL and doing some algebra, but I had no real intuition that my answer was right until I submitted my answer and it told me I was correct.  Which took several attempts.  When experienced electronics gurus sees this circuit, what do they see?  I see a voltage source and a current source fighting each other to decide who's in charge, but I'm pretty sure that's not the right way to see it.

simulate this circuit – Schematic created using CircuitLab


texts: How to Simulate VHDL when Using a Vendor's Tool Generated Instantiation Code?

texts:
I'm working with a Gowin FPGA and they recommend instantiating block RAM.  That sounds great, but how do I simulate that?  I would expect there to be a library with the model for the instantiation primative, but Gowin provides no simulation resources that I know of.  I would happily write code to infer the RAM if I completely understood the details to know I have it right.  These buggers have some tricky behavior in the read after write situation.  The "semi-dual port" mode only has one option for that, "normal" mode which seems to have a delay for turning around the direction of the write port to read.  But semi-dual port has a write port and a separate read port (meaning the one port read mode is not used and the other port write mode is not used) so how can there be a limitation on the read when writing on a separate port???  I probably need to read the description again until it all sinks in.
Until then, is it customary for the FPGA vendor to supply a simulation library for their instantiated FPGA components?
Synth guide https://www.gowinsemi.com/upload/database_doc/762/document/5f7426a6bf224.pdf
B-SRAM & S-SRAM User Guide https://www.gowinsemi.com/upload/database_doc/1232/document/5f7befe0a7c86.pdf
You will need to create a user account to login before you can access the docs.


texts:
Is it possible to Enable multiple USART Interrupts simultaneously by CMSIS USART_ITConfig function? I mean is it correct to utilize USART_ITConfig like this :

USART_ITConfig(USART1,USART_IT_TXE|USART_IT_RXNE,ENABLE)

or i should call USART_ITConfig function for each interrupt to enable?


texts: Looking for symmetric power supply solution

texts:
I am looking for a power supply circuit that fulfills the following specifications:

12VAC or 15VAC wall wart input
Symmetric +/-12V output (7812/7912 combo)
Should easily be able to provide 500mA on the output

I looked at a few power supply designs and they all have their advantages and disadvantages but for me it's hard to chose one. I though maybe some power supply designers here could give me a few hints.

Thank you very much!


texts: help identify the part number from the marking of SOT-23 components

texts:
I want to figure out the part number of the following components all (SOT-23) from a 20 year old PCB i am trying to fix , it is coated with conformal coating , but i scratched the top of these components :

The strange is the vertical letter along with the horizontal marking . this is how i Read them :

1. U1 K

2. Z1 C

3. O2p 45

4. JSs 42

5. Sts 3N


texts: How to add automatic frequency control to varicap voltage?

texts:
I've built a TV tuner radio using a tuner with voltage synthesis tuning and a CD2003 FM demodulator. A similar schematic can be found here. The reception quality is very good, but it is difficult to tune in a station even if I use a multiturn potentiometer. The frequency tends to drift away. So I've added an AFC (automatic frequency control) function.

simulate this circuit – Schematic created using CircuitLab

This works great. Frequency is direct proportional to tuning voltage. When tuned on a station, if frequency drifts, audio signal level drops and modifies the varicap voltage.

However, I believe that the DC tuning voltage may affect my demodulator IC. Here are the voltages measured on Test Point:

                   No signal                Tuned on a station
Without AFC          1.10 V                      1.50 V
With AFC             1.98 V                      2.25 V

To tune the entire FM band I need a tuning voltage of 10 to 14 V (the tuner covers 45 to 160 MHz, I only need 87 to 108 MHz). The voltage with AFC was measured when tuning voltage was closest to 14 V (maximum).

This is the schematic (without power supply and audio amplifier):

This is the tuner pinout:

This page shows how to add AFC to a LC oscillator. But things are different in case of a varicap oscillator.

Is there any chance this voltage imposed by AFC will affect my demodulator? If yes, how should I do it correctly?


texts: Can I make a one-speed AC motor variable-speed by modulating the power input?

texts:
simulate this circuit – Schematic created using CircuitLab

I'm using a Raspberry Pi with a SainSmart solid-state relay. If I connect the relay to an AC motor (a box fan in this case) and run the following Perl script with different timing values, the motor speed does change accordingly.

use Time::HiRes qw(usleep);

for(;;) {
  system("gpio write 24 0");
  usleep(50000); # 50ms
  system("gpio write 24 1");
  usleep(50000);
}

The question is, is this safe and efficient? If not, is there a way to make it so with additional inexpensive hardware?

EDIT: On further observation, this might not be a good idea after all. I attached a meter to the AC supply and the fan actually draws more power on a 95% duty cycle than it does at full speed, even though the fan turns noticeably slower. Presumably that extra power is just heating up the motor.


texts: Using a tablet without battery (and making it believe it has one)

texts:
Tablets have gone mainstream a few years ago, and Li-Ion batteries have a lifetime of a few years only. This paves the way for a new need for us couch potatoes: to be able to use a tablet when the (Li-Ion) battery is no more reliable and has to be taken out (and no replacement is available).

In order to make my question the more general possible, since I believe many will benefit from advice on how to tackle this problem, I'll have to be overly wordy.

The problem:

a) A tablet (for which we assume we have no schematics) whose battery
has ballooned to the point it popped open the chassis
b) no replacement battery available from the manufacturer or seller; other
batteries of similar capacity are too big to fit
c) it appears it is
not possible to run the tablet without a battery with the charger
only, and leaving the ballooned battery in is a bit too risky.

The idea for a solution:

To use a suitable circuit that will simulate the battery presence so that the tablet can be run when attached to the charger (we assume that with the original battery fully discharged the tablet runs ok).
The circuit might use a smaller battery and or a supercapacitor or some other magic gizmo to do what follows (note: only point I is strictly required):

I) MANDATORY - operate the tablet while connected to the charger with no battery inside. In this case a smaller battery or supercapacitor (or even capacitor) will only act as a buffer to protect the mobo (this should be easy), while some other circuit might be needed to fool the tablet in believing there actually is a battery and it is being charged (this might be tricky). Let's say that the main purpose here is to avoid a ka-boom.
If necessary, a custom charger (or to be more precise, power supply) can be built form scratch (either with a 7805, LM317 or a DC-DC converter) - there are no problems in finding a schematic for that.
II) OPTIONAL - the smaller battery or supercapacitor should
act as a temporary buffer to power the tablet for a handful of
seconds to allow for a soft shut down in case the charger is
accidentally disconnected.
III) OPTIONAL - the additional circuit might fool the tablet into believing there is a battery (as above), and that it has been charged to the point it is possible to update the OS (I have read, for example, that the Nexus modifed to run with directly with the charger won't update unless it detects a charged battery).

Pointer to reference needed:

To implement point I) we need to know

What storage element to use: would a (flat, <9mm) supercapacitor do?
Can we simply hook that up with a diode to the charger
leads on one side and to where the battery leads went on the the
mobo?
Do we need a thermistor to fake an overheating protection?

To implement points II) and III) requires knowing:

How do (most commonly used) Li-Ion batteries communicate with the motherboard
Is it possible to create a custom circuit that fakes the communication for "battery is ok, and it is 100% charged", small enough to fit in a battery form factor?
Is it possible to infer how the charging circuit works by looking and the PCB of motherboard and battery protection?

Answers to single points are welcome. Partial solutions can be used as starting point for tackling one's specific problem.
If needed I can post pictures of my tablet circuits but that would defeat the purpose of generality.

(I see this question has been put on hold to be closed. I had a look at the guidelines mentioned below, and I do not think they apply to this case. This is not a "repair" question for a single device. This is a general question on how to create a new circuit that will make all those tablets with dead batteries work again. I am not claiming that doing so will revert climate change but a couple of polar bears, those might be saved)


texts: Need a Switch that Stays Off Once Power is Out

texts:
What is the name of an electrical switch that meets the following requirements?

I can plug the switch in between a 120v outlet and my device,
Energizes the device (and stays energized) when I momentarily
mechanically/physically engage the switch,
De-energizes the device  (and stays de-energized) when I momentarily mechanically/physically disengage the switch, and
De-energizes the device and sets the switch to open/off when the outlet loses power.

That is, I want an energized device to be de-energized should the power go out and for the device to stay de-energized should the power come back on.  When the outlet's power has been restored, the device will only be (re-)energized (and stay energized) once I momentarily engage some button.

Maybe I am looking for the opposite of an overload fuse/GFI - some "fuse" to trip when the source power is lost and I need to engaged a button to reset it.

I did find that a "relay toggle switch" might possibly describe the type of switch I'm trying to find, but there were so many varieties that I am asking for some assistance from this community to point me in a more focused direction.

Thanks in advance.


texts:
Here's a picture from a book on filter design:

Where did 80 usec time delay came from? Isn't is supposed to be T = 2 * R2 * C1 ?
Here's the same circuit analysis from http://sim.okawa-denshi.jp/en/OPtazyuBakeisan.htm :


texts:
I'm currently building a small, portable human-powered charger for supplying a 1W led. I salvaged a dynamo core from a torch, but I'm unable to use other components inside since the torch is only designed to power 3 70mW LEDs; the internal li-ion battery is only capable of outputting a fraction of a watt.

The problem is one of storage. I know the device is capable of outputting the energy I need; by shortening the crank used to power it and attaching the output to a LM2596 voltage regulator, I was able to output ~1A at 5V (measured via multimeter shunt resistor); this is well in excess of the 1W required to drive the LED. While this power output took a lot of effort (since the dynamo was almost shorted), 1W was fairly sustainable. However, I'd prefer some sort of short-term energy storage that I could use to drive it - that is, at least 10 seconds of full power, so a capacity of greater than 10J.

Possibilities are as follows:

-I have a 10F supercapacitor, but it's only 2.2V, which is too low to drive the LED. While I could get a step-up SMPS, I'm worried about energy losses, since I'm already using one to step the voltage down from the dynamo.

-I could use lithium ion batteries, and intend to (charging apparatus is easy enough to get, and I have the power output capabilities), but I would also like the torch to have a long lifetime; battery lifetime of these is around 3-5 years last time I checked, which I feel is too short. Also, I might want to scale up power production (for instance, leg power instead of arm), which would entail higher energy input which these batteries are incapable of - being limited to a maximum of 1C, so about 1A or less.

-Other possibilities include perhaps a flywheel, but I'm not sure about bulkiness and feasibility.

Main design considerations are efficiency and portability, while still being able to meet power requirements.


texts: Can a contactor be used as a temporal logic bit as in PLC?

texts: I want to design a control logic circuit using relay logic.  I want to have a bit as a marker as in PLC.  Can I use a contactor for this function and then use auxiliary coils as a latch as in PLCs.


texts: Can I remove unneeded 2 plugs from PCI-E power cable?

texts:
I have a PCI-E PSU power cable and I have two unneeded pins at the end (only need 6 power pins but have 6+2). Can I simply remove the pin where these two wires enter the PSU?

I wouldn't think that this would cause any problems, but better safe than sorry :) The two-wire connector on the right is wired to a single pin in the upper-right corner of the grey connector at left.

Also, how do I get the pins out of the casings? They seem to be pretty attached.


texts: Limit voltage/current of bridge rectifier

texts:
Assume I have a small bicycle generator which usually feeds the front and back LED/light bulbs. Powering a small gadget from this generator should well be possible.

The setup would involve a full-wave bridge rectifier followed by some sort of regulator. However, the rectifier output voltage does vary wildly depending on speed and load:

low speed and/or high load by lighting: low rectifier output voltage
high speed and/or lighting switched off or defective: high output voltage

The first case is non critical and simply means that I need some sort of battery backup and/or a boost converter for hold-up power while going slow or standing.

The second case is more critical since it dictates the voltage rating of regulator and capacitors. And I wonder: Is there a clever way to limit the voltage and or current of a bridge rectifier?

I considered zener diodes but these would dissipate quite a lot of power and I wonder wether there is a more clever way.


texts: correct use of MAX3232 for a single TTL to RS232 connection

texts:
I am using the MAX3232 chip for doing TTL to RS232 conversion. Datasheet available here:

http://www.ti.com/lit/ds/symlink/max3232.pdf

The chip is dual channel, but I only need to use one channel. I follow the schematic of Fig 8 of the datasheet.

However I noticed the following: if I use pins 7, 8, 9, 10 to do a level conversion, but I let the pins 11, 12, 13, and 14 float, the chip does not work as expected. If I put pins 11, 12, 13, 14 to +5V, everything works fine. I guess this is because even if not in used, pins 11 to 14 should not be let floating and should have some impedance connected (I guess a serial port is like a high impedance in a sense?).

My questions are:

Am I right?
I cannot find a place in the datasheet where this is explained. Am I missing something?
I guess putting all to 5V is not optimal (some of the inputs are 3.3V as some of the pints are TTL). Is there a better way of doing so? Maybe a way to even keep the chip working with a single channel, but make it possible for later use to connect one more channel (if I get a PCB produced for example)?

EDIT

Now I understand. I was wrong about which chip I was using, thank you for pointing that the TI and the MAXIMs chips are different. This is then a closed issue: see datasheet p 11:

https://no.mouser.com/datasheet/2/256/MAX3322E-MAX3323E-77424.pdf


texts:
I wish to design audio amplifier circuit. Hear I use two stage of amplifiers. 1st stage amplifies 100mv to 1.2V peak @ 2KHz.

Q1. When I change the frequency to 50Hz output becomes to 210mv peak signal. At that time when I changed c3 cap to 100uf again it amplify 1.25V peak signal.  I need to amplify audio signal therefore amplitude is changing according to frequency. What can I do for it?

Q2. 2nd stage is power amplify part. Output of at that stage 180mv peak shows @ 2 KHz signal. That mean 2nd stage amplitude is decreased how it happened and solution for it.


texts:
How to calculate the Vout when the input voltage Vin is = 20V DC + 10V AC.
Here is the circuit:


texts: i am an electrical engineering student and have been tasked in creating a quite interesting project. Basically , the whole PCB with the microcontroller and all other parts is already designed, however me and my fellow colleagues are stuck with choosing/finding a proper Led driver IC. Here is the problem : We need to power a 20 W led as show in Picture 1. In the attached photos we can see the characteristics of the led. It need 300/350 mA of CC , with its voltage varying differently for the corresponding color. Now, we know that a CC source adjusts its output voltage depending on the load. However , the whole PCB needs to be powered by a 12V CV source. My question is this, is there such an IC which will take 12 Volts as an input voltage , and convert it to a constant current of 350 mA with its output voltage matching the led characteristics ? . Currently we only have considered the ZXLD383 (https://www.diodes.com/assets/Datasheets/ZXLD383.pdf) , but its input voltage is too small. Does anyone know a proper IC for this job ? Any tips are welcomed, thank you in advance.


texts: What makes industrial capacitive sensors so good?

texts:
I am using a proximity sensor on a battery powered wearable sensor and maybe facing some detection issues because of a bad grounding.
I am seeing detection differences between the sensor system powered through USB (which I undestand,) the battery powered sensor in a hand, and the battery powered sensor on a desk.
I have spent a lot of time searching about that topic but I didn't really find answers to fully understand.
Do you have links/documents to explanations giving equations, drawings and numerical examples?
Additionally:

I have seen that self-capacitance is really dependant on good grounding (system to ground only, as human body to ground is generally high enough to not be considered) but that for mutual-capacitance, the sensor sensitivity is not, and really low impacted by it. Why is that?
Is it the reason why smartphones or other commercialized capacitive sensors are so performant, or is it due to hardware specifity or even different algorithm used?

EDIT: 10/11/2020 14h33
I am using a microchip MTCH101 IC as a proximity detector. I know this is not exactly the same technology, as proximity detector is based on a self-capacitance, increasing the range of detection but with maybe some unwanted coupling, and capacive screen are mainly using mutual-capacitance technology, increasing precision thanks to a radiated field vertically lower and more directionnal which avoids unwanted coupling with others adjacent sensors.
Is this the mutual-capacitance architecture or the algorithm behind that makes smartphone more robust to grounding issue ? or the Hardware architecture maybe?
I have read many times that mutual-capacitance is less dependant from grounding issue than self-capacitance, is it true? why ? (but never seen equation to prove it) ?
Is any fundamental detecting methods (CTMU, CVD, CSM,...) better than an other for grounding issue?
For self-capacitance, the grounding issue is comming from the fact the wearable battery power supplied device has a unfix and sometime low capacitance between its local ground and the earth. There is 2 cases: when it's handled by the second hand of the user and when the device is laid on a table. When there is a good coupling (high capacitance), its negligible and only the sensing electrode is measured. When it's not, the ground to earth coupling is taking part to the measurement as parasitic. I have found that the following way would help to improve this coupling :
Big ground plane at the device back, to increase surface which will be seen by the second hand or the table.
connexion from the device local ground to the device casing to let the human hand which hold the device have a contact with local ground and a better coupling.
Heating pipe (which i do not know)
"Use human finger to modify an electrical field between the electrode and the system ground, working as a dielectric constant modified". I interpret that as mutual-capacitance, is that correct ?
Finally, why the mutual capacitance would have less that kind of issue since that the charge exchanged with the finger are still flowing throught the earth and the device ground ?


texts: GPS modules with Active Antenna and without Active Antenna

texts:
After so much research, I've found out that GPS modules have so many factors that depend their performance on.

But I was initially under the impression that GPS devices with active antennas are always much better at receiving in harsh environments. But there are some companies that do not make GPS devices to support active antennas yet! have sensitivity levels higher than the ones with Active Antennas.

I'm truly confused.

Here is one such GPS receiver that has the highest sensitivity i've seen so far.

http://www.telit.com/products/product-service-selector/product-service-selector/show/product/jupiter-se880/

Its data sheet:
http://www.telit.com/index.php?eID=tx_nawsecuredl&u=0&g=0&t=1411463905&hash=20957d837b99cb6e9250bf5ee0b2655061a32e77&file=downloadZone/5455.pdf

My SIM908 even with an Active Antenna has lower acquisition sensitivity than this one does with only passive Antenna!  Even the UBlox and my other Linx GPS module has far less efficiency than this.

Is it that these people have put so much effort and this device is actually better than any of those I mentioned later? I meant better in the sense of obtaining faster fix times. I mean the same throughout.

Does this mean I can dump all these active antenna devices and start using this passive Antenna device (linked above & which I would love to do!) and expect higher performance? it even has inbuilt jamming protection and many other important features including A-GPS, online ephemeris download, client generated ephemeris down etc.

If you can shed some light, it would be so much helpful.


texts: Overtones Produced From Speaker Load on Asymmetric Square Wave

texts:
What I am doing

I built a circuit using a 555 timing chip in astable mode which produces a square wave. There is a potentiometer which allows me to adjust the frequency produced.

One aspect of this circuit is that the square wave is always uneven, i.e., the high and low times are different:

time_high = 0.693 * (r1 + r2) * c1
time_low  = 0.693 * r2 * c1
fequency = 1 second / (time_high + time_low)

This difference is smallest when R2 is significantly higher than R1.

simulate this circuit – Schematic created using CircuitLab

What I am observing

When I used an audio microphone to record the output of the circuit. I generated frequency graphs for different sections of the recording. I noticed that at a given R2 position there are two spikes and at other R2 positions there sometimes many more (spikes meaning the circuit is producing a wave at that frequency).

Initially, I was not able to explain this, however, now I am suspecting that these overtones are produced from the relationship of the speaker load and the square wave. (This is why the overtones do not appear in a circuit simulator.)

In other words, when the voltage moves from high to low, the speaker cone is not able to change with the same speed because of its air resistance and mass. If the square wave had a perfect 50% duty cycle this "rounding" effect would be balanced between each push and pull. Since my circuit is asymmetric, perhaps the speaker cone is never pushed fully out when the voltage is high before the voltage goes low and starts to pull the speaker cone back. This, in my head, seems like it would create little humps on the waves.

My question:

I kind of just want some thoughts on this. Does what I am saying make sense? If so, is there a name for this effect? If I am correct, could someone point me to an article about this?

Update:

Here are the spectrum graphs side by side at two different knob positions. You can see that on the left (238 Hz) there are some overtones but they are modest in relation to the spikes when the circuit is generating a higher frequency wave (771 Hz).

Additionally, considering the formulas, the lower frequency wave is more symmetric than the higher the frequency wave. This is because R2 is > 100x  the difference of R1.

Further Question:

I understand that jitters in the square wave will produce "overtones", however, does the speaker load affect it? Can someone speak to that?

This wave form looks nothing like a square wave. It looks like a bunch of sign waves. Which makes sense because a speaker cannot make a "square wave," right?

Also, why are there such strong differences between the graph of 238 Hz and 771 Hz?


texts: Measuring voltage with dynamic voltage divider and Arduino with ADS1115

texts:
Is a “dynamic voltage divider” even a thing? I am using an ADC ADS1115 to measure voltage on batteries. Now these batteries are sometimes 12 volts, 24 volts or a bank of 48 volts or even 72 volts.
To get 5 volts at the output of a voltage divider with 72 volts input, I need R1 to be 20 kΩ and R2 to be 1.5 kΩ. Like this I can have 0 to 72 volts measured.
However if now the input voltage is 12 volts… using the same voltage divider, I get 0.833 volts output and with 24 volts battery input, I get 1.667 volts output.
Is there a way I can measure these voltages without doing any hardware or source code modification and re-upload to code to Arduino?


texts: Is it safe to use the cable used in Portable Battery Charger and connect to the phone via the PC USB?

texts:
Every portable battery charger have a cable. That cable is usually connecting the PC USB port to the Portable Battery Charger so as to charge the battery inside the Portable Battery Charger.

So, is it safe to use it to connect the PC USB Port to the phone directly? (The reason that I asked is because each cable have resistance levels, which I am concern if it will affect the charging of the phone if used in this way and will it cause damage to the phone or the phone battery or the cable or the PC USB port.)


texts: EEPROM read/write problems on PIC16F18877

texts:
For a reason not clear to me I can not write to the EEPROM of the PIC16F18877.
Programming is done with the XC8 compiler. Debugging with PICKIT3

The function works well in the simulator but fails to work in the actual situation.

I have reduced the code to a minimum with the main calling the function under test.

#include <xc.h>

void main(void)
{
     while(1) Test();
};

void  Test(void)
{
   uchar value = 0x09;
   uchar retval = 0;
   uchar address  = 0x0;
   eeprom_write(address,value);
   while(WR)continue;
   retval = eeprom_read(address);
};

The test function is nothing more than the sample code from the Microchips site.

For the completeness I include also the pragma settings:

   // CONFIG1
    #pragma config FEXTOSC = HS     // External Oscillator mode selection bits (HS (crystal oscillator) above 4MHz; PFM set to high power)
    #pragma config RSTOSC = EXT1X   // Power-up default value for COSC bits (EXTOSC operating per FEXTOSC bits)
    #pragma config CLKOUTEN = OFF   // Clock Out Enable bit (CLKOUT function is disabled; i/o or oscillator function on OSC2)
    #pragma config CSWEN = ON       // Clock Switch Enable bit (Writing to NOSC and NDIV is allowed)
    #pragma config FCMEN = ON       // Fail-Safe Clock Monitor Enable bit (FSCM timer enabled)

    // CONFIG2
    #pragma config MCLRE = ON       // Master Clear Enable bit (MCLR pin is Master Clear function)
    #pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
    #pragma config LPBOREN = OFF    // Low-Power BOR enable bit (ULPBOR disabled)
    #pragma config BOREN = ON       // Brown-out reset enable bits (Brown-out Reset Enabled, SBOREN bit is ignored)
    #pragma config BORV = LO        // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (VBOR) set to 1.9V on LF, and 2.45V on F Devices)
    #pragma config ZCD = OFF        // Zero-cross detect disable (Zero-cross detect circuit is disabled at POR.)
    #pragma config PPS1WAY = ON     // Peripheral Pin Select one-way control (The PPSLOCK bit can be cleared and set only once in software)
    #pragma config STVREN = ON      // Stack Overflow/Underflow Reset Enable bit (Stack Overflow or Underflow will cause a reset)

    // CONFIG3
    #pragma config WDTCPS = WDTCPS_31// WDT Period Select bits (Divider ratio 1:65536; software control of WDTPS)
    #pragma config WDTE = OFF       // WDT operating mode (WDT Disabled, SWDTEN is ignored)
    #pragma config WDTCWS = WDTCWS_7// WDT Window Select bits (window always open (100%); software control; keyed access not required)
    #pragma config WDTCCS = SC      // WDT input clock selector (Software Control)

    // CONFIG4
    #pragma config WRT = OFF        // UserNVM self-write protection bits (Write protection off)
    #pragma config SCANE = available// Scanner Enable bit (Scanner module is available for use)
    #pragma config LVP = ON         // Low Voltage Programming Enable bit (Low Voltage programming enabled. MCLR/Vpp pin function is MCLR.)

    // CONFIG5
    #pragma config CP = OFF         // UserNVM Program memory code protection bit (Program Memory code protection disabled)
    #pragma config CPD = OFF        // DataNVM code protection bit (Data EEPROM code protection disabled)

#define _XTAL_FREQ 20000000

main() and Test() are excerpts of a very large program brought back to these essentials.

What am I doing wrong. Help is appreciated.


texts: Measuring the velocity/acceleration of a swinging pendulum

texts:
I'm trying to find a good way for measuring the speed/acceleration of a swinging pendulum. I know one way is to use an optical encoder for capturing the rotation positions, but unfortunately there's no room for an optical disc.

I was considering an accelerometer/gyro. Would it be possible? Could I somehow compute the change in pitch? Like with the MPU6050, it can spit out the pitch using its DMP.

Would measuring the change in pitch with an accelerometer/gyro be a good idea?


texts: How do I connect a relay and transistor to an Arduino?

texts:
Ok, so this is what my relay looks like. I can't figure out what pins I hook the arduino and transistor to, and what pins to hook the the other device.

Please help.


texts: How can I simulate this vhdl using modelsim?

texts:
I'm new to model sim.
I have this vhdl

-- Code your design here

library IEEE;
use IEEE.std_logic_1164.all;

entity my_and is
port(x : in std_logic; y : in std_logic; z : out std_logic);
end entity my_and;

architecture rtl of my_and is
begin
    z <= x and y;
end architecture rtl;

And this test bench

library IEEE;
use IEEE.std_logic_1164.all;

entity my_tb is
end entity my_tb;

architecture rtl of my_tb is
    component my_and is
    port(x : in std_logic; y : in std_logic; z : out std_logic);
    end component my_and;

    signal clk : std_logic := '0';
    signal x : std_logic;
    signal y : std_logic;
    signal z : std_logic;
    constant period : time := 1 ns;
begin

    unit : my_and
        port map(x => x, y => y, z => z);

    clk_process : process
    begin
        clk <= '1';
        wait for period/2;
        clk <= '0';
        wait for period/2;
    end process clk_process;

    unit_proc : process(clk)
        variable count : integer := 0;
    begin
        if(clk'event and clk = '1') then
            if(count mod 4 = 0) then
                x <= '0';
                y <= '0';
            elsif(count mod 4 = 1) then
                x <= '1';
                y <= '0';
            elsif(count mod 4 = 2) then
                x <= '0';
                y <= '1';
            else
                x <= '1';
                y <= '1';
            end if;
        end if;
    count := count + 1;
    end process unit_proc;

end architecture rtl;

I've written the test bench by my self, I haven't used the tool. However when I do "Simulation -> Run simulation" the console tell me

  Error loading design

I've set the test bench as top entity. Is there something I could check in order to run the simulation?

In terms of what the console spit out, here's what I get:

Compile of my_and.vhd was successful.
# Compile of my_and_tb.vhd was successful.
# 2 compiles, 0 failed with no errors.
vsim -gui work.my_and(rtl)
# vsim
# Start time: 11:30:05 on Jul 28,2016
# Error loading design


texts: Synchronising signals of Verilog test bench with RTL clock

texts:
I have been given an interesting assignment. My task was to design a 4 bit up_down counter which has two controlling signals, up_down and load. The up_down decides weather the counter should be up-counting or down-counting(up_down=1'b1 up-counting and up_down=1'b0 down-counting). The load signal is to load the 4 bit data into the counter. I was able to design and verify the code in rtl and test bench.

But now I am notified to make sure my input driving signals from test bench arrive after the posedge of the clock in RTL. That means my load and up_down signals should arrive after the positive clock edge of the RTL clock. Please find my rtl and testbench. I am told to do something in testbench as in write a logic in Test bench to make sure my signals arrive later the posedge. I would need some help on this. Please do respond.

My RTL code:

module up_down_counter(
  input clock,
  input reset,
  input load,
  input up_down,            //up_down = 1'b1,upcounter; up_down=1'b0,down_counter
  input [3:0] data,
  output [3:0] counter
  );

  reg [3:0] counter_reg;

  always@(posedge clock or posedge reset)
  begin

    if(reset == 1'b1)
      begin
      counter_reg <= 4'b0000;
      end
    else
       begin
        if (up_down == 1'b1)
              begin
             if(load == 1'b1)
                begin
                counter_reg <= data;
                end
             else
                begin
            counter_reg <= counter_reg + 4'b0001;
            end

          end

        else
              begin
             if(load == 1'b1)
               begin
               counter_reg <= data;
               end
             else
               begin
           counter_reg <= counter_reg - 4'b0001;
           end
          end
        end
 end

  assign counter = counter_reg;

  endmodule

my Test Bench:

module tb_up_down_counter;

  reg clock;
  reg reset;
  wire [3:0] counter;
  reg up_down;
  reg load;
  reg [3:0] data;

  up_down_counter dut(
  .clock(clock),
  .reset(reset),
  .load(load),
  .data(data),
  .up_down(up_down),
  .counter(counter)
  );

  initial
    begin
    clock = 1'b0;
    forever #50 clock = ~clock;
    end

    initial
     begin
    reset <= 1'b0;
    load  <= 1'b0;
    up_down <= 1'b0;

    data <= 4'd0;

    repeat(5)
    @(posedge clock);
    reset <= 1'b1;

    repeat(5)
    @(posedge clock);
     reset <= 1'b0;

     repeat(10)
    @(posedge clock);
    up_down <= 1'b1;

    repeat(5)
    @(posedge clock);
    load <= 1'b1;

    repeat(10)
    @(posedge clock);
    data <= 4'd3;

    repeat(5)
    @(posedge clock);
    up_down <= 1'b0;

    repeat(5)
    @(posedge clock);
    load <= 1'b0;

    repeat(5)
    @(posedge clock);
    load <= 1'b1;

    repeat(10)
    @(posedge clock);
    data <= 4'd5;

    repeat(5)
    @(posedge clock);
    up_down <= 1'b1;

    repeat(5)
    @(posedge clock);
    reset <= 1'b1;

    repeat(10)
    @(posedge clock);
    reset <= 1'b0;

     repeat(10)
    @(posedge clock);
    load <= 1'b1;

    repeat(10)
    @(posedge clock);
    data <= 4'd8;

    repeat(10)
    @(posedge clock);
    data <= 4'd15;

    repeat(10)
    @(posedge clock);
    data <= 4'd12;

    #5000 $finish;
    end

 initial
 begin
 $shm_open("waves.shm");
 $shm_probe(tb_up_down_counter,"AC");
 end

 endmodule


texts:
I have an rf transmitter and receive set up on a basic circuit so that when I connective data pin of the transmitter to the 5v, the receiver should detect it and the LED turns off. This mostly works but when the transmitter isn’t connected, the LED flickers from dim to bright constantly.

Also: sometimes when the transmitter is connected, the LED will flicker on for a very short time.

Is there a way to make the LED a constant ON/OFF?


texts: Voltage divider for Arduino external ADC reference voltage (AREF)

texts: In order to set a 2V reference voltage for the ADC on an Arduino, I believe can use a simple voltage divider setup between the 0V and 5V lines with resistors in the ratio of 2:3. Does it matter what values of resistors I use? If so, why?


texts:
Have people here used the LPC1343 Cortex-M3 chip?

I've built a few small circuits with PIC microcontrollers before but now I'm using an LPC1243 Cortex-3/ARM. I've been using an LPCXpresso prototype board which has worked very nicely but I want to build a proper PCB now for my circuit. I'm finding this chip a lot nicer to work with in software than PICs (Which i also like!)

With the PICs my experience was that it was easy to forget something when building the hardware. For example a pin needed pulling low to disable low voltage programming on some pics or the chip wasn't programmable.

My circuit is simply a 18x2 line LCD module connected to the chip which gets its input from a PC connected via a USB HID interface. I have it all working on the prototype board / breadboard.

On the LPC1343 I plan to connect

The power supply pins to power and decoupling capacitors
The 12 MHZ crystal and capacitors.
The 6 I/O pins I need to drive my hardware (An LCD module)
The USB pins to a USB port via resistors and a pull up resistor
Switches on the reset pin and the pin that enables the internal USB bootloader

And that's all.
My question is, are there any other pins I need to connect? It's important that I keep this as simple as possible as it's my first "hobby" project with the chip and frankly it's going to be hard enough to solder it without adding extra complexity (But I'm confident I can do it!)

I guess I should post a schematic really, but have I missed anything obvious?


texts: Cascaded Amplifier Circuit Analysis Problem

texts:
I have this homework problem for my electronics class and I'm in need of assistance.

Here is the original problem statement:

This is what I have after drawing the circuit:

My professor always suggests that we start at the output and write it in terms of the first dependent source to the left, but when trying to write V_out, there's two dependent sources.

I'm not sure how to handle that.

Things I tried:

Current Divider

I can't use a current divider to find the voltage across R4 because the series combination (R8 + R2) are not in parallel. And I can't do a KCL at Node H without adding another unknown variable to the mix.

KVL expression for V_out:

Similar as the current divider, I can't write an expression for V_out because there are no KVL loops that don't require me to define even more variables.

Then, all I could figure out to do was start at the input and write equations for the variables that control the dependent sources, but that involved defining even more unknowns. As you can imagine, this got really ugly, really quickly.

All other amplifier circuits we have looked at in class are "linear", in that there aren't two sets of cascaded amplifiers stacked vertically, like in this problem, and I can't find anything like this circuit in the chapter of our textbook.

If anyone could explain an intuitive thought-process or a process to solve a cascaded amplifier circuit like this one, I'd be very grateful. :)

Thanks,

Caleb


texts: How to account for baud speed in logic analyzer

texts:
I'm an utter newbie awkwardly stumbling along, so I apologize if this should be obvious somehow.

I have a FTDI 232R UART hooked up to a "blue pill", and I'm send my first bytes along. I have screen open in a terminal to follow along, but it's just gibberish. No problem, I hook up a logic analyzer (shiny new Saleae Logic 8) and take a peek at the signal. Slowing the baud rate down to 100 on the STM32 I see that my "Hello World\n\r" message isn't getting read even close to the right timing by the Saleae.

I have seen that the receiving device should be sampling maybe between 8x - 16x the rate to hit the middle of the pulse, so I try setting it to 800 and try again. Better, but no dice. After some experimentation I finally get the signal loud and clear by setting the Saleae to 1140 and it looks like 1139 would have been optimal. I set the baud rate on screen to 1140, but still gibberish.

I'm sure I can fiddle around to get this to line up, but I'm wondering, how should I know what multiple to use to begin with? Is it just experiment until it captures it correctly? Is there a resource that could help me get over the hump? (I'm new enough that I don't even know where to go to get knowledge.)

Thanks for your help.


texts:
I am working on a project in which i need to connect Permanent Split Capacitor(PSC) AC motor using relays as shown in the below block diag fig 1. I want to rotate it in both CW and CCW direction. It is a 30W AC motor.
But on googling some data i found the image as shown below fig 2, whihc show only one swich which will toggle to change the capactior polarity, to change the direction of the motor.
Can i do the interface using one realy only or if i want to do the conection using two relays than how it can be done?
Please correct me if i am wrong.


texts: Having a hard time Identifying this part

texts:
I think its a female berg pin. I have a requirement of a similar part But I am not able to find it. What is it called?

Thanks


texts:
I live in an off grid property running on 6 12v batteries. We have a 2000w inverter and are trying to get a fridge to run on our system. We have enough power to run it however the issue I am having is on the initial start up the compressor draws around 100amps for around a second. This draw drops the voltage of the batteries to the point that anything else we were using (TV, computer) turns off and has to be rebooted.

I am looking into a soft start device to distribute that instant 100amp draw over a few seconds (such as this one https://www.jaycar.co.nz/240v-10a-motor-speed-controller-kit-with-soft-start/p/KC5526

I was wondering if anyone has any experience with this and if they believe that it will work or any other suggestions. My main concern is that the soft start will mess up the timing of the electric motor of the fridge and it will just stall out.

Thanks in advance!


texts: Protect Op Amp input from piezo sensor overvoltage

texts:
I have a circuit that I'm using to detects "knocks" using a piezo element. It seems to work adequately, but as I half suspected, I have now demonstrated that it's possible for the piezo element to generate excess signal (I'm assuming voltage, since they don't really generate much current do they?) and destroy the first op-amp input stage.

I don't really care about the actual signal waveform, but I'm anxious not to introduce delays (the key part of this is an attempt to measure the arrival time of a shockwave at various points in a piece of steel.) So, currently I'm considering adding two 5v1 zeners (because that's what I happen to have lying around) nose-to-nose across the inputs. So, the effect would be like this:

simulate this circuit – Schematic created using CircuitLab

Everything to the right of the zeners is working at present, and I'm confident that limiting the input swing to 5.8 volts will not, of itself, adversely affect the rest of the circuit's ability to do its job.

Are there any concerns that I'm missing here? Again, I do care about response time and must avoid adding lag to the system, but I don't care about distortion, or signal following accuracy, in any of the traditional "amplifier" kinds of ways.

Edit, I transcribed a subset of my actual circuit, intending to focus on the bit that I was interested in (i.e. just up to the first op-amp's input), and I fear that this was not clear. However, I also discovered, thanks for the feedback, that I had made an error in transferring my test circuit to my final. I had omitted the ground connection on the positive input to the op-amp. Oddly, it works (seven copies of it) seemingly just fine like that. Clearly, however, that needed fixing :)


texts: How to wire LED strips into my display cabinet?

texts:
Let me start by mentioning that I have little knowledge in this field.
LEDs I have: 12v 1Meter Rigid Double-row 3pin LED strips with 1.8A total draw (0.9A each row).
For some reason, they have massive voltage drop. With 12v input they measure 10.5v at the end of 1 meter and the lights seem noticeably dimmer, At 50cm it reads 11.3v. Is it normal? Wire used for testing: 10cm 2.5mm2(13AWG). Power Supply: 12V 15Amps.
I have to use the strips to light up my display cabinet(s), the cabinet has 6 shelves, each shelf is 25cm tall and 40cm long. I want each shelf to have it's individual light strip. So I will cut the strips in 40cm parts.
Now I have to find proper ways to wire the whole cabinet with minimum voltage drop, so the lights would be as even as possible. If you have any clue while considering the strips' huge voltage drop, please help.
I came up with three methods so far:
SEE UPDATE SECTION
PS: I don't know how/where to provide better diagrams.
Update:
I updated the diagram making it more understandable:

Red leads are positive, Gray ones are negative.
And by "1 meter", I mean 1 meter of LED strip, not the wire. The drop is across the strips.

Method 1 is a parallel connection, supplying each strip from both ends.
Example from web:

Method 2 is a parallel connection, each cable (2 leads) supply two LED strips at one end.
Example from web:

Method 3 is a parallel connection, supplying each strip at one end, individually and directly from the power supply.
Example from web:


texts: Is it possible to change the grid size in Quartus II schematic window?

texts:
Having a schematic for the top level structure of design appears to be a good idea. I have a few schematic symbols that I want to edit. The signal name is too long and does not appear correctly in the autogenerated symbol for a design block.

When I try to edit the symbol, the grid size gets in the way. Can I make the grid size smaller in Quartus II schematic window?


texts:
I pulled some LM13700 OTAs from an old board and tested them. All voltages, currents, and resistances were measured. I had the expected (approximate) voltage gain using the equation
\$ A=(R_2/(R_1+R_2 ))*g_m*R_L \$ where gm equals \$ 19.2*Iabc \$.
The problem begins when I use the linearizing diode on pins 2 or 15. The gain goes down substantially, the higher the current on these pins, the lower the output. I have used Marston’s equation from the old Nuts and Volts article, \$ I_{out}=2*I_S*(I_{bias}/I_D ) \$
but the result are way off.
Does anyone know of a better way to calculate gain in an LM13700 when the linearizing diodes are used?
UPDATE - I got a couple of new LM13700s and got the same results.


texts: LM3466 current limit - per parallel string or for the current source

texts: Is the current limit on the TI LM3466 per parallel string of diodes or is this the maximum for the current source?


texts: Is FT232R/245R eeprom write-protectable?

texts:
FT232R and FT245R have embedded EEPROM.

Does a known way to protect the content of this eeprom against re-writing exist?

(Any solutions, including unofficial and hacks, are welcome.)


texts: How to build a 3-bit comparator using a multiplexer?

texts:
I need to (in design) create a 3-bit comparator using an 8-bit multiplexer and/or up to four 4-bit multiplexers. There are plenty of examples of how comparators and multiplexers works on the web. There are several examples of 2-bit comparators based on multiplexers. But nothing over 2 bits. After many hours of pondering and sketching I am beginning to think it is impossible.

Can someone tell me if it is even possible ? Am I beating my head against a concrete wall for no reason at all ? If it's possible can someone just give me a hint?


texts:
I want to use Bluetooth 4.0 protocol for stream communication between MCU(STM32) and Android/iPhone smartphone. Does Bluetooth 4.0 supports any other case scenario than usual(Heart monitoring, fitness etc.)?

To be specific in this datasheet http://www.farnell.com/datasheets/1863900.pdf I've found stream mode, but I am not sure is that a marketing or not?

Thank you!

EDIT: To be precise, I want to stream data from STM32 over Bluetooth 4.0 protocol to Android/iOS with baudrate higher than 115200. Can I do that with smarthpones which have Bluetooth 2.0 in it?


texts: Interfacing 62256 SRAM to low pin-count AVR via latches

texts:
I need to add over 20 kBytes of RAM to the small device built around ATMega8. Moreover I'm interested to research whether I can substitute it with ATtiny2313. The goal is roughly speaking to store some fast arriving data there before serving them out through serial interface...

I thought of 62256 chips, but with them I need 15 address lines and 8 data lines - somewhat more than I can spare with any of these two MCUs. Meanwhile the matter is to find the solution with smallest (cheapest) MCU possible, so I'm not ready to switch to some ATMega16 or 32 which, I think, will do the trick. I also have found serial SRAM from Microchip, but it seems the speed will be not sufficient for me...

So I'm thinking of using two (?) octal latches - but I'm afraid I'm reinventing the wheel and here could be easier solution. That's why I'm here. This is my current idea:

I feed the high and low bytes of the address from outputs of two octal latches;
I wire 8 pins (say, PB0..PB7) to both latches and to 8 data lines;
Now I need two more pins to control latches and another two for WE and OE of the SRAM chip.

And here are my questions:

are two latches enough, is it correct I need no latches on data lines?
will 74hct373 be a good choice for latches?
is it ok to slightly swap address lines for high byte (i.e. instead of order A8, A9, A10, A11, A12, A13, A14 wire them as A8, A9, A11, A10, A14, A13, A12 for example to simplify routing)?
perhaps there is another solution (besides larger MCU, latches or serial SRAM) I've missed?


texts: Does wire thickness matters for current only or for voltage as well?

texts:
Suppose a wire capable to handle 10 amp current. Does it capable to handle 10 amp on specific voltage of on any voltage value?
Can same wire has different ratings for AC and DC ?


texts: What would be the voltage across a load at a junction point where two current sources are connected in series?

texts: If two current sources are connected in series,then what would be the voltage at their junction point across a load?


texts: Whether RF affects LPG Gas Sensor sensitivity or can it be hazardous, like fire and all?

texts:
I want to make a wireless electronic LPG gas leak detection solution.

I want to start with any of two sensors MQ2 (How Catalytic Combustible Gas Sensors work?, DataSheet, Another DataSheet, Tech Wiki) or MQ6 (DataSheet, Another DataSheet, SparkFun info,  ).

The sensor on the sensor board will be having a uC and uC will send(/transmit only) RF signal to a remote receiving uC board. The arrangement will be done inside a house or a factory. This can be done in several ways, keeping this apart.

I have gone through all the documents I've linked for. None says anything about the RF stuffs. I have seen some products already available in the market with IR based  communication. I didn't see any with RF. These docs didn't mention anything about RF at all.

The RF can be any one between 433Mhz to 2.4GHz.

My Question is whether RF will create any problem for sensitivity of the sensor or affect it in any way?

What about the Preheat time? Is it one time for forever or each time we switch it on we have to heat it up for that time? Or it is needed a continuous maintained heat?

I changed my question!
Now my question is .. that

Can the RF communication cause fire or any hazardous situation with the sensor?


texts:
I'm studying Zener example and it doesn't make sense to me:

the Example - with solution

in the above picture i can see that input is 26.4V and Zener voltage 14.56V. when load 1k connected.

but in the above picture i can see that input is 21.6V and the Zener voltage is actually bigger? 14.561V.

what is not making sense to me:
how he wants to add load when he operate the Zener at knee point. and he uses the estimated linear model of Zo or dynamic resistance.

Q1: is this example wrong and because he is using estimate model of zener on knee of the zener?

Q2: i mean OK, you can calculate Rmax but then the slope will change and you cant assume Rz is 14 ohm right??? and this Vo in second case is larger than first case is wrong right??

Note: this example is taken from university material. and I'm not studying there but assuming the tutor is mistaken by providing this example? unless he want to tell students that this example is actually not right at the end???!
or all my assumptions are wrong?

EDIT:
what i mean with Vz at Knee and slope: modeling zener at VZK has different slope:


texts: What's the name of this PCIE power connector?

texts:
I have a standard computer power supply unit pci-e power 8 pin connector like this one:

(source: playtool.com)
I want to power my own PCB via a connector like this and I am having trouble find the name of the pcb socket housing for it. I have gotten to the point where I think that it is a molex mini-fit, dual row, but I can't find anything that would have a matching square/round pin configuration.
What is the name of the socket for this connector and where can I buy one?
UPDATE
The similar but incompatible connector I was finding is called EPS. Here is a nice page showing various PC connector types and their names
http://www.playtool.com/pages/psuconnectors/connectors.html
Molex 45558-0003 is the equivalent 6 pin version. Need to find the 8 pin sku.
Other names I have found: 8-pin PCI Express auxiliary power. The only place I found where you can buy one is http://www.moddiy.com/products/8%252dPin-Graphics-Card-PCIe-Male-Header-Connector-%252d-90%25-Angled-%252d-Black.html


texts: Tuning PID Controller with high precision

texts:
I'm learning control theory at university and I have to design PID controller for this object
G(s) = 10/s(s+1);
But my teacher requires settling time <10s and %overshoot <=2%
Anyone can suggest me some methods to tuning PID parameters satisfying these requirements,please?
Thanks


texts: How do I cycle a WiFi transmitter through all modes, for FCC intentional radiator EMC testing?

texts:
I'm integrating a WiFi/Bluetooth module into a consumer product, however
the module does not have a modular grant, will not have a modular grant, and is anyway getting paired with a unique internal antenna.

Per https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=50&tn=916170 (FCC publication 996369 Section 15.212), that means certification as an intentional radiator.

I have also read http://www.emcfastpass.com/rf-modules/ on the benefits of single-modular and limited single-modular certification.

The question is: if I must certify as an intentional radiator, how is the WiFi module cycled through testing modes?  My testing lab says we must do low, and mid on each band, plus each modulation mode and speed, for each regulatory region.  The permutations are huge:

Two bands (2.4Ghz and 5Ghz)
Eight protocols (802.11a, 802.11b, 802.11g, 802.11n, 802.11ac, Bluetooth, BTLE)
Six modulation techniques (FHSS DSSS OFDM HR-DSSS 256-QUAM CKM) at various data rates from 1 to 54 Mbps.
Two channel pairings (20 Mhz, 40 Mhz)
Three regulatory regions (US/Canada, Japan, Europe).

A few of the above are documented at http://www.intel.com/content/www/us/en/support/network-and-i-o/wireless-networking/000005725.html

Perhaps this is why I was quoted $50k and up for the testing, and 12 weeks, with 10 days of lab time at 8 hours of chamber time per day.

Is this really what's done?
And how are those modes set anyway?  I can imagine:

Load special software into the Linux driver which runs through test modes.  This requires cooperation with the chip vendor (internal chip is Broadcom BCM43341).  However, this is not representative of the product in real use. The WiFi driver is not fully under my control, so running software from the module maker may be difficult or impossible.
Have a trick Access Point, that can cycle through the modes.  Each time have the product connect to the AP and stream data until the test data is collected.

The device pre-tests perfectly for unintentional radiation: passing with flying colors, even with an active AP co-resident in the chamber.

It's an IoT kind of device, so has no way to hook to a Windows PC for testing.


texts:
There are lots of examples of latching circuits that use a single momentary push-button to turn on/off a circuit by combining two or more transistors. Some examples are:

Simple soft power latching circuit for a microcontroller
https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/
https://www.youtube.com/watch?v=0IjJH3ksqfs

Since it is common for LiPo-powered devices use an LDO to generate a constant 3.3V, my question is: can you use the "ENABLE" pin on the LDO to generate that latch from the microcontroller? The general idea would be something like:

Push button pulls AP2112 LDO EN high
LDO powers microcontroller
Microcontroller uses LATCH pin to keep LDO EN pin high (this is the latch)
Microcontroller can shut-down the whole system when desired by setting LATCH LOW

simulate this circuit – Schematic created using CircuitLab

Do you spot any problems/disadvantages with this approach?
It is a very common application and I am surprised I haven't found anything similar on the internet.

Thanks for your help!


texts: Enabling uClinux to run on Altera DE2-115?

texts:
I'm trying to learn Qsys and Quartus II to define a system that can run linux according to this document:

http://uuoc.org/uClinux_nios2_custom_hardware.pdf

But I'm running into problem as the document is not detailed enough. I get errors from Qsys and Quartus and I'm not exactly sure whether I'm doing the right thing.

I tried to add the SDRAm but I was not successful, could you please help me understand how to do it?


texts:
Im building an sEMG circuit and am a bit confused on how to change the signal  back to non inverted before the output.The signal goes -> amplifier (x16)-> high pass filter -> variable amplifier (typically x65) ->full wave rectifier -> integrator. However after the integrator the signal will be inverted (I put it through the negative terminal of the op amp), I though about putting the rectifier before the amplifier but will the diodes work correctly when the voltage is than 0.7 V?
The instrumentation amplifier is the INA129, the diodes are 1N4148 and the opamps are AD822, thanks!


texts:
I recently got started working with digital electronics as a hobby and gotten myself some parts and soldered together a test board for AVR µCs. I'm using an ATMega328P.

Now I wanted to play around with a shift register, specifically a 8-bit SIPO of type 74HC164.

I wired it up as the pinout says, wired the clock to pin 0 on port B(pinb0) of the atmega and one data line(a) is wired to pin 7 on port D(pind7).
As a first test I wanted to set one bit and shift it over, visualizing the result with four LEDs. To do so I set pind7 high, then set pinb0 high then set pinb0 low again as well as pind7. I do that in a loop every 5th run, the other four times I just keep setting pinb0 high and then low again to get a clock and let the shift register shift.

Now the problem is, that the leds are just all on and shortly turn off when the clock signal is there.

Also weirdly it also does react to my proximity to the cables on the breadboard, making the leds flicker about.

Anyway, heres the schematic, should be correct, excuse my shoddy schematic skills:

btw, I always have only one µC inserted at a time, so please ignore the ATTiny.

And here's the code:

#define F_CPU 20000000UL

#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
    /* Replace with your application code */
    uint8_t i = 0;
    uint8_t j = 0;
    while (1)
    {

        if (i == 0)
        {
            //clear register
            PORTD &= ~(1 << PIND7);
            for(j = 0; j < 8; ++j)
            {
                PORTB |= (1 << PINB0);
                _delay_ms(1);
                PORTB &= ~(1 << PINB0);
                _delay_ms(1);
            }

            //set first bit to high
            PORTD |= (1 << PIND7);
            _delay_ms(1);
            PORTB |= (1 << PINB0);
            _delay_ms(1);
            PORTB &= ~(1 << PINB0);
            _delay_ms(1);
            PORTD &= ~(1 << PIND7);
            _delay_ms(1);
        }
        else
        {
            PORTB |= (1 << PINB0);
            _delay_ms(1);
            PORTB &= ~(1 << PINB0);
        }

        i = (i+1)%5;

        _delay_ms(1000);
    }
}


texts: What is this torus wire coil next to dc motor?

texts:
I'm currently playing with a cheap $7 RC car from the toy store, and has just started out with arduino and electronics.

What is the purpose of the torus thingy with wire going around it, between the motor and power?

I could not measure any difference in current/voltage/resistance measuring before/after it in the circuit.

What does this thing do? And do I need it (or can I just ditch it and connect the engine straight to the arduino?

PS: should the digital out use a transistor to connect the circuit between engine and power source, or can this small of a 5v engine be powered simply by going through the digital pins?


texts: Extract Components From a 3-in-1 Printer

texts:
I have a fairly recent 3-in-1 Cannon ink jet printer, which works fine accept creating a small skew on the printing page. I wanted to just throw it away, but was wondering if I can pull out components from it and use it with an Arduino?

It has a color LCD, Sensor in the scanner and it probably has a few servo motors. Are my assumptions correct? Would they be in a form where I can remove them and use them?

Update

Printer Model: PIXMA MP 470


texts: Can I build a 3-phase transformer bank out of single transformers of different KVAs?

texts:
Can I build a 3-phase transformer bank out of single transformers of different kVAs?
Can I build a 3 phase transformer bank with 2 transformers of additive polarity and 1 of substractive polarity?
The connection is Dy7, 2 transformers of 100kVA additive polarity and 1 transformer of 50kVA substractive polarity


texts: Trouble Storing Information in D Flip Flop

texts: So I'm really not understanding how to store bits in flip flops and have them enable for to change on a condition. Here's the general setup that I'm trying to do but it just doesn't seem to work.


texts: Wiring diagram check up for usb interfaced avr

texts:
Hi I want to make sure I've not wired anything wrong here. My USB interface is working fine. However the 5 V from USB seems to be powering the led on my laptop power brick. Hence even when I switched the power brick off at the wall outlet, the led is still on. When I unplug the USB it goes off but comes back on again as soon as I plug it in. Do I just but a diode in?

I'm using this power brick because a part of my circuit draws a lot of current.


texts: How do garage door wire connectors work?

texts:
This is going to sound stupid, but I have garage door wire connectors like this:

The wire keeps falling out. How do I get it to hold. The manual and case says "Strip to this length: 11 mm and I've done that. Is there some other secret?


texts:
From Linear Optical Isolation for Safe Sensor Operation:

Are the three grounds indicated all connected?
Are the four Vcc indicated all connected?
If the above is all true, how could this be an isolated circuit? The grounds aren't isolated.
If the above is false, wouldn't U1 fry at the first hint of significant common-mode potential to ground?
Are U1 and R1 considered pre- or post-isolation?


texts: Simplest latching circuit with press-ON hold-OFF button that can cut power when Raspberry Pi halts

texts:
So I'm making a battery-powered Raspberry Pi project, and it would be ideal if it could cut off power to the Raspberry Pi after the Raspberry Pi shuts down.  It would also be ideal if the power for the whole system was controlled via a single on/off button.  The events I'm looking to respond to are like so:

Short press of power button:

Closes circuit if circuit is open (powers on the Pi)
If the Pi is already on, it boops one of the GPIO pins on the Pi (I'll configure the Pi to listen for this and prompt the user to shut down the system safely)

Long press of power button:

Opens circuit if circuit is closed (forced shut down of the Pi)

A GPIO pin on the Pi goes high or low (I'll configure the Pi to do this on halt):

Opens circuit if circuit is closed

The power supplied will be 5V, and I doubt current drawn by the Pi and its peripherals will be much more than 2-3A.  My knowledge of active circuit components is very limited, but is there any one component that can do what I'm shooting for?


texts:
I have almost no knowledge in electronics and electricity. I've encountered the concept of open-drain output recently and I think I got the idea.
What I have understood is that it is a transistor connected to an output pin, acting as a sink. Therefore, such pin will always output a zero value.
Maybe I simplified it too much and I missed something.
Anyway, I was wondering why this kind of outputs are needed.
As far as I know, if we were to output a one through such pin, we would have to connect an external pull-up resistor. Why not have that resistor already connected internally?
Thanks for any answer you can give. Also, apart from beign a noob in electronics, I'm new to this forum, so I'm sorry if this question is too theoretical. In case it is, I would apreciate some recommendations of forums where to ask these kind of questions.


texts:
I have a pneumatic chuck that needs a pulse that lasts a bit to open and close. Currently I have 2 foot pedals and each works in one direction. I would like to have just one pedal and a relay circuit to make it a flip-flop, but I only know how to do it digitaly.
When the pedal is pressed first time the signal should go in one direction as long as the pedal is pressed. When it's released the direction should change, and by pressing it again it should start again.
             ____                ____              ____
FOOTSW  ____|    |______________|    |____________|    |_______
                                 ____
SOLN-O  ________________________|    |_________________________
             ____                                  ____
SOLN-C  ____|    |________________________________|    |_______

Basicaly to get both a push button and a latching switch with the same pedal that in hadrware only has push buttons.
Is it possible to have this kind of functionality with just relays, and how?
I can solve the problem in general, I would just like to know if there's a solution to do it without other elements like timers, capacitors and microcontrollers.


texts: How do designers know about kilowatt power of wind turbine generators like 1.5 MW?

texts: Generators and transformers are always designed in kVA because designers never know about the load it will provide power to. Then how do we know the wind turbine generator will deliver 1500 kW or 2 MW etc?


texts: Proving that we can apply the half-circuit model for the common-source differential amplifier

texts:
This is the circuit I'm trying to solve through the half-circuit model:

To do so I need to first prove that \$V_{p}\$ is a small-signal ground under opposite symmetric excitation (\$v_{in1}=-v_{in2}\$), i.e. that in this small-signal circuit \$v_{p}=0\$ :

Given (\$v_{in1}=-v_{in2}\$) if neglect (OC) \$r_{1}\$ then it becomes trivial by equating the currents from the two current sources that \$v_{p}=0\$ however, by including \$r_{1}\$ I can't seem to get around it unless I also assume that \$v_{o1}=-v_{o2}\$ and this makes feel that I'm getting some circular logic involved because if \$v_{p}=0\$ then it also implies \$v_{o1}=-v_{o2}\$, so have I missed anything?
To summarize this in a question:
Can we by just using the fact that (\$v_{in1}=-v_{in2}\$) show that the circuit has \$v_{p}=0\$?


texts: Oscilloscope for troubleshooting higher voltages?

texts:
I'm working on a friends inoperative Miller 300 Amp DC inverter Tungsten Inert Gas (TIG) machine. These machines convert 240v single phase A/C to DC, then use IGBT chips to generate controlled DC output.  Rated output for this machine is 250A @ 30 VDC.  The actually welding amperage range is 5-300 amps, wit maximum open circuit voltage at 95 volts.  Typically you would set a maximum output current on a panel, then further control that output with a footpedal (full pedal = maximum set output current).

The control boards seem to communicate well with the front panel.  There are no faults set. There are no signs of any component overheating, nor any sign of blown capacitors. Note: Factory repair is priced in the $1000 of dollars. My suspicion is some key high power components are not functioning correctly.  I'd like to verify this, and I was hoping to verify this in circuit.  I'm reasonably active on the welding forums and component failure is a known cause for non-function.

Tools I have..

Old analog two channel oscilloscope, with new aftermarket probes (x10, x1), a device I have little experience with.
Typical $100 multimeter, nothing fancy.
Fluke 36 Clamp Meter (rated at 600v, 600A AC, 1000A DC)

I'd like to check the diode bridge rectifier, the IGBT chips and the output diodes in circuit.  My initial thought was to just use the oscilloscope and look at the interim signals.

And then I pause, to think.  Is this even safe?   I don't want to hurt myself, or any tools or any devices being tested. Can I safely probe up to a 240 VAC signal with the oscilloscope? Is there an isolation device available?  If not, is there an alternative way to read a full rectified 240v output, or troubleshoot a switching power supply board with the above rated power?


texts:
I am tring to solder an IC, UCC2844C onto a PCB using solder paste and T962A Infrared IC Heater but I end up soldering IC pads between themselves.

Anyone has any idea how to avoid this? Am I maybe putting too much paste on the PCB?


texts: Can copper pour be used as an alternative to large traces?

texts: This is a general question, but if I am designing a PCB that needs a trace width of 110 mil, would I be able to use the copper pour instead of drawing out the large trace? The reason I am asking is for PCB's that have a lot of components that don't allow for large trace widths. Thanks.