texts:
Follow on from : earlier post

Below is an LTSpice simulation of an MC34063 step up (5v to 9v) circuit.
As you can see, this particular circuit is working correctly, and delivering about 300mA.

The N-Channel FET used is rated at 6A continuous
Raising the load to about 500mA the circuit still just manages 9V, but at 1A
I get this :

The inductor I'm using is rated at 15A.
What is stopping the circuit from delivering 1A at 9V?

below is the waveform
waveform
Green - output voltage
Blue - voltage source/drain


texts: How to figure out reason for last reset on MSP430?

texts:
There are a number of possible causes for a microcontroller to reset itself, for example:

brown-out or power-out
watchdog timer
reset initiated from software (to programmatically enter bootloader, etc)

I'm wondering if there is a way to figure out, when a microcontroller starts up, what was the reason for the last reset - perhaps using some kind of flags that survive reset.  In particular I'm on the MSP430F5xxx series.

The use case is to avoid a cycle where some part of the self-test routine (for example) causes a glitch on the power rail, and then the micro resets itself and runs the self test again, repeat (until it succeeds).


texts:
I don't know where else to ask this question and I think this is the best place so I'll ask here.

I'm making a remote controlled boat that uses two DC motor controlled by a L293D motor driver chip. It takes power for driving the motors from 4.5 to 36 V. To supply this, I'm planning on using two 9 V batteries in parallel. Would this be fine, or is there a better option like 4 AA batteries in a series?

I don't know much about batteries and the like, so there might be something that would make this not a good idea that I don't know about, so that's why I'm asking here. Thanks.


texts: implementation different than simulation

texts: I have to build the below series RLC circuit , and output its bode diagram using NI ELVIS Instrument Launcher. It is for a bandpass filter, so the output is taken across the resistor. Before proceeding I simulated the circuit on Multisim, and it worked perfectly, however the implementation didn't give me quite the expected results. I measured the two cut-off frequencies, and they had high percentage errors. Any reason as to why this could happen? Does the software assume certain things?


texts: Choose of components for a rgb led strip

texts:
I'm pretty new to electronics. I have some basics from my student life but it is not much.
I want to progress in it and the best way for me is to do it with a project.
Anyway, my goal is to power a RGB strip (as many of you from what I've read online) only using batteries and resistors.

The strip were given to me, I don't know any of the specs or refs

For now, here is what I found:

My RGB Led strip is powered with a 5V supply (written on it)
There is one input (5V) and 3 outputs (R, G and B).

From the USB power supply given, I ran some tests with the provided IR remote and a multimeter to get a table for the corresponding color intensity with the Intensity and the Voltage to put.

Those tests were ran on a 45 LED strip (5050 if I look at the size of the LED)

Now, with this table (at the bottom), I'm capable of getting any color's (or close color) voltage and current.
For example, if I want #5F9FBF, I know it is R(95) G(159) B(191)
So for the 45 LEDs of my strip, I need

Red at 1.69V and 0.26A
Green at 2.33V and 0.21A
Blue at 3.76V and 0.44A

For this, I thought about adding resistors to the circuit.

simulate this circuit – Schematic created using CircuitLab
I'm thinking about using 3 batteries of 1.5V in series, I think the brightness can't go full but anyway, I guess it will works as the only time I need 5V is when I want full brightness on a color
Given, the input of 4.5V (3 x 1.5V) and UR = E - Uled, my guess is

URred : 4.5V - 1.69V = 2.81V (with 0.26A)
URgreen: 4.5V - 2.33V = 2.17V (with 0.21A)
URblue: 4.5V - 3.76V = 0.74V (with 0.44A)

If I go back to my current section and use U=RI I found

Rred 2.81/0.26 = 10 ohms
Rgreen 2.17/0.21 = 10 ohms
Rblue 0.74/0.44 = 1.7 ohms

First thing first, I'm not even sure this is correct... For example, 1.7ohms does not exist, so I need to get close, maybe 2ohms, but this will change the current (and the voltage)... so all the maths are wrong here... I'm a bit lost
And the second problem is power.
Given the P=UI (P=RII) formula, with red as example my resistor should handle
PRed 10 * 0.26 * 0.26 = 0.616W
But basic resistors can only handle 1/4W, so I need a "bigger" resistor, don't I ? One that can handle 1W for example. The other solution is to add multiple R in // to divide the current to get 0.250W max per R I guess
Anyway, if anyone has a clue because I think I am in a kind of snake loop with the calculations here...

Here is the table I found using the multimeter in my led strip

Red
Uled (V)
iStrip - 45Led (A)

256
3,98
0,71

224
3,56
0,63

192
3,12
0,54

160
2,66
0,44

128
2,2
0,35

96
1,69
0,26

64
1,15
0,16

32
0,6
0,08

0
0
0

Green
Uled (V)
iStrip - 45Led (A)

256
4,37
0,62

224
4,04
0,54

192
3,66
0,46

160
3,25
0,39

128
2,79
0,29

96
2,33
0,21

64
1,79
0,14

32
1,25
0,06

0
0
0

Blue
Uled (V)
iStrip - 45Led (A)

256
4,58
0,59

224
4,2
0,51

192
3,76
0,44

160
3,27
0,36

128
2,76
0,29

96
2,21
0,21

64
1,63
0,14

32
1,03
0,06

0
0
0


texts:
I'm working on a power supply for my camera (powershot SX150IS) in order to leave it on for long periods of time. So I took an old power ATX power supply and connected the 3.3V output to the camera, but it never powered on, not even in playback mode. Every time I tried to power the camera on, the power supply shut down.

The rated current for the 3.3V output is 15A and, according to the specs of the ACK-800, which is the power adapter for my camera (see http://www.cnet.com/products/canon-ack-800-ac-adapter-kit/specs/), the current the adapter drives is 1.5A. So, the power supply wasn't even able to drive 10% of the rated current for the 3.3V output.

Do you guys know why this is happening?


texts:
I'm trying to understand how to dump a flash device myself without using a universal programmer.

I have this chip S29GL032N90TFI040,
I also have TSOP48 socket
The datasheet specifies the table of the device bus operations (page 17):

In SPI flashes that I dumped before the datasheets of the SPI flashes had its specific and easy to understand command for reading data, for example [0xB] [A1] [A2] [A3] [Dummy byte] [Dummy byte] [Dummy byte], after this command the SPI flash would spit out its contents from address [A1][A2][A3] until CS# was LOW, After looking in the datasheet of S29GL032N90TFI040, I didn't see the commands that are needed to be sent in order to retrieve data from this flash, only the table of device bus operations, which specifies the device bus operations pins but not the command that is needed to be sent or the ordering (there is a read operations timing image in page 65, but it is still not enough information for writing a programmer for this specific chip.)

My questions are:

How can I find out the specific command that is needed to be sent, the order of the command, the number of bytes that will be retrieved from the input address?
What Arduino like board is recommended and have enough pins to program TSOP48 chips?

Note: I know there are Universal Programmers that will make my life easy, But I don't like easy.

Thanks.


texts: PIC18 USART Interrupt for reception, doesn't trigger

texts:
I have set up the Enhanced USART module for a PIC18F4331 and have been trying to do a loop test. I am using MPLABX, programming in XC8, using Pickit3 for debugging and monitoring serial pins with an oscilloscope.

Without going into much detail, this is basically what I am doing:

1) In the main function, USART is transmitting values (solely for debugging)
2) Receiver Interrupt is set, when triggered it stops transmitting and jumps to ISR

This is what happens when I connect TX to RX:

1) USART transmits fine.
2) The Rx register receives a byte and sets flag RCIF after the first STOP bit, but the ISR does not trigger. Therefore the RX register overruns because it hasn't been read. The program does not go in the ISR at all.

I am thinking that the problem might be that it may not be possible to trigger an interrupt by receiving a byte while USART is transmitting? They are independent though so I don't understand why I couldn't do it.

My code:

int main(int argc, char *argv[]) {

//***********************Initializing Values****************************//
unsigned int ResultADC, FLAG;
unsigned char temp, idle; //High Byte result store, 8bits long

//***********************ADC and SPI Settings****************************//

Initialize_control();    //Initialize Control Configuration Pins
InitializeADC();         //Initialize ADC in Continuous Mode
USART_initialize();      //Initialize USART module
InitializeMasterSPI();   //Initialize SPI module

//***********************ADC Capture and Output to SPI******************//

  while(1){             //While ADC buffer has something

    //Enable transmission
     TXREG = 0xff; //Debugger

     while(!TXSTAbits.TRMT);//wait while TSR is full

     TXREG = 0x0; //Debugger

     while(!TXSTAbits.TRMT);//wait while TSR is full

  }
  return 0;
}

//////////////////INTERRUPT SERVICE ROUTINE/////////////////

static void interrupt isr(void){

//Disable Interrupt
PIE1bits.RCIE  = 0;

int count;

//Read USART data
//PIR1bits.RCIF;//Data has been passed to RCREG
RX_Data[count] = RCREG; //Read RX register
count++;
//Reading RX_data clears RCIF, how to read more than 1 byte?

if (count==3){
    //Use data for control
    Control_Arduino(RX_Data);
    count = 0;
}

PIE1bits.RCIE  = 1;
}

//**********************Functions****************************//

void USART_initialize(void){

//Configuration TX and RX pins
TRISCbits.RC6 = 0; //TX output
TRISCbits.RC7 = 1; //RX input

//TXSTA: Transmit Status and Control Register
TXSTAbits.SYNC = 0; //Asynchronous mode
TXSTAbits.TX9 = 0; //8bit transmission
TXSTAbits.BRGH = 1; //Set HIGH Baud rate
TXSTAbits.TXEN = 1; //Enable transmitter
TXSTAbits.SENDB = 0; //Disable break

//RCSTA: Receive Status and Control Register
RCSTAbits.SPEN = 1; //Serial Port enabled
RCSTAbits.RX9 = 0; //8bit reception
RCSTAbits.CREN = 1; //Enables Receiver

//Test bits
//    RCSTAbits.FERR = 0; //No framing error, cleared by reading
//    RCSTAbits.OERR = 0; //No Overrun error, cleared by clearing CREN
                      //Disable receiver CREN 0

//BAUDCON Control register
BAUDCONbits.BRG16 = 1;  //16bit baud rate generator
SPBRG = 0xCF;           // Set to 19200 baud rate, 12Mhz, High Speed, BRG16
//Test bits
//    BAUDCONbits.RCIDL = 0; //Receive in progress

// USART interrupts configuration
RCONbits.IPEN   = 1; // ENABLE interrupt priority
INTCONbits.GIE  = 1; // ENABLE interrupts
INTCONbits.PEIE = 1; // ENable peripheral interrupts.
PIE1bits.RCIE   = 1; // ENABLE USART receive interrupt
PIE1bits.TXIE   = 0; // disable USART TX interrupt

}


texts: EAGLE share package variants between different libraries

texts:
Is it possible to share package variants between different libraries because
I'm not a huge fan of copying the same package variant over and over again.

Example:

ref_packages.lbr
    defines SOT23 package
texas_instruments.lbr - needs ref_packages.lbr to work!
    uses the package defined in ref_packages.lbr

When the SOT23 package in ref_packages.lbr is changed, it is also "changed" in texas_instruments.lbr.


texts: Difference between Rated Load & Max. Switching Voltage on Relay Contacts

texts: Under the 'contact ratings' of a relay datasheet, there is a row for rated load, which specifies a 10A 30VDC load on both NO and NC contacts. There is another row which is the max. switching voltage and this is specified as 250VDC (max. switching current is 10A). What is the meaning of these two specifications? Which voltage am I able to apply across the contacts for operation?


texts:
In my car I have power converter for the cigarette lighter. This power converter has some 3 USB ports and 2 cigarette lighter ports. I have devices plugged into the cigarette lighter ports. One of which is to power my phone (is left in car overnight).

If the phone has enough power it will power the other devices plugged into the power converter, when the car is turned off. Power is not coming from the car. I know this for certain as the other devices will immediately turn off when i remove the charged phone.

I assume the power from the phone is leaking through the USB cable and into the other devices. This is a problem as I don't want the phone to discharge over-night.

I think putting in a diode on the 5V wire for the USB cable for the phone will do the trick. What requirements do I need in a diode to ensure that I don't cause damage to my phone and allow it charge as normal as possible?


texts: How many lines of C code (average) corresponds to 1Ko programmable memory?

texts:
I'd like to know how many lines of C code in average corresponds to 1Ko programmable memory for PIC18F microcontrollers

Or how many lines of assembly instructions ?


texts: What parameters to look at when comparing capacitors of same value but different package size

texts:
I'm looking at a capacitor that will be used as an output cap on a buck regulator. Looking at what I think is the same exact cap from TDK (10uF, 16V, X5R) but in an 0603 and an 0805 package.

Beyond those parameters, is there something else I should be paying attention to that's likely to change as package sizes change? I can't find ESR or ESL values in either, other than a nominal "low ESx" statement in the description.

In general, what starts to give as package sizes decrease for capacitors?


texts: Flash IC memory mapping for two application

texts:
I am referring biomedical instrument where I need to save result of a reaction in a flash IC ( SST25VF020 2 MBit serial flash ). In the same application, I am using Voice Guide Assistant where I need to save voice in memory to play it while operating instrument.

My query is, can we use single flash IC ( for eg. SST25VF020 or so ) for storing result and voice at the same time? Is there any issue while implementing it in hardware/software? Is this logically possible?

(I can increase memory size of IC by choosing higher size chip, it's not an issue)

Thank you.


texts: Dual channel current sense circuit design

texts:
First of all if this isn't the correct place for a post such as this please tell me where I should post it. I need a circuit that will allow me to measure the current of two solenoid operated pump modules (Device1 and Device2). The impact of the circuit on the signal from the controller to the solenoid should be negligible. The signal for each "channel" can be as high as 16 volts at 20 amps in the extreme worst case (and is limited by the main power supply) and is generally at or below 13.5 volts and less than 9 amps. For each device I need two outputs (signals), so 4 total. All signals are voltages and are being sent to a data capture device. Signal 1 is the raw voltage at the device input. Signal 2 is a voltage representation of the current (similar to the output of a traditional current clamp). The data capture device is capable of voltage inputs only and has an input limit of 60 volts. The voltage for signal 2 should be proportional to the current (ideally 1 volt = 1 amp with mA resolution).

Again if this isn't the right place for this then point me in the right direction. I'm competent enough to assemble components if given a parts list and a schematic, but am completely ignorant of the theories behind electronic components and circuit design. I'm willing to consider alternate solutions but the inputs and data logging equipment are not changeable and the data for signal 1 and signal 2 are requirements (@ 10k samples/second). Thanks for your time and constructive input.


texts:
On the GPIOs of some ARM-based microcontrollers, you are given a register BSRR which you can write to to perform atomic changes in a ports output register.

For example, to set Port A Bit 5 to a 1 you simply do GPIOA->BSRR = (1<<5)

This alleviates the problem of atomicity so you do not have to perform a read-modify-write sequence. Without the BSRR you would have to do GPIOA->ODR |= (1<<5).

How does the BSRR register work under the hood? Does it clear itself so that the next time you want to set a bit there isn't the previous bit still lying around.

If i wanted to set bit 2 and later on set bit 6 i can do first GPIOA->BSRR = (1<<2) and then later on do GPIOA->BSRR = (1<<6) but won't bit 2 still be set from my previous call?


texts: Toggle "on/off" with small resistance change

texts:
I'm trying to make a small model car stop when it crosses a black line on the ground. My idea is to use a photresistor + some magic to do the trick. I'm here for the magic part...

The resistor I have at hand changes its resistance between 5 and 8 kiloohms between "bright" and "dark" underground. I also have some BD137 transistors. The car is powered by a 9V battery pack and the motor draws 100 mA.

What is the easiest possible circuit to completely stop the motor at "high" resistance and make it run at full speed at "low" resistance?


texts: Something wrong with open USB circuit, electrostatic problem

texts:
I faced a strange problem with the following circuit.

I'm using some buck converters and an Arduino. The buck converter (Vout = 5.25v) is for a USB charger (up to 2 Amps). Well, I think the circuit itself has no problem, but in fact there is a problem due to electrostatic charges.

Let's suppose that I touch the open-state USB cable with some electrostatic charge (caused by friction of my clothes). Then the Arduino's voltage is influenced in this situation. I coded the Arduino to respond to the voltage fluctuation of the circuit and the Arduino tells me the fluctuation has occurred. If the electrostatic charge is big enough, Arduino reboots!

I know the electrostatic charge causes the problem, but how can I cease the problem? Some intuitions for the solution will be appreciated. This just occurs very few times but I don't like this. If I can do, I want to solve this problem.

USB is used with Dedicated Charger Port (DCP) mode.


texts: Detect rotation direction of a rotary switch

texts:
Posted recently this: https://electronics.stackexchange.com/questions/210904/detect-rotation-of-a-rotary-switch

But I want to be more precise about what I'm trying to do.
I have a 1 pole 8 position rotary switch with continuous rotation, and I need an interface (a micro?) to send pulse A for each click clockwise, pulse B for each click counterclockwise. Cannot use a rotary encoder as they have a low activation torque, and I need a strong "click" feeling. Any way to achieve this?


texts:
I am confused as to how I should be connecting this design since this LED LTW-E670DS since it has 4 pins.
How do I connect it?
Pin 2 is Anode and 1 Cathode but 3 and 4?


texts: Lead acid batteries replace by lithium in a golf cart

texts:
I am converting a golf cart from lead acid to lithium batteries, and when the accelerator is pushed hard from a standing stop, the cart kicks out.  I think I need a voltage regulator that limits the max voltage to 51 or so volts (it's a 48 volt system).  Or has anyone else had experience with this conversion?
This was my thinking.  When the cart is stopped, even for a minute or two, the batteries recover voltage to their current max - as high as 56 volts.  As you progress on a normal run the voltage drops, e.g. – going up a hill it drops from 53 volts to 48 volts and everything is working fine.
If, after a stop, you press the accelerator all the way it hits the system with the full, recovered voltage – 53 volts.  If you are gentle, the voltage is lower and the system likes it.  That is why I think a voltage regulator, in series, might work.
I tried one of the new lithium carts in our fleet and if you press the accelerator all the way, it takes maybe 5 seconds for the cart to feel all the power.  On my cart in AZ with the lead acids, if you push it hard the cart jumps to full acceleration right now.


texts:
I am modeling the output voltage of an AC generator and I am using/I chose the following specifics:

Number coil turns = 300. This is 1.02 mm gauge copper wire, so knowing the density of copper, I calculated the weight of the coil being 4.39 kg.
Magnetic strength field = 1.24 T. Here are the specs for the magnet
Area of 0.1 m\$^2\$
The rpm will be 45

I want to know if the following variables I chose make sense.

Furthermore, I plugged these numbers into the output voltage equation

$$ε = NBAωsin(ωt)$$

to get a voltage value of 525.9. Is this number reasonable??


texts: Arduino ECG and GPRS shield compatible? And working with battery?

texts:
I'm new to this whole arduino development things, so please dont punch me for my questions smiley
But arduino looks really great, so I want to increase my knowledge and start with a projekt:

I want to create an ecg (electro cardiogram) device, running with battery and sending data via gprs to a webserver:

My basis would be an arduino ( i dont know which, but i think smalles possible (tip which would work? smiley )) with 2 shields:

GPRS Shield V.2
http://www.seeedstudio.com/wiki/GPRS_Shield_V2.0
OLIMEX - SHIELD-EKG-EMG - BOARD,ECG / EMG ARDUINO SHIELD
http://at.farnell.com/olimex/shield-ekg-emg/board-ecg-emg-arduino-shield/dp/2144343
http://www.farnell.com/datasheets/1641097.pdf

As battery i would like to use some high capacity mignon/aa rechargeable batteries (4x1,2 Volt with 2700mAh each) .

Do you think this would work?
Im not very good in electronic calculations, and I would like to ensure that i dont waste much money for components which wont work together. I also read that some shields cant work together, because the use the same software/hardware serial ports.. But I dont understand the manuals and which ports are when used or how..

Can you maybe help me? :)
Thanks a lot!


texts: TRIAC Failure - Short between input and gate?

texts:
I am having a spot of trouble with a TRIAC (T2535-600G) whose gate is triggered by a PIC microcontroller (PIC12F1501)through an opto-isolator (MOC3063SM).
Normally, the TRIAC, labeled U2 in the diagram below, will pass 120VAC to my output, labeled HEATER_OUT, when the gate is triggered if measured with respect to AC neutral. Recently, I had one that was wired incorrectly. From what I was told, since I was not there when it happened, was that the AC neutral was connected to HEATER_OUT pin by accident. Once the wiring was corrected, there was a constant 68VAC being supplied to HEATER_OUT without any output from the PIC to the opto-isolator.
My initial thought was that the TRIAC had simply failed in a manner that allowed half the voltage to pass through it without a signal to the gate due to a short between 120VAC hot and neutral through the TRIAC. I was surprised however when I cut the output of the TRIAC from the circuit and was still measuring 68VAC at the output (HEATER_OUT). At this point I disconnected the connections between the PIC and the opto-isolator but still no change. Only until I severed the connection to the gate of the TRIAC from the circuit did the voltage finally diminish to 1VAC.
Is it possible that the 120VAC input is somehow passing from the input of the TRIAC through the gate???
Unfortunately, I have been unsuccessful at replicating the failure after multiple attempts. Also, while wired incorrectly, the circuit was hipot tested at 1500V with 1 second ramp up, dwell, and ramp down checking for 4mA leakage current or greater which it passed.
Any insight to help understanding what happened to my TRIAC would be greatly appreciated! Thanks for your time.


texts: How to interpret the output of a 3-pin computer fan speed sensor?

texts: I have a 3-pin 12 V computer fan and I want to interpret its speed sensor output. At the yellow wire I get something that looks like pulse-with modulation. How would I interpret the output without actually connecting the fan to a computer?


texts: How can I prevent reverse current in this circuit?

texts:
I learned that you can use an op amp to do differentiation. Further that you can chain them to do higher order differentiations.

So I tried simulating this on LTSpice. A single differentiator circuit works as expected. But when I chain two together, I get feedback that leads to incorrect results (with regards to the math).

How can I connect the two differentiator circuits without having this problem?

Here is my circuit schematic:

The function I am analyzing is \$f(x) = x^2\$.
Its first order derivative is \$f'(x) = 2x\$.
Its second order derivative is \$f''(x) = 2\$.

Here is what the output looks like when I directly connect the two components:

When I stick a diode there, the output is better, but not ideal. Below is an image. My problems is with the 0.2 seconds it takes for \$V_{\text{out2}}\$ to reach its expected value of 2V. I think the delay is due to the intrinsic potential barrier of a diode. But is there anything I can use that has no 'dead zone'?


texts: Unable to reduce noise and no proper sine wave is generated using LM358

texts:
We have planned to make 30 kHz pure sine wave using LM358, by the use of a Wien bridge oscillator, I have made a Wien bridge oscillator connection in LM358.

I have calculated the frequency by using the formula f=1/2*3.14*RC, where C=0.01 uF and R=530 Ω (std resistor 560 Ω is used in the circuit).

But there is more noise  and no proper sine wave.  Please help me to solve this problem.

I have attached the waveform measured by a DSO.

Supply voltage is +6V and -6V.


texts:
I thought I'd brush up on some of my knowledge by going over some of the basic building blocks and I'm at the diode. I've never had to "really" know anything about a diode's current, and if in school we did anything, it was probably a small section and bjt's and fets overshadowed the diode.

I know that the current through a diode is non linear, given by

\$I_d = Is(e^{qV_d / nkT} - 1 ) \$
where \$ kT/q = 25.86mV \$

\$I_d = Is(e^{V_d / 26mV} - 1 )\$
where \$V_d \$ is the voltage drop across the diode.

But what does this really mean ? If we have the following circuit

simulate this circuit – Schematic created using CircuitLab

When I do a DC sweep for V1 from [0,10], the current seems to be linear. It appears to be  \$ I_d = \frac{V_1-V_d}{R_1}\$ ie, related only to the resistor.

Where is this non linear current defined by the equations above ? Am I missing something ?


texts: How to step-down voltage without a transformer?

texts:
Say I am running a line from a transformer to a distribution panel that doesn't quite need 240V but less. How do you go about creating the required voltage drop?

I was asked this in a interview for my internship and he told me the answer to that is thicker ground wire?


texts: How to write Boolean Algebra of a CMOS circuit?

texts:
How to write the boolean algebra of this circuit?
I am confused with the inverter in the middle .
Any help will be greatly appreciated!


texts: Updating Multiple Ports on 8bit AVR in Single Cycle

texts:
On the 8bit Atmel AVR MCUS (specifically mega and xmega series), is it possible to simultaneously modify multiple ports in a single instruction cycle?

For example, I have a 512kB RAM chip which requires 19 address lines. This requires multiple 8bit ports to adequately address. Is it possible, in a single instruction cycle, to set all 19 bits to a specific address? I understand I can set the high bits, then the middle bits, then the low bits and increment the low end port to step through the RAM however the mapping may not be sequential. Can I, again to take a random example, have the RAM place the 1st byte, then the 510th byte then the 294th byte on the data bus in three sequential CPU clock cycles?

Thanks!


texts: Beyond Arduino: AVR Programming Book for Beginner

texts:
I've been using Arduino for awhile and now I'm interested in programming AVR microcontrollers without the Arduino framework.

What is a good reference for beginning AVR programming in C? A book is preferred, but online resources are also welcome.

I'm looking for something that will start with basic setup on a *NIX platform, start with examples and cover a number of core topics. Something similar to K&R, but oriented toward microcontrollers would work well.

(Related question: Linux / Mac AVR Programming Suite?)


texts: Dimmable LED lights flashing on full power

texts:
This is quite specific but i don't know another site to ask this on.

Symptoms:

I have a driver that has 3 settings, off, dim and full. The lights turn on and work on dim but on full they flash.

Light specifications:

24V dimmable, constant voltage.
The lights flash when at full 5m length and when cut down to 1.5m.
https://www.amazon.co.uk/gp/product/B018UHCEZ8/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

Driver specifications:

24VDC, 0~1.25A, [30W max] edit: 10w max
(https://d2ydh70d4b5xgv.cloudfront.net/images/a/1/brand-new-ikea-ansluta-electronic-transformer-white-24v-led-power-sup-502-883-39-dc26b7becc947853aea78ec4ebc8c408.jpg) this is not the same as my specs

Any help would be appreciated.

Edit:
I apologise i made a mistake, the specs on the driver is 10w max


texts: Feedback loop-gain(beta) derivation for the inverting amplifier?

texts:
During my study on the negetive feedback concept, i observed that the beta derivation for the non-inverting amplifier is so evident which is just a potential divider voltage.But i am unable to find the same for the inverting amplifier.

Could somebody get the beta(feedback gain) with the derivation exempting the approximations for the below shown simple inverting amplifier.


texts: Can I use an extended power cord for washing machine?

texts:
I have heard that the usage of a power cable to a washing machine is not recommended, however I do not have other option for connecting as I have no bathroom power outlets.

What is the general problem with using a power strip, you can use it on various things, but not on washing machine as it seems to me. Is it because of around 2.5 kilowat potential max (which you barely ever hit it unless you wash on 90 celsius) power which is most of the time higher than any other appliance. From this asumpstion then you should not use water heaters, microwaves and vaccuum cleaners too? Or is it because it is the extended period of use that tha can heat up the cable and cause fire hazards? In this case can't I just get a thicker cable?

What cables types are there, what thickness should I get what is the biggest con of using one, do I need to have a surge protection on a cable like this, what are your recommendations (link me amazon if needed).

Thanks!


texts: How fast can ARM Cortex M0s/M3s bit bang?

texts:
I have not yet used ARM Cortex uCs, only AVRs

Firstly, how fast can they:

Stream 1024+ bits (serially, from bytes in RAM) out of a pin, with no pauses/jitter
Stream 1024+ bytes (parallel, from RAM) out of 8 pins, with no pauses/jitter

I'm expecting answers in the form of X clock cycles per bit/byte, but I could be ignorant of how the ARM chips work.  Are there non-deterministic timing issues with e.g. the L1 cache (if it even exists on those chips)?

Secondly are one or both of these jobs done better by some integrated peripheral (SPI, USART) commonly found on ARM uCs?

I'm particularly interested in the LPC1114FN28/102 if that makes any difference. I am not uC electronics professional, it's just a hobby.


texts: Help in finding capacitor and resistor value for discharging circuit

texts:
I'm newish to electronics and I am trying to make a circuit that charges a capacitor, then discharges it when a switch is closed. The signal then goes into a schmitt trigger to be cleaned up. The trigger I was thinking of getting is this

simulate this circuit – Schematic created using CircuitLab

My question is will this circuit work or have I screwed it up? Also how to I figure out the correct values of the capacitor and resistors? I want the capacitor to charge in around 20ms if that is possible. Thanks


texts: Output Impedance of BJT/Mosfet amplifiers

texts:
I have heard in lectures that the desired output impedance for the BJT/Mosfet Amplifiers is LOW. But these transistors are Transconductance amplifiers 'by birth'. I mean they give output current proportional to the input voltage. So WHY should there be low impedance. I think we need HIGH output impedance. Really confused.
Thanks
Salil


texts: Understanding dielectric readings - Water vs Apple Sauce (for example)

texts:
I thought asking this question here might be the easiest way to get an answer. I'm not looking for an exact answer, just an explanation of why this is the case.

I used a Chirp! sensor connected to an Arduino Uno. The reading in AIR was 209, at 22 degrees C. In tap water the reading was 488 at 19 degrees C. In Apple Sauce the reading was 499 at 13 degrees C. I did warm these items up as well, and the differences were similar.

For reference I tried distilled water was well and the readings were lower the both the tap water and apple sauce.

So what is the theory behind this? Why are the results this way? I thought water would be the highest, but that wasn't the case.

Thanks in advance.

Dave.

Edit: Chirp! Sensor is a capactive sensor http://wemakethings.net/chirp/


texts: Is a resistor needed for LEDs in this beatbox project?

texts: I'm making a LED beatbox (seen on Kipkay.com). I'm using 8 LEDs (5 millimeters, I don't know if this helps) and my power source is 12 VDC 800 mA. Do I need to add a resistor? If yes, which one should I use?


texts: How would you size the transistors in this problem?

texts:
I know that whenever you have series transistors multiply the equivalent W/L of the inverter by the number of series transistors. In the parallel case W/L remains the same. I don't know how to apply those two rules to this problem. All of the examples I can find are far simpler than this and more symmetric.

How do I apply parallel and series rules to transistors?


texts:
I've been trying to build some circuits that use logic gates, without using pre-made chips. My main goal is to further my understanding of the subject, but it'd be nice to make something useful in the process.
After a lot of failed attempts and googling I landed on this question, which works great. But I feel that the current consumption will be very high (since the inverters will basically send a load of current to ground when they're low?). This is especially true if you want to use many gates.
It seems to me that you need to 'black box' the logic gates so that you can chain them as much as you like without much worry. The inverters do this, but at the cost of current. Is there a better way? Is learning the hard physics behind it all the only way to really make complex logic circuits, so I'm just moving out of my depth? I have a strong understanding of the gates themselves, and designed my circuits as pure gates already, but the actual physical implementation is very different.
So my question would be:
Is there a simple and effective way of blackboxing RTL logic gates so that they can be chained?
Edit: I just recalled that NOR can be used to construct other gates - so I suppose the solution would be a design for a NOR gate that can be treated as modular.


texts: What is the function of diode D3 in this circuit?

texts:
https://github.com/cubic-print/timeframe/blob/master/electronics/PCB_schematic_V3.JPG

This circuit to strobe some LED's and a magnetic coil. C1 is a 4700uF capacitor to "reduce flickering". What is the function of D3?


texts:
I have a 660nm LED powered in a separate circuit and am trying to build a photo diode using a transimpedance amplifier but I am extremely confused. I read all the articles on this site about them.

The photodiode is most sensitive to 660nm as well.

Found here: http://advancedphotonix.com/wp-content/uploads/PDB-C142.pdf

The circuit below seems to be a common one for converting a current into a voltage. I read I can choose a large value such as 1M ohm for Rf but I am confused where the datasheet for my photodiode comes into play. Also why is there no voltage source for the op amp? Just the op amps power alone?

Light current means its most saturated current and dark is the current when there is no light correct?

Any help would be great! Photodiodes are much harder than I expected.


texts: Why is the salient pole rotor in a synchronous machine made of laminated steel whereas a cylindrical rotor does not have any lamination?


texts: I know that the there is two lines to connect it to the integrator like the below picture  , so what the 3rd line do ?? how to use it ?? is it necessary ?


texts: LOGIC GATES and logic circuits in a calculator

texts:
i am tasked to do a circuit using logic gates regarding the work of a calculator. it is said that how can we make number 3 shown in a calculator represented by logic gates. can someone help me?

i need to light the sections that will form the number 3.

like this image.


texts:
I'm attempting to set up SPI communications on a breadboard between two PIC18LF2550 microcontrollers. I'm using a fairly slow clock of ~750kHz, waiting ~300us between bytes, and signal integrity on the scope looks good.

I'm using SPI mode 0,1 (i.e. with configuration bits on both the master and slave PICs set to CKP=0, CKE=0), with a slave select line. I have cleared the SMP bit on both master and slave (this is required for the slave), meaning that SDI is sampled in the middle of the data output time.

When I disconnect the slave entirely and loop back the master SDO into the master SDI, the communication works reliably. Furthermore, if I add a delay of 100ns or so (5% of the clock period) to either the clock or data lines, the connection is still reliable; this is expected, since the sampling is in the middle of the data output time. This, and the fact that all the lines (SDO/SDI/SCK/SS) match figure 19-3 of the datasheet (pg. 203) (with CKE=CKP=SMP=0) makes me think that the master is working correctly.

When the slave MCU is connected, the data sent from the slave to the master is always received reliably, but only about 50% of the bits sent from the master are received correctly at the slave. The incorrect data received are usually shifted one bit 'early', as though the slave is clocking the data at the very end of the clock period, and often reading data from the next bit instead. This hypothesis is supported by the fact that if the master SDO (slave SDI) line is delayed by a few nanoseconds, the data is 100% correct, whereas if the SCK line is delayed by a few ns instead, the data received is 100% incorrect.

Input sampling on the slave therefore seems to be occurring at the end of the data bit, but I would like it to occur in the middle of the data bit. However, the datasheet implies that, in slave mode, sampling can only occur in the middle of a data bit! (SMP must be cleared, as it is in my code). If I had set CKP or CKE wrongly, this might lead to sampling at the wrong time, but these are both set to 0 in both master and slave as required, and bits on the SDI/SDO lines are not half-a-bit out of sync, as might be expected if the clock polarity was set wrongly on one PIC.

Can anyone suggest what is going on?


texts: Why the input voltage to the amplifier in the circuit on right side is taken from resistor R2 when circuit on the left side is doing the same job with just one resistor (Rin). Why to use the voltage divider circuit to provide the input to the input of an amplifier ?


texts:
I ask a question in this , but it has been closed, I just want to know how to realize a simple frequency hopping.

I use RH_RF24 to control SI4463, and success to send some simple data. But I know maybe there will be disturb . So, I want a way to avoid disturb.

First, whether there is a way that choose a best(clear) frequency in some range after scan all frequency in the range at beginning ? If have, what is the way ? If giving a detail example, it's really best.

Second, is there any simple and reliable way of frequency hopping ?  Because I want use it in my model airplane, I hope it is anti-interference. About frequency hopping, I really know nothing.

Thanks for any answer.


texts: What limits increase of power supply voltage of operational amplifiers (op-amps)?

texts:
As title says, what limits increase of power supply voltage of operational amplifiers? Is there any significant drawback related to increase of power supply voltage other than pure energy consumption problem?

So like any slowdown of the amplifier process, size of op-amp or power supply has to be bigger, or those kinds of issues. Is there any of them happening due to power supply voltage of op-amp increasing? Anything related to transistors?


texts: Charger showing correct voltage but very small amps

texts: My electric shaver stopped charging. It comes with a 110 to 15V/150mA charger. Measuring the charger's output with ohmmeter, I'm getting 16 Volts but only 5 or 6 mA. My question is, am I right to conclude the charger is broken? In a broader sense, what are the signs of a broken charger (besides the obvious case of when there's no amps and no voltage). What explains the fact that there is 16 Volts but such small current?


texts: stepper motor constant speed under load?

texts:
Before posting this question I've been looking up google but can't find an answer to this question other than "speed control and torque control". I've done a lot of research on steppers but still don't know the relation of torque and speed. Don't get me wrong, I don't mean the relation of "increasing the speed too much, decreasing torque.". I am wondering if the speed will be constant when loaded in a bipolar setting.

For example, the stepper turns 130 rotations per minute. The stepper has a max torque output of 1Nm. When I load the stepper with 0,5Nm, does it decrease the speed? Since a stepper motor has to do certain steps, I think the speed would stay constant. I want to know if the speed will be constant or a feedback & PID control is required.

Thank you in advance!


texts: What is the ARM 32 bit MCU with the fastest ADC?

texts: I have been trying to find and answer, but it is remarkably tedious and difficult trawling through manufacturers data sheets. The best so far is 12 bit at 2MSPS


texts: Why is a relay usually placed "after" a pnp transistor and "before" a npn transistor?

texts:
Usually in circuits a relay is placed "before" the transistor (meaning between VCC and the transistor) in case of a NPN-yransistor whereas a relay is placed "after" the transistor (meaning between the transistor and VSS) in case of a PNP-transistor.
I do understand that in both cases the relay is on the collector side of the transistor - but why is it placed there? As far as I understand, a relay should switch on/off independent of where it is connected to the transistor (emitter or collector.)


texts: Is there a voltage buck converter which also boosts output current?

texts:
Application: solar USB charger.

I have a 9V solar panel. I use a buck converter circuit to bring it down to 5V before going into the USB battery charging circuit.

Exact components:

http://www.amazon.co.uk/gp/product/B00I0MOVBO
http://www.amazon.co.uk/gp/product/B00EYT1DWW

This link has more information about the buck converter circuit (I think it's the same one I bought from amazon above):

http://www.minikits.com.au/LM2596-PSU-01

I was hoping that the buck converter would also increase the output current (say, for example, from 333mA to 450 mA, for a ~75% efficiency), but after measuring it, it seems to track exactly the input current (Ioutput = Iinput). That's why I didn't simply use a 7805 regulator, which I understand dissipates extra power as heat: I was hoping that the buck converter circuit would convert more efficiently, and translate in increased output current.

Are there any alternative buck converters (PCB or a design that I could build myself) which would reduce from 9V to 5V while also increasing the current somewhat? If yes, in practice, would their efficiency be worth it? (I think that anything below ~75% efficiency might not be worth it for such low power).


texts: Trying to detect if a battery is charged

texts:
So I am doing a project as part of which I have rechargeable 5V battery and a charging source. I want to detect if the battery is charged and if it is then all the current should flow to a dummy load but if it isn't then all the current should flow to the battery. I many people I have asked said I should use a voltage comparator however I don't quite understand how.

Can you explain/ provide an example diagram of how everything should be connected or if there are other methods which can be used?


texts: If an electrical certification tag reads 220-240V 50/60 Hz can the device be used on both 220V 50 Hz and 240V 60 Hz?


texts:
I know this question might get closed because of being opinion depended but I couldn't find any answer from google or any other search, so I decided to ask it here.

For clarity of question I want to link this Nexys II board just as an example.

For PCB manufacturing, prices per board drops sharply at low volume intervals(when you double the quantity price per board) as the graphic below. So PCB manufacturing becomes feasible after a couple hundred of production. For example a 10cm x 10cm, 4 layer PCB costs ~8$ per board(with other settings default) at pcbwing.

But Quoting for PCB assembly seems way expensive in those production levels and I couldn't find an online quote website for high volumes to see when cost is feasible per board.

So my question is, approximately at what quantities I get similar price per board graphics for PCB assembly costs(for boards like Nexys II) ?


texts: How to choose an IC to use with your project?

texts:
This may be somewhat contrived, but I'm going to use an illustration. Let's say you're building a desktop computer for yourself. Now, one way that you could go about do this is just to visit a site that distributes components (e.g. Newegg) and browse CPUs until you find one that you want. Then, find a motherboard compatible with the CPU that you like. Then build off that. Before you know it, you'll have chosen all of your parts.

Back to electrical engineering: often, I'll know "what kind of part" I'm looking for, and have a vague idea of what specs it should have. But simply doing a search on a components site (e.g. Digikey) will often yield tens, hundreds, maybe even thousands of results. This is staggering for someone like myself who has little experience, as it would be difficult to distinguish an appropriate general-purpose component that I could use.

How would one with little experience go about picking a central IC around which to develop one's project (assuming that such a design is appropriate)? Are there any resources that have lists of such useful or simple or commonly used ICs (transistors, op-amps, micrcontrollers, etc..)?


texts:
There are four address spaces in PCI express:

Memory Mapped
I/O mapped
Configuration Space
Message

Can anyone please explain significance of each address space, and it's purpose in brief ?

As per my understanding,
These all spaces are allocated into RAM (i.e. processor's memory).
Configuration space is the space allocated for common set of registers (present in all PCIe devices). Is this space is common between all PCIe devices ? And how it's useful for PCIe functional operation ?

This space contains BAR (base address register). Is this register gets used to specify the address available in PCIe endpoint ?

I am new to the PCIe, and trying to learn it. I am referring the Base specification, But I think it's written for the readers having some prior knowledge of PCI and PCIe.

Also please refer some free online references useful to speed up the understanding of base specification.
I understand that whenever any PCIe device attached with root complex, it will be assign with some memory region.


texts: Why BJT BE voltage allows to avoid distortions

texts: In Common-Emitter amplifier the BE voltage is set near 0.7V but we apply both positive and negative swings to BJT and there is no distortion on output but the signal will be 0.7V+signal_value and 0.7V-signal_value. Why there is no distortion for 0.7V-signal_value? The BJT is not in conduting state now.


texts: Phase margin measured at lowest positive-gain point, rather than 0dB point?

texts:
When discussing voltage regulators, one often hears that phase margin should be measured at the 0dB gain crossing. This makes intuitive sense in a simple system where the phase has only a negative slope with increasing frequency. However, what about in more complicated systems where the phase dips and then recovers before gain goes to zero? It would seem that system stability would depend on the lowest phase margin at any frequency with positive gain, rather than just the amount of phase margin when gain finally goes to zero.

An example bode plot is below:

Using the oft-cited method of measuring phase margin at 0dB (70kHz, in this case), one would report a phase margin of 87 degrees. However, if we look at the worst-case, we actually have 58 degrees of phase margin at 23kHz. Either way, there's probably enough margin to comfortably call this stable, but that's not always the case.

Often, one will add a pole to the feedback loop to boost phase margin towards the higher frequencies in an attempt to improve stability. However, I've seen little emphasis on maintaining margin in the middle of the frequency range.

Am I fundamentally misunderstanding stability, or is lots of regulator design literature glossing over this important consideration when looking at phase response?


texts: How do I know if a transformer will output A.C. Or DC?

texts:
I recently bought a small transformer to transform 230V AC mains to 7.2V DC to power a small IC and relay. I wired it all up, but as far as I can tell, the output is AC rather than the DC I expected.

Here is the data sheet for the transformer : http://www.mantech.co.za/datasheets/products/P58.pdf
I have the P01172

I can't see anything on that datasheet that specifies one way or the other. If I don't see anything specified, should I assume that it does not convert?


texts: Delaying a TTL signal on the falling edge

texts:
I have a microcontroller (uC1) which outputs a TTL signal that simultaneously closes a switch on another microcontroller (uC2) AND controls a power MOSFET that cuts power to the entire system. I need to delay the MOSFET signal (via IC1) by about 20 seconds so that uC2 can save its files and go to sleep. Here's my basic schematic:

Closing SW1 changes the TTL level. Ideally the delay on IC1 would only happen on the falling edge (turning the system off, when uC2 requires time to enter sleep mode). Here's a basic timing diagram illustrating the relationship between the shifting TTL level and IC1's output to the MOSFET:

I've found some similar questions on here, particularly this one, and also this one, and it seems like a simple microcontroller is the easiest solution (I've got a few ATTiny's laying around). HOWEVER, current consumption is a real issue with this project, so if anyone has something even smaller, like a single 555 circuit, I'd love to know.

EDIT: My uCs require some explanation. Both are units which have been purchased and so I don't have access to their firmware. uC1 is an "intelligent battery system" which outputs power from 16V battery. uC2 is a device which records analog data to an SSD.


texts: Is there any country where the 868 MHz or 915 MHz ISM band cannot be used?

texts:
The product I am working on (Electronic Shelf Label) uses the 915 MHz radio frequency band and is currently being deployed in Asia. I am gathering the list of countries that the 915 MHz frequency is licensed or illegal to be used in. I prefer to stick to this and not switch to 433 MHz to avoid increasing the antenna length. Most sources I found state that it is allowable to use 868 MHz in Europe with certain limits, therefore I am considering it as well since antenna length only increases slightly.

However I came across the following information.

  This Decision harmonises the frequency bands and the related technical conditions for the availability and efficient use of spectrum for short-range devices within the 874-876 MHz and 915-921 MHz frequency bands.

What I wish to know is whether 915 MHz is currently allowed (license-free) in Europe? Additionally, are there Regions/countries where I have no choice but to use 433 MHz?

Extra info: Table 5.1 here shows that 868-950 MHz is allowed to be used globally, but does not mention about licensing.


texts: Converting and Stabilizing output voltage of a dynamo hub

texts:
Preface - I don't know much about electronics :P

I have ordered a Shimano dynamo hub for my bicycle. I have done a little homework and here are my findings about it:

The output of the above mentioned dynamo is a 6 volt AC.
The output voltage of the dynamo is not stable, it varies based on the speed of the dynamo.
There are chances that the lights will blow up ;) Reason is because of non stabilized voltage output.

Based on the above I have few questions.

Is there a simple circuit which converts AC to DC output? I have read about some bridge rectifiers, but wanted to be absolutely sure about it. Also what size is the circuit, how easily it is available and how reliable it is?
Most important thing which I wanted to know, how do I built a circuit so that the 6 volt fluctuating AC output from dynamo to convert to a 5 volt (USB chargeable) stabilized DC output? Are there any already available? What is the cost of such circuit or how easily can I build from scratch?
I have read somewhere that plugging in a device to a non-stabilized input source (in this case the 5 volt output from dynamo to my iPhone) would blow off the device. So, if I could not achieve in building (or purchasing) the above mentioned point 2's circuit, can I use the 5 volt output to charge intermediate batteries like a spare Lithium Ion solar charger for iPhone and a AAA rechargeable batteries through a USB charger and use these to charge up my gadgets?


texts: Confusion on Voltage levels in Digital Waveforms

texts: My question is why Io is in different direction when Vo=H and Vo=L respectively? I really can not understand the underlying mechanism!


texts:
This was found on a window fan remote control. The fan is a Bionaire BW2300

It seems to have no AGC leader, 12 bits, my guess is each bit is either:

~420us on + ~1260us off
~1260us on + ~430us off


texts: I'm having trouble identifying a blown SMD tantalum capacitor. The markings on it are 10 35L which I took to be the capacitance, voltage rating, and tolerance, but looking up that component on the schematic provided with it, that same component is labeled with the value 47U/16V. As this capacitor blew after being subjected to a 13 VDC power supply for an extended period of time instead of the 9 VDC the board is rated at, a 16 volt rating seems more likely than 35 volts. A neighboring cap has the label 220-10L which more closely matches the schematic for it's value which is listed as 220U/6.3V. This makes me wonder if I have a different revision of the schematic than the board or if the labeling is using a different scheme. What's the value of the capacitor I need to replace it with?


texts: Is parallel adder doing additions in each bit position simultaneously?

texts:
Does parallel binary adder actually make additions in each position simultaneously? I have read various sources and they all have this description relating to the parallel binary adder: "The additions in each position are taking place at the same time."

However, in my opinion, lefter positions have to wait for the results of the righter ones because of carry bits.

Am I thinking right? I really appreciate any helps!!


texts: Why doesn't the zener diode conduct even while the battery is being charged at a higher voltage than 6.8v? I assume that to charge a battery the charging voltage has to be more than the batteries current voltage.


texts:
If you can only insulate active or neutral, which should you choose?
Does it matter?
Is it important?
Is one better than the other?


texts: What's the purpose of this section in an RF amplifier circuit?

texts:
I'm relatively new to electronics and I've just grasped the concept of bypass caps and some common decoupling practices (so you have an idea of my general level) – but I can't seem to understand the purpose of the circled section of this circuit:

As I said, I'm very new to electronics so don't be too hard on me – it's probably something blatantly obvious I'm missing. Or not.


texts:
I am writing IPbus Transaction Verification Model for UVVM and I have encountered some problem. I know potential solution, but I don't like it and I am not sure if it can be handled better in some different way.

Here is some code snippet that is necessary to introduce the problem.

  type t_ipbus_tranaction_header is
  record
    protocol_version : natural range 0 to 2**4  - 1;
    transaction_id   : natural range 0 to 2**12 - 1;
    words            : natural range 0 to 2**8  - 1;
    type_id          : t_ipbus_transaction_type_id;
    info_code        : t_ipbus_transaction_info_code;
  end record;

  -- Overload t_slv_array in order to enable unconstrained array in record.
  type t_slv_array is array (natural range <>) of std_logic_vector(31 downto 0);

  type t_ipbus_transaction is
  record
    header : t_ipbus_tranaction_header;
    bodyy  : t_slv_array;
  end record;

  function ipbus_transaction (
    protocol_version : natural;
    transaction_id   : natural;
    words            : natural;
    type_id          : t_ipbus_transaction_type_id;
    info_code        : t_ipbus_transaction_info_code;
    bodyy            : t_slv_array
  ) return t_ipbus_transaction is
    variable trans : t_ipbus_transaction(bodyy(bodyy'length-1 downto 0));
  begin
    assert protocol_version = 2 report "Wrong IPbus protocol version." severity failure;

    trans.header.protocol_version := protocol_version;
    trans.header.transaction_id   := transaction_id;
    trans.header.words            := words;
    trans.header.type_id          := type_id;
    trans.header.info_code        := info_code;
    trans.bodyy                   := bodyy;

    return trans;
  end function;

  function ipbus_read_transaction (
    read_size : natural;
    base_address : std_logic_vector(31 downto 0)
  ) return t_ipbus_transaction is
    variable aux : t_slv_array(0 downto 0);
  begin
    aux(0) := base_address;
    return ipbus_transaction(2, 0, read_size, READ, OUTBOUND_REQUEST, aux);
  end function;

Now, I would like to define signal or variable in the testbench in the following way:

signal transaction : t_ipbus_transaction := ipbus_read_transaction(1, (others => '0'));

However this returns following error in the GHDL:

tb/ipbus_tvm_tb.vhd:40:12:error: declaration of signal "transaction" with unconstrained record type "t_ipbus_transaction" is not allowed
tb/ipbus_tvm_tb.vhd:40:12:error: (even with a default value)

I am not sure if it is because of lack of the support in the VHDL standard or in GHDL.

I have also tried the following definition:

signal transaction : t_ipbus_transaction := new ipbus_read_transaction(1, (others => '0'));

This returns error:

tb/ipbus_tvm_tb.vhd:41:53:error: a type mark must denote a type or a subtype
tb/ipbus_tvm_tb.vhd:41:53:error: (type mark denotes function "ipbus_read_transaction")

So it is not supported by the VHDL standard.

I am aware that the problem can be easily solved by the following definition:

signal transaction : t_ipbus_transaction(bodyy(0 downto 0)) := ipbus_read_transaction(1, (others => '0'));

However, this approach has few drawbacks for me. Namely:

User has to type redundant information.
User has to know transaction body length in advance.
User has to have greater knowledge about the protocol itself.

So, this is the VHDL language issue I am facing right now.

I realize already in this moment, that there also will be problem with returning response transaction in the procedure via output argument, where length of the transaction body is also unknown.

I would like to ask you for advice, if my object oriented approach to model the IPbus transaction with variable body length is implementable in the VHDL language.


texts: Do I have to supply an analog switch IC with a voltage level higher than the switched voltage level?

texts:
I have an analog switch circuit as seen in the image above.

I want to switch a digital signal which has either -5.4V or +5.4 level.

My analog switch is MC74VHC4316.

According to the datasheet, the VCC voltage can be in the interval of [+2.0V, +6.0V], and the VEE voltage can be between [-6.0V, 0V].

I understand that the internal impedance of the switch varies according the applied VCC and VEE voltage levels (see: datasheet, 4th page, 2nd table).

I want to know if I need to apply at least +5.4V VCC and -5.4V VEE voltages in order to transfer a \$\pm\$5.4V signal. What happens if I supply the IC with lower VCC and VEE voltages (e.g.; VCC = +3.3V, VEE = 0V). Does my digital signal get clamped? Does anything bad happens other than seeing a higher switch channel impedance?


texts: MASTER Clock output from one micro to another vs independent clock src

texts:
I have a Small STM32 Nucleo board where the on-board ST-Link debugger has an 8mhz crystal for the debugging microcontroller. That microcontroller is set up to output its MASTER clock, in other words it outputs the 8Mhz to the other microcontroller which is the one for the user. So the user also has an 8Mhz master clock.
Aside from lower parts count are there any other pros and cons for this setup versus each mcu having its own independent clock source.


texts: Determining voltages at nodes and currents through branches (BJT)

texts: I am unsure if I have set up these KVL's correctly, and if Vb is truly 7.5 V seeing as that node is a voltage divider.


texts: SPI SDHC card will not come ready, Regular (older) SD card works fine

texts:
I am trying to make an SPI interface  on a 186 Microprocessor using bit banging and a GPIO  to control the CS, SCLK, MOSI and reading in the MISO lines.  Mode 0.
I cannot get SDHC  (version2) cards to intialise to the ready state. Older SD cards work fine.

So my init sequence is as follows:

Plug in the  SD card into a live socket
wait ~100ms
start initialization (CS, MOSI  high + send 100 clock)
then every command has the following sequence..
8 Clocks
CS LOW
8 clocks
CMD0 (arg:0, crc:0x95) + wait R1 response
8 more clocks
CS High
8 more clocks
Same sequence for CMD8 as follows...

(a) For the older SD cards  CMD8  gives illegal
Then I send a sequence of CMD01  which initially give an 01h R1 and eventually give 00h -- indicating the card is ready.

(b) For the newer SDHC commands I get  ..
CMD8 (arg:0x000001AA, crc:0x87) + wait R1 + arg echo response

Then ..

CMD55 (arg:0, crc:0x65) + wait response
CMD41 (arg:0x40000000, crc:0x77) + wait response
repeat ACMD41 (CMD55 + CMD41)    forever.

The SDHC card never comes ready

I have tried  8GB  Sandisk and Transcend SDHC cards-- the result is the same.
Am I missing something here?  However I suspect the clock signal....

My question is to do with the SCLK signal.
Because it is generated by bit banging, it has an uneven mark-space ratio, that  dips below the 100kHz occasionally.

Has anyone successfully  used an SDHC card in SPI with a slower than 100kHz clock?  Or an uneven mark-space clock.

Unfortunately, it's not that easy for me to improve the clock speed with the bit banging method that I have in the code.

Thanks for any help.


texts: EI Lamination core geometry for 3-phase transformer

texts: There are several tables for EI Lamination geometries for 3-phase transformer cores available from manufacturers. Is there a general standard (something comparable to the AWG table concerning wire geometry)? Or is there something like a geometric rule for this type of core geometry? If yes, does somebody know a useful link?


texts:
I have 6 IR LEDs that I want to run off a cigarette lighter outlet in a car.
(High output infrared LED 5mm 1.2VDC 100mA 940nm)

Currently I have all six in series with a 100ohm 1w 5% resistor.

I am going to use the Arduino Uno as a timer. Output on Pin 2.

int led = 2;

void setup() {
  pinMode(led, OUTPUT);
}
void loop() {
  digitalWrite(led, HIGH);
  delay(35);
  delayMicroseconds(544);
  digitalWrite(led, LOW);
  delay(35);
  delayMicroseconds(552);
}

My 6 leds are in the place of "M". But for some reason this is not working for me.

The leds are sometimes off, blink at the inncorrect freq, or just stay lit.


texts:
I am trying to design an isolated dc dc converter. Now, my input is approx 20V and I need an output of 7V at the final output. I understand that I need a PWM controller that is approx 100kHz or so. Now, how do I control the duty cycle of such an IC ? I need 7V from a 20V supply. So approx its 35% duty cycle. Also, I need a transformer for the isolation. How shall I select such a transformer ? I know this is a huge topic(selecting a transformer), but any pointers will be appreciated. Also, will I need a feedback or such ?

simulate this circuit – Schematic created using CircuitLab
The above is a representative schematic of this circuit.
Now, regarding the PWM generator, can an IC 555 suffice ? Will it give out sufficient gate drive ?
My main concern is regarding the selection of the transformer.

The load is a max of 4Amps.


texts: High Voltage to Low Voltage Attenuating Isolation

texts:
So for an Electric car team I am on, we need isolation between all high voltage and low voltage components. That being said, for the low voltage side, we need to take the battery pack voltage (0V to 300V) and change it into a 0-12V analog signal. Without isolation, this could easily be done with a voltage divider. However, when we have to isolate the two grounds it makes it a lot harder. Any ideas on the best way to accomplish this?
Thanks for the help


texts: how to solve the solder joints not shiny?

texts:
I have met a problem, need your help.
I had used Sn62Pb32Ag2 (liquid temperature is 179℃)solder paste to solder components for many years,solder joints always are shiny.
but recently,when I used it to solder AgPa alloy finished resistores,
after reflow soldering ,the solderjoints were not shiny as they were supposed to be.
I have tried many reflow profiles, the peak temperature(TP) of the solder joints from
222℃to 210℃,time of temperature higher than 179℃ are range form 60s~100s,some time ,the time of temperature higher than 215℃ reach 20s,higher than 220℃ time reached 6s.
but all solder joints are not shiny as normally.


texts: Checkered / square-patterned copper plane on a PCB

texts:
The Verge has published photos of the original iPhone "dev kit".

The board looks like an ordinary development kit to me, however there is a strange pattern of squares on the topmost layer. I know only of solid and hatched variants of a copper plane.

What could be the reasons to use such a pattern on a copper plane?

Aesthetics? EMC? Obfuscation?


texts: Can I use a DC-DC step-up module for a small form factor computer?

texts:
I want to design a DC power supply for my Intel NUC small form factor PC using a battery.

The data-sheet for the PC:

https://www.intel.com/content/dam/support/us/en/documents/boardsandkits/D53427RKE_TechProdSpec05.pdf

There are internal power supply connectors and external DC jack. Both support only 19V.
I have a LiFePO4 battery that can supply 12 volts (at 10A max continuous discharge)

The input required for the PC is 19V drawing upto 3.42A

I am thinking of connecting a DC-DC step-up module at the battery output and supply the output to PC. The characteristics of the step-up module from its data sheet:

Input voltage : DC 10 - 32 V
Output Voltage : DC 12-35 V(Adjustable)
Output Current : 6A(MAX)
Input current : 10A (MAX) (more than 10A please strengthen heatsink)
Output Power : 100W (MAX)
Conversion efficiency : 94% (when Input 19V 2.5A Output 16V, Reference)
Output ripple : 2% (MAX)
Working Temperature : industrial (- 40 ° c to +85 °c) ( environmental temperature, more than 40 degrees, please reduce power to use, or - enhance cooling).
Full-Load temperature : 45 degrees
No-load current : 25mA typical
Voltage regulation :  ± 0.5%
Load regulation :   ± 0.5%
Dynamic response speed :  200us 5%

Will the step-up-module's output ripple affect the PC?
How can I reduce the ripple if it is a problem?


texts: How does the MAX7219 in a LED Matrix work?

texts:
i am wondering how the MAX7219 in a LED matrix actually works? I mean, the datasheet: http://tronixstuff.com/wp-content/uploads/2010/07/max7219.pdf only describes if it is used with 8 x 7-Segment Displays but not how to turn a dot on / off on a 8x8 matrix. I would be really thankful if anybody could explain to me how i turn a single dot on a 8x8 matrix on.

Thanks


texts: Power supply design pattern with various capacitors

texts:
I'm seeing the following pattern for power supplies on the board I'm working on:

What is the purpose of the capacitors? Why are they of different values? What is the purpose of the design pattern?


texts: Can't get DS1077 programmable oscillator to work

texts:
I'm trying to get the DS1077 to work, but I can't for the life of me figure out what I'm doing wrong.  I'm using the defaults for the MUX and BUS registers, and programming in my own DIV frequency has no effect.  I can read out the registers over I2C and they return the values I set, but the oscillator output (as measured on my scope) is nothing like what it should be.  I tried copying the values in from SparkFun's example (I'm using their breakout board) but the "40kHz" output is way above the 60MHz bandwidth of my scope.

I found an example on Maxim's website and they recommend you tie CTRL0 and CTRL1 to GND if you're not using them - but if I tie CTRL1 to GND mine stops responding to I2C messages!  I have to tie CTRL1 to VCC to get it to respond over I2C (no mention of that in the datasheet), but that disables the oscillator output.  Otherwise my "circuit" is the same as their example - SDA/SCL go to an Arduino, and the OUT pins go to my scope.  VCC and GND are connected correctly and within spec.

I've got no idea what's going on, it seems really simple but I still can't get it to work :'-(  Has anyone encountered anything like this before?  Any ideas to help narrow down the problem?


texts: XOR all signals of a vector of two dimensions together

texts:
I have a vector that contains 15 elements of 8 bits each. I want to XOR each element:
$$
out = f_0 \oplus f_1 \oplus \dots \oplus f_{15}
$$
where each \$f_i\$ has 8 bits (it's declared as logic [7:0] f1 [0:15];). I know how to do it with one dimensional vector, I'd just do out = ^vector; How do I do with this two dimensional vector? I tried:

out = ^f;

and

out = ^f[7:0];

None of them seem to have a correct syntax.


texts: KiCad - what does this syntax Highlighitng mean, why can't connections be made?

texts:
Everything turns yellow and it won't let me make ANY connections in Pcbnew.

Does anyone know why this is?  Also, when I import the netlist, there are no rat's nest!

This is the diagram, but I was trying to do this manually because, well no rats nest...
see this question.


texts:
I have a supply of 17V@890mA. I am using COTS DC-DC converter, which has efficiency upto 90% at Minimum input voltage and 83% at Max Input voltage. It has input range between 4.25-24V. It provides output at 3.3V@1A.

So what will be the current consumption/Input current requirement of this converter? On what factor it depends?

I couldn't find this info in the DC-DC converter specs.


texts:
I would like to know how the rotation speed of the coil is bringing the change about the flux where I could have simply used flux=BAcosphi and not BAphi.

I think the relation is derived from the above graphs and I'm not successful in finding the relation between angular velocity and flux from the graph.
My approach:

I find the function for every piecewise continuous graph which gives me the following result:
Φ=-B∙A, Φ=((2B∙A)/(π-2θ))∙(φ-π/2), Φ=B∙A, Φ=-((2B∙A)/(π-2θ))∙(φ-3π/2),
Φ=-B∙A and let me find the derivative of flux with respect to angle first which gives me:
dΦ/dϕ=(2B∙A)/(π-2θ), dΦ/dϕ=-(2B∙A)/(π-2θ) for two slopes
and derivative of flux w.r.t time comes out to be:
(dΦ/dϕ)∙(dϕ/dt)=((2B∙A)/(π-2θ))∙dϕ/dt, (dΦ/dϕ)∙(dϕ/dt)=-((2B∙A)/(π-2θ))∙dϕ/dt, where dϕ/dt=2πn. And the answer doesn't equal to that of lecture-derivation.


texts:
I'm using ad7190 to sample single-ended voltage. The rms input-refered noise is given by the datasheet. However, the datasheet only specified the noise with 5V reference, whereas I'm using 4.096V reference.
How should I calculate the noise now? Should I scale the noise down proportionally?
The noise in the datasheet is also test with differential input, does it makes a difference if my input is single-ended?
Thanks!


texts:
Simple question, can the bin-to-dec decoder CD4028 (datasheet) work connected direct to a raspberry pi gpio ? powered from the 3.3v line at the pi, grounded there, and 3 gpio with pull down resistors connected to the inputs of the chip. Will this lead to 3v in the decoded output?

I keep on checking the datasheet but.. it sounds like chinese to me :)


texts: Frequency of Natural Resonance with Parasitic Component due to Oscilloscope

texts:
So, I've just performed a lab on measuring the resonance of an LCR circuit. I rearranged the circuit so each time the component in question had one lead on the ground plane, and then measured it's frequency response.

Each time, an oscilloscope was attached across the component in question. When the natural frequency was measured for each component, each time it was different.

I'm assuming this is because the oscilloscope itself has an inductance/capacitance and therefore adds a parallel component to each measurement. I want to calculate the value of this parasitic effect. How would I go about doing that?

Inductor Value: 109.4 mH
Capacitor Value: 2.116 nF
Resistor Value: 327.2 Ω

The natural frequency when measured across each component was as follows...

Resonant Frequency of Inductor: 10.1kHz
Resonant Frequency of Capacitor: 10.075kHz
Resonant Frequency of Resistor: 10.425kHz


texts: What does this Op Amp Circuit in the Voltage Regulation Section Do?

texts:
This is the mystery circuit (the Op-Amp part):

It appears in the voltage regulation section of a stepper controller board (stepper driver and micro not pictured).

At a glance, it seems like it loads the 12v rail through Q1 if the rail starts to exceed PB12V, but why would the designer even want to do this?


texts: V+, V- and GND - Getting started with virtual grounds

texts:
I've been happily playing around with TTL logic but have recently come across an Analog / Digital converter TSC7106 whilst tearing apart an old thermostat which has demanded V+, GND and ... V- :o

I see that I should come up with some kind of virtual ground but I'm unsure of the simplest approach. I've tried setting up my bench power supply to 10v and then creating a 50/50 voltage divider with 10K resistors but I notice that any asymmetric load seems to heavily reduce the voltage on the loaded side.

I have a fair range of resistors, capacitors and have a couple of operational amplifiers that I can salvage from various junk (TL081CP, MC1458P1, PMIOP07CP). Could someone point me towards the easiest solution to get this A/D converter up and running?

Cheers,

Andrew

P.S. I'm an IT engineer that's just getting started with electronics.


texts:
I am working with some analog +/- 10V a/d conversion cards that are part of a larger process system and I've got a question about the way they describe their maximum allowed voltage based on the table below.

The answer in this one case is probably to contact the vendor but I'm interested in knowing if this terminology is common enough that I would expect to see the same description elsewhere.

Specifications

Input Signal Ranges: +/- 10VDC
Maximum permanent allowed overload (no damage): +/-12.5V

Should I be interpreting that as anything beyond +/-12.5V is potentially damaging OR is it anything overloaded by 12.5V beyond the valid input signal range +/-(10+12.5)V?

Obviously I wouldn't expect a valid A/D conversion of a 13V signal but based only on their specifications would I be in the range of potential damage?


texts:
I am examining the context switching procedure on a ARM Cortex-M4 based processor running FreeRTOS.
In port.c we have:

void xPortPendSVHandler( void )
{
    /* This is a naked function. */

    __asm volatile
    (
    "   mrs r0, psp                         \n"
    "   isb                                 \n"
    "                                       \n"
    "   ldr r3, pxCurrentTCBConst           \n" /* Get the location of the current TCB. */
    "   ldr r2, [r3]                        \n"
    "                                       \n"
    "   tst r14, #0x10                      \n" /* Is the task using the FPU context?  If so, push high vfp registers. */
    "   it eq                               \n"
    "   vstmdbeq r0!, {s16-s31}             \n"
    "                                       \n"
    "   stmdb r0!, {r4-r11, r14}            \n" /* Save the core registers. */
    "   str r0, [r2]                        \n" /* Save the new top of stack into the first member of the TCB. */
    "                                       \n"
    "   stmdb sp!, {r0, r3}                 \n"
    "   mov r0, %0                          \n"
    "   msr basepri, r0                     \n"
    "   dsb                                 \n"
    "   isb                                 \n"
    "   bl vTaskSwitchContext               \n"
    "   mov r0, #0                          \n"
    "   msr basepri, r0                     \n"
    "   ldmia sp!, {r0, r3}                 \n"
    "                                       \n"
    "   ldr r1, [r3]                        \n" /* The first item in pxCurrentTCB is the task top of stack. */
    "   ldr r0, [r1]                        \n"
    "                                       \n"
    "   ldmia r0!, {r4-r11, r14}            \n" /* Pop the core registers. */
    "                                       \n"
    "   tst r14, #0x10                      \n" /* Is the task using the FPU context?  If so, pop the high vfp registers too. */
    "   it eq                               \n"
    "   vldmiaeq r0!, {s16-s31}             \n"
    "                                       \n"
    "   msr psp, r0                         \n"
    "   isb                                 \n"
    "                                       \n"
    #ifdef WORKAROUND_PMU_CM001 /* XMC4000 specific errata workaround. */
        #if WORKAROUND_PMU_CM001 == 1
    "           push { r14 }                \n"
    "           pop { pc }                  \n"
        #endif
    #endif
    "                                       \n"
    "   bx r14                              \n"
    "                                       \n"
    "   .align 4                            \n"
    "pxCurrentTCBConst: .word pxCurrentTCB  \n"
    ::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY)
    );
}

In the first half of the code, the current task status gets pushed to its stack, then vTaskSwitchContext is called. In here, the system decides, if a context switch is needed and gets the TCB of the next task. Then, the context is restored by loading the value from the stack. In my understanding, the LR register should now contain the program counter of the new task. With bx r14, this value is loaded to the actual program counter. When having two tasks A and B, context switching is working. However, when I examine the code by using GDB and jump into xPortPendSVHandler when switching from A to B should occur, the value of R14 (LR) is 0xfffffffd, and not 0x8008700 (PC when task got interrupted). What I am getting wrong?


texts:
I wish to drive a MOSFET using a 555. I dont have a driver handy, will it be fine to use a transistor instead?
So the output of a 555, could activate a transistor(as swtich), which allows a source to drive the FET?


texts: Method for connecting Unused comparator pins

texts:
I have a dual comparator and one of the comparators is not being used. I know with an op amp you're not supposed to connect the inputs directly to ground. The way I do it with op amps is with a voltage divider for half the rail and then put that into the non inverting input and then make it a voltage follower.
But I'm not sure what the correct way to do it with a comparator is.
The way I have the comparator circuit now is both inputs for the comparator are connected to GND and the output is unconnected.


texts:
I have a board that has VME64 core implemented in it and this board communicates with other boards via VME64 bus. All boards share the same backplane motherboard which has J1, J2 connectors on it.

If the following pins on the board are connected as follows:

BG0IN is directly connected with BG0OUT (onboard).

BG1IN is directly connected with BG1OUT (onboard).

BG2IN is directly connected with BG2OUT (onboard).

BG3IN is directly connected with BG3OUT (onboard).

BR0 to BR3: no connection.

IRQ1 to IRQ7: No connection.

I could not understand how will the bus arbitration work if the above pins connections are in place on the board? Is it some fix mode for 'Bus master' or 'Remote terminal' mode?


texts: How can I amplify the current out of a triangle wave generator?

texts:
I'm designing a triangle wave generator to power a detector. The triangle wave is coming out at the right frequency (0.4 Hz), but I'm using an LM324 and the detector that I'm driving needs 100 mA to run. I tried connecting the triangle wave output to a 1k resistor, and then into the base of a transistor but the output from the emitter was only the positive half of my triangular waveform, and I need the detector to oscillate with the positive and negative peaks.
I know that I could order an op amp ic that drives a higher current, but if possible I'd like to use parts that I have on hand.

I have a spice schematic attached for reference. Spice doesn't have the LM324 so I just used the LT1014 to draw up the schematic. I also attached the schematic with the added transistor.

Thanks in advance for any ideas!


texts: Why have apparent memory bitflips in non-ECC memory not increased?

texts:
Back in the early 2000s I remember asking about why it was so important that servers use ECC memory. The prevailing wisdom at the time was that systems with lots of RAM would be, statistically, more likely to suffer bitflips. This makes sense - if each cell has a 10-20 probability of suffering a bitflip per second, then 109 cells have a 10-11 probability per second. The more cells you have, the higher the probability of a bitflip in any given time period.

Back then we would be looking at a ballpark of 128MB to 1GB of RAM. These days we regularly put 16GB or more in laptops and desktops, with workstations commonly having 64GB or more. For argument's sake, let's say we've increased total RAM amounts by two orders of magnitude. So we should see a hundred times or so more bitflips, on average, in any given system, assuming that nothing else changed.

The more I thought about it, though, the more I realised that the random bitflip rate should be much higher in newer systems:

Lower operating voltages means lower distinction between a 0 and a 1.
Lower gate charge means less overall energy required to flip a bit.
More densely packed gates increases the likelihood of being affected by cosmic rays.
Refresh times don't seem to have gone anywhere. DDR2 tRFC was 40-60 clocks, DDR3 tRFC was more like 90-130 clocks, and DDR4 tRFC is more like 200-450 clocks. When you divide by the internal memory clock rates to get a wall time for each refresh timing it doesn't really show much of a trend - it's effectively flat but with a higher margin either way as time goes on.

But, as far as I know, we're not seeing bitflips everywhere on non-ECC RAM, at least within the confines of our atmosphere.

So, what's the deal? Why aren't we seeing endless bitflips everywhere, at least 100x if not 10000x more frequently than two decades ago? Is ECC actually important in the context of growing RAM sizes, or do the stats not back it up? Or is there some other technology advance that is mitigating bitflip problems in non-ECC memory? I'm particularly interested in answers with authoritative references rather than speculation about error rates.


texts: DC Boost Converter stepping up voltage very slowly, if any

texts:
I've come across DC boost converter and told myself - why not to try it as well? So I started building a simple circuit which includes BD243C NPN Transistor, ATTiny13A programmed to give some pulse to the Base of the transistor, 16 uH inductor, 82 uF 450 wv electrolytic capacitor and IN4007 diode to prevent current flowing from capacitor back to the circuit.

I calculated the needed duty cycle to have 30V on the output from 5V input which was around 0.83. Then I wanted the pulse width (10 ms period), I got the result of 8,333 ms. The remaining 1,667 ms should indicate the time there's no pulse happening.

So where is the problem? When I powered my circuit using 5V battery, voltage rises to 7V, if I wanted to have for example 10V, I would have to wait for almost an hour to have 10V on the output and if I wanted more, I would have to wait more than one hour. I don't know exactly where the problem is.

Before when I tried this circuit for the first time with 1ms period and I wanted 10V on the output from 5V, it worked. According to calculations, I had 10V on the output, which was okay, but it took like 10 minutes to have 10V, but it was at least someting for a start. And with 10ms, it doesn't even charge up to 10V, not even to 30V.

Here's the schematic of my circuit.

Would be nice if anyone gave me an advice what should be fixed.

Thanks in advance


texts:
I have a question about an exercise considering op amps.

simulate this circuit – Schematic created using CircuitLab

The task is to give an expression for V_OUT as a function of V_IN, V0, R1 and R2.

Could anyone explain me how to solve such a task? Because I've always had struggles with op amps.

Thank you for your help!

EDIT:

I tried to solve this task using superposition. My result was:

\$V_{OUT}=V_0-V_{IN}*\frac{2*R_2+R_1}{2R_1+R_2}\$

Is this correct?


texts: Is there a calculator for converting a circuit designed for 15v to 12v?

texts: I would like to build an audio circuit designed for +/-15v, but using a +/-12v power supply.  The design is discrete and all components are fine running off 12v, but will the response of the design be thrown off with no substitutions?  I don't have any decade boxes to dial in values, so was curious if there is a calculator online that can help convert values for a situation like this?  When I search I just find suggestions for pumping 12v up to 15v for the circuit, but that seems wasteful/not ideal for audio.


texts: How to correct instability of op-amp voltage follower?

texts:
I am using a number of single-supply op-amps (OPA4344) in a circuit, and am using one of them to supply a VCC/2 value for a virtual ground to the + side of several other op-amps.

VCC is +5 volts.  When I first power up the board, I get 2.5v from the output, but after awhile the output jumps to around 4.5 volts and stays there until I power off and back on again.

I read here that:

  Due to the strong (i.e., unity gain) feedback and certain non-ideal
  characteristics of real operational amplifiers, this feedback system
  is prone to have poor stability margins. Consequently, the system may
  be unstable when connected to sufficiently capacitive loads. In these
  cases, a lag compensation network (e.g., connecting the load to the
  voltage follower through a resistor) can be used to restore stability.

As you can see, I am already using a resistor on the output. The datasheet for the 4344 (referenced earlier) claims the op-amp is "unit gain stable."

Is there something else that can be causing the instability?  Do I need a separate resistor for each output (currently I the + inputs of three op-amps tied to VOUT).


texts: Can I get some opinions on this design please

texts:
Before I start, I totally know that I could buy one of these, I don't want to.

I'm building a simple circuit that will allow me to use an ESP8266 (I have the -01 variant) to control my big shop lights above my workbench. Obviously the lights will be controlled by a relay, which is driven by a transistor which is switched by the ESP. I already built the prototype circuit and it works well, so I designed a circuit board that I think will work and I'd just like some more experienced opinions on things like design and whether or not it'll catch fire. Here is the schematic and PCB layout:

The idea is that I'll have a 12v power supply (for the relay) and this circuit board mounted in an enclosure with one cable coming in for AC and two going out to the lights (300W Halogen shop lights). The 12v supply will get its power from the mains, and will be regulated down to 3.3v for the ESP by the regulator on the board. In my breadboard tests the circuit works well, I even tested it by switching on and off a 500W shop light and a 144W string of outdoor patio lights at the same time. The relay I have is rated for 120VAC at 20A, the lights I'll be switching total 600W, resistive load, so should only draw around 5A.

The reason for the blank section at the bottom-left is the relay I'm using has 4 pins on the bottom, but two spade connectors on top. I'll be using the spade connectors. I wanted to make sure the relay was still securely fastened to the board, but those pins are well clear of the rest of the circuit as they'll be live at mains voltage. I'm going to cut a slot in the circuit board itself between those pins, and between the right-most pin and the ground plane.

Anyway, any suggestions or reprimands, things I should change or anything at all to say about it, I'd be happy to hear it. Please bear in mind, I dabble with this stuff on occasion, I'd call myself an enthusiast, so I'm still trying to learn.

Edit

I rearranged the circuit board, moving the ESP itself off the board (except for its headers) and hopefully making things better for attaching a heatsink. Here they are:


texts: Laser scanning: Why are things like deflection and mirrors used instead of just a mount and servo?

texts:
In the Wikipedia article for laser scanning, it is said that laser scanning is the controlled deflection of laser beams, visible or invisible. It then lists some of the technologies used, such as mirrors. But why is deflection necessary? Why do we need to use these intermediary components, such as mirrors, to direct the laser beam? In particular, couldn't we just attach the laser to a servo, as done here and here, and do laser scanning in this way? What benefit does deflection have over using a servo? It seems to me that using the intermediary components for deflection is just superfluous, outside of, perhaps, specialized use-cases.
I would greatly appreciate it if people would please take the time to explain this to me.


texts:
Take a look of this product: http://www.hobbyking.com/hobbyking/store/__68694__HK_Pilot_Power_VI_Module_Distribution_Board_And_Dual_UBEC_ALL_In_One_120A_and_10s_.html

It says is a 45 by 45 mm PCB, gold plated. It is just a power distribution board, two input pads where you solder the battery leads and 8 output pads.

What I don't understand is that it says can handle up to 120 Amps, using any online trace width calculator, a trace in order to be able of handling that amount of power needs to be almost 60mm wide...

How can they handle that amount of current in that small form factor?


texts: Why my current mirror results in wildly different currents?

texts:
Let me start with that I'm new to current mirrors and my idea may be conceptually wrong. Feel free to ask any clarifying questions.

I'm designing a dual "LED lamp" with very finely tunable brightness including very dim levels. The control loop for the brightness is only for a single lamp, with the second lamp added to double the max brightness possible, and this is where I use the current mirror (I want the second lamp shine as brightly as the first). I don't have the second LED string yet, so I've substituted a 5W 220ohm resistor. The relevant part of the schematic is:

simulate this circuit – Schematic created using CircuitLab

A MCU is controlling Vgs of the MOSFET, and sensing the actual current via the R3 shunt.
The current mirror PNP pair is a single-package device - BC807DS,115, a SOT-457 part.
The LED string is "cannibalized" from a commercial mains-voltage LED bulb. Only the LED PCB is used, where it has just the +/- terminals, and the LED string needs ~29V for full brightness.

The problem

If I slowly increase the gate voltage, to the point that the left leg conducts 5-10mA (measured at R3), the second leg starts conducting close to 100mA (measured at R4), more than 10 times more. However, if Vgs is 0, then both legs don't conduct. Also, at higher currents, the mirror sort of works, with both legs conducting relatively similar currents (yet not perfect).

Example at low currents, where the problem is most pronounced:

Left leg is yellow, right leg is cyan. Both traces are 50mA/vertical div.

At higher currents the matching is closer (about 110mA for the left leg, 130mA for the right):

Same settings for the traces.

Question

Is a current mirror really a good approach for this task? Any idea why does mine fail so miserably?
I know, of course, that you can alternatively wire both led strings in series. That would require 60+V supply which starts to be somewhat dangerous for the intended application of the device - I strongly prefer the 31.5V solution.


texts: how to design step groove pcb in altium designer

texts: I need to design a multilayer pcb in altium designer that has cutout just in one layer. I was seeking that and I found out that in china it is called 阶梯槽. I translated to English but I didn't find any solution about step groove or step slot. I will appreciate it if anyone can help me out.


texts: Ground, common, and Earth ground confusion

texts:
I am learning on transmitters and input modules nowadays. But the usage of word 'ground' is confusing me. What does 'ground' mean there (earth or power supply common)?

If it is earth ground, why we need to do that? Just wiring to power supply common won't be enough? (Isn't it a real reference point of signal?) You can say it is to prevent having a floating signal, but what happens if power supply common is directly earth grounded? Also isn't it the nature of differential signal measuring to have a floating signal? If the input signal is differential and we make it earth grounded, won't it be like a single-ended signal?

If it should be earth grounded what happens if we don't wire it?

I also attached one example. What happens if I don't wire '-' of input signal to earth there?


texts: If we could start our electrical grid from scratch with today's technology, which would be the most efficient choice? AC or DC?

texts:
Lately, I’ve been reading about the many advantages of HVDC transmission systems for long distance transmission, undersea links, and others. The historical reason of why AC was picked over DC was mostly due to the invention of the transformer, which allowed easy manipulation of AC voltage enabling high voltage transmission across long distances.

However, after the invention of mercury valves, thyristors, IGBTs and all these components that have made DC transmission feasible, I’ve been thinking that if we had a purely DC network we could get rid of all AC/DC rectifiers that we find in our electronic appliances. This could improve energy efficiency greatly and save tons of money in resources.

If we had a chance to start over, could a DC-based transmission system be the better1 choice, or would AC still come on top?

1: with better, I mean more energy efficient.


texts: How independent is the output voltage from the load resistor in this linear regulator?

texts:
Consider the circuit below:

So we know that the op-amp will try to keep \$V_{+}\$ equal to \$V_{-}\$ (Inverting and non-inverting voltages of the op-amp) . Knowing this we can calculate the output voltage:

$$ V_{+}=15\times \frac {1k}{9.1k+1k}=1.48\; V $$
$$ V_{-}=V_{out}\times \frac {R_{2}}{R_{1}+R_{2}}=V_{+} $$
$$ \Longrightarrow V_{out}= V_{+}\times (1+\frac {R_{1}}{R_{2}})= 1.48\;V\times(1+\frac {R_{1}}{R_{2}}) $$

So as we can see, the output voltage is not dependent on the load resistor, but in practice we know that our circuit is not perfect and if we make a significant change in the amount of load resistor, there will be a small change in the output voltage, why does that happen?


texts:
I have discovered, on YouTube, videos of what it being called a, "Desulfating Capacitative Battery Charger".

The components of this device begins with a 50 MFD uF Run Capacitor 370 vac Volts, a Bridge Rectifier, regular 120VAC dial timer, and a voltage meter to monitor voltage at all times.

This device is, as purported by its various designers, a device to desulfate the plates in Lead-Acid, flooded, AGM, or sealed batteries of various DC voltage configurations.

It appears so far, to work as designed, but before I follow any of these instructions to build one, I believe, or at least for my own sense of mental security, it is missing one vital component, and that is the ability to control maximum voltage output, i.e; 6V, 12V, etc.

Some videos show this connected to a 12VDC car battery, and charging at the rate of 14.73v. I have a battery bank of 6V Trojan Solar batteries valued at $360.00 each new, and I do not trust that this device would not cause damage if the maximum voltage is not controlled.

What would I need to add to such a device to control this maximum voltage output, to prevent over-charging of my 6V batteries, should I decide to build one of these?

Note: While I am not an electronics engineer, I question the use of the descriptor, "Capacitative", as I've never heard this word before.