texts: Arduino PWM pin vs digital pin PWM simulation

texts:
Do I understand it correctly from this thread, Why do some pins have `~` signs next to their numbers?, that the PWM pins generate a square wave signal independently from what the code uploaded to the chip does after starting the PWM output? In other words, if my code contains all sorts of delay() functions that pause longer than the period of the PWM signal, the PWM signal will still be generated properly, correct?

On the other hand, if I decided to implement my own PWM on a digital pin instead by flipping the state between HIGH and LOW in my code at regular intervals, the presence of other delay() calls in other parts of the code would directly impact my ability to generate the desired consistent PWM signal. Is this correct? I hope this question makes sense (a bit hard to ask the question).


texts: Relation between the Fourier transform of Y and X

texts:
So, I watched a video from MIT Signals and Systems Open course on youtube, and there is a moment when he substitutes \$ x(t)e^{jw_ct} \$  for y(t), and then:

Shouldn't it be just \$ X(w - w_c) \$ ? The theorem about the shift in the frequency domain says so. So why there is an "j"?

Youtube video with the exact moment:

https://youtu.be/OT04cEdpK-M?t=759


texts: How to calculate the Voltage on the scheme with inverted amplifier?

texts:
Given input 1mA and resistances: 1kOmh and 100Ohm. Find the V[exit].

My try:

V[on R1] = I[R1]*R1 = 1V
As long as R2 "grounded" the I=0A and U=0V
The difference in Voltage between "-" and "+" should be 0.

How to solve it?


texts:
I am using DMA on an STM32F4 Discovery board to push values from an array into a peripheral. This needs to be done repeatedly, so I am using the circular DMA mode:

DMA_InitStruct.DMA_Mode = DMA_Mode_Circular;

which gets the DMA source address to jump back to the start of the array automatically.

I would like to count how many times this wrap has happened. Is there an interrupt or other feature built in to do this?


texts: Driving a 5V LED on computer chassis with 3.3V

texts:
My add-in card uses a pair of pins to drive an external activity LED, with anode "provid[ing] 220 ohm pull-up to +3.3 V".
However, the LED that I wish to drive with these pins, is designed to be driven by "LED pull-up to +5 V".
How do I proceed?


texts:
Trying to improve on the transformer efficiency, I changed the configuration of the rectifier from half wave to full-wave. Below shows the configurations I used

Transformer turn ratio is enough so that the input side on the LDO is maintained well above drop-voltage + output voltage. The load on the LDO consumes about 130mA.

I was expecting twice the efficiency improvement, but the result is not what I expected.
With secondary side current consumption remaining the same, I only saw 10mA improvements on the primary side.

With half wave rectification, the primary was consuming 110mA, and with full wave rectification, the primary was consuming about 100mA.

The transformer is very hot, and the hotter it gets, the current consumption grows more on the primary side.

Is there anything I am missing?

Addition :

I add the component value as following

The single diode is MRA4007, which has about 0.7V forward voltage
The bridge diode is MB6S which has 1V voltage drop per bridge.

Transistor is simple PZT2222 which is simple BJT.

The pulse I am using is 18V when high, and 0 V when low.

The frequency driving is about 31KHz. I changed the frequency to 45KHz, but the current

consumption rather increased. I think there is some kind of loss when switching.

The resistor value, I tried using 3.3K to 10K Ohm, but i saw little improvements.

The capacitors are 10uF plus 0.1uF in parallel before the LDO.

I will try to measure inductance of the transformer and let you know


texts: Normalizing a nonlinear plant in system identification in control

texts:
I have calculated the "active power" and the "the reactive" power of a system in dq axis in nonlinear form and I am doing system identification on this "nonlinear" plant as a MIMO system.

The problem I have is that the system identification works with "normalized models" and this causes that either there is a steady state error or no correct model is identified.

Is there any way to normalize a nonlinear plant (input/output) other than using the per unit parameters?


texts:
I am having trouble interpreting the Output Data Section of the datasheet for the ADS62P22 ADC.
Page 56 includes the following description:

Output Data Format
Two output data formats are supported - 2s complement and straight binary. They can be selected using the serial interface register bit DATA FORMAT or controlling the SEN pin in parallel configuration mode.
In the event of an input voltage overdrive, the digital outputs go to the appropriate full-scale level. For a positive overdrive, the output code is 0x7FF in offset binary output format, and 0x3FF in the 2s complement output format. For a negative input overdrive, the output code is 0x000 in offset binary output format and 0x400 in the 2s complement output format.

(emphasis mine)
Based on this description, the full code range for the straight binary output format is 0x000 to 0x7FF or 0 to 2047 in decimal. The full code range for the 2s complement format is 0x400 to 0x3FF, or -1024 to 1023 in decimal. Both of these ranges have a total of 2048 codes, which only requires 11 bits.
But this is a 12 bit ADC. What happened to the other half of the codes?


texts:
Consider that the hardware team will take 2 months to develop some hardware, but by that time I will need to have the software ready.

My question is that how can I write the software and test it without having the hardware?

Is there any standard/s to be followed? How do you do it?


texts: Difference between Ethernet & Automotive Ethernet

texts:
What is difference between normal ethernet & automotive ethernet?
If I select a Ethernet phy which is a AEC qualified is that called automotive ethernet.
Please help me to understand.
Thanks


texts: How to calculate base resistor of PNP transistor?

texts:
I have not worked with transistor much, and therefore need some guidance in deriving the base resistor and pull-up resistor values.

I have the following circuit and I want to calculate base resistor R1, and the R2 resistor, which I am using to pull up the PNP base to 3.3V to prevent it from false turn ON when the GPIO pin is in the high impedance state.

As per the BC857C datasheet, the minimum current gain is 420, Vbe(sat) is -700mV, and Vce(sat-max) is -300mV.

With the following circuit, I intend to enable/disable the 1.5K resistor as pull-up to the load. So basically I want to use the transistor as a switch with 1 (3.3V) from GPIO putting it in the cut-off and 0 (0V) from GPIO putting it in saturation.

Could anyone please help me with the calculations?

simulate this circuit – Schematic created using CircuitLab


texts: How to use a transistor to externally trigger a Canon EOS camera?

texts:
I need to trigger a Cannon EOS 650D camera externally, this is done by shorting 2 wires, leading out from a standard 2.5mm jack:

The camera provides 3.3V. I want to complete the circuit and externally trigger the camera from an Arduino, for which I think the best way to do so is with a transistor. This is my current wiring diagram:

Pressing the button completes the circuit, but nothing happens. I tested it with an LED and it worked fine, the only difference being that I supplied the LED with the 5V of the Arduino. The exact transistor I'm using is an NPN 2N2222. My resistor is 10k Ohm.
Is my wiring wrong? Why is working with the LED but not the camera cable? Do I need a different transistor? If so, how do I know what I'm looking for? Any and all advice is welcome.


texts: I have heard that multimeter cables are good for HP server plugs. What is the standard name of this type of plug, so I know what to order? I have circled it in red:


texts: STM32 ADC over DMA Continuous Mode Too Greedy

texts:
I am trying to read ADC data via DMA on an STM32F412. The reading itself works fine but the rest of the program is not executed anymore so it's killed by the watchdog soon.

I have an array of size 50 and have it filled by the ADC in one-channel continuous mode.

There is a small function calculating the average of those 50 values that I call from the "complete" interrupt. If I call this function from main, it works fine.

To slow down the ADC, I set the prescaler from /4 to /8 but that did not help.

What would be the preferred way of slowing down the ADC? Increasing the size of the array seems dirty and might not buy me much.

A timer interrupt maybe?


texts: Struggling with mini ammeter on power supply

texts:
bit of a beginner here so please go easy on me.
I have a power supply (DC 24V30A) that I use to power a battery charger and soldering iron as well as a couple of other things (not all at once). It was a bit untidy so I designed and had printed a 3D case for it. At first I just ran the positive and negative into a couple of banana connectors so that I could easily swap between loads but I also thought it would be cool to put in a mini ammeter to monitor amp draw (purely a novelty thing, I don't need it, I just think it looks cool), however I'm having some issues getting it to work.
This is the ammeter I bought, its 0-30V 0-50A.

And this is the wiring diagram that was on the items page when I ordered it..

I've tried wiring it exactly like this. With no load connected the ammeter reads 12.4 (If anyone can explain this I'd really appreciate it. I don't understand how it has a reading at all when the circuit it technically broken? Unless its shorting from the thin red?). With a load connected it reads zero and the load doesn't power.
I tried a few different things incase the wires were labelled wrong, the only way I could get the load to power was by reversing the thick white and black and also connecting the thin black ground but the ammeter reading was zero again.
Hopefully what's happening is obvious to someone more knowledgeable on the subject and you'll tell me I'm an idiot for getting it wrong :) Otherwise I can't work out what's happening so any help would be appreciated.
Thanks


texts: What am I doing wrong? COB LED with LED Driver

texts:
I am relatively new to electronics and I am trying to turn on a Bridgelux BXRC-50C2001-D-74COB LED (Digikey listing, Datasheet ) using a 500mA Mean Well DC-DC LED Driver (LDD-500LW). The LED Driver is powered by a Mean Well 24V AC-DC power supply (IRM-60-24ST).

I've hooked up the LED Driver control wire to an Arduion's PWM output, added a heatsink to the back of the LED, and grounded myself when handling the LED.

I can't figure out why this setup is failing to turn the LED on. I shouldn't need a resistor in line with a constant current power supply, right? I read 24V across the other input pads of the LED, so I know power is being delivered.

Am I burning it out somehow?


texts: How much resistance is too much resistance for a video switch?

texts:
I'm looking for a device to switch video signals; a video switch. I want to use a dual/triple switch for two purposes, first to switch between two video signals, and secondly to switch the signal between open and +3.3V (which drives the pixel on the frame high.) (The third  channel may be used to switch between on and off for the pixel.) It's for an on screen display application.

However, most chips I've seen have an on resistance of nearly 60-80 ohms. This is way too much surely for video which is terminated with 75 ohms? If I'm switching with 75 ohms in series with the required 75 ohm termination, I've effectively created a voltage divider and halved the video signal. It might work, but the video would probably lose considerable quality; at worst, I'd probably lose sync.

As an additional question, related to this one, would there be any bandwidth issues with video switches? I'm using composite (CVBS) NTSC or PAL colour video.


texts: Why have atx power supplies need selector voltage?

texts: I am studying various ATX power supplies schematics and don't understand the need of the voltage selector as switching power supplies work at range of voltages. In most schematics i see the 110V line connected after the bridge rectifier between the resistors and filtering capacitors. Why?


texts: I want to make a power supply using two 18650 batteries in paralell with a TP 4056 module but im not sure how to balance the batteries

texts:
I am using a TP 4056 module, two 18650 batteries and some sort of BMS to balance the batteries before going to the charging module however I'm not sure whether I need a 2S BMS or a 1S BMS.
Preferably I would want the batteries to be in parallel so how do I go about connecting that to a BMS?


texts: Voltage comparator with single rail op amp

texts: I'm planning on setting up a voltage comparator with a single rail op amp and was wondering if I still need to attach a diode to the output because it is single rail and not dual.  I would think that the op amp will only produce an output when the input voltage is above the reference voltage not below it since it's a single rail.  Is this correct?


texts: How the time is converted into distance by multiplying it with 17,000

texts:
The general formula for Distance to Time conversion or vice versa is,

Velocity = Distance / Time

I have been implementing HCSR04 Distance Sensor,

Datasheet: https://docs.google.com/document/d/1Y-yZnNhMYy7rwhAgyL_pfa39RsB-x2qR4vP8saG73rE/edit

and according to Datashheet,

  To start measurement, Trig of SR04 must receive a pulse of high (5V)
  for at least 10us, this will initiate the sensor will transmit out 8
  cycle of ultrasonic burst at 40kHz and wait for the reflected
  ultrasonic burst. When the sensor detected ultrasonic from receiver,
  it will set the Echo pin to high (5V) and delay for a period (width)
  which proportion to distance. To obtain the distance, measure the
  width (Ton) of Echo pin.

This is how i am calculating the Distance right now,

Distance = Velocity of Sound * Time

But according to datasheet,

Time = Width of Echo pulse, in uS (micro second),
Distance in centimeters = Time / 58
Distance in inches = Time / 148
Or you can utilize the speed of sound, which is 340m/s

How come Time divided by either 58 or 148 gives Distance ?

Also,

Some code on the internet (http://www.bytecreation.com/blog/2013/10/13/raspberry-pi-ultrasonic-sensor-hc-sr04)  suggests that,

Distance = time * 17000 (in cm),

Here is what this page says.

  # work out the difference in the two recorded times above to
          # calculate the distance of an object in front of the sensor
          timepassed = signalon - signaloff

    # we now have our distance but it's not in a useful unit of
    # measurement. So now we convert this distance into centimetres
    distance = timepassed * 17000

How come multiplying time with 17000 gives the distance.


texts: Linear Variable Differential Transformer Operation

texts:
Ok, so I am a bit unclear on how this device works. I know it converts the linear displacement to an electrical signal and the movable magnetic core acts as the linear displacement magnitude. My question is...
If I use this device as a feedback component that measures the current position of a load, how exactly does it do this?


texts: What pad hole (drill) size is appropriate for a given through-hole lead diameter?

texts:
I am making some new through-hole parts in Eagle for components that are not already in the various libraries. I've realized that the drill size needs to be a little larger than the lead diameter, but I'm not sure by how much.

With some research, I found the following information:

"It depends" based on whether the component is being hand or machine soldered
add 6 mil to the lead diameter
7 to 15 mil (diametric gap) for 63/37 solder
5 to 10 mil (diametric gap) for lead-free/RoHS solder

Is there a rule of thumb or guide to support this information? Someone referred to the  Industry Standard for Printed Board Design (IPC-2221), but the IPC apparently only provides the table of contents of the document unless you pay $100US.

I'm planning on soldering the components by hand using 63/37 solder.


texts: How to fix Hitachi HD44780 16x2 LCD garbled display in 4 bit mode?

texts: It often happens that a HD44780 16x2 LCD shows garbled characters during usage. Most help on the web advises for using snubbing techniques to prevent voltage noise such as induction spike. I've done all that but the problem still persists. What can I do ?


texts:
I have to demodulate a square wave FM+PWM modulated signal, so for the FM demod I'm using a PLL with a positive edge sensitive comparator to lock on frequency only (CD4046BE). Carrier frequency is 100Khz, fmax 120Khz and fmin 80Khz.
What kind of loop filter should I use? Should it allow the modulating signal BW to pass? (LPF with fc=40Khz in this case?)
I tried anything from fc=infinity (no loop filter at all) from fc=150hz.. the oscillator locks in with the FM signal but the VCO controlling voltage (i.e. my demodulated output) is a mess and it's changing in amplitude with the frequency. (Not only the DC part of it, as I would expect)..

Any ideas?
Thank you very much!


texts:
I want to use LM35 Temperature Sensor in such a way that it gives out '1' i.e. HIGH for any temperature higher than 60 deg. C and '0' i.e LOW for any temperature lower than it.

How would I develop a circuit to give a high value when above 60deg and a low value for below 60deg?


texts: Low Melting Point solder paste reflow profile adviced

texts:
I've found a low temp solder paste with a melting point of 140°C. I want to use it with some SMD parts. I've looked for some reflow profiles and didn't found nothing with this low melting point.

Can I just go without "soaking zone" and:
- linear ramp profile to 150-160° - 2.5°C/sec.;
- mantain for 20-30sec;
- linear ramp profile to 25° - 5°C/sec.

Or there is particular advices?


texts: Would T feedback network of transimpedance cause serious distortion?

texts:
I am now designing a transimpedance using ADA4062-2 to detect signal from a photodiode. The first image is the equivalent circuit.

The signal from PD contains 1kHz sine wave and 2kHz sine wave and their equation are:

1kHz: 1u*sin(a)cos(2*pi*1k*t);

2kHz: 10n*cos(a)cos(2*pi*2k*t+b);

(while a is a fixed value set manually and b means the phase of 2kHz signal)

My target is to measure the amplitude and the phase of 2kHz sine wave. As the signal is quite small, I decide to use T feedback network. However, I found that the phase of 2kHz would change a lot, especially when a is set to be near 90 or 270 degree.

I doubted that it may be due to the T feedback network. So I substitute the T network with equivalent resistance(the second image). And luckily the phase change is gone.

But I don`t know why would the T feedback network affect the phase. Distortion? or any other reason? Does any one have idea about it? Thank you very much!


texts: What is this symbol in Eagle and equivalent for altium

texts:
I only use Altium Designer. Today I found an arduino due schematic for Eagle PCB Design Software and I saw a symbol I don't know.

What is it, and what is the equivalent in Altium Designer? Is it a directive>>PCB layout in Altium maybe?


texts: Induction heating directly from AC wall power

texts:
I am working on a project converting a 220 volt resistance heating kiln into an induction heating crucible furnace for melting black sand concentrates from a precious metals mine, which are comprised mostly of iron sand.
My question is, where the resistance kiln already steps the amperage up and the voltage down from 220 volts, can I simply connect the induction coil to the power feed to the kilns resistance heating elements?
I want to disconnect the resistance heating elements from the kiln and connect my induction coil to the power source.
My induction coil is a 1-in copper tube with water pumped through it to keep it cool.
I already know that designing an induction heating circuit specifically for the application would be most efficient, but, for now, I just need an induction crucible furnace to do several batches.
I already know that the 60 HZ of the kiln circuit is appropriate for heating iron.
The kiln circuit appears to maintain alternating current from the wall to the elements.
The kiln appears to control the amount of heating in the elements by switching three layers of windings on the transformer on and off.
I just need to know if I'm going to damage anything by hooking up to the induction coil.


texts: How to use a solid state relay in a dip package to drive a 24 vac relay

texts:
We have a fan coil unit in our server room where I work that utilizes a microcontroller to control temperature and humidity.  I have an HVAC and electrical background so I am familiar with instrumentation and controls but I am still on a learning curve with electronics and semiconductors. The project I am working on is building and programing a microcontroller (which operates on 5vdc) to replace the unreliable existing one that is already in place. I have completed the programming and touch screen interface for the controller and am now in the stage of designing a shield (interface board) for the controller so it can operate several 24 vac contactors, relays and a few pump down liquid line solenoids that are on the fan coil unit.

Originally I was going to use triacs with octocouplers but found a solid state relay (AQW212EH) in a DIP package that would allow me to install more outputs on the shield. Here is where my lack of experience comes in. Looking at the data sheet for this relay, pins 1,2,3 & 4 are used for the inputs and 5,6,7 & 8 are used as the outputs. While physically looking at the relay there is a small circle in the corner of the dip package. I assume that this is the anode of pin 1.

So with all of this information and assuming I wired this circuit correctly going off of what I assumed was pin 1 and looking at the Data sheet for the solid state relay I came to the conclusion that connecting 5vdc through a 560 ohm resistor to the input side of relay (anode), the LED reverse voltage of 5V, the Peak forward current of 1A and the LED forward current of 50 mA would be more than sufficient to safely drive the relay.  On the output side I connected 24 vac to what I assumed was pin 8 and then pin 7 was connected to the coil of a 24 vac 30 amp contactor. This in theory I assumed would drive the contactor, but alas I let the smoke out of my relay.

Can someone tell me if pin one on the relay is what I assumed it was? If it is, am I using the correct relay for this application (do I need some sort of snubber for this circuit)? If this is not the correct relay to use does anyone have a suggestion on which one I might try?


texts: Doorbell to buzzer with relay and AC to AC transformer

texts:
I have the following buzzer and want to use it with a switch by the door.

Would the following configuration let this work or are there crucial parts missing?

simulate this circuit – Schematic created using CircuitLab


texts: Explanation of the filter timing analysis in FPGA

texts:
I have wrote a FIR filter in VHDL by using ISE design suit. In design summary I can get all information about the timing analysis.
There is information about the max frequency.

and I have also found information about gate delay.
What does minimum period( max frequency) mean for filter realisation?


texts: Annoying Biomedical Electrical Engineering Question - How do you relate circuit values to find the distance of the nodes of ranvier?

texts:
Question is as follows:

I have the electrical circuit drawn as described by the question (ie, the electrical circuit representation of a membrane with Rm1 = 0, Cm1=0 then in series with Rn and a DC voltage, which is then in parallel with Cn).

But i have no idea at all how we are supposed to use this circuit to calculate the distance that the nodes of ranvier would have to be. The lecture notes give no indication or no guide as to how to do it. How do you go about solving this question??


texts: LED indicator - How to show 'on' when circuit is open

texts:
I am designing a circuit to replace a problematic computer controlled raise/lower operation for our mobile home bed. The bed uses a 30 amp DC motor (similar to a wiper motor) and simply reverses the polarity to raise/lower the bed. Quite simple really. There is a limit switch that cuts power when the bed hits an upper limit (thereby opening the normally closed switch) and a master on/off switch controlling the main power supply from a vehicle battery.

I am confident the circuit will work fine however I would like to place an LED in the circuit somewhere to indicate when the limit switch has been activated i.e to light when the limit switch is open.

I have looked at How to create a circuit to turn off LED when switch is "ON" and turn on when "OFF" but this and other answers I can find do not have a relay or other similar load attached to the circuit so I'm unsure how to proceed.

I am considering simply bridging the level limit switch with an LED and appropriate value resistor figuring that with the switch open current will flow through the LED/resistor lighting it. With the switch closed currect will flow through the closed switch instead (path of least resistance) turning the LED off. However I am unsure of the effect the relay will have on the LED when the switch is open. Will it (in effect) try to use power through the LED/resistor thereby burning them out?

Would appreciate some tips/comments/suggestions please.


texts: Closing a switch for a fixed (but short! milliseconds) amount of time

texts:
I would like to create a circuit with a button. When this button is pressed, a circuit should be closed for a fixed amount of time.
Right now, I have managed to get the desired effect using an arduino, but that seem way overkill for my needs.

I have found similar questions, like this one on EE, but my requirements are different. I need the circuit to be closed for 1 to 50 milliseconds (the value would be selectable using a potentiometer). Is the 555 timer suitable for this kind of durations?


texts: how to use external st-link v2 with evaluation board STM32F469NI

texts:
I tried to use external ST-LINK V2 with evaluation board STM32F469NI.
I connected it to the connector CN16, disconnect USB from CN22 and used ST-LINK utility. But connection to target MCU was failed.
I think that the problem was that I din't dis-activate ST-LINK v2-1 on board.
But it was no instruction in user manual about this issue.
Please, advice.


texts: How to send unsigned bytes through serial from arduino

texts:
I am using the sketch below to send the bytes of the frame buffer display.screen of 1536 bytes in size, to the computer over serial communication. The result of it to my java program is a byte array with values between 127 and -128. The result I am seeking of in java program is a byte array with values between 0 and 1. How could I declare the value of i to be an unsigned byte?

#include <TVout.h>
#include <video_gen.h>
#include <SoftwareSerial.h>

#define BAUD (9600)
#define W 128
#define H 96
#define compute ((TV.hres()/8) * TV.vres())

TVout TV;

SoftwareSerial Sserial(0, 1);

void setup() {
  Sserial.begin(BAUD);
  delay(1000);
  TV.begin(PAL, W, H);
  initOverlay();
  initInputProcessing();
}

void initOverlay() {
  TCCR1A = 0;
  TCCR1B = _BV(CS10);
  TIMSK1 |= _BV(ICIE1);
  EIMSK = _BV(INT0);
  EICRA = _BV(ISC11);
}

void initInputProcessing() {
  ADCSRA &= ~_BV(ADEN);
  ADCSRB |= _BV(ACME);
  ADMUX &= ~_BV(MUX0);
  ADMUX |= _BV(MUX1);
  ADMUX &= ~_BV(MUX2);
  ACSR &= ~_BV(ACIE);
  ACSR &= ~_BV(ACIC);
}

ISR(INT0_vect) {
  display.scanLine = 0;
}

void loop() {
  delay(1000);
  TV.capture();
  for (int i=0; i<compute; i++)
    {
      Sserial.write(display.screen[i]);
    }
  delay(3000);
}


texts: Which one of these transistors is equivalent to 2N918 NPN?

texts:
This is an FM radio receiver. Q1 is 2N918 NPN transistor but it is not available for me.

Which one of the following transistors is more equivalent to Q1 ?

BC547

TL431

s8550

s9014

2n5401

2n5551

I've read their datasheets but I'm not an expert, so I need your help :)


texts: NPN Switch when ON operating in Forward Active or Saturation Region?

texts: When an NPN transistor is used as a switch as shown below, is it operating in the Forward Active Region or the Saturation region when it is turned ON? I believe its working in the Forward Active Region since V_BC = 0V < 0.4V and V_BE = 0.7V. I read somewhere that an NPN is in saturation when operated as a switch in the shown configuration. I'd appreciate if someone can clarify.


texts: PS4 Party linked to Discord | Jack output to microphone input (line signal to phono signal) | Audio

texts:
I would like to connect an audio jack output (audio usb card on PS4), to the microphone input of a phone, and reverse the audio output of the phone to the audio input (microphone) of the usb card. Here is my idea:

 -

Red : Righ Signal
Blue : Left Signal
Purple : Mono Signal
Black : Ground

-

At first the stereo audio output I transform it into mono, with R1.
Secondly, the signal is reduced because the microphone input works much lower. With an attenuator (PAD) (for to transform it in phono signal level) (with R2 & R3)

Could this method work? I would like to know if there is a risk for my devices before carrying out this assembly.

The purpose of this montage is to connect a PS4 Party (Voice chat) to a Discord (an other voice chat), using a smartphone.


texts:
I made multi layer with Altium PCB board wizard.
I assigned two signal plane on each surface(top and bottom layer) and two internal plane(power and ground).
On layer stack manager, there is no dielectric on interface of Top Layer - Power plane and  Power Plane - Ground Plane(As you can see in the image) This makes me a little bit confused. Is dielectric unnecessary between those planes? If so, why?

Thanks in advance


texts: How to connect multiple signal wires to a single output?

texts:
Please forgive me if I've messed up some terminology somewhere. I've taken entry level electronics classes in college and played around with run of the mill microelectronics stuff, but please assume I know nothing.

The issue I'm dealing with is that I installed an aftermarket radio into my car that requires a connection to the emergency brake indicator. I also have an e-brake bypass that I'd like to install. The bypass fakes the e-brake signal to allow certain radio functions to be available without the e-brake actually being engaged. I'd like to keep both the existing e-brake wire and the bypass wire connected, but the issue is that when both the bypass and e-brake connection are fed together into the radio then the bypass indicates to the car that the e-brake is engaged even though it isn't.

I'm familiar with using blocking diodes to separate 3.3V/5V inputs on 3.3V/5V systems, but the e-brake uses a ground connection to signal that it is engaged. Would diodes work in this situation as well?


texts: AVR Attiy45 PWM Servo motor control in Assembly

texts:
I'm trying to contol a servo motor with attiny45 writing the code in assembler. I figured out how to set the timer in pwm mode and how to choose a needed prescaler. And with different OCR0A values i'm getting the neutral and 0 degrees position. However, i've ran into a problem with 180 degrees. When I keep the timer settings the same and don't set the OCR0A, the servo easily goes to 180 degrees. But when i change the OCR0A to get different pulse and different motor positions and than try to come back to default OCR0A value, nothing works. So, the code:

This puts my motor in 180 degrees position

.includepath "/usr/share/avra/"
.device ATtiny45
.DEF A=R16

.equ DDRB = 0x17
.equ PORTB = 0x18
.equ TCCR0A = 0x2A
.equ TCCR0B = 0x33
.equ OCR0A = 0x29
.ORG $0000
SBI DDRB, 0x3
SBI PORTB, 0x3
ON_RESET:
    SBI DDRB, 0
    LDI A, 0b10000011
    OUT TCCR0A, A
    LDI A, 0b00000011
    OUT TCCR0B,A
MAIN_LOOP:
    RJMP MAIN_LOOP

This doesn't (Hope it's easy to understand what I'm trying to do here)

.includepath "/usr/share/avra/"
.device ATtiny45
.DEF A=R16

.equ DDRB = 0x17
.equ PORTB = 0x18
.equ TCCR0A = 0x2A
.equ TCCR0B = 0x33
.equ OCR0A = 0x29
.ORG $0000
SBI DDRB, 0x3
SBI PORTB, 0x3

ON_RESET:
    SBI DDRB, 0
    LDI A, 0b10000011
    OUT TCCR0A, A
    LDI A, 0b00000011
    OUT TCCR0B,A
MAIN_LOOP:
    LDI A, 0xFF
    OUT OCR0A, A
    RCALL DELAY_05
    RCALL DELAY_05
    RCALL DELAY_05
    RCALL DELAY_05
    LDI A, 192
    OUT OCR0A, A
    RCALL DELAY_05
    RCALL DELAY_05
    RCALL DELAY_05
    RCALL DELAY_05
    LDI A, 40
    OUT OCR0A, A
    RCALL DELAY_05
    RCALL DELAY_05
    RCALL DELAY_05
    RCALL DELAY_05
    RJMP MAIN_LOOP

DELAY_05:
    LDI R17,8
OUTER_LOOP:
    LDI R24, low(3037)
    LDI R25, high(3037)
DELAY_LOOP:
    ADIW R24,1
    BRNE DELAY_LOOP
    DEC R17
    BRNE OUTER_LOOP
    RET

Yes i don't know how to write a 2 sec. delay function.

So is there a way to 'reset' the OCR0A register?


texts: What is the part number for a SIO connector?

texts: What actually is an Atari SIO connector, if I wanted to order the part? I have tried Farnell for DB13, Dsub 13 etc but no joy. I am assembling a SIO2ST for an 800XL.


texts:
Sometimes it feels like a ground-loop is inevitable. Please follow along the following thought-experiment. It would be wonderful if you could provide solutions to the issue described.

Imagine a board where one cannot use a ground plane. There are some chips on the board:

A digital or analog signal flows from Chip 2 to Chip 3. Suppose the trace cannot go straight to the other chip, but needs to bend around some other circuitry on the board.

Now consider the current flow when the signal moves from Chip 2 to Chip 3:

This looks bad. The surface enclosed by the current flow is very large. If it is a digital signal, it will surely inject lots of noise into the circuitry soldered on that surface. And if it is an analog signal, it will probably absorb noise from the circuitry on that surface.

Trying to be smart, I come up with the following solution. Let's add a return path for the signal:

Huray, it looks like the signal is very well protected now. The enclosed surface is much smaller. It won't emit magnetic fields, nor absorb them.

But wait a minute... do you see that? Do you see the ground loop I just created? Look again:

Yikes! What now? Did I just improve the situation, or did I actually make it worse?

Please help...


texts: I am working on a Quality Assurance procedure document for PCB integrator. I did some research on the quality standards followed by different companies. But what I could not find was a general and basic procedure by which I (as a client) can evaluate how my PCB manufacturer and integrator have fabricated my PCB post fabrication. P.S. These procedures are just for Visual Inspection. I have a separate procedure for Factory Acceptance Test (FAT) where I check the PCB by applying voltage, uploading code and other procedure.


texts: Calculating voltage drop and current use of an IC

texts:
I’m trying to figure out the voltage drop and the current used by a Johnson counter from a data sheet and am feeling a little lost.

In particular I’m looking at a CD4022B from TI.

I’m looking at the static electrical characteristics on page 3. I’m getting confused as to the relationship between Vo, Vin, and Vdd.

In hooking up the IC I’m assuming Vss is the input voltage, Vdd is the GND, and Vout is what is outputted through the decoded outputs (0-9).

I’m also a little lost on the different output and input states listed.  I’m assuming the Output High (source) current Ioh is referring to when one of the decoded outputs is high, and that the Output Low (sink) current Iol is referring to current draw by the IC when the decoded outputs are low.

I’m also assuming right now that Vol are also referencing the decoded outputs, and Vil is referencing Vss, but I’m guessing that assumption is wrong simply based on what the numbers are.

Any help would be great in figuring this out. Thanks.


texts: How To Hold Power ON For Some Time Without Using A Microcontroller or 555?

texts:
This is my first question here, so I'm hoping for help.

I'd like to take a Momentary event and use it to turn on a device (LED, for starters to model the concept) for a minute (give or take) at a steady Current & then go off.  I'll need to provide ~3v at ~.350 to ~1A (.350 most likely, 1A not-so-much) from a low-voltage DC Source.

Imagine walking up to your door, stepping on the mat (with a pressure switch under it), and having the porch light come on for a minute without using your hands and you'll get the concept.  With a minimum component count and all (other than wiring) in as small a package as possible.
EDIT: I'm trying to build a proof-of-concept prototype as described, but the end result will be human-wearable.

I've been playing with Monostable Multivibrator ideas ("one shot" being irresistible), but seem to have hit some saturation point in my soggy melon & can't get a steady current while ON.

There's more to this project, but this specific part is scrambling my brain & I fear I'm down a rabbit hole & need expert help digging back out.

Currents, voltages & time are approximations, but my primary concerns are NOT using a microcontroller or 555, holding the Output steady during the entire "unstable state", using no or minimum quiescent current during the "stable state" (not that a one-shot is the right answer!) and keeping the bounding box as small as possible as well as keeping the cost at a minimum.

No need for complexity, just a simple trigger-and-hold-for-a-minute latch.
EDIT: I'd like to emphasize the need for brutal simplicity.  And that a quick momentary bump would hold non-TTL current to the load for about a minute.

I hope some creative electronics genius reads this and can suggest some possible circuit(s) to try.

Thank you for reading, and more-so for answering with a simple circuit or a link to a page with one on it.

J


texts: Atmega328 reset pin not working after re-burning Arduino boot loader?

texts:
For a bit of background you might want to read

ATmega328 with Optiboot not compatible with Arduino?

But I will summarize anyway. I have some Atmega328 chips that shipped with the optiboot bootloader burnt onto them that appeared corrupted, To get the chips to work I purchased and used a USBASP and re-burnt the bootloader. The process works OK and the chips reboot and run the blinky sketch without issue but when I pull the reset pin to ground the chip does not appear to reset and run the Arduino loader. While the reset pin is held to ground the sketch will stop running and when released the blinky sketch will start without delay.

If connecting the Reset pin to DTR of my USB-TTL the sketch will stop running when trying to upload a sketch via the Arduino IDE then fail the upload with a not connected error.
Using the USBASP I can re-burn the bootloader and it appears to reset correctly

The reset worked before reburning the boot loader, The reset circuits I use work on the atmega168 chips I have.

For the bootloaders I have tried flashing chip to use the internal clock
http://arduino.cc/en/Tutorial/ArduinoToBreadboard
and as a lilypad and duemilanove but the reset pin still does not appear to work correctly.

I have also used the software that came with the USPASP and read the Fuse&lock bits and the High/Low fuses look ok, not sure about the extended and lock bits.

Chip reads;
Low= E2,  High= DA,  Ext= FD,  Lock=CF

board.txt reads;

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F


texts:
I don't understand why CPU manufacturers make multi-core chips. Scaling of multiple cores is horrible, this is highly application specific, and I am sure you can point out certain program or code that runs great on many cores, but most of the time the scaling is garbage. It's a waste of silicon die space and a waste of energy.

Games, for example, almost never use more than four cores. Science and engineering simulations like Ansys or Fluent is priced by how many cores the PC it runs on have, so you pay more because you have more cores, but the benefit of more cores becomes really poor past 16 cores, yet you have these 64 core workstations... it's a waste of money and energy. It is better to buy a 1500 W heater for the winter, much cheaper.

Why don't they make make a CPU with just one big core?

I think if they made a one-core equivalent of an eight-core CPU, that one core would have a 800% increase in IPC, so you would get the full performance in all programs, not just those that are optimized for multiple cores. More IPC increase performance everywhere, it's reliable and simple way to increase performance. Multiple cores increase performance only in limited number of programs, and the scaling is horrible and unreliable.


texts:
There are some "audiophile fuses" in the market, and the manufacturers claim that they are directional.

Here are some examples:

HiFi-Tuning
Isoclean

Here is a quote from a fuse review (yep...):

"After a few hours I received a reply from Mr. Stein with a question that turned the dance around. He asked if I installed each fuse using the directional arrow shown on the fuse logo. He informed me these fuses are directional and must be installed in that manner to work correctly."
A fuse review at the Stereo Times

Now, my question is how can AC fuses be directional, given the nature of AC?


texts: Diode Bridge Rectifier using Dual Schottkey Diode Bridge

texts:
I am trying to develop the first stage circuitry of a kinetic energy harvester from that is made using  magnets and a coil. I attach a photo of the harvester taken during development.

My intention is to efficiently convert the voltage coming out of the coil to a DC voltage so that I can power up a TI energy harvester IC ( hopefully BQ25505 or similar) at a later state to charge a Lithium Battery.

The very first step assigned to me is to develop a good rectifier bridge. I would like to ask from the community if I can use the following IC that has a set of schottkeys integrated by TI for my purpose.

IC : http://www.ti.com/lit/ds/symlink/uc2610.pdf
Internal Schematic of IC

I have gone through the IC and it claims to give a ~0.3V drop for 1mA current.

I have measured my harvester to not exceed 10mA of generation. It is also one of my requirements to simulate my results soon and thats why I have chosen such an IC.

My first question is Can I use this IC for my low voltage dropout rectification perpose?

My second question is that i can notice that there are two rectifier bridges. Therefore, can i provide the same AC output of the harvester coil to both bridges to with the hope of obtaining a lower voltage drop?

Finally, what are the disadvantages of following this type of an approach? Is there a better way I can rectify the generated AC energy waveform?


texts:
Is a 4060B IC meant to start with Logic 1 on outputs, or does it start counting from 0? Surely as its a binary counter, its meant to start with all outputs on logic 0, and count up using binary?

My circuit with a 4060BE IC has nothing else but a resistor and a capacitor, and it appears to start with all logic 0. How would I start counting on Logic 0, would I just have to use an inverter to flip the input?


texts:
How to measure -50V to +50V using a microcontroller ADC?

I would like to scale my signal so that -50V signal voltage equals -5V at the input to the ADC and +50V signal voltage equals +5V at the input to the ADC. Vref and Vcc are 5V.

for clarification
When I connect the-50V input (trimmer), so the output will be-5V.
When I connect the +50 V input (trimmer), so the output will be +5 V.

So the input range for the AD converter is + /-5V.

Thank you very much for your help

I drew a schematic, but this works in the output range of + /-5V.


texts: Connect two different LiPo batteries in parallel

texts: I am working on a device which needs 1000 mA current at any time. Due to space constraints, I forced to use two different size and capacity battery from the same manufacturer. One is of 270 mAh and another one is 500 mAh. Both have 3.7V but the internal resistance is different. For 500 mAh battery, it is 0.19 ohms and the 270 mAh one has 0.8 ohms. If I am going to connect them in parallel will it cause any problem? Is there any problem to charge and discharge them?


texts: Why is this resistor connected between connector shield and ground?

texts:
I was looking over my raspberry pi model B and I noticed a resistor between the USB power connector shield and ground.  I've noticed this on many PCB designs with much larger packaged resistors although I've never known the reason for them.

This is the part I'm curious about, R51.

On the board, it looks like its an 0805 package, although I've seen larger one.

So my questions are basically:

Why do we need a resistor here? is it something to do with ESD when inserting a cable into the connector?
Why do we use such a large package?  I assume its to handle more power, but where would this power come from since they are both "GND"

Please correct me if I'm wrong in any of my thinking


texts: Why don't more devices incorporate full-wave rectifiers as reverse polarity protection?

texts:
Recently, I was introduced to the idea of using a full-wave rectifier, in order to protect against reverse polarity damage in DC devices.

I hadn't even considered using a rectifier in an already DC circuit, but now that I think about it, why doesn't every device that has the potential to be damaged by backwards power and ground connections use this idea?

I can't wrap my head around why something that could easily protect the circuit whilst simplifying the setup wouldn't be included?


texts: Would this photodiode sensor work better in series or parallel?

texts:
I am working on a photodiode small object sensor that detects and records signatures of objects passing through an array of photodiodes facing an array of IR LEDs. I am connecting the photodiodes to the two channels of the Max86141, but would like to use more than two photodiodes per channel to cover a large area.
Would this work better with photodiodes in series or in parallel? How would the signal differ between the two options?


texts: Test Cases for 16-bit Ripple Carry Adder

texts:
I'm working on a lab for a course I have on VHDL, and part of it is to implement an n-bit ripple carry adder and then test it as a 16 bit adder. My problem is that I don't really know HOW to test it, or rather what inputs to give it to test it thoroughly. This is the first time I've ever done anything like this so I'm sorry if it comes across like I have no idea what I'm talking about.

My first thought was that since the adder is just a bunch of identical full adders chained together, if I could show that the individual adder blocks work fine, then it would be trivial to show that the 16 bit adder worked properly since it has such a simple design. So my two inputs would be XXXXXXXX01101010 and XXXXXXXX01011100 with an initial Cin of 0. Using these initial values, the first 8 adders in the chain would each perform a unique addition (as a function of both inputs and Cin) which would fully cover the truth table for a full adder. So if the corresponding bits in the sum are correct and the carry doesn't screw up along the way, it would show that the adder works properly.

I have a bunch of reasons to think this is the wrong approach though. First off, it just seems too simple. The lab manual refers to test CASES, but obviously I've only done one case. It also mentions that you should get timing information from the simulation, but I don't understand how that would work with only a single case. And most importantly, the strategy just doesn't make sense to me. All I'm really doing is finding a really awkward way to test a full adder by chaining a bunch of them together and forcing the Cin for each test case to be linked to the previous test case. I'm not testing the functionality of the whole thing.

As you can probably tell I'm pretty confused. I don't really have any idea how to properly test a 16 bit adder aside from testing the individual parts making it up. Should I just treat it as a black box and only concern myself with the final carry out and sum? But since the sum is 16 bits, how much testing do I actually need to do to show it operates properly?


texts: how to find specific component with ltspice?

texts:
I'm having trouble every time I need to find a component with Ltspice. Normally I manage to find what I need but not for the current component.

I need a 2n2222 transistor. I've tried to enter words in the component search toolbar for transistor, nothing. I tried to enter the code, nothing

I wonder what is the best way when you know the component you need to search it, because every time I need a new one, it ends up being troubles.


texts: Parallel resistor and current source analysis

texts:
I'm a little bit confused by this circuit. I want to analyse the current "I"s AC and DC terms.
Since the capacitor will allow AC, there will be an output current Iout which is the sum of Ir and I, making I = Iout - Ir. For DC, there will not be any output current because the capacitor will block it. The resistor and the current source will be in series, and thus the current "I" will be the current through the resistor. However, the direction of the current "I" and the current that goes from Vs to 0V are opposing each other. How am I supposed to approach for DC analysis? Thank you for advance :)

simulate this circuit – Schematic created using CircuitLab


texts:
So zener diodes in reverse bias apparently only work within a specific current, Is min and Is max which generally have basically the same X value. On the zener diode graph usually lets say Is min is at like 5.6v and Is max is at like 5.61v or something really close. So zener diodes only work within that voltage? If I apply 6v it will break? If not, then I don't understand the relationship between I-V on the graph

How do zener diodes create a stable voltage output even then? How do diodes have a constant voltage drop? I don't understand how to input a specific current into the zener diode without having to input a super specific voltage since voltage is just the different charge density that drives current

I'm just entirely confused


texts: Keep a circuit closed after activating a reed switch NO (normally open)

texts:
I need a circuit that it is open until I bring near a magnet that closes a NO reed switch for a short interval of time. I need the circuit keep closed for ever.

Thanks!


texts:
Introduction

First off, I'd like to let you know I am a beginner at electronics so some of the stuff I say might be very wrong.

What I want to make is a 'spark generator' for lighting some gases in a chemistry project.

I have been having a bit of fun just shorting a mini capacitor bank and seeing the spark it produces. Now I want to include a remote switch so I can discharge them from a distance.

I have decided to use a transistor controlled by an Arduino Uno (Arduino is controlled by nrf24l01 module).

Circuit

simulate this circuit – Schematic created using CircuitLab

Sorry if my circuit drawing is bad, here is a written description if you prefer:

capacitors are 35v (I only charge them to 12v) 1000uF and there are 5 in parallel with eachother
arduino I/O pin connects to a 500 ohm resistor, which connects to base pin of transistor
transistor collector pin is connected to capacitor+
transistor emitter pin is connected to capacitor-
the arduino ground is also connected to capacitor- (HAVE NOT TESTED!) -

I have made separate cables for charging them up. Essentially I have charged capacitors hooked up to a transistor switch which is controlled by an arduino.

Here is what I need help with

Previously to making this circuit I had tested it without arduino ground connected to capacitor-. It did not work which is what led me to attach arduino ground to capacitor-. I am concerned that shorting the capacitor bank will actually just flush it all into the arduino ground and fry it. I was tempted to try it but I came here for reassurance from someone more knowledgeable. Thanks


texts:
Suppose a rubber duck antenna with the typical radiation pattern as shown below,

Rubber duck Antenna http://www.l-com.com/copyrighted_images/pattern_hg2405rd.gif

also the manufacture specifies that this monopole has vertical polarization.

If I put the "vertical monopole" in a horizontal orientation, the polarization changes to horizontal?

So the antenna has lineal polarization and the orientation of the antenna will determine if it has horizontal or vertical? Also the radiation pattern will shift from Vertical to Horizontal and vice-versa?
 Like the monopole antenna what kind of antennas will be affected for this phenomenon.

Also I would like to know if the polarization is affected by obstacles? Like Faraday Rotation in ionosphere that satellite communications needs to overcome.


texts:
I am using WDT to wake up pic16lf1619 from sleep mode. I have all the unused pins configure as output and connected them with a 10 kohm  to the ground. What is happening is that when in sleep, current is about 5mA. I read the data sheet seems to do what is needed, can someone please work me through to solve this?

If by any chance any examples to follow or any article to read to better understand this power consumption issue.

Below is the code that I am using

void main() {

// then, setup OPTION as a first thing to do after each reset
//    OPTION_REG = 0b10001111;

    OSCCON  = 0b00000000 ;                   // Set the INTOSC= 31KHZ
    FVRCON  = 0x00;
//    ANSELA  = 0x00;
    CM1CON0 = 0x00;
    CM2CON1 = 0x00;

//    WDTCON0 = 0b00011000;                  // Set the WDT time out to 4 second
    WDTCON0bits.WDTPS1 = 1;

    TRISA   = 0x00;
    TRISB   = 0x00;
    TRISC   = 0x00;
    ODCONA = 1;
//    ODCONB = 1;
//    ODCONC = 1;

//
//    WPUA   =  0x00;
//    WPUB   =  0x00;
//    WPUC   =  0x00;

// while(OSCSTATbits.LFIOFR==0){};         //wait until LPOSC  is ready

while(1)
    {
        CLRWDT();
          RA2 = 1;
//          NOP();
        __delay_ms(5000);
          RA2 = 0;
//          NOP();
        __delay_ms(5000);

       WDTCON0bits.SEN = 1;
        SLEEP();
//        SLEEP();
//        SLEEP();

       WDTCON0bits.SEN = 0;
    }
}


texts: Looking for a miniature low-power range detector for a robot

texts:
Sorry if I am not following guidelines.

I am a noob trying to build a Robot for learning purposes - I want to play with navigation algorithms using particular measurements - distance to the obstacle along a straight line. I know there are many other ways to skin the cat, but I want it this way.
I have been looking online for a sensor that would help me, but there are so many options and none of the are ideal. My requirements:

Can sense distance between 1 foot (30 cm) and and 15 feet (5m); ideally between 10 cm and 10 meters (I'll accept infinity as the upper bound :) ).
Is directional, not shotgun-like. Ideally, at 10 feet (3 meters), the sensor would bounce back if the bounding sphere the size of a tennis ball would contain a wall. (Hopefully this makes sense - this translates to a cone with a certain angle).
Is small - no bigger than a human eyeball including casing.
Is low voltage/power - so that I can make it draw power from a usb cable, perhaps adding some sort of converter, but hopefully not.
Functions in complete dark, or near-dark.
Is under $20 per piece (I might buy 10 in bulk).
has distance resolution of at least 10 cm (4 inches); higher is better.

It does not have to be sample the data very fast; even 10 times per second will do.
Hopefully this question is withing the guidelines. Again sorry, I do not have previous robotics experience.


texts: use of BTFSC with pic16f627a/628a/648a not clear

texts:
Still learning on pic programming.

The code has no meaning only for looking at the behaviour of BTFSC
When using BTFSC in a loop construction the testing bit is changed the next instruction is not skipped when the tested bit is 0.What is wrong in my approach?

 AGAIN
    MOVLW  B'01010100'
    MOVWF   BYTE
    MOVLW H'07'
    MOVWF LOOPCOUNT
LOOP

    BTFSC BYTE,LOOPCOUNT
    BCF PORTA,OUTPUT
    BSF PORTA,OUTPUT
    DECFSZ LOOPCOUNT
    GOTO LOOP

    GOTO AGAIN


texts: syntax error near module or module not declared?

texts:
I'm trying to write one main module and one as secondary (called "adder"). However, I kept getting errors either telling me there are syntax errors with the "adder". Please help me with my code:

Here is the implementation of the module:

module adder(
output reg [3:0] S_out,
input [3:0] S_in,
input [3:0] coin
);
initial begin
assign S_out = S_in + coin;end
endmodule

and here is the main module:

module Assign2(
input Nickel,
input Dime,
input Quarter,
input Start,

output reg Release_Paper,
output reg Return_Coins
);
`include "adder.v"//this line is removed

wire CLK;
CLoK C1(CLK);
reg [3:0]S_in;
reg [3:0]S_out;
reg [3:0]coin;

wire [2:0]i;
assign i = {Quarter, Dime, Nickel};

wire reset;
parameter S0 = 4'b0000;
parameter S1 = 4'b0001;
parameter S2 = 4'b0010;
parameter S3 = 4'b0011;
parameter S4 = 4'b0100;
parameter S5 = 4'b0101;
parameter S6 = 4'b0110;
parameter S7 = 4'b0111;
parameter S8 = 4'b1000;
parameter S9 = 4'b1001;
assign reset = Start;

always @(posedge CLK) begin
if (reset == 1) begin
    S_in = S0;
    S_out = S0;
end
case(i)
    3'b001: coin <= S1;
    3'b010: coin <= S2;
    3'b100: coin <= S5;
endcase
#100;
adder jjjjj(.S_out(S_out), .coin(coin), .S_in(S_in));//here is the error
if (S_out == 4'b1010) Release_Paper <= 1'b1;

else if (S_out > 4'b1010) Return_Coins <= 1'b1;
end

endmodule

EDIT:
I have removed the include and here is the error message:
[HDL 9-806] Syntax error near "addr". ["....Assign2HDL/Assign2.v":66]

The platform is Xilinx Vivado 2017.1, and I also tried on Xilinx ISE 13.4, which strangely has some issue with my clock:

Line 28: Non-constant loop condition not supported for forever

and here is the clock:

module CLoK(
output reg CLK
);

initial begin
   CLK = 1'b0;

   forever
      #2 CLK = ~CLK;
end

endmodule


texts: Digital output won't go from 5V to 0V with a diode attached

texts:
Edit

I did a poor job of soldering and forgot to solder the pull-down resistor on the input to the buffer.  My mistake for posting a question too soon.

I built a circuit to read a button with a single board computer.  Wanting to protect the input of the computer, I used a TI 74HC4050 buffer with a diode on the output to avoid any consequences if the SBC's input pin was mis-configured as an output.

I'm confused about the behavior of the buffer at the anode of the diode.  It goes from 0V to 5V, but does not return back to 0V.  Removing the diode seems to solve the issue (and anyways the resistors limit current enough to protect misconfigured pins), but I still want to understand why this was happening.

The datasheet description for the buffer says that it is a CMOS non-inverting buffer, so I imagine that there is a pull-up network and a pull-down network.  Why doesn't the pull-down network successfully clear the voltage at the input of the diode?

simulate this circuit – Schematic created using CircuitLab

This is my understanding of how the buffer looks on the inside.  I understand that there may also be some ESD protection circuits attached, but I don't see how those could be causing issues.

simulate this circuit


texts:
I have following program to control two servo motors:

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

void main()
{
  int x,i,j,t=0,y=0,n=0;
  DDRA=0b11111111;
  DDRC=0b11111111;
  DDRB=0b00001111;

  //Configure TIMER1
  TCCR1A|=(1<<COM1A1)|(1<<COM1B1)|(1<<WGM11);         //NON Inverted PWM
  TCCR1B|=(1<<WGM13)|(1<<WGM12)|(1<<CS11)|(1<<CS10);  //PRESCALER=64 MODE 14(FAST PWM)

  ICR1=2499;  //fPWM=50Hz (Period = 20ms Standard).

  DDRD|=(1<<PD4)|(1<<PD5);    //PWM Pins as Out

  OCR1A=65;
  OCR1B=50;

  unsigned int k[1],z[1];

  while (1) {
    for (i=0;i<=4;i++) { //for keypad
      PORTB=0xf7>>i| 0xf0;
      x=PINB;

      if (x==0b11101110) {  //key 1 for moving motor 1
        OCR1A=OCR1A+1;
        _delay_ms(100);
      } else if (x==0b11011110) { //key 2 for moving motor 2
        OCR1B=OCR1B+1;
        _delay_ms(100);
      } else if(x==0b10111110) {    //key 3 for storing value of OCR1A
        k[t]=OCR1A;
        t++;
        _delay_ms(1000);
        _delay_ms(1000);
      } else if (x==0b11101101) {    //key 4 for storing value of OCR1B
        z[n]=OCR1B;
        n++;
        _delay_ms(1000);
        _delay_ms(1000);
      } else if (x==0b11011101) {   //key 5 for moving motor from k[0] to k[1]
        OCR1A=k[0];
        Wait();
        for(OCR1A=k[0];OCR1A<=k[1];OCR1A++) _delay_ms(100);
        _delay_ms(1000);
      } else if (x==0b10111101) {    //key 6 for moving motor from z[0] to z[1]
        OCR1B=z[0];
        Wait();
        for(OCR1B=z[0];OCR1B<=z[1];OCR1B++) _delay_ms(100);
        _delay_ms(1000);
      }
    }
  }
}

I have 4*3 Keypad connected port B. Both motors work properly through keys, but while storing only values of OCR1A are stored properly and somehow OCR1B values are not stored properly. Is there any difference between functioning of OCR1A and OCR1B?

After moving motors I am storing the values of OCR1A and OCR1B which represent their current positions. I am storing those values in array (k[] and z[]). Keys 5 and 6 are used to access the values stored earlier so that I can move the motors between the two positions.


texts: Why is this light in this parallel circuit only working in series?

texts:
I have a set of christmas lights I have shortened. I don't understand what is happening here.

Both wires work to light the second half, but when I connect it all together (1), the light on the first half does not work??

In (2) and (3) I showed that power is still passing through both wires, except that it does not light the first half. So the problem is not a short in the wires themselves.

In (4) I show that the bulb lights up when I put them in series. So I also know the problem is not the bulb.

What is going on here? I don't understand what I am missing.

Here is a picture showing illustrations:

UPDATE:

Ok, so by looking at a new uncut set, I have learned that the original was NOT in fact wired like above. Thanks to a commentor who pointed out that it is short-circuited, I went to a new set and learned that it was not wired as it originally looked. I also cracked open one of those lights with three wires to see what it looked like inside.

Here is a modified diagram of the actual wiring of the original. I popped off the bulb so you can see how it is attached:


texts:
I'm planning to use a chip with two 5V output pins to provide power to two systems: a MCU (attiny85, operating voltage: ~2V - ~5V) and a USB device (input current: 3A). On top of that, I'll have an alternative 5.3V input source to power these systems.

I think the chip's 5V pins will need to be protected from current flow when the alternative source is active. I believe I could perhaps use two sets MOSFETs back-to-back and two Schottky diodes for the required circuitry. The diode will likely have a 300mA - 400mA voltage drop, which is why the alternative source is boosted to 5.3V to accommodate the voltage drops.

I'm very new to designing transistor circuits, so please bear with me. Is the following a good circuit for the task? I'm thinking of using Si2305CDS, which I just happened to find on Digikey and seems to have the right Vgs.

I added a 100r to each gate and a 1M to GND by following this answer. The idea is to block current flow in PIN 1 and PIN 2 when VDD is active. Is this the entire circuitry required? Are there things one should look out for?

Any advice will be much appreciated.

Thanks

EDIT: Fixed MOSFETS. Thanks to @mkeith.


texts: What kind of metal are the legs of resistors made from?

texts: Can anyone tell me what kind of metal is used in electronics to make wires going in/out to the elements? Can longer of this metal wire be found anywhere? Actually I am looking for sth like copper wire but in silver colour. What's its name?


texts: LED Circuit from a demo board -- not sure how both LEDs can function

texts:
Can someone explain how this circuit works?

I believe the green led is supposed to be turned on when the input is positive however I can't seem to figure out a situation when the red led would be turned on.

From the direction of the Red LED it would look like it would be turned on if the input was negative. However if that's the case I can't seem to see where it could source current since the QLED1 would be blocking any current to it.


texts: Mean time to failure (MTTF) of coreless DC motor?

texts:
What is a typical MTTF of a small coreless DC motor (e.g. 4x12mm) like the one seen here?

For a non-coreless 'toy' permanent magnet DC motor, the MTTF was shown to be in the 10s of hours at rated voltage, with MTTF decreasing exponentially as voltage was increased beyond spec: https://www.pololu.com/docs/0J11/all

However, I have read that coreless DC motors can have longer commutator/brush life due to lower inductance.  Would it be reasonable to expect a coreless DC motor to have an MTTF of 500-1000 hours if the applied voltage was half the spec voltage?  Does continuous (i.e. multiple hours) operation wear down the brushes faster than shorter runs (in the minutes)?

This information has not been available from any of the vendors I have interacted with, so I guess my next step would be to buy 100 or so and test them.


texts:
That was a pdf when originally uploaded, but am now going to try to zoom in on the sub-circuits.  Please let me know if there's a better way to do this.

I'm trying to make a PIC-based BLDC motor driver but am drawing ~0.5A even with no motor plugged in.  I can move a motor, variable speeds, clockwise, counter clockwise, have validated my drive tables, but am not doing it efficiently...like at all.

I suspect that I'm permitting some current to shoot through a transistor pair.  MOSFETs heat up crazy fast when I try to PWM at frequencies greater than 1kHz (I'd ideally want this to drive at about 30kHz).  A lot of time on the o-scope has shown me that the gate voltages cross over (high side turns off and low side turns on) for about 1us and then for about 2us when high-side turns on and low side turns off.

Because all the MOSFETs are N-Channel, I have to use a gate driver (LM5109BMA) to boost voltage and be able to turn on hi-side MOSFETs.  Unfortunately for this to work I need to keep on charging a boot-strap cap which means I have to do that business where the two MOSFETs of a pair toggle opposite one another.

I guess my question is, is that 1us to 2us of crossover really that bad? Is there any way to practically mitigate that?

see also: AVR443 and AN957 application notes from Atmel and Microchip


texts: Connecting a computer fan controller for multiple 12V DC fans to 120V AC

texts:
I would be interested to control multiple fans in an application that is outside a computer. I didn't find any interesting product for controlling multiple 12V 120mm fans that I could connect to 120V with an adapter.

So my question is: if I'm going to use a computer fan controller, how could I connect it to 120V AC (assuming that I would be using a computer fan controller with thermal sensors, that could control more than 3 fans)?

If this is a bad idea, what should I use instead of a computer fan controller for multiple 12V 120mm fans?


texts: Arduino getting supply from digital pin?

texts:
I'm having a weird problem: my Arduino seems (in my far-from-expert interpretation) to be getting supply voltage from a digital pin.

This is my setup:

Arduino is using external supply voltage. I've connected the power supply's GND and positive outputs to Arduino's GND and Vin inputs, respectively.
I have a simple program using digital pin 3 as an input. I read the value on pin 3 and use it to set the value on pin 13, which then powers on or off an external LED.

Now, I thought that if I unplugged the Vin pin, the LED would go off, but it doesn't. Am I missing something?

Thanks!


texts: Trying to calculate Vae by Kirchhoff KCL

texts:
I have this circuit.

I am trying to calculate the voltage between A and E by using Kirchhoff current law.

This is what I did.

First I wrote the equation for the left side, starting at A clockwise:

\$ -V_{B2} - I_{1}R_{3} + I_{2}R_{3} - I_{1}R_{5} + V_{1} - I_{1}R_{1} = 0 \$

plugging in the value and simplifying, I get:

\$  17I_{1} - 10I_{2} = 8 \$

Now lets talk about I2. I assumed that this current was clockwise, so

\$ I_{2} = -2 A \$

right?

Plugging in this value on the first equation I get

\$  I_{1} = -0.705 A \$

Now I draw the 3 currents for the branches...

\$ i_1 \$ will be equal to \$  I_{1} = -0.705 A \$
\$ i_2 \$ will be equal to \$  I_{2} = -2 A \$

and

\$ i_3 = i_1 - i_2 = 1.294 A \$

so, \$ V_{AE} = 2 + 1.294 \times 10 = 14.94 V \$

I arrived at this value but B2 is killing me. I am not sure if I should add or subtract B2 to get \$ V_{AE} \$

is that correct?


texts: Technical name for 3.5mm microphone input and speaker output to headphone with microphone cable?

texts:
I am trying to find a cable online that takes the front jacks on my computer case (speaker out, audio in) and merges them so I can use my headphones that have a built in microphone.

What would I search to find what I am looking for?


texts: I know that cassettes store an analog signal, but is the signal Amplitude-Modulated (AM) or Frequency Modulated (FM)?


texts: SPICE .DC LIN sweep directive w/ variables for START, END, and INCREMENT args

texts:
According to most of the SPICE references I've read, the form of the .DC sweep directive is

.DC [LIN] <sweep variable name>
+ <start value> <end value> <increment value>
+ [nested sweep specification]

I'd like to know if it's possible to use variable-based expressions for the START, END, and INCREMENT arguments.

For example, say I define parameters for a nominal resistance value (R_NOMINAL) and a sweep resistance value (R_SWEEP)

.PARAM r_nominal=560k,r_sweep={r_nominal}

and my goal is to a) perform a linear sweep of R_SWEEP's value, and b) use the values assigned to R_NOMINAL and RTOL to define the START, END, and INCREMENT values for R_SWEEP, e.g.,

.DC LIN PARAM R_SWEEP
+ {R_NOMINAL*(1-RTOL)} {R_NOMINAL*(1+RTOL)} {R_NOMINAL/1000}

where RTOL is the resistor's tolerance value (e.g., 5%). When I attempt to simulate with this statement, PSPICE emits the following error message in the output file:

*Analysis directives:
.DC LIN PARAM R_SWEEP {R_NOMINAL*(1-RTOL)} {R_NOMINAL*(1+RTOL)} {R_NOMINAL/1000}
----------------------$
ERROR(ORPSIM-16152): Invalid number: Error while converting token '{R_NOMINAL*(1-RTOL)}' to double value. Token can be a constant or expression

I've tried removing the curly braces from the expressions shown above, I've tried user-defined functions, etc., but so far it appears that the START, END, and INCREMENT argument values cannot be defined via expressions containing variables; they can only be defined via numeric constants or expressions containing only numeric constants. Is that correct?

FWIW, the schematic capture software I'm using is Cadence Design Systems' Allegro Design Entry CIS (OrCAD), if that matters.


texts: How does Wi-Fi deal with multiple frames received at once?

texts:
Right now I'm trying to establish a network of 30+ transceivers with NRF24L01 modules - one of them acting as central. However there are big problems, whenever two or more nodes try to send data to one node.

As far as I know, WiFi devices are able to receive multiple frames at once with no problems. How is this possible? Are they listening on multiple (like 100) channels at once? And when there are two frames received in the same moment on one channel are there errors just like with NRF24l01 network?


texts: I use PIC18F4550 in my board and it is "read protected". But I want to have more security by changing the part number of the micro to another part number. This way if someone cracks the code, the code will not work correctly for another micro controller. How can I change the part number?


texts: Does a 3-winding common mode choke work on PE wire

texts:
Update

It was pointed out the PE wire has to carry large current in fault condition so using a 3-phase CMC is problematic. In IEC62368-1 (2nd edition) chapters 5.6.3 and 5.6.4 it is implied that the protectice current rating for EU is 16A and US 20A, this is based on common fusing in the regular mains indoor setup. So that translates to 1.25mm^2 wire for 16A and 1.5mm^2 wire for 25A. That's one chunky CMC. Possibly you could get away with that thick wire for PE and lighter wiring for L and N, if you're procuring a custom CMC.

An alternative / additional measure could be to use a heavy-duty ferrite on the PE line with regular CMC attached to the L and N lines.

Like the title says. On IEC61000-4-6 conducted immunity test, a coupling device is used to inject 150kHz - 80MHz interference to the external cabling. As this noise is common mode in nature, it's not filtered by ferrites, pi-filters, 3-terminal caps etc.

The device here has a touch screen, which has a sensitive front end and these are notorious to be nasty with regards to immunity testing as you're dealing with something designed to pick up very small changes in capacitances.

See here for example: How do I Design Capacitive Touch Interfaces with EMC in Mind?

Standard response for this is to include a common mode choke that'll take the noise right out, at least if your part frequency range and characteristics are OK.

Now if you have a device with earthing, you have a separate PE wire. This will happily carry the noise right past your CMC and you will have your chassis acting as an antenna.. Which messes with our sensors. I have verified this is indeed the vector as disconnecting the PE makes the problem go away, however this is not acceptable to the client.

Now there are three-phase CMC inductors which are obviously designed for high-er power 3-phase devices. My immediate instinct would be to find a suitable 3-phase CMC and connect the extra winding to the PE.

Is this going to work? Initial testing indicates not so well. Why not? Shouldn't the inducted RF be exactly the same on L + N + PE as it would be for L1 L2 L3?

This is what I expect to see:

3-winding CMC connection:

NB: We're trained professionals, whatever the euphemism is in EN60950 that allows using life-threatening contraptions like this. Do NOT try this at home.


texts: Stepper Motor Speed control using Driver IC

texts:
I am referring Stepper Motor driver IC DRV8824 and TEA3718.

I want to increase speed of rotation and as per datasheet of DRV8824, rising edge on step pin causes the indexer to move one step.

Does it increases speed of stepper motor?
TEA3718 doesn't have step pin, so can I say we can't increase motor speed in TEA3718?

Please someone explain. Thanks.


texts: Charging (via USB) and using 2 Li-Ion batteries in parallel simultaneously?

texts:
I've been searching everywhere for a solution that will allow me to charge 2 Li-On batteries (3.7V) in parallel with a USB port without taking off the load/run (mechanically) of the rest of the circuit. If possible with charge balancing as well, although I would ensure similar charging levels before connecting of course. To be clear, the first part of the load is a boost circuit taking the 3.7V up to about 6.5V. I can't use a larger capacity battery due to their size (the batteries I'm using are really small).

I was thinking of using two chargers connected to a single USB port, but that might take too much current from the port, although I could adjust for that. It would also require a switching circuit that switches from running mode to charge mode if the voltage would drop below a threshold (2V?) for either battery for example, which would need some voltage regulator IC, but I have no idea where to look for this. This would also require some type of limiting circuit for simultaneously charging and using, which is what I'm aiming for. Is this setup a good idea? I imagine there might be simpler solutions.


texts: 2 Blue LEDS , in series or parallel/ optimal power resistor type of batteries compact area

texts: I intend on making a project illuminating an acrylic  transparent rod. drill holes on both sides and inserting Blue LEDS tight space wired in series or parallel  what resistor value and perhaps  small switching power supply to make LEDS Blink to prolong batteries and maintain luminosity?  I am considering using High end rechargeable double AA batteries  guessing 3, in learning that blue LEDS require 3.2 VDC.  Power and or a switch must fit into compact area like 2/3 of cigg pack. any ideas? Bottom line long life of batteries and at least mid way luminosity.


texts:
I am working on a PCB for which I need external soldered wires. I made the whole PCB with al the traces on the front layer. Then, with 3 vias, I got to the back layer. Here I need to solder 3 wires to the traces (green traces on picture). I used a "Test point" for that. Does this work: Does placing a pad on a trace make it a connection?

And one more question: I am new to PCB designing. In this design I did not made a ground plane. I am planning to do this in the future, but how can I then solder a wire to this ground plane? Also through a pad placed random on the board where it is filled with copper?

Thanks!


texts: Understanding simple circuit with two transistors and one led

texts:
I'm trying to understand the following circuit:

I expected it to work like this: Initially the LED is dark. When S1 is pressed, Q2 is "opened" and powers Q1's base, so Q1 is "opened" and current can flow to the LED. In addition, because Q1's emmitter is connected to Q2's base, I expected that both transistors will stay "open" and the LED stays lit up even when S1 is released.

But it doesn't work like that. When S1 is pressed, the LED is lit up, but when S1 is released, the LED goes dark again. Why is that?

EDIT: Added D2:


texts:
I recently came across an article explaining how to drive a high side MOSFET using a "separate isolated power supply whose ground and the ground of the MOSFET-based circuit are isolated". However after reading this article I still do not completely understand the driver circuit and had a number of questions:

Why is it necessary to use an isolated power supply rather than a non isolated power supply that will simply boost the gate voltage to able 12V higher then the voltage of the "main supply" in this case 12V higher than +24V with reference to ground?
the isolated power supply shown in the figure is represented by a battery, how can I instead replace this with a boost converter? (should the input to the boost converter be +24V and ground, with the output negative connected to the source of Q1 and positive terminal where the positive terminal of the battery was)
what effect does having the negative terminal of the isolate power supply connected to the source of Q1 have?
is there an isolated boost converter that you can recommend given the small current required to drive the gate.
if applied to a H-bridge will i need 2 seperate isolated boost converters (one for the left high side drive and one for the right high side drive?)

The circuit suggested by the this article is below:


texts: How do you determine antenna gain from a polar radiation plot?

texts: Using the plot from the Wikipedia Patch antenna page as an example, how is the 9dBi value obtained? It looks like the radiation is barely higher than 0dBi at the strongest location.


texts: In my understanding, the polarity of the magnetic field of a bipolar stepper motor does not matter. You can hook it up to the biploar driver either way and it would still work correctly. However, is there a drawback to reversing the polarity of the magnetic field by hoooking it up incorrectly?


texts: If I had something like this, where the forward voltage for the diode is 1.8V, then how would I determine the current through the resistor? Do I use the 1.5 voltage drop through the resistor?


texts: What interesting application areas utilise electrical engineering simulation tools, e.g modelling mechanical analogues?

texts:
Electrical simulation methods have been developed extensively to simulate electrical and electronic circuits. It is commonly recognised that there are electrical analogs to  mechanical components using mass, springs and dampers which can then be represented as capacitors, inductors and resistors, with these analogous circuit simulations it is then possible to determine the systems response to arbitrary user inputs, and perform frequency response sweeps, and to optimise component values to minimise overshoots and resonances, in many cases analogous circuit simulations can provide quick and elegant solutions to problems in other physical realms.
In my career as a research engineer  (electrical) I've used electrically analogous systems several times but rarely come across other EE's doing the same.
There must be many other interesting practical applications of physical systems that are designed or analysed based on analogous electrical systems.
Background reading:
https://en.wikipedia.org/wiki/Mechanical%E2%80%93electrical_analogies
https://lpsa.swarthmore.edu/Analogs/ElectricalMechanicalAnalogs.html


texts: Answering a phone call with RN-52 and Arduino Mega 2560

texts:
I come from Stackoverflow in need of some guidance.

My goal: stream tunes (completed) and answer/end calls through the RN-52 (not completed)

My issue: I am getting confused on the RX/TX/CTS/RTS functions of the RN-52 (datasheet).

I have tried: Connecting the RX and TX of the RN52 to the TX and RX of the Mega 2560 (pins 0 and 1) to initiate UART however when I attempt to send the command C to the module, nothing occurs (that should tell the RN52 to answer the call).

Perhaps: my issue is getting the RN52 into command mode, but I have ground GPIO9 (putting low makes it command mode).

Perhaps: I am not sending the command correctly? I used Serial.println("C");.

I hope my question and struggle is clear. Any reading material pointing me in the right direction would be greatly appreciated. I would love to get this to work but I would love to learn how it works even more. Thanks in advance and happy New Year!

Helpful link: https://learn.sparkfun.com/tutorials/rn-52-bluetooth-hookup-guide/c

EDIT (diagram, additional info)

Here is my code for using two push buttons to answer or decline a call.

#include <SoftwareSerial.h>//not sure if this is needed...read about it during a tutorial?

const int answerButton = 52; //button to answer
const int endButton = 53; //button to end

void setup(){
  Serial.begin(9600); //start talking to RN52
  pinMode(answerButton,INPUT); //set buttons to input
  pinMode(endButton,INPUT);
}
void loop(){
  int answer = digitalRead(answerButton); //read the state of the buttons
  int endCall = digitalRead(endButton);

  if (answer == 1){ //if depressed, print C (command to answer the call)
    Serial.print("C");
    delay(2000);
  }
  if (endCall == 1){ //if depressed, print E (command to end/reject call)
    Serial.print("E");
    delay(2000);
  }
  delay(1);//for stability...although I'm not entirely sure this is needed :)
}

When I use this, I do see the RX LED illuminate however the call is not answered. And unfortunately I can't connect to the RN52 serial to see what is says through CoolTerm at the same time since the Arduino is using the connection (read about that in this forum).

GPIO7 is NOT connected to anything (just open).

The RN52 is grounded and does stream tunes properly through Bluetooth on my iPhone. HOWEVER, there is mention about grounding or sending a signal on GPIO2 in the datasheet (table 1-3) but I can't comprehend what they are saying to do...this might be part of my issue.

ADDING SCHEMATIC (awesome, had no idea I could do this! Sorry, will include in all future posts!)

simulate this circuit – Schematic created using CircuitLab


texts: getting arduino PWM from 0-5V to 0-10V or 0-12V?

texts:
I have an IR2110 driver and a LOD voltage regulator 15V from a solar panel. now this will supply 15V to VCC as shown below. Since I have a LOD voltage regulator of 15V, I can't apply the same voltage to VDD and Vin (arduino). Therefore, I bought a 12V regulator that will be applied to VCC and VD as long as PWM signals from the arduino be 0-12V. Is there a solution that make pwm go up to 0-12V?
note also I have one PWM and its inverse coming out of the arduino.

1)Is there a solution that make pwm go up to 0-12V?

2) What effects on the driver if I reduce VCC to 12V?

3) Is there formula for capacitors other than the bootstrap one and what their purpose?

I know it is a lot of questions, but if I get any help, I really appreciated :)


texts:
We are working on a robotics project employing a differential drive.We are facing problems with one of the motors .While one of the motor runs fine, the other motor humms and sometimes doesn't run when connected through L298n driver,but works fine when directly connected to a battery.Tried checking the driver and everything is fine with it when tested with the other motor.How can I solve this problem?
Thanks in advance
Motor specs- DC motor with encoder
12V , 1A ,rated torque- 7kg-cm, stall torque - 17kg-cm


texts: Altium Designer: Not assigning all the sub-parts of a device

texts:
I've been banging my head against this one for a while now and can't seem to find and answer anywhere.
I have a multi-channel design that uses a a quad comparator as the base part. However in the repeated sub-sheet I only make use of 2 of the 4 comparators.
When I compile the design and check the BOM I get 16 devices where I'm expecting 12. The 16 devices are all only partially used.
How can I get Altium to optimise the subpart usage?


texts:
I have a project where I would like to use an electromagnet to lift an item for a longer period of time. I was looking at a magnet like this one:

http://www.ebay.com/itm/110880874455?ssPageName=STRK:MESINDXX:IT&_trksid=p3984.m1436.l2649

Problem is that seller states that it should not be used for more than 5-10 minutes at a time (without severe reduced lifespan). I would like a magnet that could stay on for an hour at a time at least and lift/hold maybe 20kg. Is this possible?

I was thinking that one might be able to do this by getting a significantly larger magnet than  required and powering this on a lower voltage than specified to avoid it burning out (less current going through the coil), but this is just a guess on my part.


texts: Question regarding Voltage-controlled resistors in PSPICE

texts:
I am quite new to PSPICE, and I am using Capture to design my circuit. To explain what I am trying to do, I have two circuits that I want to connect via a voltage in the following manner:

In circuit 1 I have a certain voltage, let us call it V1.

In circuit 2 I have a resistor (R1), with a value that I want to be dependent on V1. So that basically, R1 = f(V1), where f is a function. The function, f, is not necessarily linear.

Is there any easy way to do this in SPICE/PSPICE?


texts: I am trying to build automotive load dump circuitry to bench test my inverter design. I would like to know if anyone has any experience building something like this. I need to create a 172V spike that stays for 400ms.


texts: Question regarding an Op-Amp substitution

texts:
This schematic has a LM107 op-amp at its heart. It seems that it is now discontinued. Will a uA741 op-amp be a good substitute? If not, why not? What would be a good substitute?
Thanks.


texts: How to remove remnants of a capacitor pin?

texts:
I want to replace swollen capacitors on a motherboard. Unfortunately, when removing one of them, a fragment of a pin has stuck in the PCB:

I tried to remove it using pliers, but it only made the situation worse.

EDIT: I’m more interested in methods that can be achieved using tools available in home.


texts: What is the effect of PCB trace length to a capacitors frequency response?

texts:
I want to know the effect of PCB trace length to a capacitor's frequency response, especially in terms of bypassing and decoupling applications.  For instance in the above simplified PCB, we have a capacitor, C1, connected to VDD and GND, near an IC, U1.

I am able to obtain the frequency response of this 0805-sized capacitor (PN CL21C270JBANNNC) from the manufacturer, as below:

What is the effect of the PCB traces to the frequency response, particularly to the resonance frequency?  Assume, the trace lengths between the capacitor and IC are 10mm, trace widths are 0.25mm, and this is a standard 1oz copper FR-4 board.

My assumption is the manufacturer obtained the frequency response curve with zero or minimal trace lengths.  How does the resonant frequency shift because of the traces?


texts: Which optical sensor for detecting moving paper?

texts:
I am building a mailbox notifier and looking for sensor and thresholding circuit suggestions to detect when mail is dropped in, here are my requirements:

very low power (when no motion at least) sub 1mA at 3.3/5V
output LOW when no motion
output HIGH during motion

I have started testing with an off the shelf PIR sensor board (https://www.adafruit.com/products/189), but there are a few issues, mostly the PIR sensor does't always trigger when an envelope is dropped it, even with the sensitivity at maximum. I believe this is due to the PIR sensor not working well with paper temperature.

I am considering the following options:

photo diode/transistor -- because luminosity changes when the lid/door is opened
photoresistor -- maybe too slow to respond?
integrated active proximity/IR sensor (http://www.adafruit.com/datasheets/vcnl4000.pdf), but will it detect a thin piece of paper?
What other options should I consider?

The problem with sensing luminosity is mailboxes have thin openings and if it's on a door, and the door is opened or lights are switched on/off outside, it may get confused.

For the threshold circuit, I need to basically only trigger when mail falls in/move, and optionally the door is opened/closed (luminosity goes up/down at once), and go back to LOW as soon as things are still.

The ideal would be detecting when paper is moving, but I am looking for ideas to do this on a low power circuit...


texts:
I am working on a project where I have 4 MAX3485 (for 4 different RS-485 channels) chips talking on the same UART bus with an ESP-WROOM32 module.

This is the schematic:

simulate this circuit – Schematic created using CircuitLab

My code sets all DE_X lines to low and all RE_X lines to high before any communication on any of the RS-485 channels. This, according to the datasheet, should set all the MAX3485 chips into low power mode and all RO pins in High-Z. When talking on a RS-485 channel, the code sets DE_X high, sends the message then sets DE_X low and RE_X low, waits for the reply, then sets RE_X high. The code never talks on more than one channel at a time.

I checked all that behavior with an oscilloscope and all the DE_X/RE_X signals toggle as expected.

The problems:

RX line is idling low instead of high.
When any one of the MAX3485 chips talks on RS-485, the device on the other line gets the message and responds, I can see the response on the RX line but because it is idling low the ESP32 won't pick it up (I do see high toggles when a message is received, like RX is inverted)
If i populate only one MAX3485 on the board, it works, RX line is idling high and the ESP32 is picking up what is coming on RX

When testing I only have one other device to connect to the RS-485 bus, so all the tests are performed with 3 channels unconnected (but with termination resistor).

What am I doing wrong?

Thanks very much for your help!

Edit:
The device I'm working on connects to 4 different RS-485 buses and terminates each one. This is needed because the total number of devices that must be reached is 124 and not all of them play nice, so we don't want to take any chances and chose to link 32 devices / RS-485 channel => 4 channels / device.


texts: First-order sigma-delta ADC quantization noise cancellation

texts:
I claim I can completely eliminate the quantization noise associated with the first-order single loop sigma-delta ADC. That is kind of overhyped but to me I have not been able to reject the claim yet. Mathematically it makes sense though. Anyway, here's my design:

The equations for \$y_{1,i}\$ and \$y_{2,i}\$ can be written as
$$y_{1,i}=x/2+\epsilon_i-\epsilon_{i-1}$$
$$y_{2,i}=x/2+\epsilon_{i-1}-\epsilon_{i}$$
The digital filters take average of the digital streams \$y_1\$ and \$y_2\$, hence \$D_{out1}\$ is the digital representation of the analog voltage \$y_1^{avg}\$ and \$D_{out2}\$ is the digital representation of the analog voltage \$y_2^{avg}\$. The voltages \$y_1^{avg}\$ and \$y_2^{avg}\$ are given as
$$y_1^{avg}=1/n\ \Sigma_{i=1}^{n}y_{1,i}=x/2+\epsilon_n/n $$
$$y_2^{avg}=1/n\ \Sigma_{i=1}^{n}y_{2,i}=x/2-\epsilon_n/n $$
where \$\epsilon_n\$ is the quantization noise for the last step. Now the analog voltage associated with the output Y, \$D_{out}\$, is simply
$$ Y=y_1^{avg}+y_2^{avg}=x$$
So the quantization noise in the output code does not appear, and I have completely reconstructed the original input signal x. Am I right?


texts: PIC microcontroller PORT not changing logic states

texts:
I tried to run the following code on both the PIC16f690 and the PIC16f19176. All the code should do is turn off and then turn on PORTA. I also tried turning on then off PORTA. However PORTA never changes so whatever I first set it as is what it stays at. Eventually once I fix this PORTA will be used as the 8 bits for a 16x2 lcd and then PORTB will be used for the other lines. So when I send a command to the 16x2 lcd I need to be able to set PORTA = 0b00000001; for example and then keep switching it.
void main(void) {
     TRISA = 0b00000000;
     ANSEL = 0b00000000;
     ANSELH = 0b00000000;
     while(1){
        PORTA = 0b00000000;
        __delay_ms(5000);
        PORTA = 0b11111111;
        __delay_ms(5000);
    }

    return;
}


texts: Bit/data stream unknown. How to figure out?

texts:
I have taken apart a digital weight scale and on the circuit are two pins labelled 'test'. When connecting this to the soundcard of my PC I can see it is a digital signal (high/lows), but I don't know how to read/interoperate it.

Anybody knows how to do this? I'm pretty sure I once saw a free/open-source program that was able to read different kind of data protocols. Anybody know it?

Here is a recording when pressing up/down on the scale, perhaps it helps: http://lars.stonerocket.co.uk/images/electronics/weegschaal.wav

Thanks


texts:
Where can I find MOSFETS which don't have the source and the substrate at the same potential? I have searched through the Internet but I only find MOSFET which have the source and the substrate at the same potential.Do I need to google a key word or something?
I want to connect the MOSFET just like this:

simulate this circuit – Schematic created using CircuitLab


texts: How do you achieve an efficiency of more than 1 bit per Hertz?

texts:
I believe this is also known as spectral efficiency - apparently it's possible for us to transmit more than one bit per Hertz.

But to my layman mind I imagine a Hertz being only capable of representing a single bit, on or off. Perhaps that's just because I'm visualising a square wave, and there's some way to cram more data in than that if you can get something more complex than a square wave to the other side clean enough.

Could someone explain this in detail, touching on what the concept is called and some methods used commonly such as in the 802.11 specification.


texts: What does it mean that NiMH batteries do not have a "float voltage"?

texts:
I am working on a project that requires a very tiny amount of power and will be used fairly infrequently for short periods. As such, I'd like to experiment with making it entirely self-contained by connecting rechargeable batteries to solar panels, allowing it to recharge from ambient light.

According to my research, sealed lead acid batteries can be subjected to a charge at a constant "float" voltage for extended periods, but are generally reserved for high-power applications due to their weight and bulk. LiPo and Li-ion batteries are extremely finicky.

According to this question, NiMH batteries "don't have a float voltage, so constant voltage charging doesn't work, as you've likely discovered". However, I'm having difficulty finding a resource explaining what "doesn't work" means, precisely. Other pages say that as long as a battery is subjected to a voltage greater than its current charge level, it will charge. I take this to mean that NiMH batteries can be charged at constant voltage, but in charging them to their full potential one runs the risk of overcharging them due to temperature-dependent fluctuations in their charge and discharge curves.

So my question is: can a NiMH battery be safely charged for an indefinite period of time using a "dumb" charger which supplies a constant voltage below the battery's maximum? i.e. if my application requires 3.6 volts, can I power it using a 4.8 volt NiMH battery that is deliberately charged to only 3.6 volts?


texts: Simulation measured voltage not matching calculations

texts:
Ok, so I have the following circuit:

click here for simulation

The source voltage is 5V.

The voltage measured between A and B is 2.44V, which differs from what I get by calculating that same voltage - 2.55. Here is how I am calculating it.

R1=1000

R2=1/(1/1.2*1000+1/4.7*1000) //adding voltages of parallel resistors using the 1/Rt = 1/R1+1/R2 formula

Rtotal=R1+R2

Vab=R1/Rtotal*5V

Vab=2.55 //calculated result using MS Mathematics because I am a lazy piece of shit

As you can see there is a difference of 0.11V. Is that normal or is there another reason as to why it happens? Am I doing something wrong? Is the simulator bugged, maybe?

UPDATE: Here is how I get the exact same value using excel:

Gonna pick up a pen and paper and see what I get myself.