texts: Going below the bottom of the stack in ATmega328P

texts:
I'm working with an AVR based project and just have one curiosity.
The ATmega328P has total 2kB of SRAM. The lowest address of the stack can be 0x8FF. Now suppose the stack pointer is at 0x8FF. What would happen if I gave a RETI instruction at this point or a POP instruction multiple times?
RETI and POP both are supposed to take the value at the top of the stack and increment the stack pointer (incrementing the stack pointer would mean taking the stack down.)
I tried on Microchip Studio (earlier AVR studio.)
There it simply increments the stack pointer from 0x08FF to 0x0900 to 0x0901 an so on. This could actually be possible because the stack pointer is a 16 bit register (2 registers SPL and SPH of 8 bit each.)
Now suppose I take my SP to 0x0905 and do a PUSH, and then do a pop. In the simulator it pops the correct value (that was pushed) into my output register. Howeve , in a real ATmega328P that would not be possible (as there is no place to store the below 0x8FF address.)
How would a real microprocessor unit react to such a scenario?
The code I used was :
LDI R16, 0x88 ;load a random value
POP R0        ;increase SP to 0x900
POP R1        ;increase SP to 0x901
POP R2        ;increase SP to 0x902
POP R3        ;increase SP to 0x903
PUSH R16      ;decrease SP to 0x902
PUSH R16      ;decrease SP to 0x901
POP R4        ;increase SP to 0x902 and store 0x88 in R4

In comments I have written whatever I observed in the simulator, I want to know how would a real processor would react.


texts: The circuit-level "why" of the loudspeaker / amplifier “POPP” sound

texts:
in the other question about the "popp" sound I asked if the "popp" is harmful to a loudspeaker.
Since I am also interested in the "why" on the circuit level, here is my next question. I put this question here and not in the audio design part because I think the problems also apply to other power amplifiers beneath these for audio systems.

So...what is the reason?

CoreyF answered to my previous question, that professional audio equipment uses power sequencing systems to turn on the components of such a system one after the other and the amplifier in the end. (And here starts my interpretation) This helps to avoid these loud sounds / the surges that are generated by switching processes of other compoinents to be amplified and supplied to the loudspeakers.

But if I am right that means that the surge itself is initially generated by other components than the amplifier (e.g. the mixing console), right? The amplifier only amplifies the already generated surge.

If my assumptions from above are correct, how do I avoid these surges in non-professional audio systems? For example: My active loudspeakers I have here make a "popp" whenever you switch them on or off (the attached audio source is already up when I switch them on or off, so no surge comes from there).

That means, the "popp" comes from the circuits inside the loudspeaker.

My intention is to modify the loudspeaker in such a way that it doesn't make these "popp" sounds any more, but for that I want to understand, where the sound comes from (where the surge is generated).

Since there are three different situations in which a popp occurs, here are my three "problems":

I can imagine that the sudden connection of the supply to the AC mains is responsible for an initial voltage peak/transient that is amplified by the amplifier (am I right here?). To solve that I plan to use a "soft start" circuit, using a timer and a relay which connect the rest of the circuits after a short delay to the supply.
Why does the active loudspeaker "popp" when I switch it off? That "popp" also occurs not immediately when I push the switch (when I switch off the AC), but after 2 seconds or so, after I switched it off. So it is not a (direct?) surge that the switching generates.

When I push the switch and let it go, the LED at the front fades out, so I think some capacitors are discharging. As soon as the LED is close to be dark, the switch-off "popp" occurs. Where does that surge come from / what is the reason? My initial idea to overcome that surge is to monitor the secondary AC side of the transformer and disconnect the drivers from the amp as soon as the AC signal falls off (and optionally the amp from the supply).
Whenever I accidentally disconnect the loudspeaker from the mains without switching it off using the front-panel switch, a really loud "bang" occurs. That bang also occurs immediately when the power falls off, in contrast to the delayed "popp" when I use the front panel switch (see 2).

Why is it louder when I switch off the mains instead of using the front panel switch? From my point of view I assume, that the front panel switch only disconnects the secondary side of the transformer from the capacitors of the supply, which reasons the discharging and the difference in the switch-off process "popps/bangs".

Additionally I assume that the sudden power loss generates a high voltage at the transformer's secondary due to it's inductance.

Which of my ideas and guesses are wrong or right?


texts:
I need to charge a lead acid battery, I will be manually developing a program to set the current. Its the "US 12V XC2" Deep Cycle battery. Here is a link to the datasheet: http://usbattery.com/wp-content/uploads/2015/01/usb_12V_data_sheet_2015_web.pdf

The part I am confused about is "Bulk Charge Constant current @~10% of C/20 Ah in amps" does that mean C = 92? or C = 155? or is C/20Ah = 155?

Thank you


texts:
I currently use a step up converter from China.
(https://www.amazon.co.uk/gp/product/B01534P0OI/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1)

All of the step-up converter schematics i've seen seem only to be able to cope with 3.3V to 12V rather than the 3.3V to 24V that I require.
(Without adding components to run the IC out of spec)

The IC on this circuit is unmarked, and even with plenty of research, I can't seem to ID it. (Could it be MT3608?) (Is there any evidence of LM2577 in this package?)

I could either do with someone who can identify the mystery IC, or more preferably provide a schematic for the PCB below!

Thanks in advance!


texts: Servo doesn't move when driven by a PIC micro controller

texts:
I have a PIC12F629 and a servo sg5010(for which I could not found any datasheet )
So I built this circuit :

simulate this circuit – Schematic created using CircuitLab

The LED is for checking if a pulse is sent and the switch SW1 is for enabling the servo.

And I have written this program for the PIC:

#include <xc.h>
#define _XTAL_FREQ 40000000
#pragma config WDTE=OFF , BOREN=OFF , PWRTE=ON , MCLRE=OFF , FOSC=INTRCIO

void main(){
    TRISIO = 0b0000000;
    GPIO = 0b000000;
    int i;
    while(1==1){

            GPIO = 0b111111;
            __delay_ms(1);
            GPIO = 0b000000;
            __delay_ms(19);

        for(i=0;i<50;i++){

        }

            GPIO = 0b111111;
            __delay_ms(2);
            GPIO = 0b000000;
            __delay_ms(18);

        for(i=0;i<50;i++){

        }
    }

}

Here I tried to turn the servo arm any degrees forward and backward and the for loop is here to give time for the servo to act and _XTAL_FREQ is here to set its frequency.

I even tried to transfer the GPIO settings into the for loops and add an empty for loop after them.

When I run the circuit, I face critical problems:

When I press the switch, the servo reverses about 10 degree back and forward (every time it powers on even without any feedback connected). Then if it doesn't reach 360 degree, it turns 20 degrees by 20 degrees up to the end and then stops and emit sounds like click click for every pulse sent by the PIC. (I saw LED blinks). This is not what I want to implement.
If I delete every loop in it (for and while loops) and only write this in main:

GPIO = 0b111111;
__delay_ms(2);
GPIO = 0b000000;
__delay_ms(18);

The program loops on itself and the LED blinks. Why does it loop on itself?


texts:
I came across a question regarding logic gates and I can't understand how to solve it.

Q) Construct the truth table and write the boolean output equation.

i) Realize using NOR gates only:
  $$f(A,B,C,D) = \prod (0, 1, 2, 7, 8, 9, 10) + \Phi(12, 13)$$

I tried to get Boolean equation using KMAP method and I got this Boolean equation
$$(B + D).(B+C)$$
Is this correct? If not how to approach this problem? What does phi of 12, 13 mean here? Are they don't care values?

Any help is appreciated.


texts:
I am a computer science student working on a project for my Diploma and I am building a DIY PDU,

I thought building something would be a lot funner then programming a website like 90% of the class

So I have run into a problem with my build,

I have 8 Relays that are controlled by a 74hc595 shift register, this chip is then controlled by an Arduino.

Everything works awesome until i put 230VAC onto the relays and flick all the relays to on (with no load). This is where the problem occurs.

The relays start to tick randomly and stay off !

Here is a schematic of the Relay Board

There are 8 of these all going to the 595 chip.

Now I have an 8 Relay Module Board that follows the rougly the same design except it uses PNP transistors and where I used NPN ones

could the different Transistor configuration be somehow effecting the 595 register ! Or am I not using the correct diode configuration ?

NOTES

I have tried and RC snubber between the relay contacts and between the relay + and - of the coil.

When I put a scope between one of the relays coils (NOTE this is a crappy DIY scope from china) and I see I negative voltage just after I put 230VAC through relays ! and then the relays turn off.

When I power the Arduinoo on the Project PSU (using a lm7805 regulators with a .33uf cap on the input and a .1uf cap on the output) the problem is A LOT  more apparent !

when I power the Arduino off the USB problem shows up  a lot LESS !

Update:

This relay

http://www.gmelectronic.com/relay-with-dc-coil-12v-finder-40-61-9-012-0000-p634-038

Circuit board:

This relay

http://www.gmelectronic.com/relay-with-dc-coil-12v-finder-40-61-9-012-0000-p634-038

Live is the 2 long strips of solder and the 8 patches of solder at the relay connect points


texts: Kirchhoff's voltage law in a circuit with just a battery

texts:
I am just starting to learn electronics. Today I encountered Kirchhoff's voltage law, and I don't quite understand how it works. From Wikipedia:

  The directed sum of the electrical potential differences (voltage) around any closed network is zero

What about when you make a circuit by connecting one side of a battery to the other, without any other components in the circuit? For example, if I connect a 9V battery to itself, wouldn't the total sum of the voltage in the circuit be simply 9V? Am I missing a -9V source somewhere here?


texts: How can I test the resistor on my USB connector?

texts:
I have purchased some USB-C connectors that I use to build my own cables with (I have separate "host" and "device" side connectors for various cable assemblies), and I was wondering how I might go about testing the resistor on the little PCB to ensure it is correct and to spec? Any best practices or reliable techniques for doing this?

I recently had a customer inform me that a USB-C to Mini-USB cable that I made for him damaged the keyboard he had it plugged into and I'm trying to ensure it doesn't happen again. (I am assuming there was something wrong with the USB-C resistor that caused the issue). Thanks!


texts:
I understand the zero state response can be found by finding the homogeneous and particular solution. I am analyzing this circuit.

My input is $$Vin(t) = e^(-2t) * u(t)$$
I set the Vout to 0. So for the homogeneous equation I have $$0 = \frac{-4}{i} * \frac{dv(t)}{dt} + v(t), t< 0$$
And for the particular solution I have $$1 = \frac{-4}{i} * \frac{dv(t)}{dt} + v(t), t > 0$$ However, given all this, how do I proceed? Also, is there a simpler way of doing this for more complicated circuits? For instance, if the resistor and capacitor positions were switched or if I had a really complicated transfer function.


texts: Is transistor the only electronic component on a CPU?

texts:
I have been reading about CPUs recently and came to know that all logical blocks and memory on CPU can be made out of transistors. So is it the only electronic component on CPU?

Edit (Made after first two answers):

But the making of CPU only talks about projecting transistor diagrams (May be that is the major part). But how are additional components like diodes, capacitors etc. added to CPU?


texts: Do I need an input resistor for an isolated DC-DC converter?

texts: I am using a 24V-> 12V isolated DC-DC converter and the power source are two 12V, 65Ah lead acid batteries connected in series. Do I need a input resistor at the terminals of the converter as a current limiter?


texts: Is it possible to determine coefficients of an analog Bessel filter based on order, fc and attenuation only?

texts:
In our work, we were given a data which according to documentation has been filtered via an 'analog four pole low pass Bessel filter at 2kHz with attenuation of signals above -3dB of 80dB/decade'. We are now tasked with creating a model of the original system (and therefore a model of filter too), but can receive no further information, and circuit diagrams are unavailable. Is it possible to obtain the filter coefficients based on such limited info?

I am trying to study the filters theory for past two days, and while I feel like I understand the basics, I am genuinely stuck. Would also welcome any resources pertaining to this problem.


texts: LED lights up even though there is not supposed to be an output from the STM32

texts:
I'm using an STM32F103C8T6. I connected an LED to the pin PA5 and a tactile button switch to the pin PA0. I wrote the program as follows:

If(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0) == GPIO_PIN_SET)
{
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
}
else
{
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
}

The program works as expected but the LED is lit up about 50% bright when the switch isn't pressed and 100% when it is. And to be sure it wasn't the microcontroller, I wrote another LED blinking program which worked as expected. I'm inclined to believe that it has something to do with the code. I used the STMCubeMX  to initialize the pins so I don't think I've done anything wrong there. Where am I going wrong?


texts: Why are DRAM cells laid out in a square with regards to demux size?

texts:
I'm reading the chapter about DRAM access (2.1.3) of the paper "What Every Programmer Should Know About Memory - Ulrich Drepper" and there's a certain snippet that I just can't make sense of.

Figure 2.7 shows a DRAM chip at a very high level. The
DRAM cells are organized in rows and columns. They
could all be aligned in one row but then the DRAM chip
would need a huge demultiplexer. With the array approach the design can get by with one demultiplexer and
one multiplexer of half the size.

I can understand that there are a lot of reasons for a memory array to be laid out as a square. But why would you need a huge demultiplexer if all the memory cells were aligned in a single row? First of all, if they were aligned on a single row then wouldn't the CAS multiplexer be huge instead? If there's only one row to select then you wouldn't need a demultiplexer to select the correct row. If I trusted myself on this then I would just think that they mistyped and meant to write They could all be aligned in one column.
And secondly, why does the combined size of the demultiplexer and multiplexer become smaller with the array based structure instead of just having a single row? Or am I misunderstanding the snippet somehow? Is one demux with 15 address lines together with one mux with 15 address lines smaller than one demux/mux with 30 address lines?
I do know about multiplexing address lines so that you can use the same set of address lines for both row and column selection. But because the paper mentions this feature a few paragraphs after the displayed quote, I'm assuming that it's not meant to be taken into account yet. If it's relevant.
Apologies if my use of different terminology is incorrect. My only experience with this topic is through this paper and what I've researched online to try and understand it. Especially the title, I couldn't think of a better one.


texts: Is there a standard/foolproof way to tell what input or output impedance is?

texts:
Sorry if this is a stupid question, but I'm in multiple electronics courses and I can't seem to understand input vs output impedance no matter who I ask.

I can always find the impedance between two points, if I am given the two points and I know all resistor/capacitor/inductor etc. values between those points along all possible paths between them. But when I'm asked to find input or output impedance of an entire circuit, I have no idea what those two points are. My professor seems to automatically understand which two points happen to correspond to input or output impedance in a given example, but to me, it seems completely arbitrary.

I understand that power supplies and loads have effective impedances, but often when I look at a circuit, I have no idea where the power supply ends and the load begins, or whether it's even relevant to think in terms of power supplies and loads... to me it's just a bunch of components jumbled together.

Here's some examples of worked homework problems (solutions in red):

Why is it that the input impedance of the circuit in part "a" is 10k? Obviously there's a 10k resistor on the op amp input, which seems extremely simple, but it's also extremely vague. Why don't I need to worry about the 500k resistor? Why should I care that the input has a 10k resistor when the signal also runs into a 500k resistor and an op amp with an enormous resistance?

Then in part "c" we add another op amp to greatly increase the input resistance. Now all of a sudden we do care about the large op amp resistance, just because we put one op amp in front of another.

It really seems to be that simple, but I feel like I'm just saying  "I'll just throw a 10k resistor in front of this circuit and voila, there's you 10k input resistance, have a nice day." If it's really that simple, I at least want to know why it's a helpful idea.

Could someone please break down this concept and really explain it to me like I have never seen electricity in my life. For some reason it's so obvious to others, that they do a terrible job of understanding just how confused I am, and their explanation won't help.


texts: How are Vivado's projects directories structured?

texts:
I'm working with Vivado to program FPGA's in VHDL. Can someone explain me what are the various directories that are created under the project's directory?

In my projects, the following folders are created:

[project_name].cache
[project_name].hw
[project_name].ip_user_files
[project_name].runs
[project_name].sim
[project_name].srcs

I want to use git to manage the projects, so I need to know what each directory consists of as I want to ignore the ones with compiled files.


texts:
I have a charger that make high pitch noise only when I disconnect the device from the charger.

The charger is "switched-mode power supply"

Input: 100-240V AC 150 mA 50-60Hz
Output: 5V DC 850 mA

I have tried everything that I know, I tried to re-solder pins and
some components on the main board.
I tried to glue the transformer and the capacitor and other components
with silicon.

I checked if the output or the input signal not smooth! but everything work perfectly and the output is stable!

I'm not sure from where exactly this high pitch come from! from the transformer or a capacitor.

NOTE: The charger make high pitch noise even if I unplug it from the wall! for around 35 second and the noise is so high even old people can hear it from other room!

Is there any way to solve that!


texts: In BJT CE configuration, is it correct to write Ie = Ic+ Ib? Shouldn't it be Ie= Ic-Icbo + Ib?

texts:
This is my understanding..
The collector current Ic comprises of two components.
1)alpha times the Ie,
2)the reverse saturation current Icbo.

If this is correct how can Ie = Ic+ Ib be true?
It should be Ie= Ic-Icbo + Ib , right?.

Please let me know if I am wrong.


texts: Can I draw more current from this battery?

texts:
I'm looking to build a power box like this one:

The battery that I'll use is 12V 35Ah deep cycle battery, which has an initial current of <= 10.5A:

Devices that I plan to connect are:

On 12V Outlet Socket will be connected device of 7A
Two devices on 2 USB ports will draw 3.1A
Flashlights will draw 1A
A device on 2-Way Banana Plug will draw about 10A

Total of 21A.

Do that mean that I cannot connect all devices at the same time on this battery because of the initial current of 10.5A?


texts:
I've been working on this design for a client for a little while now. I can't go into full specifics on it but the basic design is a USB hub. The IC I picked at the time met the design requirements that were established (USB5807C). The hub allows for 1 host and 7 downstream devices to be connected. From what I can see, the chip does support a USB Type-C connection. My client's design changes are a switch to Type-C for the host connection and HDMI output to make use of Type-C's Alt Mode for HDMI. I have some experience working with USB 2.0 and 3.0, but I'm new to Type-C in general and especially the HDMI mode. My question has two parts:

Is it possible to work in the HDMI port into the current hub design using the USB5807C or would I need to use a different IC?
How do you go about working in the HDMI support while also having the same pins also acting as a hub?

I know that it's possible to set up because there are a bunch of similar type-c hubs that also offer HDMI. I would really appreciate any help on this a great deal, thanks! :D


texts: Why equation 22 is subtracting the current rather than adding?

texts: Both the currents are going into resistors and should add to the voltage across resistors, hence the voltage across capacitor ?


texts: Avoding repeated queries while working in a WSN set-up of Coordinator-->Repeater-->End Device , when Coordinator and End device are in Range

texts:
I am working on a WSN set-up. I posted a question earlier on the same.   I had a another question with respect to the same. My question is while working in broadcast mode, if Coordinator and end device are too far away and we are using a repeater in between , then its fine, repeater will only braodcast message to End device and End device will not receive multiple copies of queries (as it happen in a case when Coordinator and End devices are in Range and we are also using a repater, although in this case there is no need of using repeater). Now assuming that end device receive multiple copies of queries, how we can neglect other multiple copies?

I am attaching a pic along with this question.

Should i use time stamp? I really don't have any idea regarding how to use time stamp to avoid using multiple copies? Probably i should add time stamp in the querry send by the coordinator(Running on Raspeberry pi, equipped with OLP865 Xbee). What if i don't have internet access on Raspberry pi and no RTC. Probably i should use a series of number(generated from a software). On the End device side(Running on Arduino), i should, parse the incoming string, store that time stamp/number and match it with the next incoming query, if they both match, drop this next message, if not, process the query. Can any one verify, if these seems to be a right approach or if there is any other method?


texts: Multipurpose momentary button - microcontroller/arduino - Which mosfet to use?

texts:
Further to my previous question regarding using a single button as a power button that acts as an input button for a micro-controller/arduino, I finally stumbled on this site and found exactly the circuit I was looking for.

In particular this circuit:

All credit to free_electron (thanks whoever you are).

From my understanding, on first press of the button, this circuit connects the gate on the p-channel mosfet (IRLML6401) to GND connecting the battery to cpu-power.

Then when the micro-controller powers up, a pin ("power" in the diagram) connected to the n-channel mosfet (2N7002) is set high which also connects the pmosfet to GND. This allows the user to release the button and the micro-controller remains powered.

Any other press of the button will pull an i/o pin ("switch" in the diagram) to GND on the micro-controller thus registering an input by the user.

To turn off the device, I was going to listen for the button to be held (e.g >3 seconds) and, on release, drop the power pin to GND turning off the device.

Question:

If my understanding of the diagram is right, the issue I'm having is (having no experience with mosfets as I'm a more a hobbyist than a pro) it seems like the parts described in the above diagram require higher voltages than I can provide (around 60v) for them to work.

My circuit runs on a regulated 3.3v (via an LM3671 buck converter) and I dont know which mosfets would suit this purpose?!

In my research I've come across "logic level" mosfets and those which require negative gate voltages and its all a little unclear.

I'm trying to achieve the above with a 3.3v power rail and expect entire circuits current to peak at around 350mA. Can anyone suggest any low cost options?

I'd greatly appreciate any help. Thanks in advance. I really love this forum!

Chris


texts:
I'm using this LISY300AL Gyro: DataSheet

But i cant get a precise data..

Here is my calculation:

    sensitivity = 0.716454545;
    gyroAdc = analogRead(0);
    if(abs(gyroAdc - gyroZero) <= Threshold)
      gyroAdc = gyroZero;
    gyroRate = (gyroAdc-gyroZero)/sensitivity;
    gyroRotation=gyroRotation+gyroRate*dtime1/1000;
    gyroAngle = abs((gyroRotation - 360 * ceil(gyroRotation / 360))); // Round up between 0-360
    dtime = millis() - stime; // millis() is the milliseconds since my controller started
    stime = millis();

I dont get a precise angle, i move my object 90 degrees but the gyro drifts too much so it showes something else...

Maybe i'm doing something wrong ? or i should just add an Accelerometer to make it more precise ?


texts: When people talk about a device "drawing" current, what do they mean? Why do devices under load "draw" more current?

texts:
In my (extremely rudimentary) understanding, the amount of current flowing in a circuit is determined by a) its resistance, and b) the voltage of the power source (voltage from beginning to end), which forces the charge to flow through.

Why then, do people talk about a device "drawing" extra current when e.g. a motor encounters a heavy force? If anything, I would expect this to increase the resistance in the circuit, and thus decrease the current that flows through. What say does a load in the circuit have in how much charge is forced through? How can it draw more out?

Alternately: where is my understanding of these interactions flawed? :)


texts: Frequency modulation occurs not in an expected way

texts:
I've built this oscillator.

Then I gave it a DC bias and connected an mp3 player.

Result: I have local fm-stations muted at 90MHz, 90.75MHz and 89.25MHz.

However, at 90MHz an mp3 music is very quiet. At 90.75MHz and 89.25MHz an mp3 music is loud.

Why there's almost no transmitted music at 90MHz?


texts: smallest possible length of copper wire, where I can measure capacitance via multimeter

texts:
I am a new highschool physics instructor and I want to show to my students the basic concept inside  capacitors and how they work.

I plan on showing them 2   simple  copper wires side by side , supplied with battery, constructed on a breadboard, and measuring via multimeter (which can measure mA), we can measure capacitance.

But I am afraid it would fail, the school does not have that much supply though, I do not have my own multimeter but planning to buy one if somebody here at Physics stackexchange can confirm a setup that I can measure capacitance and tell me the appropriate parameters.

I got this idea from the formula, which states that at some point, at the correct Area and distance to each other, 2 copper wires supplied with voltages can give me capacitance.

So, if you guys have any spare time and device, can you please experiment on what length 2 copper wires, side by side, is enough to measure capacitance, I do not also have any idea if 9V battery is enough, maybe I can series battery to reach higher voltages.

Please help. Thanks!

Setup:

Hope somebody can try. Thanks!


texts: Injecting current into the feedback node of an LDO/DCDC, bad idea?

texts:
I'm trying to control an LDO/DC-DC converter externally (using a DAC for example). I was thinking of injecting current into the feedback pin (see the schematic below for illustration), is that a bad idea ? Anything I should be extra careful with ?

I aim to drop the output voltage past the regulator's voltage reference, is there any issue with doing that ?

The regulator's load, capacitors and voltage source were omitted from the schematic

simulate this circuit – Schematic created using CircuitLab

EDIT:
The ADJ pin might have caused a misunderstanding.

I was referring to regulators which use a constant voltage reference going into the error amp, such as TPS74701:


texts: connecting teensy + A4988 carrier + motor

texts:
I am very new to electronics and I am trying to wire a teensy 3.2 to a A4988 driver carrier and a (unipolar???) motor.
I have zero clue what I am doing but I am trying my best to follow the diagram but I am lost on where to connect all of this!? could someone tell me what pins (and why) to get all of this connected so I can then program the teensy to move the motor. I can program, but I am a massive circuit noob. There are too many lines on this diagram for me to understand what is happening
Is this diagram suggesting I need 2 power supplies?


texts: How to measure 120 Hz ripple current at the output of an LED driver?

texts: I have a 50W LED driver and a programmable load. Please suggest a way to measure 120Hz ripple current! I have an oscilloscope and multi-meters.


texts:
I've come across this question at work and it has stumped me... even though it is quite basic.

A distribution board is supplied by 3 phase 415 AC power. From the distribution board to a circuit breaker, only 2 of the three phases are used, and the other phase is grounded.

A RCD is to be installed after the circuit breaker. Is the power that the RCD to receive considered 3 phase with an asymmetric fault, with 415v between phases and 240 between phase and neutral?

Or is it split phase power? with 240 between phase and neutral and 480 between phases?


texts:
Formulas for Integral Components:

I am looking for "simple" approximative formulas for integral components. In particular for:

A grounded interdigital capacitor (i.e. above a ground plane and with one set of fingers connected to ground), and
a square pad on an infinite ground plane (to estimate SMT pad capacitance). I believe that due to the method of images this is equivalent to a finite parallel plate capacitor with twice the separation but I am not 100% sure.

Sanity-Check Request:

Maybe somebody is also able to sanity-check the following reasoning.

In the absence of a formula for a grounded interdigital capacitor, would the following provide a reasonable estimate:

Calculate the capacitance between the two sets of fingers (with the available formulas)
Add the capacitance of a microstrip of equivalent length to the total length for microstrip contained in one set of fingers

Example using the formula provided here:

er = 4.2
t =  70 µm (copper thickness)
h = 1.6 mm
W' = 9.9 mm
l = 8.4 mm
W=S=l'=s' = 0.3 mm

A1 = 3.63*10^-3 pF/mm,
A2 = 8.27*10^-3 pF/mm,
N = W'/(W+S)+1 = 17

$$ C_{interdigital} = 2.58 pF $$

Length of microstrip in one set of fingers (the one with 9 fingers):

$$ L_{microstrip} = 9.9 mm + 9\times(8.4+0.3) mm = 88.2 mm $$

$$ C_{microstrip} = 88.2 mm \times 0.0431 pF/mm = 3.80 pF $$

It follows that the interdigital capacitor presents an approximate capacitance to ground of about:

$$ C_{total} = C_{interdigital} + C_{microstrip} = 6 pF $$

Does this calculation make any sense at all?


texts: Trying to understand the critically damped equations of a RLC circuit

texts:
I am trying to understand the equations of the critically damped equations of a RLC circuit here

I see this part on page 16

The part I do not understand is this one:

How can part of the equation be extracted and equaled to zero???

I mean,  I understand what the author is trying to do but I cannot understand where this third line comes from.


texts: Can I operate 2 electromagnetic locks using the same power supply?

texts:
I'm using this power supply:

Specs:
Input Voltage: AC90V-AC260V 50-60HZ
Output Voltage: DC12V
Momentary Current: 3A/5A
Persistent Current: 3.5A

To operate my electromagnetic lock situated on the top edge of the door.

Specs:
Holding force: 180kg(350lbs)
Voltage: DC 12V
Current: 380-430mA
Working temperature: -10 to 55 Celsius degree (14 to 131 Fahrenheit degree)
Humidity: 0 to 95%
Working mode: power-on to lock

Everything works fine except that my door is aluminum and it's flexible.
I want to connect a 2nd electromagnetic lock on the side of the door to make sure it's really locked.
Can I use the same power line connecting the first lock to also connect the 2nd lock or is it "depleting" the power supply output?
Thanks.


texts:
Could I get some help with this question:

Set up an equation for the I (V) containing constants E, R1 and R2 and
variable U, when the voltage in M1 is loaded. RL shall not be included in the expression.

M1


texts:
I just setup a pepper seed starting shelf using a metal shelf from a Swedish furniture outlet. The shelf has no electrical contact with the 5x T8 bulbs which are hanging on plastic zip ties. The T8 bulbs do not have a ground connection, and are isolated from their own chassis. At the very bottom, I have a small box, which uses a 12V DC LED strip powered from an external power supply (xbox 360 12V brick), for the sprouted seedlings. I was testing if there is any leakage from anywhere using a multimeter and before I even installed the "sprout box" I had about 10V/AC from the shelf in respect to the earth wire in the wall outlet. I thought that was bad and grounded the shelf to earth, although electrically isolated from everything, and the voltage disappeared. Now recently after adding the "sprout box" I noticed when touching the wires leading to the LED strips, I get a light "zing" when touching the shelf. Between the xbox 360 PSU and the metal shelf is 210V/AC!!! So I checked how much current can flow and I'm seeing about 80µA, which lights an LED very dimly.

Is this something I should worry about, as it only happens if I touch the LED strip power leads?

How comes I have such crazy floating voltages? all from induction?

Should I ground the xbox psu too?

p.s. the xbox psu doesn't have an earth connector, only live and neutral.

p.s. the psu in question is an xbox 360 power brick Here is an excerpt from the link Jack Creasey suggested below


texts: Program to draw pinouts (and easily visualize pin's multiplexed functions)

texts:
Documenting an electronics project is also an important task if it will be used by someone else other than the hardware designer(s). Right now I need to draw a diagram for a breakout board in order to show what functions are available on each pin. Something like the following diagram (of mbed):

Can someone recommends me a program that allows me to easily draw such diagrams?


texts: Does a datasheet paramaters of an IGBT gives you a DC , AC rms or an average value

texts:
For an example if you look at this datasheet for an IGBT datasheet ,

It has values for

1) Vces

2) Ic

3) VGes

ect.

Does these values give you a DC, or AC RMS or an average value?


texts:
Consider the following circuit:

I was just thinking about how connecting consumer grade unbalanced electronics together has a tendency to generate hum. For example, I have a little mixer that has an SMPS supply and some unbalanced outboard gear that has it's own supply and a guitar FX thing that has it's own SMPS and unbalanced output. Computer audio is always a good source of hum as well.

Normally, the proper solution for this sort of problem is to use an active balanced circuit or maybe even transformers if one can afford it. But with short runs of cable between unbalanced gear, the problem is not noise induced in the cables, it's ground loops. The grounds of each peice of gear are bouncing around at different potentials. So I really just need to isolate the grounds.

To explore this with LTSpice I created the above circuit. V2 is suppose to simulate hum (although 6.5kHz was used instead of 60Hz just so that I could see the effect visually in the waveform). So the idea is very simple, instead of connecting the grounds together, they are isolated using a 10k resistor (R7) and then any AC is coupled to the non-inverting input through C1 thereby canceling out the ground loop hum.

This seems to work. The model is not perfect because when you plot something it is always relative to the one ground. But the op amp out has the hum and the net between R5 R6 is clean. So the hum is actually being canceled.

So the question is, would the circuit above work in practice? Is there a circuit like this that is used in practice? If yes, can you point to a schematic?


texts: Pre-Amplifying Electret Microphone for ADC Input

texts:
I have designed a simple circuit that amplifies an electret microphone (this one: https://www.sparkfun.com/products/8635).

This amplified signal must be no greater than 3.3V, so I bring down the voltage to power the OP-AMP using the appropriate voltage divider.

Here is the schematic:

simulate this circuit – Schematic created using CircuitLab

Here's the problem: I hooked up an LED to Vout, and the microphone appears to literally be doing nothing. It is a very high possibility that I just simply don't understand how the microphone works. I have included the product link so that it may be useful for someone to explain the microphone to me.

Another question: the final goal of this circuit is that it feeds in human voice into the ADC of me DE0-Nano FPGA board. Would there be anything wrong with this method? What is a better way?

Thanks!


texts: Why is data stored on a NAND chip irretrievable if cracked?

texts:
All data recovery companies, regardless of skill, unanimously say that if the memory chip of a device has just a hair line crack, data recovery is impossible. Not unlikely, not expensive, but impossible. One company even stated that even the FBI can't retrieve the data. Is this true?

Why is this? I find it hard to believe if just a tiny section of an extremely common chip has a tiny crack, all of the data is completely gone.

I would have thought some talented person somewhere would be able to patch up the area of the chip and get some of the data back...

Is it something to do with the charge? I know flash memory uses transistors to store its ones and zeroes in the form of an electrical charge. If the chip is cracked, do the transistors "short-out", turning them all to zeroes, something like that? Is the data gone rather than irretrievable?

All I want to get are some awesome holiday videos back. Thought they were gone for good, then I learned about data retrieval, thought I had a good chance of getting them back and then I realised there's not really a chance at all if the memory chip is cracked.

How much would retrieval be? Hundreds? Or thousands? A million, as RedGrittyBrick says? If were to hold onto the memory card, in a few years do you reckon the price of such an advanced retrieval could come down? Or is this just being unrealistic?

We're talking about a 256mb sd card here.

I suppose technologies are moving away from SD cards and more to integrated memory and then goodness knows what else...atomic memory, DNA memory..You don't see people coming out with new advanced procedures regarding cassette tapes today, do you? Should I just bite the bullet and give up?

Also, I'm not even a hobbyist in this field, however I am interested in general by how things work so if someone could explain simply the problem I would appreciate it.


texts: Is there anything besides power factor that determines the max CFL that can be used in a socket compared to the max incandescent for that socket?

texts:
When shopping for lamps recently, I've noticed that the sticker on the socket says something along the lines of "To reduce risk of fire, use maximum 60 watt incandescent or 13 watt compact fluorescent."  My question is, why does the maximum wattage vary for different types of bulbs?  Shouldn't the socket be able to handle 60 watts, no matter what is drawing it?

I've searched on the Internet, and although the question has been asked before on various websites, most of it seems to be uninformed speculation, or people who don't even understand the question.  (Hence why I decided to ask a forum of electrical engineers.)  The best answer I've been able to find is that it's because the power factor of a CFL is significantly less than 1.  That makes sense to me.  So it seems like a "60 watt incandescent" socket is really a "60 VA" socket.

However, even if the power factor of the CFL is 0.5 (and my impression is that it's usually more like 0.6), then a "60 watt incandescent" socket should still be able to use up to a 30 watt CFL safely.

So, why does the socket say only a 13 watt CFL is safe?  How does the manufacturer calculate this?  Is there something else that needs to be taken into consideration besides power factor?


texts: SAP-2 ADD instruction possible in 4 T states?

texts:
I'm working through implementation of the SAP-2 CPU from Digital Computer Electronics, 3rd Edition.

I'm having difficulty understanding how the arithmetic & logical instructions can be implemented in only 4 T-states.  Let's take the "ADD B" instruction as an example, which adds the contents of register B to the accumulator (register A).

This CPU design uses 3 T-states to fetch/decode, so the third rising edge latches the instruction into the instruction register from RAM.

That leaves me only one cycle to perform the addition.

Unfortunately, this CPU design also has the ALU hard-connected to the accumulator (A) and a temp register (TMP).

So, I can set up my control word so that on the 4th rising edge it will "enable B" to write to the bus, "load TMP" to receive the value of B, and also set the ALU to addition mode.  But, I can't get the sum back out of the ALU and into A during that same rising edge.  The data bus is already in use with the B->TMP movement, and the result from the ALU won't be ready yet anyway.

I feel like I'd need a 5th cycle where the control word is set up "enable ALU" & "load A" to store the result back into A, and also set "load flags" to latch the zero and overflow flags.

What am I missing?  How does the SAP-2 do all this during just the T4 state?


texts: What would be the most practical and cheap way for me to implement a GPS tracker in an ebike I'm working on, so that I could track it on my phone or an online service in case it is stolen or displaced. I am very interested in developing myself a working system like this!


texts:
I've got halogen spot bulbs, with GU10 connector, throughout my living room. All connected to one halogen dimmer. I'd like to replace them with LED spots, using the same fixtures as the halogen spots.

This made me wonder. There are LED spots that are specifically labelled dimmable. For halogen you need a special halogen dimmer. What kind of dimmer do LED spots require? The same as halogen spots or does a normal dimmer work as well?

I've tried one LED spot with my current halogen dimmer, and it works. It doesn't, however, dim the light as low as with halogen spots. This could, of course, be because it's simply not possible to dim LED spots that low. On the other hand, could the fact that I'm using a halogen dimmer instead of a normal one or the mix of halogen and LED spots in the same circuit be of any influence?


texts:
Many sampled data systems accept a 10 MHz frequency standard. I'm designing a sampled data system, and would like to include the ability to lock to an external clock reference.

I've seen many different outputs, I have one GPS reference that puts out 13 dBm into a 50 ohm load, a distribution amplifier that puts out 1 V p-p into a 50 ohm load, and I'm sure there's many others, so I'm a bit confused as to what inputs I should be able to cope with to make this system versatile.

Is there a standard or a suggested range for a 10 MHz frequency reference input?

Thanks,
Ryan


texts:
I'm trying to build a circuit to let a Raspberry Pi control 12 linear solenoids. The solenoids are rated for 12 V and 400 mA, so they should have a resistance of 30 ohms. However, on the force-stroke curve the manufacturer lists, there is a 25% duty cycle which draws 15.2 W. Does this mean that the solenoid is powered with around 40 V instead?

This brings me to the issue of powering these solenoids. Their application (pushing piano keys) will probably require a 25% duty cycle. If I were to use a 24V power supply, I would be supplying (according to P = V^2/R) about 19.2 W of power to each solenoid. The voltage/power specifications come from the heating/duty cycle, so I assume this should be fine as long as my duty cycle is kept in check. This would require 19.2 W * 12 = 240 W of power for 12 solenoids. Assuming I would be pushing a maximum of 6 keys at once, would a power supply like this be sufficient? It's a 150W power supply, so (240 W) * (6 / 12 keys) with a 20% safety factor. Since the solenoids are inductors, I don't really know how to estimate their power usage (or how much of a safety factor I would need).

I'm really sorry if this is a bad question, but I don't want to order the wrong thing. I've already tested the circuit with one solenoid and eight AAA batteries (so 12 V) using a Raspberry Pi connected to these MOSFETs. Any help would be greatly appreciated!


texts: I have 8pin 4x4 keyapd, and i want to connect it to my microcontroller, I've search over the net but i can't see its pin configuration. I have a problem connecting it because of that can someone help me. I have a picture of the keypad and pin description of my controller here.


texts:
So I purchased a cheap Double-7-Segment display piece (specifically this one: https://www.amazon.com/dp/B01D0WSCJA)

To do some tinkering with. I've messed around with it manually to make sure it works and it does. However from reading the datasheet I can't quite tell if the 7219 supports SPI. The datasheet im using is: https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf

It states that the 7221 supports SPI but doesn't mention anything for the 7219. So when dealing with this with a normal MCU...do we just bitbang it specifically trying to match the timing diagram?

If that's true (and this is one I ran into when doing it manually with switches/buttons for testing) I get confused on the last timing portion. Specifically when CS/LOAD goes high and then low the last time. Do we pull CS/LOAD high on the last Data bit CLK latch? or does it have to go high RIGHT as the CLK is falling on the last data bit?

And we just need to make sure the LOAD stays high for a sufficient time before pulling it back down? (The last data bit portion always screwed me up). Im having a hard time telling how to handle that in code (Since I screwed up doing it manually, which I tend to try out to learn the datasheet first). I just can't tell if it matters when LOAD goes high at the very end if that needs to be when CLK has latched the last data bit or it needs to start going high before then. The data is latching on the rising edge correct? (of CLK)

One thing I learned when testing this was that it has to be put in Shutdown Mode-Normal operation before doing anything (Which had me stumped for awhile). Because I thought it would be accepting data when it was first started up. Is there anything else im missing on "startup" mode?


texts: Why do we have to discharge the capacitor before testing it in an LCR Meter?

texts:
LCR meters charge and discharge the capacitor to find out the capacity value (by using the time constant formula.)

I wondering why a charged capacitor(even few volts) can damage the LCR meter?
Why do we have to discharge the capacitor before testing it in an LCR Meter if the tester must charge it to find out the capacitor value?


texts: I am  using an incandescent light bulb as a heating element in an old freezer to keep my glues and finishes from becoming ruined due to extreme cold ( I live in Alaska where we experience -40 temperatures in the Winter). I want to wire in an alarm light or LED that will turn on if the light bulb burns out. Thanks in advance for your assistance. Also please understand that I am a woodworker and not an electrician other than lighting and electric plug wiring.


texts: HSPICE code to cut off supply voltage of a subcircuit

texts:
I am trying to cut off the supply voltage "Vcontrol" of a subblock "circuit" for a very short time using a pmos, a nmos transitor and a voltage source. The Hspice code is as follows:

Vpulse Pulse 0 PWL (0.0n 0 0.1n 1 2n 1 2.1n 0)
M1 Vcontrol Pulse VSS! VSS! NMOS L=1u W=6u
M2 Vcontrol Pulse VDD! VDD! PMOS L=1u W=6u
Xcircuit Nin1 Nin2 Nin3 Vcontrol VDD! circuit

Using this code, I cannot pull the voltage level inside the circuit completely to 0, it looks rather like an RC discharge curve until a certain level. It does not drop below it that level, even when I increase the pulse width.
Has anyone an idea what I am doing wrong or knows a better way to do this?

Thanks a lot.


texts: How to discover memory overflow errors in the Arduino C code?

texts:
Several times I had some suspicious outputs on the Serial Monitor after uploading code to the Arduino: like eternal output of whitespaces or suddenly cut of strings or scrambled strings.

Because there was no compile error or warning in the Arduino IDE I thought the Arduino was broken but after some tests I found out that not all kinds of errors are caught by the Arduino IDE compiler - especially when assigning variables in a loop for array structures. This seems to crash the Arduino in a short amount of time.

How can I discover errors not displayed by the Arduino IDE?


texts:
In order to double output voltage swing I was going to use two OPA548 in difference configuration, connected to opposite inputs like this:

I had one big concern about this circuit - that ground-connected resistor chains on one OP Amp input would affect the gain of the other OP Amp or introduce a bias.

Then I stumbled upon the following circuit in OPA2544 datasheet:

As you can see, it uses second OP Amp with -1 gain connected to the output of the first one.

I think the resistor matching will be much easier to achieve in the second circuit. And there is no cross-affecting resistance on the inputs. However I have a gut feeling that it could be prone to oscillation, and that capacitor looks very much like their way to deal with it.

Question 1: Are there any potential pitfalls in the second circuit?

The isolated amplifier in previous stage is single-supply and has output centered at half positive voltage. For this reason I'd rather connect first OP Amp in difference configuration, to get rid of the DC bias.

Question 2: If I connect first OP Amp in difference configuration, would the mirroring of the output still work as before?

Also, I am going to add adjustable current limit using built-in functionality of OPA548, as discussed here. My understanding is that I only need this on the first OP Amp, the second should fall in line. But since I was wrong about OP Amp behavior many times before I'd like to get a confirmation.

Question 3: Is current limiting on the first OP Amp sufficient?


texts: Computer Controlled Large Slow Stepper Motor

texts:
Can someone smarter than me help me out? I do 3D 360 degree pictorial (http://imagesolutions2.deviantart.com/art/Baltimore-Greet-Meet-March-Black-Rock-Shooter-289812655 but it requires flash) of human beings.  Currently I have a board on an extra large lazy Susan that supports 500 pounds. It works well enough and I can turn it with 2 fingers.
What I want to do is add a stepper motor with computer control. I would like to have a simple plug and play motion control board (like on http://www.pcgadgets.com/ under GadgetMaster) plus a stepper motor. What I do not know is what type of stepper motor I will need.  I need a complete rotation within one to three minutes and the ability to stop with the software’s help. I think the extra large lazy Susan will support the weight but do not know how strong I need the motor to be or what type.  Can anyone help?


texts: Why inside the always block with posedge condition, sees the signal as zero?

texts:
I'm experimenting with FPGA (I'm using the Mojo board but I don't think is essential), and I wrote some code to add a counter each time a button is pressed (the counter is assigned to the 8 leds in the board)

The code is below (button_conditioner is simply a debouncer and shouldn't matter, BTW the code of this project is here)

module mojo_top(
    // 50MHz clock input
    input clk,
    // Input from reset button (active low)
    input rst_n,
    // cclk input from AVR, high when AVR is ready
    input cclk,
    // Outputs to the 8 onboard LEDs
    output[7:0]led,
    // AVR SPI connections
    output spi_miso,
    input spi_ss,
    input spi_mosi,
    input spi_sck,
    // AVR ADC channel select
    output [3:0] spi_channel,
    // Serial connections
    input avr_tx, // AVR Tx => FPGA Rx
    output avr_rx, // AVR Rx => FPGA Tx
    input avr_rx_busy, // AVR Rx buffer full
    input button
);

wire rst = ~rst_n; // make reset active high

// these signals should be high-z when not used
assign spi_miso = 1'bz;
assign avr_rx = 1'bz;
assign spi_channel = 4'bzzzz;

wire btn_out;
reg [7:0] led_r;

assign led = led_r;

button_conditioner btn(
  .clk(clk),
  .btn(button),
  .out(btn_out)
);

always @(posedge rst or posedge btn_out) begin
  if (rst)
    led_r <= 0;
  else if (btn_out == 1'b0) // <=== THIS IS THE WTF LINE
    led_r <= led_r + 1;
end

What puzzles me is that the counter is increased only checking for the
signal equal to zero but the condition is on posedge i.e. a transition
from 0 to 1: so I would expect a check with 1'b1, what I'm missing?


texts:
What can I do to improve my test bench for testing a 64x4 RAM memory in Verilog to obtain the desired result?
I have written a test bench to test a simple 64x4 RAM memory in Verilog and it seems to "work" partially; in that it outputs the requested address data, after the subsequent request and this is after duplication of the first requested address data with the subsequent one.
To better explain it, the first request yields the correct outcome. But, the following request yields the same result as the first.
And subsequent requests will then yield the data for the 2nd request, then the data for the 3rd request and so on and so forth.
I have tried to modify the code various times, but keep on getting the same result. And after returning to this after a hiatus of 2 years, I would really like to put this one to bed.
The code for the test bench is as follows:
 module tb_Memory();
    reg   Enable, ReadWrite;
    reg   [3:0] DataIn;
    reg   [5:0] Address;
    wire      [3:0] DataOut;
    wire      [3:0] Mem [0:63];

    Memory    M0 (Enable, ReadWrite, Address, DataIn, DataOut);

    initial begin
       Enable = 0;
       DataIn = 4'b0000;
    end

    initial fork
       #2 Enable = 1;
       #5 Address = 6'h00;
       #8 DataIn = 4'b1101;
       #10 ReadWrite = 0;

       #25 Address = 6'h01;
       #26 Enable = 0;
       #28 Enable = 1;
       #28 DataIn = 4'b1010;
       #45 Address = 6'h02;
       #46 Enable = 0;
       #48 Enable = 1;
       #48 DataIn = 4'b1111;
       #65 Address = 6'h03;
       #66 Enable = 0;
       #68 Enable = 1;
       #68 DataIn = 4'b1100;
       #85 Address = 6'h04;
       #86 Enable = 0;
       #88 Enable = 1;
       #88 DataIn = 4'b0111;
       #105 Address = 6'h05;
       #106 Enable = 0;
       #108 Enable = 1;
       #108 DataIn = 4'b1110;
       #125 Address = 6'h06;
       #126 Enable = 0;
       #128 Enable = 1;
       #128 DataIn = 4'b0101;
       #145 Address = 6'h07;
       #146 Enable = 0;
       #148 Enable = 1;
       #148 DataIn = 4'b1001;
       #160 Enable = 0;
       #162 Enable = 1;
       #165 Address = 6'h08;
       #168 DataIn = 4'b0001;
       #180 Enable = 0;
       #182 Enable = 1;
       #185 Address = 6'h09;
       #188 DataIn = 4'b0110;
       #200 Enable = 0;
       #202 Enable = 1;
       #205 Address = 6'h0a;
       #208 DataIn = 4'b1011;
       #220 Enable = 0;
       #222 Enable = 1;
       #237 Enable = 0;
       #239 Enable = 1;
// Read data from memory addresses
       #240 Address = 6'h08;
       #242 ReadWrite = 1;
       #257 Enable = 0;
       #259 Enable = 1;
       #260 Address = 6'h07;

       #277 Enable = 0;
       #279 Enable = 1;
       #280 Address = 6'h09;

       #297 Enable = 0;
       #299 Enable = 1;
       #300 Address = 6'h03;

       #317 Enable = 0;
       #319 Enable = 1;
       #320 Address = 6'h04;

       #337 Enable = 0;
       #339 Enable = 1;
       #340 Address = 6'h0a;

       #357 Enable = 0;
       #359 Enable = 1;
       #360 Address = 6'h06;
    join
 endmodule

Any assistance that anyone can provide will be very much appreciated.


texts: Ground Plane Layout for Power Supply on PCB

texts:
I'm in the process of designing my first PCB. For the power supply, I have a 4.5V battery pack fed into a voltage regulator that outputs 3.3V. This section of the PCB and governing schematic are shown below:

The battery pack, voltage regulator, and the rest of the components on the PCB are connected to the same ground plane.

Is this OK or should I do something differently in the design such as separating ground for the battery pack and the rest of the circuit?


texts: PID controller slowly oscillates out of control

texts:
I am trying to tune PID controllers for my drone. There are 3 controllers, one each for Pitch, Yaw and Roll. I have gotten Yaw tuned to a reasonable amount and I am assuming the values for Kp, Ki and Kd are pretty much the same for pitch and roll.

Currently, for pitch and roll, I have Kp = 0.5, and Ki=Kd=0. I am trying to set Kp right now before I move on to Ki and Kd, but no matter what value I put there, the drone (which I have hanging from a string along its center of gravity) oscillates with increasing amplitude until it is completely out of control. Changing Kp only seems to affect how quickly the oscillations increase in amplitude.

Is this the wrong strategy to tune the coefficients or do I have the wrong test setup?

Thank you for your help.

PID Controller code: (Arduino C++)

/**
 * Calculate motor speed for each motor of an X quadcopter depending on received instructions and measures from sensor
 * by applying PID control.
 *
 * (4) (2)     x
 *   \ /     z ↑
 *    X       \|
 *   / \       +----→ y
 * (3) (1)
 *
 * Motors 4 & 1 run clockwise.
 * Motors 2 & 3 run counter-clockwise.
 *
 * Each motor output is considered as a servomotor. As a result, value range is about 1000µs to 2000µs
 */
void pidController() {
  unsigned long t = micros();
  float dt = (t-timer2)/1000000.0;
  float delta_err[3] = {0, 0, 0};          // Error deltas in that order   : Yaw, Pitch, Roll

  // Calculate sum of errors : Integral coefficients
  error_sum[YAW]   += errors[YAW]*dt;
  error_sum[PITCH] += errors[PITCH]*dt;
  error_sum[ROLL]  += errors[ROLL]*dt;

  // Calculate error delta : Derivative coefficients
  delta_err[YAW]   = (errors[YAW]   - previous_error[YAW])/dt;
  delta_err[PITCH] = (errors[PITCH] - previous_error[PITCH])/dt;
  delta_err[ROLL]  = (errors[ROLL]  - previous_error[ROLL])/dt;

  // Save current error as previous_error for next time
  previous_error[YAW]   = errors[YAW];
  previous_error[PITCH] = errors[PITCH];
  previous_error[ROLL]  = errors[ROLL];

  // PID = e.Kp + ∫e.Ki + Δe.Kd
  float yaw_pid   = (errors[YAW]   * YAWp)   + (error_sum[YAW]   * YAWi)   + (delta_err[YAW]   * YAWd);
  float pitch_pid = (errors[PITCH] * PITCHp) + (error_sum[PITCH] * PITCHi) + (delta_err[PITCH] * PITCHd);
  float roll_pid  = (errors[ROLL]  * ROLLp)  + (error_sum[ROLL]  * ROLLi)  + (delta_err[ROLL]  * ROLLd);

  // Calculate pulse duration for each ESC
  pulse_length_esc1 = constrain(holdingthrottle - roll_pid + pitch_pid - yaw_pid, 1000, THROTTLE_LIMIT); //holdingthrottle = 1400, THROTTLE_LIMIT=2000
  pulse_length_esc2 = constrain(holdingthrottle + roll_pid + pitch_pid + yaw_pid, 1000, THROTTLE_LIMIT);
  pulse_length_esc3 = constrain(holdingthrottle - roll_pid - pitch_pid + yaw_pid, 1000, THROTTLE_LIMIT);
  pulse_length_esc4 = constrain(holdingthrottle + roll_pid - pitch_pid - yaw_pid, 1000, THROTTLE_LIMIT);
}


texts: Phone RF Module Interfacing with an Arduino

texts:
A little while ago I desoldered a 900 MHz phone and its base's RF modules and was wondering if anyone could help me to interface them with an Arduino, or just help find a datasheet.

The numbers on the base's module are:

PQLZ10006ZBM
RU0903B15JBB
SS9951
S/N:0026130F
1740M ABT

The numbers on the phone's module are:

PQLZ10005ZBM
RU0927H15JBB
SS9951
S/N:0037256A
1740M ABT


texts: How to calculate the exact delay of a delayed ON/OFF imlemented by low pass filter

texts:
I am trying to implement a delayed ON/OFF by using low pass filter implemented by a capacitor and a resistor. I can find the R,C, and cut off frequency by using calculators I found in the internet.

The problem is, I dont fully understand how the calculation works.

To be more precise, if I need a delay, say, of $$\tau = 1~\textrm{msec}$$, I can easily find a pair of R and C sizes that will give me the needed delay.

So my question is:

  Why do I need to deal with the frequency cuttoff point?

Obviously it is important, because everyone calculate it. But, I dont understand why?

(Does it have something to do with the step function of the "ON" signal?)

Thanks!


texts: Deactivating RF modulator circuit in an Amiga 1200, minimum required parts to remove, worrying about composite video voltage

texts:
I'm currently doing some work on the PCB of my old Amiga 1200. In order to play some games I want to revive it by installing a scandoubler/flickerixer that I bought to basically be able to connect it to modern monitors and add some other addons like an internal IDE to CF converter, do some retrobrighting of the case and so on.
The computer had a leaky capacitor that needed to be replaced. So I thought replacing all electrolytic capacitors would be a good idea, I've already removed any electrolytic caps, both SMD and through hole ones. And I also removed the RF modulator can, which I think didn't work even back then, and I don't think I'll ever use this computer on an old TV with an RF antenna jack anyway. But I need that space in the case to put a VGA or DVI jack there.
So I got the schematics for my revision of the A1200 from the schematics page on the Amiga wiki. And after removing the RF can I noticed that quite a few electrolytic caps are for the RF circuit, mainly AC coupling and decoupling to ground. So I thought, why adding new capacitors that basically aren't used anyway, it only adds a part that can potentially leak (though less likely if not used).
But do they really serve no purpose even with the modulator removed? Now here's the dilemma, I have quite some gaps in knowledge when it comes to electronics and I noticed something in the schmatics which made me wonder about something. The composite output CV_OUT is split at one point before C236 and C237, it goes to the RF modulator and to the composite output jack. What I'm worried about is the voltage level for the composite output. Will removing the modulator and the capacitor raise the voltage for the composite output and thus distort the signal or make it too hot? Do I need to replace R234D with a different value resistor? Does it even have an effect? Or is it only there to protect the polarized capacitor C237 from heating up if it degrades from the constant flow of DC?
Also should I remove the resistor E232R to disconnect the components E232C, C239 (already gone cause it's an elcap) and R236? Wouldn't that part of the circuit just use up power or introduce noise to the ground plane or oscillate or some other weird stuff? (I have no clue) It's certainly not needed because the modulator is gone, but if it's not an issue I'd rather not desolder those components.
Here's the relevant section of the schematic:


texts:
I tried to build a circuit as in picture below, where the LDO+MCU contains an Atmega328P, powered with an LDO:

In D3 cathode, there is a main rail supply, which can be up to 20V feeding the LDO and the MCU.
The VUSB can be 5V, if present.

In theory:
If voltage from J1 is between minimum operating voltage and 5V, I can choose from MCU to drive the PWR_CTRL. In this condition if PWR_CTRL is HIGH, the power is drained from the USB, otherwise from J1.
If voltage from J1 is >5V, I always drain from J1, due to Kirchoff laws.

In reality, this is what happens (among other issued of minor relevance):

Bootstrapping the MCU with PWR_CTRL low, such pin is at middle voltage range when in reset. This bring to a lock condition which does not let the MCU to start (so far so good), but due to this intermediate condition, could happens that the MCU actually runs with such pin high, and so starts powered fully from the USB (no good), probably due to bad bootstrapping (the pin is set only once at startup). When system is locked without starting, so with intermediate voltage on T1 gate (so ok to me) -> a bit oscillation from the USB switching supply is amplified and reversed on T1 drain -> reversed again is present somehow amplified on Q3 drain -> almost completely cut off on D3 cathode (from 300mV to 30mV peak)
When the system bootstrap with PWR_CTRL high, when at J1 with voltage more than 5.6V the USB regulator starts oscillating up to 200mV at swithing frequency of the USB regulator attached to the usb port (it is a portable charger). This oscillation is only present in the VUSB net, and almost completely absent everywhere. This could sounds good, but in this condition, when the USB voltgae is present contemporary with 20V (or other lower values) on J1, the LDO absorbs a doubled current (from 12 to almost 24mA). This at 20V end with an LDO too much hot. So I supposed that some current flows from J1 -> LDO -> PWR_CTRL -> USB -> GND. Or USB -> LDO -> PWR_CTRL -> -> GND, but this last seems impossible, due to the diodes, and D3 is reversed with 15V applied on it.

What am I missing here?

PLEASE note that the goal of the question is not to find a solution that works, but to find why this solution have such issues.


texts: How to use nodal or mesh analysis with a current source?

texts:
This is my circuit:

The task is to get \$V_0\$ using Norton's theorem. My problem here is how current sources work.
I tried to use mesh analysis first, but didn't know how to.
Then I tried to use nodal analysis. Here I short-circuited AB (for Norton's theorem) and got this with nodal analayis:

(Sorry, couldn't do it another way.)
Here I got the follow equations:
$$I_2 - I_1 - I_0 - I_3= 0$$
$$I_0 - I_5 - I_4= 0$$
$$I_{sc}= I_1 + I_5 $$
This gives:
$$\frac{V_0 - V_1}{3000} - \frac{(V1-0)}{4000} - 0.004 - \frac{V1-0}{6000}= 0$$
$$I_0 - \frac{V_2 - 0}{8000} - \frac{V2-0}{2000}= 0$$
$$I_{sc}= I_1 + I_5 $$
and then I would solve it to obtain \$ I_{sc}\$. But I don't know if I'm using nodal analysis properly. I'm looking the way to use mesh and nodal analysis for Norton's theorem in this circuit.


texts:
I am designing a WiFi based home automation module and for that I have a regulated power supply which has rating as follow 18V @ 1A. Some device is connected to that which draws around 700mA of maximum current at 18V.

I need to attach ESP12 WiFi Module to it as well. I have checked the ESP12 datasheet it doesn't require current more than 200mA, but supply has sufficient current to drive ESP12.

Now my question is what is the most reliable and efficient way to power ESP12 module from the power supply I have (18V@1A) ?

In my opinion, a dc dc converter like LM2596 or MP1584 or MP2307 or ST's L7980 are some of the decent dc dc converter IC which can solve the purpose. They can provide decent current and has wide range input as well.

But I have read that, a good 3v3 linear regulator fed from, say a 5v supply provides more reliable results than a 3v3 switched-mode supply. For example LM1117 which produces 3.3V

Also, I read that these converters occasionally reset themselves down to about 1 V output!

If I go with above DC DC converters which one I should go with, all has different switching frequency and almost same output current. Any recommendation on that?


texts: What is the best metal to use for lead acid battery cables?

texts:
I purchased an AGM lead acid deep cycle battery, inverter and solar panels. All of the provided cables connecting these devices were made of thick copper.

I also have Goal Zero Yeti 400 lead acid battery which has a built-in inverter. I wanted to chain this to another AGM battery using its mini Anderson plug port. I went to an electrical shop and they gave me what I needed to chain the batteries and it’s all working fine. The cables that they gave me for connecting the chaining port to the terminals on the second battery were much thinner cables made of a silver coloured metal. What metal is this likely to be? The copper cables are a lot more expensive per metre and look much more robust. Are the thinner cables satisfactory or should I be using the thick copper cables for this purpose?

UPDATE:

I can confirm that the wire is tinned copper 5x3.2mm (WxH), PVC insulated, maximum temperature 80°, rated current 7.5A, stranding 24x0.2mm, diameter 1.9mm, AWG 18. It chains the 2 batteries via a 45A Anderson powerpole connector set. The length of cable between the 2 batteries is 2m.

The purpose of my question is to prevent a catastrophe (such as a fire) and I am trying to quantify the capability of this setup. What are the quantitative limitations? Am I on the edge or well within safety limits based on the information I have provided? It’s working well so far but want to avoid any surprises later on.


texts: Shortcut method to find slip in induction motor

texts:
A 4 pole 50 Hz induction motor is running at 1470 rpm. What is the slip value?

Solution - My attempt:

Slip S = \$\frac{N_s - N_r}{N_s}\$

Also \$N_s = \frac{120f}{P} = 1500\$

So we have,

S = .02

I am looking for shortcut to find slip? As in objective exams we have lesser time to solve questions.


texts:
The default for the Arduino A/D capability is a 5v reference.  Given the 10-bit A/D converter, this is 4.88mV per number from 0 to 1023.  The Arduino also supports setting the analog reference voltage to 1.1V, giving an accuracy approximately 5 times higher.

I wanted to try increasing that further.
The Arduino has an internal 32k ohm resistor on AREF, so I connected a 1M ohm resistor to Vcc.  The voltage reads 0.16V, but then A/D converter doesn't work.  Presumably there is a lower limit.  With 100k, it works, but the reference voltage is more than 1.1V, so there isn't much point.

Is it possible to set the reference voltage to less?


texts: How can I persist data onto the Netduino?

texts:
Mainly, I want to persist data onto the onboard Netduino memory (if there is any?) without hooking anything else up.

The idea is that I either read the data back in the next time the Netduino is plugged in (for settings), or read the data when it's plugged into a computer (for analytical data). Specifically data from sensors like temperature, ambient light, GPS Position, xyz orientation, etc.

I know there is the Netduino Plus, which has a MicroSD slot to store data via System.IO, but I have a regular Netduino :(


texts:
I need a coil antenna for a small car module which takes its input from my cellphone and transmits it at 100MHz. I have thus far learned that I need 8 windings of 0.25 inch inner diameter. I presume I just feed the antenna output into this coil, and the other end of the coil to GND. Is this correct?

Cluebat bludgeoning is welcome, it is very annoying to spend time on making antennas that do not work.

It would not hurt to have a range of ~50 meters on this device, so it can be used in the garden as well.

Posted in EE because amateurradio is pretty silent these days, and most hams are here as well.

Edit: Coil build info came from this page. The FM device I am using is a small plugin module to my phone (microUSB), it states 50mW effect. It has a tiny coil, but its range is 50cm. Haven't measured current draw, but voltage is about 3.7-4.1, depending on charge level. Car antenna is on the roof, so there's no audiolove.


texts: How to power a 12V6A peltier device with a 14.4V battery?

texts:
How to power a 12V6A peltier device with a 14.4V battery.

My son is working on a school science project and unfortunately I have very little knowledge on electrical engineering. Please be patient with my questions.

We need to power a 12V6A peltier device to show the cool down process. We already have the heat sink and peltier theory in place, so this question is more related to the circuit handling the peltier.

1st Question

1st Test: We performed a simple test using a 6V battery pack (4 AA's) using a breadboard. We applied the lowest resistor we have of 10 ohms (to get as much from the battery pack and still control the current), in an arrangement + >> R10 >> Pelt >> -.

Results: The peltier worked at some extent, but the resistor got really hot and started burning up.

Q1.1?? Why does a small 10 ohms resistor get really hot (to the point of smelling and turning black) when supplying just 6V (4 AA's pack)?

Q1.2?? Does it make a difference to put the resistor closer to the source or closer to the ground? Our thought now is if we put the resistor close to the ground, it will handle less heat because the current is passing through the peltier first and thus the peltier consuming it. If we put it before the peliter, all the current passes through the resistor first, heating up.

2nd Question

We are going to upgrade the source to a rechargeable 14.4V 6A (that's what we have at our disposal), so we can hopefully run the test for 1 hour.

Using what we learned from ohms law, we need to drop the current from 14.4V to 12V, and limit the amps to 5, so we need a resistor of 0.48 (0.48r = (14.4v - 12v) / 5i).

Q2.1?? What kind of resistor do I need to get this right without burning the resistor?

Q2.2?? With such small resistance, does it even make sense to put a resistor? Should we just connect the peltier directly to the battery source and assume it can handle the extra voltage and current?

Thanks in advance for the help.


texts: Bottomless SIP Socket/Machine Pin Header?

texts:
I'm working on a personal PCB design project where I need to be able to remove a component easily (to swap out, etc). The component has two rows of 8 pins (standard 0.1" pitch).

At first, I designed the board where the pads were slightly staggered so that the component would "lock" in. However, I quickly realized upon receiving the fabbed PCB that the component stays in, but does not make a reliable connection. I temporarily soldered in a couple 8-pin headers and that fixed the connection issue while keeping the component non-permanent. However, the header is too tall for my needs. I would prefer the component be as flush as possible with the board.

Are there such things as bottomless SIP sockets/female machine pin headers? The component has rather long pins that I cannot cut and the typical SIP socket depth seems too shallow.

An alternative might be to make the pad holes smaller on the PCB... Would this result in a reliable connection without solder?

Thanks for any help and advice!


texts: I need to derive a lower frequency clock from the main clock and sample it in verilog

texts:
I have been successful in deriving the clock, but am unable to sample and check the results in the test bench. Attaching the code and the written test bench. Need to find a way to do away with the error->

Line 68: Target  of concurrent assignment or output port connection should be a net type.

The program-

module clk_div
#(
parameter WIDTH = 4, // Width of the register required
parameter N = 6
)
(clk,reset, clk_out);

input clk;
input reset;
output clk_out;

reg [WIDTH-1:0] reg1;
wire [WIDTH-1:0] next;
reg clk_tmp;

always @(posedge clk or posedge reset)

begin
  if (reset)
     begin
        reg1 <= 0;
    clk_tmp <= 1'b0;
     end

  else if (next == N)
       begin
         reg1 <= 0;
         clk_tmp <= ~clk_tmp;
       end

  else
      reg1 <= next;
end

 assign next = reg1+1;
 assign clk_out = clk_tmp;

endmodule

//-----------------------------------------------------------------------------------------------------

module sampling(clk_out, clk, result);
input clk_out;
input clk;
output reg [3:0] result;

clk_div inst (clk_out,rst,result);

reg [3:0] reg2;

always @ (posedge clk_out)
begin
if (clk==1'b1)
reg2[0]<=1;

else
reg2[0]<=0;

reg2<={reg2[2:0], clk_out};
assign result = reg2[0];

end
endmodule

It's test bench-

module tb1;

    // Inputs
    reg clk_out;
    reg clk;

    // Outputs
    wire [3:0] result;

    // Instantiate the Unit Under Test (UUT)
    sampling uut (
        .clk_out(clk_out),
        .clk(clk),
        .result(result)
    );

    initial begin
        // Initialize Inputs
        clk_out = 0;
        clk = 0;

        // Wait 100 ns for global reset to finish
        #100;

        // Add stimulus here
        clk=1'b1;
        forever #10 clk=~clk;

    end

endmodule


texts: Why doesn't the voltage divider equation work with this circuit?

texts:
As a shortcut to solving this problem, I tried to use the voltage divider formula on R4 and R4 to get:

\$Vx = Vo (R3/(R3+R4))\$

Then, since the same current is going through R2 and R3, I found using KCL that

\$Vx = -Vi(R2/R1)\$

I made these two equal each other and solved for Vo/Vi but I got the wrong answer.

Why doesnt the volatage divider method work here?

Correct Answer:


texts:
all

I am CS engineer, mainly dealing with massive IP(Intellectual Property) data using Helix Perforce. Hence, sometimes I have faced with difficulties about semiconductor jargon.

What is "Sub-IP"? What is the difference between general IP and sub-IP?


texts:
I'm using an MC25060V2 fan, and I'd like to switch it on and off through software occasionally (i.e. not PWM or anything fancy like that). My thought is to either put an NPN BJT or a N-channel MOSFET on the low side and control it's gate with a 5V microcontroller GPIO pin. Any reason I should choose one technology over the other (or another approach altogether)? Here are schematic representations of what I'm proposing (just logical, representing fan as an inductor and part numbers / values not important).

simulate this circuit – Schematic created using CircuitLab

I'm thinking to use something like a BS207FS in the case of a FET, or a 2N3904 in the case of a BJT.


texts: 16 x 2 LCD not displaying analog inputs fed to ATmega168

texts:
I am experiencing some problems getting a display of analog inputs(current and voltage) fed to ATmega168's A0 and A1 respectively. I believe the wiring and the program are correct since the same circuit works perfectly well on Proteus simulation.
I have even tried to display "Hello World" contained in the IDE examples but there was no display.Iam using Arduino Diecimila or Duemilanove w/ATmega168 programming kit with micro controller connected externally to a breadboard.

Here is my code:

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int relayPin =7;
int buzzerPin=6;
intled2Pin=8;

void setup() {

  Serial.begin(9600);
  lcd.begin(16, 2);
  pinMode(relayPin, OUTPUT);
  pinMode(buzzerPin, OUTPUT);
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);

}

void loop() {

  float sensorValue = analogRead(A0);
  float voltage = sensorValue * (5.0 / 1023.0)*28.35;
  lcd.setCursor(0, 0);
  lcd.print(voltage);
  lcd.print("V,");
  float sensorValue1 = analogRead(A1);
  float current = sensorValue1 * (5.0 / 1023.0);
  lcd.setCursor(9, 0);
  lcd.print(current);
  lcd.print("A,");
  float Power = (voltage * current)/1000;
  lcd.setCursor(0, 1);
  lcd.print(Power);
  lcd.print("kW");

  if ((current >=3.0 && current <=4.0) && (voltage >=90 && voltage <=120)){

    digitalWrite (led1Pin,HIGH); // blink green led

  } else {

    digitalWrite (led2Pin,HIGH);//blink red led
    delay(300);
    digitalWrite (led2Pin,LOW);
    delay(300);

  }
  if(current >4.0 && current<4.3) {

    digitalWrite (led2Pin,HIGH); // blink red led
    delay(300);
    digitalWrite (led2Pin,LOW);
    delay(300);

  }
  if(voltage >120 && voltage<130) {

    digitalWrite (led2Pin,HIGH);//blink red led
    delay(300);
    digitalWrite (led2Pin,LOW);
    delay(300);

  }

  if(current >=4.3) {

    delay(1000);
    digitalWrite (relayPin,HIGH); // activate relay for trip
    digitalWrite(buzzerPin,HIGH); // sound buzzer or alarm

  }
  if(voltage >= 130) {

    delay(1000);
    digitalWrite (relayPin,HIGH);//activate relay for trip
    digitalWrite(buzzerPin,HIGH);//sound buzzer or alarm

  }

}


texts:
I have the following problem that I need your help solving.

I have two digital input signals, let's call them D1 and D2, they are 0-5V, and max available current is 20 mA, and two output signals, let's call them O1, and O2.

So D1 and D2, must never be on at the same time, and will be controlled from a micro controler, one way would be to make sure in the code they don't switch on, but maybe it will be better if I can add a safeguard to prevent accidental switching.

If D1 is on (5V), then

O1:  12V@0.5A
O2: 0.3V@-0.5A

If D2 is on (5V), then

O1: 0.3V@-0.5A
O2:  12V@0.5A

If D1 and D2 are off (0V), then

O1: 0V
O2: OV

The transistor at the bottom is probably an overkill, as it can support up to 74A.

So using the circuit bellow I can accomplish switch the output to be 12V, at 0.5A, or up to 74A, now how can I use another transistor/(s), IC, or another solution to accomplish the safeguard.

The circuit bellow can be used to switch the line as needed, using the micro controller, I've tried this circuit and it works correctly for switching the one output, but how can I make them work together.

The circuit bellow can be used to lower the voltage to the necessary voltage required.


texts: How much sensitive to thermal cycling are passive components?

texts:
One of my boards, which contain solely passive components, may be subject to high thermal cycling (up to +/-100°C, but tradeoff down to +/-30°C is possible).

What sort of degradations can they experience from this?

It seems I need hints and leads, keywords (though an explanation for my understanding would be welcome), as I can't seem to find reliable data on that on internet (I only found a graph of the core losses in an inductor over a range of cycles), not even not-so-reliable data.

Context, if required: it's an impedance matching (including balanced/unbalanced conversion) circuit for a 169MHz dipole antenna.


texts: What is the most practical way mount this sort of module having no pins?

texts:
This module has no pins and the pitch between two pins is about 1.5mm. Eventually I want to be able to push it in a breadboard, so pitch is important and mechanical stability too.

What is the best option to mount this thing? Can I safely solder the contacts? Do I have to be aware of anything special?


texts: Is a multiplexer needed to read from memory

texts:
we need to enable a register to write into that register, which is done using a decoder.
even if we enable 1 register using decoder, given that RD(bar) is 0, all registers can still produce an output. And if all registers can respond, output would get corrupted.
so would we not need to select the output of that register , maybe by multiplexing?
is multiplexing used between output buffer and memory in this figure ? is it something else? i am not able to find on the net


texts: How to calculate voltage drop over and power loss in wires

texts:
How do I calculate the voltage drop over wires given a supply voltage and a current? How do I anticipate on voltage drop so that the final load has the correct supply voltage?

What will be the power loss?

What if I don't know the resistance of the wire but the AWG (American Wire Gauge) and the length?


texts: How to interface between SIM5360 and ATMEGA2560 by UART

texts:
Engineers.
Recently, I designed a device using SIM5360 and ATMEGA2560 based on the 3G_shield.

There is a circuit for the shift LEVEL because SIM5360 LEVEL is 1.8V.
I think the circuit is correct, but it doesn't work.
When ARMEGA2560 sends AT command to the SIM5360, SIM5360 doesn't respond.
To find the reason, I checked the voltage 2.8V of SIM5360 after POWLEY down-up(HIGH-LOW-HIGH). 2.8V is generated, but its waveform is uneven.

But ATMEGA2560 sends AT command via the Tx of UART.

Arduino code

#define FONA_RST 10
#define FONA_KEY 11

void setup() {
  // initialize both serial ports:
  Serial.begin(9600);///BLE
  Serial1.begin(9600);///TEST serial
  Serial2.begin(115200);///SIM5360
  Serial3.begin(9600);////CAN BUS

  pinMode(FONA_RST, OUTPUT);
  pinMode(FONA_KEY, OUTPUT);
  digitalWrite(FONA_RST,HIGH);

  delay(20);

  digitalWrite(FONA_KEY,HIGH);

  delay(200);
  Serial1.println("POWKEY lOW");
  digitalWrite(FONA_KEY,LOW);
  delay(2000);
  digitalWrite(FONA_KEY,HIGH);
  Serial1.println("POWKEY HIGH");
  delay(1000);
  digitalWrite(FONA_RST,LOW);
  Serial1.println("RESTKEY lOW");
  delay(3000);
  digitalWrite(FONA_RST,HIGH);
  Serial1.println("RESTKEY HIGH");
  delay(500);

}

void loop() {

  if (Serial1.available()) {
    Serial2.print((char)Serial1.read());
  }
  if (Serial2.available()) {
    Serial1.println((char)Serial2.read());
  }
}

What's the reason that SIM5360 doesn't respond?
I'm waiting for the solution from someone.
Thank you for reading.


texts: Shallow underwater wireless sensor network

texts:
I need to make shallow (max 2m) underwater wireless sensor network.
Data payload is about 10kB/s. I know that VLF band (~3-30kHz)could be the best solutions for that, but cause of time-to-market I cannot make hardware and software from the ground.

Maybe someone could share own-self experience in this filed.
If band 100-900MHz could be enough to send 10kB/s from one device to another - from 2m underwater to over a dozen cm from water surface?
Maybe some IC for ultrasonic communication exist?
Another ideas?

Thanks


texts: How can you check battery cell noise using oscilloscope

texts:
I want to power a photodiode and it outputs current in the region of nA. I am using Rigol DS4034 oscillator but I am having noise issues generated by ground loop. To solve this I want to power the photodiode using battery cells.
How can I test noise of LiPo or 9V batteries?
Can I just hook positive and negative sides of battery to the oscilloscope using BNC and crocodile cable? Can this generate high current in the ground of oscillator?
After checking isolated oscilloscope questions asked by others, I want to test batteries without blowing the oscilloscope.


texts: Acceptable voltage difference between two batteries connecting them in parallel

texts:
Although the answer might be easy, I am a newbie and want to ask before burning my house down.

I've seen a lot of battery packs tutorials. Now I have to use my knowledge to connect two 7S packs in parallel. Now I am worried that my tools aren't the best and the voltages of the two packs might be different and cause a big current flow that will destroy something in the dual BMS. I want to safely equalize the voltages between the packs. Everyone mentions how easy it is to balance a 2 cell battery but I didn't see anywhere how to balance two xS batteries. I am thinking of a resistor across them outside the bms and leave them until they equalize, what are your suggestions and is this a good idea?


texts: why transfer function of derivative controller is \$s\$ while Laplace of derivative is not only \$s\$?

texts:
For derivative controller transfer function, it's \$K_ds\$ but the Laplace Transform of \$\frac{df(x)}{dx}\$ is \$sF(s)-f(0)\$. For example if

$$f(x) = \frac{dg(x)}{dx}$$ hence its Laplace will be

$$F(s) = sG(s)-g(0)$$

If the transfer function of derivative is \$s\$ then

$$\frac{F(s)}{G(s)}=s \Leftrightarrow F(s) = sG(s)$$

how can inverse Laplace transform of \$F(s) = sG(s)\$ give \$f(x) = \frac{dg(x)}{dx}\$


texts:
I have a long and wide power trace (0.3" x 3") that is duplicated on several layers of a PCB. For some thermal purposes, there are many thermal vias punched into the trace (See Figure below). I imagine that DC resistance increases as a function of the number of vias in this trace and would like to calculate this. I'd also like to ignore actual location and placement of the vias, and am aware some simplifications may be necessary.

Is it possible to calculate R(N_VIAS) for a single plane (with holes in it), and then parallel all planes (assuming little or no current actually goes between the planes through the vias)?
Is "no current through the vias" a good assumption for DC (or low freq, e.g., 60Hz)?
How do I get started deriving an analytic expression for DC resistance as a function of number of vias? No need to derive everything for me, as long as I can get a starting point.
If I were to import the actual layout into a Finite Element tool, what tools are recommended for this type of analysis?

Thanks in advance for the help!


texts: Choose a battery for variable speed application

texts:
I have a simulink model of an electric car supplied by an ideal source and I want to replace the ideal source with a battery model. Is it correct if I integrate the current demanded during the whole period from the ideal source to choose the capacity (Ah)?
I am kind of confused since the capacity depends on the current demanded and it is not constant.


texts: What kind of power connector do Sony VAIO laptops use?

texts: I have a Sony VAIO laptop with a loose power connector. I'm not sure if the problem is with the female or the male connector. I want to replace it. How can I find out the type of the connector so I can buy a new one and replace it?


texts: Linear power supply vs SMPS (losses in transformer)

texts:
We know that, in a power supply, there are always losses taking place.

If we have a linear power supply, the major source of loss is the core loss in the transformer.

But in an SMPS, where we have a very high frequency voltage passing through the transformer, there are two main sources of loss

the switching element, usually a Mosfet of a power transistor and
the losses in the transformer.

To reduce the losses in the switching element, in this case being the Mosfet, there are two types of mosfet's : Trench type and Lateral type.

Now, coming back to the losses in the transformer, how do we calculate the different losses in the transformer, for a particular power supply (Linear power supply and SMPS).

Also, what are the different losses taking place in the transformer, when it is connected to a linear power supply, and when it is connected to an SMPS.

Also, how do we overcome these losses.

I read at a few different places stating two different things, being :

The core losses and the eddy current losses in a transformer are proportional to the frequency of the incoming wave, i.e., the core losses are directly proportional to the frequency, and the eddy current losses are directly proportional to the square of the frequency of the incoming frequency.
Another site states that, even though we can see that, from the equation of eddy current losses, that it is directly proportional to the square of the frequency of the incoming wave, but, it actually depends on the supply voltage.

So, what are the actual factors affecting the losses in a transformer, when we are connecting it to a linear power supply as compared to when it is connected to an SMPS.

Also, how do we decide about the trade off between the losses of the two systems, so as to select a particular supply for a particular application, considering the major factors, such as cost efficiency and and the efficiency of the system, given that the size is not an issue.

(NOTE : the SMPS in the above question is an Isolated toplogy, hence the transformer.)

Also, what are the different methods that can be used to isolate  the supply, other than a transformer, if there is any better option.

Also, other than mosfet's and power transistors, (if any) is there any other switching device that can be used to provide switching to the SMPS. (which may have more or less switching losses).


texts: How to use the makefile to generate .elf, .bin and .hex files

texts:
I'm trying to use the makefile of this project to generate a .hex, .bin or .elf file and then send it to my board via st-link.
Problem, I don't understand how to use the makefile.
The author of the project says that I need to specify the firmware folder of my board in the makefile, but I don't know which line in the makefile to specify this?
Moreover, I don't even know which make command to execute to generate these 3 files.
# Sources

SRCS = main.c stm32f4xx_it.c system_stm32f4xx.c

# USB
SRCS += usbd_usr.c usbd_desc.c usb_bsp.c
SRCS += usbd_midi_user.c

# Project name

PROJ_NAME=stm32f4_usb_midi
OUTPATH=build

###################################################

# Check for valid float argument
# NOTE that you have to run make clan after
# changing these as hardfloat and softfloat are not
# binary compatible
ifneq ($(FLOAT_TYPE), hard)
ifneq ($(FLOAT_TYPE), soft)
override FLOAT_TYPE = hard
#override FLOAT_TYPE = soft
endif
endif

###################################################

BINPATH=~/sat/bin
CC=$(BINPATH)/arm-none-eabi-gcc
OBJCOPY=$(BINPATH)/arm-none-eabi-objcopy
SIZE=$(BINPATH)/arm-none-eabi-size

CFLAGS  = -std=gnu99 -g -O2 -Wall -Tstm32_flash.ld
CFLAGS += -mlittle-endian -mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4

ifeq ($(FLOAT_TYPE), hard)
CFLAGS += -fsingle-precision-constant -Wdouble-promotion -DUSE_MIDI
CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
else
CFLAGS += -msoft-float
endif

###################################################

vpath %.c src
vpath %.a lib

ROOT=$(shell pwd)

# Includes
CFLAGS += -Iinc -Ilib/Core/cmsis -Ilib/Core/stm32
CFLAGS += -Ilib/Conf

# Library paths
LIBPATHS = -Llib/StdPeriph -Llib/USB_Device/Core
LIBPATHS += -Llib/USB_OTG -Llib/USB_Device/Class/midi

# Libraries to link
LIBS = -lm -lstdperiph -lusbdevcore -lusbcore -lusbdevmidi

# Extra includes
CFLAGS += -Ilib/StdPeriph/inc
CFLAGS += -Ilib/USB_OTG/inc
CFLAGS += -Ilib/USB_Device/Core/inc
CFLAGS += -Ilib/USB_Device/Class/cdc/inc
CFLAGS += -Ilib/USB_Device/Class/midi/inc

# add startup file to build
SRCS += lib/startup_stm32f4xx.s

OBJS = $(SRCS:.c=.o)

###################################################

.PHONY: lib proj

all: lib proj
    $(SIZE) $(OUTPATH)/$(PROJ_NAME).elf

lib:
    $(MAKE) -C lib FLOAT_TYPE=$(FLOAT_TYPE)

proj:   $(OUTPATH)/$(PROJ_NAME).elf

$(OUTPATH)/$(PROJ_NAME).elf: $(SRCS)
    $(CC) $(CFLAGS) $^ -o $@ $(LIBPATHS) $(LIBS)
    $(OBJCOPY) -O ihex $(OUTPATH)/$(PROJ_NAME).elf $(OUTPATH)/$(PROJ_NAME).hex
    $(OBJCOPY) -O binary $(OUTPATH)/$(PROJ_NAME).elf $(OUTPATH)/$(PROJ_NAME).bin

clean:
    rm -f *.o
    rm -f $(OUTPATH)/$(PROJ_NAME).elf
    rm -f $(OUTPATH)/$(PROJ_NAME).hex
    rm -f $(OUTPATH)/$(PROJ_NAME).bin
    $(MAKE) clean -C lib # Remove this line if you don't want to clean the libs as well


texts: Calculating the minimum and maximum \$R_{load}\$ for a zener voltage regulator

texts:
So, I have a generic zener voltage regulator with \$R_{s}=650Ω\$, \$V_{in}=15V\$, I'm using the zener BZX55C8V2 (datasheet). From the datasheet the test current is \$5 mA\$ and the maximum zener current is \$74 mA\$. I want to find out the minimum and maximum for the load resistance so that the Zener is still regulating at \$V_{out}=8.2V\$ and without the zener breaking.

I'm wondering how exactly I should utilize the datasheet to figure out the values for the load.


texts: How to properly calculate current of a variable capacitor?

texts:
So the formula i(t)=CdV/dt works for a constant value of a capacitor, but in a variable capacitor, i found the next formula on another site

i(t)=C(t)*dV(t)/dt + V(t)*dC(t)/dt

Is this formula correct?

How do you get the new formula from the previous one, with implicit differentiation?

In which specific book can i find this information?

Thanks for the future answers.


texts: How do you design a bare-metal Zynq PS-PL system with an accelerator/coprocessor in the PL?

texts:
I am new to FPGA development and am trying to build a simple system using the Zynq SoC (on the Zedboard). It will consist of an IP block generated using Vivado HLS which will accept arrays of data, operate on them, and produce result arrays. A bare-metal application (running on an ARM core in the Processing System(PS)) will use the IP block (in the Programmable Logic(PL)).

I am not sure how to manage data-transfer between the PS and the PL. From the information that I have seen so far, one option is to include AXI Stream interfaces on the IP block and use an AXI DMA to transfer data to and from memory.

-For such a design, what would the programming sequence in the bare-metal application look like?

-What would the structure of the C code used to generate the IP be (for the IP to be able to accept and return arrays using AXIS ports)?

I would really appreciate any pointers or links to relevant information.

Thank you.

{Edit (23/05/16): Neural network training is the specific application I am working on. So the input arrays to the IP block are network parameters. They are processed, updated, and returned. This involves multiply-accumulate operations on the rows of the arrays. And network training involves many such "input-process-output" iterations. This can of course be done on a processor (it is actually done using GPUs in most cases) but doing it on an FPGA could be faster and more energy efficient.

There is no need for any user I/O. (I will just be printing to a terminal for debugging purposes.)

I was mainly looking for some guidelines/pointers on managing the interaction between the processor and the IP (designing the interface in HLS and the programming sequence for the bare-metal application) as well as any suggestions on other approaches that I could take (alternatives to using the AXI DMA and AXIS).

(I am using the Xilinx Vivado Design Suite and Xilinx SDK. The design flow would be:
    1. Create and export IP using Vivado HLS.
    2. Design PS-PL Zynq System using Vivado IP Integrator.
    3. Export hardware to Xilinx SDK and write bare-metal application in SDK.)}