texts: speed control loop for line following Robot

texts:
I am working to control the speed in my line following Robot (using arduino uno),by using proportional constant Kp in a closed loop, in my code I calculate the RPM from The Right Motor and the  Left Motor,I  used Timer2 interrupt every 50ms to calculate the speed (Rpm) from these Encoders.

I used Timer 0 and Timer 1 to generate pwm signals with a VARIETY duty-cycle=75 % to control the tow motors speed,
I measured The RPM for the Left Motor by using Tachometer it is 100 RPM,
I changed the Kp constant But my Encoder Output still Give me about 80 RPM (no change).

so my question is :
is there any problem in my code or the way I do the controlling loop or understanding the controlling loop.

This is the Code :

//encoders variable
volatile bool counting;
volatile unsigned long events0;//the number of pulses from Left Motor in 50 ms;
volatile unsigned long events1;//the number of pulses from Right Motor in 50 ms;
double n1=540;//the number of pulses in one turn for the Right Encoder;
double n2=540;//the number of pulses in one turn for the Left Encoder;
//end of encoders variable

  //PID controller Variable.
 double setpoint=100; // Reference speed;
 const int Kp=10;
 const int Ki=0;
 const int Kd=0;
 double measuredRightRpm_value;//speed in RPM from Right encoder/Motor;
 double measuredLeftRpm_value;//speed in RPM from Left encoder/Motor;
 volatile signed long erorR;//Eror from Right Encoder;
 volatile signed long erorL;//Eror from Left Encoder;
 volatile signed long Eror;
 //End of PID controller Variable.

 //Timer 2 over flow interrupt
  int x = 0, flag = 0;

  ISR (TIMER2_OVF_vect)
  {
  TCNT2=0x64;//for 10 ms
  x++;
  if(x==5) //to get 50 ms
  {
  flag = 1;
  x=0;
  }
   }  // end of ISR

 void eventISR ()
 {
 if (counting)
 events0++;
 }  // end of eventISR
 void eventISR1 ()
 {
 if (counting)
 events1++;
 }  // end of eventISR1
void setup ()
{
//setup Timer 0 and Timer 1 to generate Pwm signals
TCCR0A=0xB3;
TCCR0B=0x02; // set Timer 0 to clk/8 HZ ,fast PWM mode,tow signal inverted to each  other.

TCCR1A=0xB1;// set Timer 1 to clk/8 HZ ,fast PWM mode,tow signal inverted to each other.
TCCR1B=0x0A;;

TCCR2A=0x00;//timer 2 overflow interrupt to calculate RPM from Encoder
TCCR2B=0x07;
TCNT2=0x64;

 pinMode(5,OUTPUT);
 pinMode(6,OUTPUT);
 pinMode(9,OUTPUT);
 pinMode(10,OUTPUT);
 //end of Timers  setup for generating PWM and interrupts.

 //Encoder Setup
 Serial.begin (9600);
 Serial.println ();
 pinMode (2, INPUT_PULLUP);
 attachInterrupt (0, eventISR, RISING);
 attachInterrupt (1, eventISR1, RISING);
 // end of Encoder setup
 counting = true;
 // Timer/Counter 2 Interrupt(s) initialization
 TIMSK2=0x01;
 interrupts ();
 }  // end of setup

 void showResults ()
 {

 Serial.print ("the speed (RPM) for the Left Motor = ");
 Serial.println ((events0/n1)*(60000/50));
 measuredLeftRpm_value=(events0/n1)*(60000/50);

 //Serial.print ("I counted for the second  Motor  ");
 //Serial.println (events1);
 Serial.print ("the speed (RPM) for Right Motor = ");
 Serial.println ((events1/n2)*60000/50);

  }  // end of showResults

 void PID()
 {

 measuredRightRpm_value=(events0/n1)*(60000/50);//speed in Rpm from Right/encoder/Motor.
 erorR= setpoint - measuredRightRpm_value;//Erorr From_Right Encoder.

 measuredLeftRpm_value=(events1/n2)*60000/50;////speed in Rpm from Left/encoder/Motor.
 erorL= setpoint - measuredLeftRpm_value;////Erorr From_Left Encoder.

 }

void loop ()
{

counting = true;
if(flag ==1)
{
  showResults();
  PID();
events0 = 0;
events1 = 0;
erorR=0;
erorL=0;
flag = 0;
}

OCR0A=192+Kp*erorR; //75% DutyCycle  for Right Motor .
OCR0B=192+Kp*erorR;
OCR1A=-192-Kp*erorL;//75% DutyCycle  for Left Motor.
OCR1B=-192-Kp*erorL;
}  // end of loop


texts:
I am trying to learn good vhdl design methodologies. I was trying to find some advises about multiple signal drivers. Unfortunatelly without success. My question is if it is good idea to have signal with multiple drives (or I shall avoid it almost always).

My problem:
- I have some transmission module. I would like to have some indicator (just for example only one) informing that there is a new data. One process set the flag if new data is available, other one clear flag after read.

In this case I have two process which drive one resolved signal. The problem which I can see here is concurency. Does exist good development pattern for problem like this ? Shall I avoid and never use multiple signal drivers ?


texts:
I have purchased these following components:

12V/18Ahr SLA battery

300W modified sine wave inverter

50W LED floodlight (NO SENSORS I.E. PIR, AMBIENT, ETC)

12V relay module

We are currently experiencing a shortage in electrical supply in our country. So in order to keep the property light during the night I decided to make an emergency backup light.
My plan is to connect a fully charged 12V SLA battery to the input of the inverter and then connect the floodlight to the output of the inverter via the 12V relay module. The 12V relay will activate the floodlight when the power from the mains is off due to load-shedding.
My question is, will it be safe to keep the battery connected to the inverter continuously, so the system is autonomous and only turns on and consumes the battery when there is load-shedding?
And I only to intervene when the battery needs to be charged. On this point is it also safe to put a 12V SLA battery charger to charger the battery and still keeping it connected to the inverter?
The LED only runs for 2 hours per day. There is no timer controlling this. The power utility (Eskom, South Africa) which implements the blackout, turns of the power lets say at 20:00pm, the utility then leaves the power off for only 2 hours. They then turn the power back on after that. The reasons for this is because the utility tries to lessen the burden on the power infrastructure by having planned power outages for 2 hours per day. Hence the relay is used to switch the light on when there is a power outage via the mains control signal and then turn the LED off when there is mains power.


texts: A-Level Physics: What is the current needed to maintain the wire at a steady temperature of 387∘C?

texts:
I am stuck on answering an A Level physics question:

When a current of 5.00A flows through a tungsten wire in a stream of air at 27.0∘C, the wire attains a steady temperature of 57.0∘C. It may be assumed that the wire's resistance is proportional to absolute temperature (i.e. temperature measured from absolute zero at −273∘C) and that the rate the wire loses heat energy is proportional to the temperature difference between the wire and the air stream.

What is the current needed to maintain the wire at a steady temperature of 387∘C?

The question gives two equations:

V = I R and P = V I

And in the text tells us:

Resistance of Wire = k * -273

Rate of wire loosing heat energy = k * temperature difference between the wire and the air stream.
So the higher the temperature, the more current that is needed to maintain the temperature.

But I cannot see how these equations can be used with the information given.

Thank you for any help as I am extremely stuck.


texts: Constructing Excess 3 BCD to 7 segment decoder - circuit hints needed

texts:
I am currently trying to construct a circut for an Excess 3 BCD to 7 Segment decoder. Therefore the input range ranges from 0011 to 1100 in binary inclusive with the rest of the inputs being don't cares.

I would like to know if I am on the right direction for my truth table for a Excess 3-BCD to Seven Segment decoder. As a result I would like to know if my assumptions are in the right direction.

Most truth tables on-line show truth values for BCD to Seven-Segment decoders. However,
I would like to create a logic circuit diagram for an Excess-3 to BCD decoder so I am left to create the table from scratch.

Assumptions:
1. Since 0000 BCD corresponds to decimal 0 on the display I am assuming that Excess BCD 0011 corresponds to decimal 0 on that same display.
2. Since I am only concerned with single digits and not multiple digits I only care about 0 to 9 being displayed.

Truth table:

What flaws do you guys see in my logic specifically what line segments are triggered when have Excess 3 BCD as inputs instead of the conventional regular BCD? Any help from the community will be well appreciated. Assume logic 0 and logic 1 for each line segment.
I have searched around for my answer but have no clear cut conclusion thus far.


texts: FCC certified module with uncertified antenna: technical or legal issue?

texts:
Say I have a consumer device that uses a pre-certified WiFi module. As I understand it, radio modules are certified with a fixed set of antenna choices that were included as part of the module's testing.

I understand that using an antenna outside of the approved list is a no-no. I'd like to know specifically why it is a no-no. I have two theories:

TECHNICAL RISK: Using an antenna that was not on the approved list is a technical risk, because you are outside the scope of what has been previously confirmed to pass testing. So you may happen to fail compliance testing because the module performs poorly with this new antenna type. However, you could also get lucky, and end up passing, if the new antenna performs well with the module.

LEGAL ISSUE: Using an antenna that is not on the approved list INVALIDATES the compliance certification of the module. Due to this, the overall consumer device will now be subjected to more vigorous FCC testing, which would have been avoided by using a compliant antenna.

Which of these two theories is the problem with using a non-compliant antenna? Or, is it something else entirely?


texts:
I'm trying to understand how the charging of a plate capacitor works which lead me to question my understanding of current flow. In many explanations, it is said that the voltage source pulls the electrons from the plate connected to the positive pole and pushes electrons to the plate connected to the negative pole at the same time. Since there is a positively charged plate and a negatively charged plate after some time, an electric field is created.

My understanding of current flow is, that electrons get attracted to the positive pole of the voltage source, as there is a lack of electrons at the positive pole (thus relatively more protons) and a surplus of electrons at the negative pole.
So how can electrons get pushed to one plate in the capacitor? Is my understanding of current flow as it was taught to me wrong?


texts: Does anyone know how the Boss Metalzone sweepable mids affect the bandpass?

texts:
https://electricdruid.net/boss-mt-2-metal-zone-pedal-analysis/
https://sound-au.com/project150.htm

Like in the original question - I'm struggling to understand the relationship between the op-amp on the right to the op-amp on the left. As far as I know, a Wein Bridge network is being used here but otherwise, I'm stumped.


texts:
I built the following circuit to filter noisy pulses from a inductive tachometer pickup. The first opamp (U4D) acts as a peak detector. The second opamp (U4C) is a comparator which uses the output from the first as a reference voltage. The positive feedback on the comparator is for hysteresis.

I am getting a lot of noise on the output of the comparator. All of the technical articles I have read suggesting adding hysteresis (which I have already done) or using an actual comparator IC instead. Are there any other ways that I may be able to salvage this circuit?


texts:
I want to buy the Fishman Triple Play (a 2.4Ghz wireless guitar hex to MIDI pickup) and there are two versions, the US one and the EU/UK one. The US one is loads cheaper and I live in Malta (Europe) will I have problems with it? What are the repurcussion of using a 2.4Ghz devise designed for the US in the EU? are there technical problems or just legal issues?

Some people and also Fishman (manufacturer) states that the devices might work but there could be some problems. Can someone please shed some light?

Thanks


texts:
According to this project
I saw many design use same principle by using MPPT to adjust PWM of buck converter.

I totally get MPPT algorithms except the DC to DC converter part.

Let's call solar panel the source.

From this link, this picture shows current at the source (input side):

As you see, input current is not continuous. From IV characteristic of solar panel, I think current should be constant to obtain correct data. So I think it shouldn’t work this way.

Questions:

Did I get something wrong?
Are there any theories to explain how this works?
If I was right, how to correct this design?


texts: Trigger wireless door bell by electrical doorbell

texts:
I want to use my electric door bell to trigger a wireless door bell. I replaced the transmit button of the wireless transmitter by a relay and connected it parallel to the speaker of the electric doorbell. When the doorbell is pressed, the relay switches. This works fine.

However, the outside button implements a light, so there's always a small current in the circuit, enough to keep the relay closed once it is triggered. In other words, my Wireless door bell keeps transmitting also after releasing the doorbell, as long as it has been triggered once. What can I do to resolve this problem?

simulate this circuit – Schematic created using CircuitLab


texts: Choosing a zener for dynamic Rload variations

texts:
I am attempting to simplify a schematic by using a zener diode as a regulator for a small radio. At peak, the radio will consume about 50mA @ 3.3V, and in its low power sleep state, virtually nothing (a couple uA). In a previous experiment, where a Zener diode with 1mA Iz and 400mW Pd was used, the voltage would shoot up far above 3.3V. After doing some of the analysis, something is still not quite clicking as to whether or not I would experience voltage fluctuations now while using this particular zener (20mA Iz, 0.5W).

If my voltages at Vz are basically 4.13V and 12V absent the diode on the high and low spectrum of the load draw, respectively, and both would trigger the zener ON, what are some things to keep in mind that might cause this zener to deregulate as mentioned? As far as I know, I'm currently looking at ~200mW dissipation at radio idle, but could come up short of Iz by about 12mA, providing only 8mA of available current when the radio is maxed out.

Thanks


texts: Embedded System that is able to connect to the internet

texts: I am thinking about starting a project and was just looking for some general input. Where I work our company currently have remote stations that take data in from a radio link and input the data to a sql database. I am responsible for maintaining the stations and their scripts. Currently they are just running on a desktop pc connected to a radio receiver and an internet connection. I have had some limited experience with working with embedded systems in the past, and would like to explore the possibility of migrating the current setup to an embedded system. The most difficult aspect of the project that I can foresee is gaining internet connectivity to a pic chip and having enough memory for the libraries that would be needed to connect to a sql database.  Can anyone recommend a resource so I can learn how to connect a pic chip to the internet as well as any recommendation on what kind of pic chip to use?  I know this can be quite a daunting task, but I like to think that I am up for the challenge.


texts: Need help finding datasheet or pinout for Toshiba TCD2907DG

texts:
I really want to play with Toshiba TCD2907DG - this is color linear CCD sensor.
I've found a number of datasheets for other TCD*, but not this one.

I would really appreciate any reference to datasheet or pinout.


texts:
I'm designing a USB device (a 3D printer board) which I want to power from an old PC power supply and use the USB only for communication. My understanding is that both the power supply and my PC are connected to earth ground, therefore form a ground loop.

My questions are:

Can it cause some problem in this application?
If yes, how can I make a sufficient (and cheap) isolation?


texts: As I understand, vehicle-to-grid technology is about using the battery of your electric car to give electricity for the microgrid. How would this be useful as we are just moving electricity from place to another, and the battery of the car will need to be recharged?


texts: Just I want to understand gain, power, link budget

texts:
I am a beginner, I am confused about  calculating the nessecary gain and power and sensitvity to overcome path loss at certain distances.

the first thing  what does  gain  mean ? I am not talkink about identification ,  but  how to use this term ?

let say  we  have  100 watt "50 dBm" transmitter connected to an amplifier  has 70 dB gain and output power of 400 watt "56 dBm" connected to  antenna has a gain of 15 dBi .

simply  how  to calculate the total budget ?  is just adding gain to last output power to antenna gain right ?

or we just adding the total gain of amplifier and antenna and ignoring power ?

should I adding receiver antenna gain & sensitivity also ?


texts:
This question is from an exam to this year official university access tests (see here, in Catalan):

In Catalan:

  Connectem en paral·lel una reactància capacitiva de 100 Ω i una
  reactància inductiva de  50 Ω. El conjunt s’alimenta d’una xarxa de
  100 V. Quina és la potència reactiva consumida pel conjunt?

Translation:

  We connect in parallel one capacitive reactancy of 100 Ω and one
  inductive reactor of 50 Ω. The set feeds on a net of 100
  v. What is the reactive power consumed by the set?

Possible answers was 0 var, 100 var, 200 var and -100 var, being correct one 100 var.

My question is: when we talk about reactive power, we can talk about power consumption?


texts: Why is it important for mains power supplies to be isolated?

texts: In all the computer power supplies and other power supplies I've taken apart, I've noticed they are fully isolated from the mains. Galvanic isolation through transformers, and often optical isolation for feedback. There is usually a very visible gap in the traces between the primary and secondary sides, at least 8mm across. Why is it important that these supplies be isolated?


texts: What happens to the output voltage of an unloaded linear regulator

texts:
I need a linear regulator for a project, for current sense reasons I need to select a regulator that passes its quiescent current into the load.

Most regulators like this have a minimum load current of a few mA. I cant seem to find anything on what happens if this condition is not met though.

Is it simply a case of regulation quality will degrade? Can I assume that since it is a parameter not listed in the absolute maximums that the chip will not be damaged.

We are currently looking at using the LD1086

I.e. if I don't care about tight regulation in no load condition can I safely use the part.


texts: Using multiple wire/rings to provide more current in Slip Ring connector

texts:
I'm going to use a slip ring connector (such as this one) to power 6 servos on the other end of a rotary. This slip ring is rated for 2A of current per wire/ring.

If the 6 servos share a common +6v and ground, they will easily exceed 2A current draw. My naive understanding of conductance tells me that if I use two of the wires for +6v instead of one (and two for ground), I can effectively double the amount of current available to the servos because the first wire/ring (the one with initial least resistance) will heat up as it approaches the maximum rated current, becoming more resistant than the alternate wire/ring.

Am I wrong to assume that this setup would allow me to provide more than 2A through the slip ring?


texts: Is there any risk if we stand in between two large conducting plates (capacitor) connected to supply?

texts:
What are the risks involved if one were to stand between two large conducting plates (i.e area where air acts as the dielectric for these plates) and the capacitor is connected to a large voltage power supply in the following cases:

If the high voltage power supply is DC and applied for a long time and someone suddenly enters between the plates, is there any possibility of getting shocked in the transient state?

If the high voltage power supply is AC then what will be the effect at steady state if someone were standing in between the plates?

I thought that since the plates are electrically isolated due to air, if one were to stand in between the plates, they aren't going to get shocked although there is continuous current flowing through it (but it is due to the change in the electric field which causes induced electric current and the electrons of the air don't participate in current flow.)
I'm not sure whether I'm correct or not .


texts: I'm trying to sort the netlist error in proteus

texts:
I'm simulating pic in Proteus loaded the hex file of the Proteus but I'm getting the following error:

Also I am getting the error of MQ-2 sensor library saying ".......\users\zain\appdata" not found (this library downloaded from The engineering projects.


texts: Precision control of current to an inductive coil (coilgun)

texts:
I have students building a coilgun.  At first they used a manual switch, despite my suspicion that it would not switch on cleanly.  After looking on the oscilloscope at the trace of a one shot, we can see that the switch is causing a series of on events ramping up due to bouncing.  However, it also appears that the time constant of the system is too big.

We want to use an SCR or something equivalent to switch power on very quickly.  However, because the pulse is too wide, it often pulling the projectile backwards.  We therefore also want to turn the power off quickly.

SCRs cannot be shut off via gate current, so what is a good approach?  We can think of several.  Advice?

Increase voltage and decrease capacitance.  This maintains energy while reducing the time constant, but we are already at 160V, and I am loath to let high school students boost voltage to multiples of that.
Use power transistors rated for high voltage ~400V in parallel to achieve a high current rating
Some other device we have not heard of?  Any suggestions appreciated.


texts:
This lecture (from page 130) shows manipulation of the buck-boost converter model into canonical form.

I am stucked at moving current source through transformer as in the picture below or from the lecture.

I know where the scaling factor D'come from but what make me confused is that how can we do that with current source in parallel with the secondary winding of the transformer.

For me, the method only works if the current source in series with the secondary winding of the transformer.

The method is from the fact that input power is equal to output power, where:

input power = voltage across primary winding x current through (in series)   with primary winding

output power = voltage across secondary winding x current through (in series)    with secondary winding

However, as from the picture, the current source is in parallel not in series with secondary winding of the transformer.
So how does the method work in this case?

Edit: My question now is that how do you determine the current direction after pushing the current source to the input side of transformer?


texts:
we are designing a buck using MIC23350 to generate 1.8V @ 2A.

Input - 2.5 to 5.5V - typical is 3.3V or 5V.

Switching frequency- ~1100khz.

Nominal current is ~0.5A, Max current can be 30% higher.

As per inductance calculation, with 30% ripple factor,

Min inductance value ~ 1.8uH (Vin = 5V, Vout 1.8V, Iout = 2A, ripple =0.6A, frequnecy =1.1Mhz)

Peak currents are ~2.5A,

if i take only Peak-peak inductor current and rms current i am getting smaller inductor sizes (3.5mmx3.2mm).

I see app notes saying inductor saturation currents should consider Current limit of the IC

If i consider that i should select an inductor with Isat>6.5A which will increase the size of inductor(currently i selected inductor with Isat = 8A).

Due to size concerns if i go with Inductor having saturation current 4A,
assume current limit condition came maximum current reaches 6.5A

I can understand
Inductor value will reduce

can this damage the inductor,

If i go ahead with small size inductor(no consideration given to current limit of IC), what worst case affects can happen to design.


texts: How to find the 120 degree phase angle in a single layered lap winding of a synchronous machine?

texts:
Ok, so I have a 4 pole synchronous machine with 24 slots meaning each slot has a phase difference of 30 degree with respect to each other.

1)That means pole pitch is 180 degree for a full pitched coil=6 slots. So, if 1 is the start then it's backside connection should be 1+6=7th slot.However, in this pic it's shown as the 6th slot

2)Let's assume Start(S) and End(E) for each coil then the connections are S-E-E-S-E-E-S (start to end to end to start .....) Is this correct ?


texts: In my design (for a hand-held device) I need a regulated power supply of 4.3 V. I am having 5 v voltage regulators. How do I convert this 5 v regulated supply to 4.3 v. I understand I can use potential divider circuit, but it will not be very accurate. Is there any better way to achieve this?


texts: how does a radio receive an AM wave with an improper antenna size

texts:
Handheld radios receive AM in the Khz to Mhz band but for these frequencies the antenna length will be in 10s of meters . So how do the radios receive high frequency FM and relatively low frequency AM with a single antenna ?

Thank You


texts:
I have four capacitors connected in series and I will apply voltage over them.

The voltage is generated from a DC-motor, and I want to make sure it does not rise above 9V. What is the best way of doing this?

My initial thought was to use a 9V voltage regulator. But as I understand it, if I generate less than 9V (which I will likely do) I will end up losing some voltage even though I don't want to (voltage drop?).

What are some other ways I could limit the voltage?


texts: How to choose reference current in a charge pump circuit?

texts: The figure shows a charge pump circuit using servo loop. The circuit is from Razavi RF Microelectronics text book. How to fix the Iref in the first branch?


texts: Trigger based on Time Difference between two sensors / Catch a Miss on sensor

texts:
I have two Sensors S1 and S2, S1 is a 24v inductive proximity sensor which i isolated using octocoupler to work at 5v and S2 is a transmissive type phototransistor  sensor, both are placed at a fixed distance , signal from S1 will is always triggered periodically and used for reference but if the product is defective S2 will not be triggered.

I have to catch if S2 does'nt trigger within 0.9 seconds S1 is triggered.

My initial idea is to use XOR but there is a time difference delay i.e S1 and S2 might not be simultanious.
How should i acheive this without a microcontroller.

Instead of XOR if i use a 555 timer with the required time interval  and trigger the pin 2 of 555 with  S1  and use S2 to retrigger to keep 555 output always  high and when S2 fails will the output from pin 3 goes low? but i think retrigger from  S2 will be considered same as debounce of S1

         _                  _
S1  ____| |________________| |_____________
              _
S2  _________| |___________________________
                                  ____
Error ___________________________|    |____

Figure 1 by @Transistor for OP to edit.


texts: How to program Arduino Nano / Pro-Mini / Pro-Micro clone that has no usb port?

texts:
I was looking for a cheapest possible option to get arduino and wireless comms for a dimmable light and come across this ebay item when searching for Arduino Nano clone. It has no usb port so how can it be programmed?

Edit:

I have discovered that there is a new device called "Arduino Pro Micro" which is similar to Pro Mini and Nano but have usb port in-built. The best thing is you can buy Pro Micro for under 4 euros! Excellent for a dimmable LED light...


texts: Simple, cheap and robust light gate for use in schools

texts:
Me: Electronics enthusiast in the 1960s, little chance to practice since then.

Project: Schools in the UK have drawers full of expensive 'Data loggers'. Sophisticated and versatile devices with lots of plug-ins to measure and record mostly physics things. Rarely used because teachers don't use them often enough, crucial bit missing, can't get software to work etc.

A posible solution: Ultra-simple hardware with common software. The software I'm trialing is either Audacity or Acoustica audio editing software. Both are available for free, measure at 10kHz+ (plenty fast enough) and resolve to 16bit (again, plenty).

My current problem: I want to fire a narrow beam of visible LED light (not laser, regulations too complex) at a sensor to produce a signal that can be fed into the mic jack on a PC. The resulting pulse.
These devices often used in pairs to start/stop a timer to measure acceleration etc but a single one could be used by reflection to count the rotation speed of a fan etc.

Photodiodes and Phototransistors are unknown to me and I have found comments on here (Q22414) like:

  Photodiodes may be operated either forward or reverse biased.  Forward
  biased gives most output.  Reverse biased gives most speed. and is
  noisier. Reverse biased mode is most usually used.

I'm thinking that forward bias would be better for me, but where do phototransistors fit in? I suspect that photodarlingtons are a little slow. Help!

My ideal circuit has no IC's, a very low component count and is really cheap. That way any unskilled solderer has a chance of building or repairing it and if it gets lost/broken then it's not a big deal.

Thanks

Oops, I'm trying to reply to comments below but there is a short message length available.

I've got one device working already. A tiny box with 3 leads - one to USB as power supply, one to computer mic input  and one with bead thermistor. Inside box is a 555 running at about 9kHz outputting to an R + 2.2V zener - this gives stable square voltage without risk of frying the mic input to computer. The output from that goes across another R + thermistor which gives me a square wave with amplitude varying with temperature.

In the audio editing program this looks like a continuous 'histogram' that goes up and down with temperature. Total cost of components about 5£$Euro, one equivalent is here:

http://www.data-harvest.co.uk/catalogue/science/secondary/data-loggers/secondary-science-data-logging/2404PK

http://www.data-harvest.co.uk/catalogue/science/secondary/smartq-sensors/smartqsensors/3100

My aim is probably not to improve, just simplify. There are already 'magic boxes' that do all the thinking to lots of decimal places , but these only teach the kids to use magic boxes - not to understand the underlying science. An example is the cooling curve of a molten solid. The liquid cools at a steady (not linear) rate but at the freezing/melting point the curve plateaus for a while and then drops again at the original rate. With my device the kids can calibrate the amplitude against a thermometer in different temperatures of water and draw a graph. This teaches more of scientific method than a magic box does.

My intention is to put the LED and the photodiode/transistor into black delrin tubes about 4-5cm long meaning that the beam direction can be deen for alignment but is not affected by ambient light.

It is unlikely that multiple sets of equipment will be use at the same time.

What I am really asking for is guidance on the relative merits of photodiodes compared with phototransistors. The data sheets mean little to me.

Thanks for the input everyone.


texts:
A few months ago, I realised a meter reading system following this french guide: http://www.magdiblog.fr/gpio/teleinfo-edf-suivi-conso-de-votre-compteur-electrique/
I use the following circuit:

(source: magdiblog.fr)
Which is connected to my Raspberry Pi B+, it works really well but now i'm trying to improve the system to read two electric meters using the same circuit.
I was told that an NPN transistor would allow me to "switch" between the two electric meters. But I don't know how to choose the transistor and where should I place this transistor in the current circuit.


texts:
I am trying to use RDA5807M to build a radio. My circuit is basically the same as the reference design in data sheet.

I know the design uses the GND of earphone as antenna. But I don't understand the function of F1, F2, C1 and L1.
I chooses to remove them from my circuit and the circuit works well. What if I put them back? Will the antenna work more efficiently?

Another question, why the LC tank consists of C1 and L1 is 107MHZ?


texts: Can microcontrollers be run at arbitrarily low clock frequencies?

texts: The datasheet for the ATTiny13A, for instance, lists Min frequency of 0 MHz.  Does this mean the clock can be run at any arbitrarily low frequency with no ill effects?  I'm assuming it draws lower current at lower clock speeds?  Does 0 MHz mean you can stop the clock completely, and as long as power is still applied, it will remember its state indefinitely?


texts: How to calibrate a Kill A Watt meter and understand its hidden service menu

texts:
I found a hidden menu within the Kill A Watt P4400 meter, which is accessed by holding down the Volt and Hz buttons.  Although I rendered my meter unable to measure accurately because of my futzing around with the menus, I was able to derive significant amounts of information about the menu.

In the menu, the Volt button exits, the Amp button is the up key, the Watt button is the down key, and the Hz button is the select key.  The kWh button appears to have no effect.
The menu contains the following entries:

SEt KWh, KWh Time - selecting it yields a submenu with EnA and dIS (enable and disable).  I don't know what this does.
rAgE Amp: once again, selecting it gives an enable-disable submenu.
oPEn: not sure what this does, selecting it simply advances the menu to the next entry.
U110: Calibrates voltage measurement, using the current input voltage as the reference for 110 V.  The menu advances to the next entry.
U220: Same as U110, only for 220 V.
1 0 1: Not sure what this does, seems to be used for calibrating wattage/amperage measurement
1 1 0: As above; probably also used for calibrating wattage/amperage measurement as well
all symbols flashing: a test mode for the display.  Selecting it has no effect.
oFF Watt: Sets the threshold for the wattage measurement below which the wattage value will be displayed as zero.  The value can be set between 0.0 and 10.0 watts.
SAVE: Saves settings and exits the menu.

Can someone (who is willing to render a Kill A Watt meter unusable by throwing it out of calibration) fill the gaps on how the menus work, and therefore how to calibrate the meter?  I found relevant information here and here, but could not understand how it works.


texts:
Was trying to solve the below circuit. But couldn't get any thought process going on.

Voltage source is square pulse alternating between 0 V and 5 V with period of 3 seconds.

So tried to simulate the circuit and i got the error as in figure. What might be the issue in this circuit?


texts: I have a project with the ATXMEGA32A4U, in which I want to use the Atmel lib Qtouch , the problem that I have is that the controller doesn't support the Qtouch Hardware, but when I saw the other uC given in the example projects, the don't support the Qtouch Hardware too. So I'm confuesed now about the meaning of this support ,and my question is can implement a software solution using the Qtouch lib on this uC or no ?


texts: Average Power for "Infinite period of time" of a periodic signal

texts:
Last night in class we talked about the average power for any periodic function.

I'm just confused of why the one halves are in the bounds for this equation.
Since we are letting tau approach infinity the bounds just approach negative infinity and infinity respectively. If anyone can give an explination on why they put 1/2 I would appreciate it.


texts:
In an exercise I got an example circuit

For one question, there is \$S(t_0)=1\$ for just \$T/3\$ (third of propagation delay [confusingly called transmission delay here] of every gate in circuit). For my understanding, there would actually nothing happen to Q' or even Q, since the signal is already gone when the NOR gate is 'ready'.
Am I wrong here? What happens to an impulse shorter than the propagation delay? Is it swallowed? or is \$Q'(t_0+T)=0\$ for \$T/3\$?

I'd be thankful for any hints or a direction...


texts:
I've made my first ever pcb myself and the etching and drilling all look pretty good at this point. I am still not sure, however, what to do about the vias. I have about 15 holes that I need to make sure a connection is made from one side to another. On a professionally fabricated board they would have copper running through, but I am not that awesome.

Should I just fill it with a glob of solder, or should I actually put some wire in it or something?

Also, some of my holes for components have wires on the top and some have wires on the bottom. How can I be sure that a solid contact is made with both sides of the hole? It seems like it would be difficult to get right under an ic to solder it to the board on both sides. It looks like the thick part of the leads make a pretty good contact, but I would like to be sure. For resistors and other smaller parts it is not so obvious that it touches both pads.

I'm hoping that if I just make sure my iron is hot and make good joints it should flow through and contact both sides. Any tricks for making sure I get good contact on both sides?


texts:
So I got an ATmega328P in a 32 pin TQFP package, along with the breakout board shown. I have connected the pins in accordance with the datasheet. I added the decoupling capacitors after searching online for possible solutions. I also connected all the Vcc (including AVcc) and GND pins appropriately. I place the IC on top of the pads, I cannot solder it due to some constraints but I am sure this is making a valid electrical connection. However, on my PC avrdude shows the following error

C:\avrdude -p m328p -c usbasp

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: error: programm enable: target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

avrdude.exe done.  Thank you.

Is there anything that I am missing? What could be the problem here.


texts: Confusion regarding the right hand thumb rule

texts:
I am confused regarding the use of the right hand thumb rule . There is two use cases for this rule :

1- The first when the thumb points in the direction of the current the fingers points in the direction of the magnetic field.

2- The second when the fingers point in the direction of the current the thumb will point in the direction of the filed.

I need to understand in which case we use the rule number 1 and in which case we use the rule number 2 ??


texts: Operation of the current limiter circuit

texts:
I have been trying to understand the current limiter circuit design. I am having problem decoding them. Could anybody help me understanding this circuit?
Here I_VCC_AUX is 12 V and R247 comes from a monostable multivibrator circuit and the output goes to actuator.


texts: How 3mG can be dangerous if the Earth's magnetic field is 500mG?

texts:
All the things I have read says that magnetic fields above 3milligauss is dangerous for people. How this can be true if the Earth has a magnetic field of 500mG?

Do smartphones and gaussmeters measure magnetic fields in a different way? Smartphones always show 500mG which is way beyond human safe limit.

https://www.who.int/peh-emf/about/WhatisEMF/en/index4.html


texts: ccd with response “time constant” of less than 0.5 ns & maximum “radiant sensitivity” exceeding 10 mA/W

texts:
I'm building a Raman Spectrometer.

Update: For this Stellarnet Sony ILX511 CCD. https://www.stellarnet.us/wp-content/uploads/ILX511.pdf

What is its response “time constant”? How do you understand the meaning of "response “time constant”"? Do you think it has response “time constant” of less than 0.5 ns?

Original message:

The following specs are listed under the U.S. Strategic Goods list where export license is required for any electronic item to be shipped out of the country.

Does a normal NIR spectrometer ccd1 have specifications "with response “time constant” of less than 0.5 ns and maximum “radiant sensitivity” exceeding 10 mA/W?

What kinds of items use these specs? Are they typical or only components used in say patriot missile systems?

Quoting from the Commerce Control List (where export license is required):

  "a.3.a. Non-“space-qualified” “focal plane arrays” having all of the
  following:

  a.3.a.1. Individual elements with a peak response within the
  wavelength range exceeding 900 nm but not exceeding 1,050 nm; and

  a.3.a.2. Any of the following:

  a.3.a.2.a. A response “time constant” of less than 0.5 ns; or

  a.3.a.2.b. “Specially designed” or modified to achieve 'charge
  multiplication' and having a maximum “radiant sensitivity” exceeding
  10 mA/W;"

1 Such as this one  ... the ccd can detect from 785nm to 1100nm, and so falls under "Individual elements with a peak response within the wavelength range exceeding 900 nm but not exceeding 1,050 nm". I'd like to know if this unit has response “time constant” of less than 0.5 ns or having a maximum “radiant sensitivity” exceeding 10 mA/W;". What do you think?


texts: micro controller cant able to sense analog value (ADC input) from op amp output

texts:
I am trying to sense the current in my motor controller using shunt resistor and an op amp. Opp amp amplifies the voltage drop of the shunt resistor, multi meter shows the output voltage good.

But when i connect that to a  Micro controller, the ADC can't able to sense the voltage.  So i connect the opp amp output to the Scope to see whats happening, since i am driving a motor as load the op amp output is like noise  sin wave (due to parasitic inductance think so).

I uses RC filter to sense the analog value, but even that to not works well.

Used --Micro controller stm32f103,  op amp LM358 and shunt resistor 0.001 ohm.

How to reduce the effect of noise in op amp output or how to sense current for motor application. Is the method i am following is correct. Guide me guys friends where i am wrong.


texts: What is the difference between enable and clock in flip flops?

texts:
I am confused between the meaning of "enable" and its function and the clocks function in terms of its form level triggered or edge triggered.

What is the meaning of level triggered vs edge triggered?


texts: Powering an Arduino with a Supercapacitor

texts:
For the purpose of a project I wish to power an arduino using a supercapacitor charged to 5V. The supercapacitor will be fed straight into the power Vin and GND terminals on the Arduino. No power plug or USB connected to a computer will be connected, so all power is to be drawn from the supercapacitor. Previously I have powered the board using a 0-12V variable voltage supply, and the arduino draws between 20 and 35 milliamps.

My question is this, if I connect the supercapacitor straight to the arduino board, will the arduino govern how much current to draw from the supercapacitor? Or will I need to place a resistor in series with the supercapacitor discharging in order to regulate current and stop the supercapacitor rapidly discharging and frying the board?

Lastly is this feasible at all? I am aware that as the 5V from the supercapacitor will drop off the period during which the arduino will run is limited.

Any advice is appreciated as I  do not wish to fry my Arduino board attempting this.


texts: Achieving (near) exact voltage divider ratio

texts: Often, I'll have a need to create a voltage divider that has a specific resistance ratio, to obtain whatever voltage I need on the output. For example, for a specific project I'm working on (creating a reference voltage for a buck regulator), I need a resistance ratio (R1 / R2) of (nearly) exactly .375. This is an easy example, as a 3k and an 8k would work just fine for this - but often there isn't an obvious common-valued resistor combination to create whatever ratio you need. Since resistors are only made in discrete values, I'm curious of the best way to go about choosing what feels like a near-arbitrary selection of resistors. I'm thinking about cases when you want maybe <2% error (for voltage references for example), so just picking 2 close resistors probably wouldn't be super easy.


texts: Sending data from MCU to PC with 1.5 Mbaud using FT232R

texts:
I have an issue using FT232R to communicate with my PC.

I have two bytes of data that I need to transfer every 50 us. The frame size is 20 bits, including two start and stop bits for each byte. I've configured the UART module to operate at 1.5 Mbaud (0% clock error), and the message duration at that speed is around 13.5 us. FT232R can operate at 1.5 MBaud with 0% clock error.

I also use CoolTerm to receive data from MCU. I can send and receive data at slower rates, but at 50 us it seems that some bytes are lost.

What could be an issue here? I'm 100% sure that MCU transmits all bytes, but somehow I don't receive all of them.

EDIT: I did another test by sending a 16-bit counter value from MCU to PC every 50 us over 1 second. This means that I send 2*20000 bytes in total, and the received bytes when merged together should give a sequence 0,1,2,3,...,19999. It seems that I always receive a sequence 0,1,2,3,...,10048, and some garbage after that, which means that I always receive first 20098 bytes correctly.

I use Windows 10 operating system.


texts: How to interface Si8902 with ATmega128rfa1?

texts:
The ATtmega128rfa1 works as master and Si8902 works as slave that is okay.

But when a request is given Si8902 takes 8us to reply back with the ADC data. How can master wait for 8 us. How to synchronize both the sides. Since the clock is generated by master, only when there is a data out. If dummy data has to be send. How to wait to till 8us. Using a timer interrupt here does not makes much sense?

Updated to clarify (copied from comments):

my question is at what instance the clock is generated? -master generate clock but when? - when you write some thing on MOSI. Okay What happens during read, How will master know that it should generate clock after 8 us.


texts:
I’m working on a project that involves 25 individually powered Arduino Nanos with mp3 playing capabilities, each hooked up to a 3W speaker. The devices need 5 volts and around 1.5 amps to run correctly.

Unfortunately the space I need to install the 25 devices has a limited power supply (only two 230v EU sockets), and I need some advice on how I will go about supplying 5 volts and 30-ish amps to the Arduinos, either individually via 25 separate plugs or together somehow.

Any help much appreciated.

Thanks!


texts: Colpitts Oscillator schematic to breadboard implementation

texts: I'm starting to learn electronics as a hobby. I'm trying to take a schematic of a Colpitts Oscillator and implement it on a breadboard. I'm using the example found here: http://www.electronics-tutorials.ws/oscillator/colpitts.html I'm trying to implement it on a breadboard using Tinkercad circuits before I physically wire it up on a breadboard. No matter what I do I cannot get it to work. When I click the simulate button in tinkercad the voltage on the supply goes up for a brief second and then drops to zero. The osciloscope does not show any output. I'm not sure if I'm correctly translating the schematic to the breadboard. Any help would be appreciated. Below is a screenshot of tinkercad:


texts: Rather basic, I'm afraid, but when would you use a relay, and when would you use a transistor?  In a relay the contacts wear out, so why are relays used at all?


texts: Finite State Machine for Synchronous Circuit

texts:
Using the diagram below I have to fill out the state table for Q1+, Q0+, G, and F.

Assuming Q0+ and Q1+ are the inputs to the left and right flip-flops, respectively, fill out the following state table for the circuit above:

Q1: 0 0 1 1

Q0: 0 1 0 1

Q1+: 0 1 0 1

Q0+: 1 0 1 0

G: 0 0 1 1

F: 0 1 0 1

Based on the diagram and the values of Q1 and Q0, would my values be correct for Q1+, Q0+, G, and F?  Thank you!


texts: I made a circuit using LM338 voltage regulator. Input voltage to circuit is 9V @5Amps using a power brick. I used 220 ohm resistor as R1 and R2 is 1K ohm potentiometer. When I assembled the circuit, I can see output variable voltage is coming out. I have set my output voltage 6v (maximum I want). But whenever I put load on it, voltage drops and servos attached to it misbehaves. I am not getting enough power out of  it.  My assumption is R1 resistor sets current and R2 sets voltage.  is it right?  Where is the problem.?


texts: High side MOSFET extremely hot in a half bridge circuit

texts:
The high side MOSFET becomes extremely hot when I try to run the half bridge, and the output does not seem right.
The PWM signals to Hin and Lin come from an Arduino - 47.5% duty cycle, dead time of 132ns, switching at 3.14kHz.
What could have been the problem?

Is my deadtime too small? I tried increasing it to 40usec. and did not see a change.
Is it the placement of ground right? Should it be moved from P1 to P2? If so, what should the polarities of C3 and C4 be?
Should C1 and C2 be electrolytic or ceramic? (http://tahmidmc.blogspot.com/2013/01/using-high-low-side-driver-ir2110-with.html mentions that ceramic capacitors should go parallel to electrolytic capacitors).
I am using 220uF, 250V capacitors for C3 and C4, could they be an issue as well?

In the picture below, the yellow wave form corresponds to the gate input of the high side switch, the blue waveform corresponds to the gate input of the low side switch and the purple waveform corresponds to the output across the output resistor Rload-1kohm.


texts: pulse voltage drops trying to connect 2 devices

texts:
Hi I try to connect 2 devices. The first one sends a pulse to the second. The second has a 3.3 V input. And the output pin from the first device has a voltage of around 7.3V. VCC of the first is 12 V.
Information from the first device: the pin is active low. What does it mean?
I thought a voltage divider was a good idea to transform the 7.3V to 3.3V. (R1 =2k2 and R2=1k8)
But when I connect  the output pin of the device 1 to R1 and his gnd to the gnd of the voltage divider, the 7.3 voltage  drops and the voltate between R1 and R2 is 0.3V. Why does the voltage drop more than expected? is there a solution?


texts: Using an Arduino (If Needed) to Charge 18650 Battery

texts:
I am looking for a way to charge 18650 battery with an Arduino (If needed) as simple as possible.

I have seen tutorials where you have to buy 10 diffident parts. I just want the simple (But wont light it on fire Haha) method for a poor kid with 30 battery's extracted from laptop battery's to charge them.

Also side question, what is a safe voltage to determine if a battery is bad EX: one of my battery's are at 2.1V and one is 3.4V


texts: IC has different pinouts on different packages?

texts:
I am going to use the HT16C21 LCD driver to drive my LCD.

Looking at the datasheet (in the "Pin Assignment" section), I noticed that the IC comes in 4 different packages, each with varying numbers of pins. The ones with fewer pins seem to exclude some LCD segment pins.

Despite the difference in pins, the datasheet does not mention anything about the difference, and it gives the impression that all the packages behave the same.

Am I missing something here? What is the functional difference between the different packages? Do all 4 behave identically?


texts: How to prevent algebraic loop in the control loop simulation?

texts:
I have been developing a simulation of the field oriented control of the three phase induction motor.
The simulation is developed in the Scilab/Xcos (v5.5.2) which is a free of charge Matlab/Simulink like
software. The diagram of my simulation in the Xcos toolbox looks like this

As you can see the simulation basically consists of below mentioned main blocks:

IM model
Dynamic model of the three phase induction motor

Control algorithm
Produces components of the reference stator voltage in the stationary reference
frame based on chosen control algorithm (open loop scalar control x field oriented control)

Observer
Calculates estimate of the components of the unmeasurable rotor flux and based on that calculates
orientation of the space vector of the rotor flux for the field oriented control algorithm

The block a) is a continuous time domain system and the blocks b) and c) are discrete time domain systems (they model software). Due to that arrangement the blocks b) and c) are separeted from the continous world (plant domain) via the ADC converter (modeled via sample and hold blocks) at their inputs and via the DAC conveter (first order hold algorithm) at their outputs.
The simulation has been developed in two steps:

induction motor controlled via open loop scalar control algorithm
Simulation works correctly because no feedback is present

induction motor controlled via field oriented control algorithm
At first I have encountered a problem with the algebraic loop error

Based on my experience with the Matlab/Simulink I have inserted a time delay into the control loop
(please see the blocks "Delay" in the ADCs part)

I have set the delay of these blocks to a small fraction of the sampling period (\$T_s =
   0.0001\,\mathrm{s}\$ and the delay has been set to \$0.1\cdot T_s\$). Insertion of that delay has
resolved the problem with the algebraic loop but it has also caused two unwelcome facts. Firstly the
state estimation error in the observer is high despite the "small" value of the delay. Secondly the
delay insertion caused huge increase of the simulation time.
I have also thought about simulation diagram rearangement to avoid the algebraic loop inherently but I
can't see any way how to do that - ultimately I simulate the feedback loop.

Does anybody have any idea how to split the algebraic loop in such a manner which does
not corrupt the state estimation process in the observer and also does not increase the simulation time
too much?


texts: Determining inductance using a multimeter

texts:
I'm having a hard time understanding why one couldn't measure the inductance of a coil using a simple multimeter capable of measuring AC voltages and currents:

simulate this circuit – Schematic created using CircuitLab

The total series impedance could be expressed as:

$${Z=R+R_L+\omega L}$$

EDIT: given the 90 degrees phase difference, the correct formula is:

$$Z=\sqrt{(R+R_L)^2+(\omega L)^2}$$

Now, if I'm not mistaking, the same impedance can be expressed as the ratio between the measured effective AC voltage and current, V and I (as complex values):

$$Z=\frac{V}{I}$$

We can then obtain L as:

$$L=\frac{V/I-(R+R_L)}{2\pi f}$$

EDIT: the correct formula is:

$$L=\frac{\sqrt{(V/I)^2-(R+R_L)^2}}{2\pi f}$$

In conclusion, by measuring the AC voltage, current, coil DC resistance and by choosing a well known external resistor, we could find out the coil inductance.

Am I mistaking? If yes, where? If no, why all google searches for "measuring inductance" present more complex methods involving function generators, oscilloscopes and phase-shifting?


texts: current mirror as active load in common emitter amplifier

texts:
Could someone help to analyse the circuit above, which is a single common emitter amplifier. And for the purpose of larger voltage gain, a current mirror building block is applied as active load. But I could not analyse how it work for larger voltage gain, and even be confused with current variation when there is a input signal applied.

when there is no input signal
Ic2 is approximately equal to IR, and will be constant
also Ic1 = Ic2

when there a small input signal, say Δib, so will be Δic1,
and the Q1 collector current Ic1 now will be Ic1 +  Δic1
but Ic2 is still unchanged, that is to say when applied input signal,
Ic2 will not be equal to Ic1, that is what has confused me.
Would someone help to explain it ? Thank you!


texts:
I am using Sim800 GPRS to send data to MySQL server online.
I use Arduino mega 2560

for one update in MySQL, it takes 1-2 seconds to run required AT commands

If I use a 4G module like SIM7000E will this be faster ? will update time reduce?

or

if I use eps32 wifi will this be faster?

in other words which module will give me fast execution and come back to the main loop? sim800 or sim7000e or esp32


texts: LED switch with externally controlled current from sinking output

texts: My device has sinking output (Vcc=3.3V), the LED current (and voltage) is controlled by another device (a voltage controlled constant current source) as indicated at VLED. The LED IV curves (as measured) appear below. I am using both, on two different outputs. The forward current for both is 100mA.  It is important to be able to maximize the LED output by allowing as close to 100mA as possible. What type of mosfet or transistor and resistor pull-ups or pull-down arrangement can I use? I have viewed many other articles but none seem to address current controlled elsewhere.


texts: high side vs low side current sensing in isolated bench power supplies, does it matter?

texts:
I'm trying to make a couple of mains isolated, transformer based, bench power supplies. Considering that the current sense resistor will be in the PSU box and external loads will not have access to the other side of the sense resistor, does it matter whether current sensing is done high side or low side? Also, if low side, ground for all components (including op amps) in the PSU will be between the sense resistor and rectifier bridge.

Will it matter if I have a couple of these power supplies and connect the external grounds together? Will it matter if I put two of them in series (external ground of one connected to positive rail of other)? Ground is just a reference, right? So it will not lead to more noise or anything...?

I will have a short circuit protection based on output voltage.

Something like this for low side sensing (U1 will be a difference amplifier). What likely problems can it cause?

[ edit: here's a proper schematic. I'm not showing the voltage sensing, but it will be there. The simulation works. However, the question remains. Any problems with low side current sensing in a benchtop PSU?

]

Also, I tried to simulate high side current sensing, and although the simulations work, I think it is violating input voltage range, so not sure I want to go there right now....

This simulates fine, current limit is set to 200mA, and 200mA flows into 100Ohm load (output voltage is at 20V). However, input at U1 is around 10.6V, higher than 5V supply. The simulation gives wrong results, as it should, if I remove the 1V offset. But I cannot understand how the offset helps overcome input voltage range limitation.


texts: Hitachi HD44780 LCD works exactly 50% of the time

texts:
My Hitachi LCD works 50% of the time. Is it a problem is a deboucing reset button issue on the AVR?
Why is this happening?
Here's a video of what is happening.

This does not happen if I write on the 1st line of the LCD only.
It only happens if I write on the 2nd line of the LCD. It looks like memory address problem, but I reset the memory with clear display on every init.

I've also tried to increment the delay time (5 seconds before the init). Didn't work.

Here my INIT():

    _delay_ms(15); //wait for VDD to rise

send_nibble(0,0b0010);   //Set to 4 bit operation (note: 1 nibble operation)
_delay_ms(5);

send_nibble(0,0b0010);   //Function set, 4 bit
send_nibble(0,0b1000);
_delay_ms(15);

send_nibble(0,0b0000);   //Clear Display
send_nibble(0,0b0001);
_delay_ms(15);

send_nibble(0,0b0000);  //Entry Mode, Increment cursor position, No display shift
send_nibble(0,0b0110);
_delay_ms(5);

send_nibble(0,0b0000);   //Display ON, Cursor On, Cursor Blinking
send_nibble(0,0b1111);


texts:
Sorry for my broken English in advance.

I am trying to make my atsam4ls2b communicate with an mcp23s17. However, I can not get it to work. I am sending what i think is the correct data over the Mosi pin to the mcp23s17, and when checking the pins with a multimeter I can see that it arrives at the mcp23s17. however it seems like it does nothing with the data. I am hoping anyone can help me out with this problem. Below is my code which is in a loop. it should set all gpio pins to output 3.3v, but it outputs nothing.

SPICon->StartTransaction();
SPICon->Transceive(0x40);//select standard first 4 bits(0100) with opcode 000(A2-A1-A0)(opcode is not used for now) and R/W bit on Write (0) (0100-000-0)
SPICon->Transceive(0x0A);//select IO control register
SPICon->Transceive(0x38);//disable slew rate, sequential and enables address pins
SPICon->EndTransaction();

SPICon->StartTransaction();
SPICon->Transceive(0x40);//select standard first 4 bits(0100) with opcode 000(A2-A1-A0)(opcode is not used for now) and R/W bit on Write (0) (0100-000-0)
SPICon->Transceive(0x0B);//select IO control register
SPICon->Transceive(0x38);//disable slew rate, sequential and enables address pins
SPICon->EndTransaction();

SPICon->StartTransaction();
SPICon->Transceive(0x40);//select standard first 4 bits(0100) with opcode 000(A2-A1-A0)(opcode is not used for now) and R/W bit on Write (0) (0100-000-0)
SPICon->Transceive(0x00);//select IO direction register A
SPICon->Transceive(0x00);//set all pins to output
SPICon->EndTransaction();

SPICon->StartTransaction();
SPICon->Transceive(0x40);//select standard first 4 bits(0100) with opcode 000(A2-A1-A0)(opcode is not used for now) and R/W bit on Write (0) (0100-000-0)
SPICon->Transceive(0x01);//select IO direction register B
SPICon->Transceive(0x00);//set all pins to output
SPICon->EndTransaction();

SPICon->StartTransaction();
SPICon->Transceive(0x40);//select standard first 4 bits(0100) with opcode 000(A2-A1-A0)(opcode is not used for now) and R/W bit on Write (0) (0100-000-0)
SPICon->Transceive(0x14);//select Latch A
SPICon->Transceive(0xFF);//set pins to high
SPICon->EndTransaction();

SPICon->StartTransaction();
SPICon->Transceive(0x40);//select standard first 4 bits(0100) with opcode 000(A2-A1-A0)(opcode is not used for now) and R/W bit on Write (0) (0100-000-0)
SPICon->Transceive(0x15);//select Latch B
SPICon->Transceive(0xFF);//set pins to high
SPICon->EndTransaction();

where the transceive function is:

uint8_t SoftwareSPI::Transceive(uint8_t DataOut)
{
    uint8_t DataIn = 0;

    for(int i = 0; i < 8; i++)
    {
        MoSiPin->SetValue((DataOut >> (7 - i) & 0x01) ? GpioValue::High : GpioValue::Low);
        ClockPin->SetValue(GpioValue::High);

        DelayUs(20);

        GpioValue MisoValue = MiSoPin->GetValue();

        DataIn |= (((uint8_t)MisoValue) << (7 - i));
        ClockPin->SetValue(GpioValue::Low);

        DelayUs(20);
    }

    return DataIn;
}

which basicly does: set the mosi pin to the the value of bit i in the byte DataOut -> set the clock pin to high -> delay to make sure changes go through -> put the value of the miso in in bit i of the byte DataIn -> set the clock pin to low -> delay again to make sure changes go through

this happens 8x so it goes through the whole byte.

the StartTransaction and EndTransaction just pull the CS down and up.

the address pins are all 3 connected to the ground, the mosi pin is connected to pinA22, miso to pinA21, clock to pinA20, chipselect to pinB04, vdd and vss are connected to 3.3V and ground. all gpios are just connected to a led for now.

I am using Atmel Studio 7 as compiler.
the program uses some custom made libraries which have been tested correct.

Can anyone see what is wrong here?

Thank you in advance.


texts: IR incandescent lamp modeling in ltspice

texts:
This is my first post here,
I’m new to electronics and am trying to model the IR source to make a suitable driver circuit for it.
so, how to build a ltspice model to match the specifications shown in the image (datasheet)?
Thank you in advance


texts:
I'm self-taught in electronics and while I can do the digital stuff fairly readily, analog throws me for a loop. I'm looking at an audio CODEC and the reference schematic has this on the input to the ADC:

I understand that C11 is there to capacitively couple the input to the ADC and to prevent any DC offset from the input to feed into the op-amp front end of the ADC.

What purpose(s) do C12, R1, and R2 serve?

(In case anyone is wondering, this is the reference schematic from the Wolfson WM8731 CODEC. http://www.wolfsonmicro.com/products/audio_hubs/WM8731/)


texts: Breadboard circuit not working as intended

texts:
I'm doing a segment of my complete circuit for my school project. But somehow it doesn't seem to work , I've double checked the connections multiple times and I can't seem to find an error.

simulate this circuit – Schematic created using CircuitLab

This is the actual connection

With reference to the schematic , the inputs A3 ~ A0 represent a 4 bit number that is set from my 4 BIT DIP switch in the actual connection , the input B0 serves as a control bit, and the rectangle labelled "VCC" is the VCC channel on my breadboard(Denoted by the red wires ) , all VCC connections are done with red wire , grounds with brown wire and interconnections with grey wires. AND1 represents the MSB of the output 4 bit number and AND4 represents the LSB. The circuit is supposed to work like this :

When B0 is on , the circuit will output the same 4 bit number as the input , when B0 is off , the circuit will output all 0's.

My circuit is for some odd reason not working as intended , I'm using an 74LS08P QUAD 2 Input AND chip.

Thanks :D


texts: Problem with biased circuit for oxygen sensor (SGX EC410)

texts: I have designed a circuit for an SGX EC410 oxygen sensor by using these application note -PAGE 4, FIGURE 4 - (http://www.sgxsensortech.com/content/uploads/2014/08/A1A-EC_SENSORS_AN2-Design-of-Electronics-for-EC-Sensors-V3.pdf). When I try to measure the biased voltage between working (SENS) and reference (REF) electrode, the value of -600 mV is held for about one second and goes down to few milli volts rapidly. The same happens when I connect the sensor without voltmeter. Am I doing something totally wrong, or the circuit is not quite right?


texts: PCB Design: When having a power plane, should I only be doing vias or also route?

texts:
Is it some times relevant to also make the routing between two nodes that are close to each other? Or is it always sufficient to just have vias?
The same question for something other than power, such a signal connected to another plane with e.g. a polygon on the other plane?


texts: Four-contact push-button switch; what's the pictured switch called?

texts:
I have single phase submersible pump, around 400 foot underground in a Bore-well and its controlled by the controller shown below.

The green button is a push-button switch which if pushed and held for 5 seconds, starts the pump.

I would like to know what the switch is called, it has 4 contacts shown below (top right).

Here is the complete album of the controller:

http://imgur.com/a/U01qs

I am planning to replicate the switch function using Arduino and high load relay.

The button reads MAX 600V.


texts: 4-Bit Adder Subtractor Quartus Prime Lite

texts: I designed a 4-bit adder/subtractor circuit in Quartus Prime Lite. I am struggling with getting the correct output on the waveform. It is supposed to take the unsigned decimal numbers and add or subtract them according to the control input M.  When M=0 it is addition & when M=1 it is subtraction. I have changed the inputs A & B to unsigned decimals and entered the numbers provided to add or subtract. Any help to allow me to get the correct output would be greatly appreciated. I have included my circuit, waveform and the correct waveform I am trying to achieve.


texts: Make hard drive stepper motor run 7200 rpm

texts:
I have an old hard drive (7200 rpm) motor like this:

I'm trying to make it run as fast as possible and I start with this code (arduino uno):

int pin1 = 2;
int pin2 = 3;
int pin3 = 4;

int delay_time = 100;

void setup() {
  pinMode(pin1, OUTPUT);
  pinMode(pin2, OUTPUT);
  pinMode(pin3, OUTPUT);
}

void loop() {
  digitalWrite(pin1, HIGH);
  digitalWrite(pin2, LOW);
  digitalWrite(pin3, LOW);
  delay(delay_time);

  digitalWrite(pin1, LOW);
  digitalWrite(pin2, HIGH);
  digitalWrite(pin3, LOW);
  delay(delay_time);

  digitalWrite(pin1, LOW);
  digitalWrite(pin2, LOW);
  digitalWrite(pin3, HIGH);
  delay(delay_time);
}

The motor runs when delay_time bigger than 50 (it run very slowly of course), with delay_time smaller it just "vibrate". So how can I make that runs at 7200 rpm?

UPDATE:

I use other source and some transistors for motor, not use arduino pins.


texts: How to start with worst case circuit analysis (performance analysis) of a power supply circuit which includes LDO , resistors , capacitors , inductors. Part data base development is done. I need to start with analysis. Help regarding from where to start with analysis in a schematic


texts: I am looking for a circuit that would be switching a relay coil and few small leds (max 3A) with a low voltage input. Now the input is variable voltage 1.1v to 5v produced by a hall sensor pot. I want the circuit to be switched on when my input reaches 1.2 or 1.3v to switch a relay with 12vdc. Also the 1.1v to 5v values can not be affected by this additional circuit. Any help greatly appreciated .


texts: Just chopped a cable, is red power, black ground?

texts:
I've just chopped a usb to micro-b usb cable.

There are 4 small wires inside

Red
Black
White
Green

Isn't it universal that Red is power and black is ground?


texts: Access a vector stored in another vector in verilog

texts:
I want to access elements (8 bits long) stored in an "array", then do a logic AND with some switches. So far, not working:

module top(SW, LED);

input [15:0] SW;
output [15:0] LED;

logic [4:0] q = {8'b11101000,
8'b10011000,
8'b10100010,
8'b10110110,
8'b10000101
};

assign LED[7:0] = q[0] & SW[7:0];
endmodule

I expect to have 8'b11101000 & SW[7:0] but clearly I'm not having that because of the result I'm seeing on the leds.
How can I achieve this?


texts: I'd like to make a small chip using either the Texas Instruments CC1101 or the Nordic nrf9e5 that provides a range of different frequencies. This is mostly meant to be a tool for playing around at my local hackspace and doesn't need to have perfect signal characteristics, just "good enough". I've been looking at lots of different multiband antenna and the Abracon ACA-105 seems to do everything I want it to do. I realize this isn't what's recommended in the datasheet but could I in theory attach a cc1101 to this (with the proper caps, resistors, and inductors) and have it send from those 4 different bands? If so, it seems like a dream come true, but I'm afraid it's too good to be true. Any suggestions or resources on multiband antanna for RF much appreciated.


texts: Why does my circuit work on a breadboard, but not on a perfboard? I am new to soldering

texts:
I'm a total beginner when it comes to soldering, and recently I've been trying (and failing) to solder together a simple circuit I put together for a Raspberry Pi sensor.

Although it works fine on the breadboard, when I solder it onto one of my perfboards, the sensor no longer turns on.

Here is a topdown view of my soldered circuit:

Here is a view of the connections (the red block is just covering up old connections from past attempts):

More pictures of the connections.

What might I be doing wrong?


texts: Is my butane soldering iron's tip dead? (pic)

texts:
I've read the other posts on iron cleaning technique and I'm pretty sure I left it dirty often enough that it's toast, it seems the iron coating on the tip has flaked off completely; since I've got nothing to lose I'll attack it with a file in a second and see if I can get another small job out of it. $15 lesson learned.

The real question is why the plating up near the catalyst is flaking off and the whole tip is bending. Does this indicate I'm using too much heat?


texts: Powering an iComSat GSM Shield and a Gear Motor with LiPo Battery

texts:
I have an iComSat GSM Arduino Shield (based on the sim900) and a gear motor that I am planning on using with a Teensy 3.1 microcontroller.  I'd like to power the whole rig using a 2000mAh LiPo Battery Cell.

So I have:

Teensy microcontroller   Vin= 3.4 - 4.5V
GSM Shield    __         | Vin=9-20V _ Iavg=500mA _  Ipulse=2000mA
Gear Motor     __       | Vin=6V _ Ifree=70mA _ Istall=1600mA
LiPo Battery Pack __ | V=3.3 - 4.3 V  _ Imax = 2C = 4000mA

My question is which of the following courses of action should I take, and are there alternative courses of action that I haven't thought of yet?

Use boosting circuits to boost the battery voltage up to 6 V and 15 V for the gear motor and the GSM module, respectively
Use a higher voltage battery source (i.e. 12 or 15V) and use voltage reduction circuits to limit the voltage seen by the servo and microcontroller.
Get a sim 900 GSM module on its own (i.e. not integrated into an Arduino Shield) and use it directly with the battery (the sim900 on its own needs 3.2 - 4.8 V).  I would still use a boosting circuit for the gear motor.

What's the most energy efficient and robust solution?  Or is there another solution I haven't though of?


texts: Understanding a generic flow of a simple data logger via FreeRTOS

texts:
So I came up with this simple flow of the program that could be done without RTOS but I'm using it for the sake of learning.
The generic idea is to get the user input over UART, and if it's something regarding data query, the data query task wakes up, reads the sensor data, wakes up the other task to transfer the data over to RX module.
In other words, I have ulTaskNotifyTake() in, say, a Data Task which waits on a notification from a UART task. Upon receiving an input over the UART regarding the query of this data, the UART task would call xTaskNotifyFromISR() from the UART's ISR waking up the Data Task, which would query the sensor data...and so on.
Does the generic flow sound OK? I'm still going through a bunch of FreeRTOS docs on APIs but that's a raw image that I thought of. Any suggestions are appreciated.


texts: Simple wireless power transfer circuit question

texts:
source: https://circuitdigest.com/electronic-circuits/simple-wireless-power-transmission-circuit-diagram
Above circuit is the very simple wireless power transfer circuit, but I could not find any explanation online about how the circuit actually works. How does the circuit on the left work as an oscillator? What is the purpose of the center tap, and how does it convert DC source into an oscillating current? Please help understand the circuit operation!
Also, how could this circuit be extended to a three phase one?


texts: Troubleshooting ready board with LM339 IC?

texts:
I thought, I will not bother any more with this project of mine, but I really run out of ideas trying to get it to work.

When using breadboard, the design works as expected (did it couple of times already), however, when I put it onto universal (3-track) PCB, it stopped to work.

I divided the testing into two parts: disconnected R8 to see if U1b generates sound. It does not. The breadboard setup was quickly done using the same pins and yes, it worked right away.

What I have done:

List item
measured "voltages" on 8, 9, 14 and compared (I am aware this is oscillating, so values are averages, I guess). Values were very similar.
touching pin 8 by finger actually produced repetitive sound on the PCB solution, while on the breadboard counterpart it added noises, otherwise reaction was similar.
checked if C1 is not shortcut, and trying another capacitor
U1a part also did not work, but I have not researched it extensively.
of course, checked continuity of all junctions and checked the schematics, more than once

The question is, what else can I try to pinpoint the problem or is it time to rework, for example, get IC out and check if it's still good? (I think, I was very careful and quick soldering IC with 350 deg.C iron, but...). I do not have an oscilloscope yet.

The picture of the board and breadboard is more an illustration, as connections aren't seen. The breadboard implements only oscillator part, but at prototyping stage I had both.

UPDATE: Solved by adding more resistance to Rload, thanks to Rafal Powierski.

UPDATE2: Datasheet for the comparator also advices to connect unused inputs to ground, as Spoon suggested.


texts:
It seems that there are different versions of the Arduino Ethernet Shield available. How can I distinguish between the versions? How do I find out which hardware version I have?

Update:

Since Kevin Mark added an answer I post an image of my Ethernet Shield:


texts:
I was buying light bulbs for a load bank for work and it occurred to me...what determines the size of the glass that goes around the filament?

It seems somewhat arbitrary since it's a vacuum so it doesn't seem like heat conduction would be a factor, but most seem to go for a pear shape that seems rather excessive if you're just trying to merge the diameters required to accommodate the socket at the end of the throat and the filament.


texts:
I was looking for a way to dim a regular light bulb in a circuit.
With the help of this site, I learned that using (variable) resistors would dim the light, but eat up electricity in the form of heat.

What I needed was a triac dimmer. I have been looking for a triac dimmer component, but failed to find anything that would fit my needs. What I'm looking for is something that is small and where a knob can be attached, much like a potentiometer.

Does this kind of component exist and how is it called? Maybe this kind of component is too big, and does not exist as a "kind of potentiometer".

Beginner questions from an absolute beginner. All help is much appreciated!

More info:

this question is about AC power
I want to make a lamp on a small block of wood with a knob to dim the light


texts:
I have a query regarding PCB microstrip antennas.
Most of my antennas have been straightforward with the U.fl being placed close to the RF feed point. Maybe a PI filter is added.
But I have seen many PCBs with unique antenna shapes. Point in case, image attached. How are the parameters for these ascertained?


texts: Digital to Analog (DAC) design with MOS transistors

texts: I am looking for a DAC design wıth NMOS and PMOS transistors as a part of a project, most of the DAC circuits that I found were builted with R-2R or with capacitors. But I need a design with MOS transistor since the porject will be implemented on Cadence and space consideration is important. DAC will be used both in 8-bit SAR ADC and in smooting filter. Sample block diagram of the project is given below, ı could not find appropriate design for DAC. Any help will be appreciated, thanks in advance.


texts:
In this datasheet the logic diagram shows three cascaded inverters to get a simple inverting function.

So that would mean that you have three PMOS-NMOS pairs in succession. Why is this better than just the two MOSFET inverter?


texts: What do I have to learn to make digital wristwatch?

texts:
I want to make a digital wristwatch for my school project. So i want to know, what are the things that I have to learn in order to make digital watch by myself? As far as I know, I have to learn about microcontroller. But what else?

Thank you for answering


texts:
I'm fairly new to electronics.  I often find I need to connect multiple wires together.  For example 8 wires to ground.
What I've been doing is taking a Female Header and soldering all the pins together.  Then I can push the 8 wires into the female header to connect them all together, and a 9th wire to connect the whole header to the ground port.
I keep thinking that surely some other component is already made for connecting jumper wires...  I just don't know what it is called to see if it is worth buying or not.


texts: Trying to find transistor needed for laser security alarm

texts:
so I'm building a laser security alarm circuit for a class project and I need a transistor, but I'm having difficulty figuring out what type to get to allow the circuit to switch ON/OFF once light is present/not present.

Here is the design i have for the circuit:

simulate this circuit – Schematic created using CircuitLab

Here are the specs for parts of the circuit:

1.LDR - GM5539

Max voltage - 150V DC

Max Wattage - 100mW

Light Resistance - 50-100 kOhms

Dark Resistance - 5mOhms

Laser Diode:
5V, 20mA, 5mW
9V power source

Hope to get an answer soon...Thanks.


texts: What sensors to use to read gym machine selected weight

texts:
I'm trying to find a set of sensors (to build a solution) to determine how many weight blocks an athlete is lifting on the weight machine like this:

I already tried this solutions:

Put RFID tag on each weight block and set a RFID reader a little bit above the top block. The idea was that when blocks are moving up, the RFID reader would know what blocks were lifted just by comparing how many unique RFIDs were detected in a sequence. The problem with such approach was that RFID reader was skipping some of the RFID tags (probably because weight blocks were lifted too fast so that RFID reader couldn't keep up).
Attach ultra sonic sensor (Sensor_1) (https://www.sparkfun.com/products/13959) on top of the block weights stand and other ultra sonic sensor (Sensor_2) on the side as shown in the picture:

Sensor_1 is facing down. Sensor_2 is attached to a helper stand as is facing horizontally to the side of the block weights stand. The idea was that when user starts lifting the weights, at some point Sensor_2 detects a weight block (that is horizontally at the same height), Sensor_1 remembers the distance (Distance_1) to the top block weight. When Sensor_2 shows there is no block at the same height anymore, Sensor_1 checks the current distance (Distance_2) to the top block again and then it calculate the number of blocks by the following formula (Formula_1):

number_of_blocks = (Distance_1 - Distance_2) / height_of_1_block_weight
, where height_of_1_block_weight = 4 cm, Distance_1 ~= 115 cm, Distance_2 < 115 cm

The problem with such approach was that ultrasonic doesn't measure distance to the point (like a ray), but there is a wave with a 15 degree angle instead and therefore we have issues with wave reflection from other objects (block weights stand or other stuff)

We tried the same approach as #2, but with IR sensors (https://www.pololu.com/product/1137). It doesn't give accurate distance because the sensor measurement error sometimes is more than 5 cm so the Formula_1 doesn't give expected output. Also, the sensor has 25 Hz limitation so if you lift the weights quick, it will skip distances > 3.2 cm (80 cm / 25 measurements a second).

The only way left that I see is to attach a camera and analyze the output image on the software layer...

Please, let me know if you have any other ideas or if you see a gap in the solutions that I specified. Thank you!


texts: Sharpening rise and fall time of square wave

texts:
I have designed a custom PCB using SN74LVCT145. The board is providing desired results up to 4MHz of frequency. From 5MHz to 20MHz the output waveform is not as desired.

Edit 4: Can someone suggest any changes to schematic ?

Edit 3:-
R53=removed R25=80.6R and I soldered 18pf on top of R25(as parallel)

5MHz output

7MHz output

Edit 3:-
R53=100K R25=120R and I solder 47pf on top of R25(as parallel)

5MHz output

7MHz output

EDIT2:-
Please find the updated schematic

R53=R55=80.6R R55=7PF and R53=49.9K R25=R26=100R

I have attached the schematic snapshot:

R1 and R10 = 4.7pF and there are 50 ohm series resistance at both input and output.

I am using 75ohm BNC to BNC cable for both feeding the input and for output.

Is it possible to adjust the rising and falling edges and make it as close as possible to square wave?

5MHz INPUT

15MHz INPUT

20MHz INPUT

5MHz

8MHz

10MHz

15MHz

20MHz

Edits:-
I have added input snaps. I need 5V to 1.8V level translation from B to A.
VCCB= 5V and VCCA=1.8V. Direction pin is tied to GND


texts: PCB - matching length - relevant in that case?

texts:
I am trying to design PCB with 85 MHz signal traces between IC and connector (the FPGA board will be connected to this connector). This connection contains 28 data signals and one clock signal. I wonder if in this case I should try to match the length of the signal paths or rather leave them as you can see in the first picture.

Without matching, the longest path is currently ~50 mm and the shortest ~15 mm. Of course, I can bring the connector closer to the IC, but at the moment I have left some room to try and match the length. However, I think the ratio between the shortest and the longest will always be at least 1:2.

With this number of connections it's a bit difficult to fit these curved tracks, but I can try. If all the paths could finally be matched to one another, the connector would be moved away from the IC, can such unusual paths have any negative impact on the project?


texts: Can unwritten (but presumably otherwise usable/functional) blocks on an SD ever fail to be readable?

texts:
Does an SD come from "the factory" with all of its ECC (or spare area) set correctly?

Sometimes when I blindly dd (copy) an entire SD card (that is only partially filled with filesystem info/data -- and otherwise has lots of unused/never-written-by-me raw space) to another one, I will get a (repeatable) read error on a block that is seemingly in a part of the SD that was never written (since it was close to the "end" of the partition).

Since the source SD was otherwise functional, I've always assumed that this read error was indicative of the block having never been written (and thus it didn't have appropriate corresponding ECC).  Is this a bad assumption?

[Now that I type this "out loud", I'm thinking that, since there weren't a constant stream of read errors, the error-causing "unwritten block" would need to be somehow special -- perhaps it was a remapped block and thus didn't get an associated ECC?].


texts: Should isolated GND be tied to logic GND to prevent ground drift?

texts:
In an industrial environment, let's say you have an isolated interface that connects to an external sensor or device.

This interface separates both logic signals to your main board as well as GND and power, such that all signals between the interface and your main controller are isolated.

As an example, this isolated interface, being external facing, can build up static charge over time, resulting in a GND reference that drifts from your logic GND over time. As this happens, you may exceed the isolation rating of your isolation components. Is this, in reality, what happens?

What is the proper way to address this? I have heard someone mention using a 1M resistor to tie isolated GND's to primary logic GND to prevent drift -- does this not violate the benefits of the isolation in any way?


texts:
I am having some problem with one of the boards I am working on, the noise from the inductor is coupling to an analog circuit and I was wondering if there are inductors that has a ground shield. I have seen several research papers but no products.

Also, is there a good way to deal with this type of noise issues from inductors other than shielding? I am looking for general direction.


texts: Low cost simple communication between two microcontrollers

texts:
What tradeoffs and connection options are there in low cost bidirectional communication between just two microcontrollers?

In this case:

Master/Slave relationship, bidirectional data flow
Distance under an inch
Slave plugs into the master (so ESD protection on the connections is a must).
The slave micro is pretty dumb, but medium speed data is needed for block I/O from a SD card.  Other than the SD card, there is a bit of low speed I/O on the slave unit where speed is not an issue.
Cheap cheap cheap.
Pin count is restricted.
Prefer minimum protocol stack overhead.

Obvious options include SPI, CAN, USB, TTL Level Serial.  I2C and 1-Wire are probably too slow.  Because of the pin count issue modulating the power supply for data would be ideal, if there were a consumer level chipset that did it, saving two pins over the serial methods.


texts: I wonder how the LUT (look-up-table) works in digital design. Why do you use it? Could you give me an example of how to implement it, for example a circuit sketch or something? I Would be glad if you had pictures too.


texts: Why does a voltmeter read lower across a load than across a supply?

texts:
From the Wikipedia article about series and parallel circuits:

  As an example, consider a very simple circuit consisting of four light bulbs and one 6 V battery. If a wire joins the battery to one bulb, to the next bulb, to the next bulb, to the next bulb, then back to the battery, in one continuous loop, the bulbs are said to be in series. If each bulb is wired to the battery in a separate loop, the bulbs are said to be in parallel. If the four light bulbs are connected in series, there is same current through all of them, and the voltage drop is 1.5 V across each bulb, which may not be sufficient to make them glow. If the light bulbs are connected in parallel, the currents through the light bulbs combine to form the current in the battery, while the voltage drop is 6.0 V across each bulb and they all glow.

So with the classic resistor example, why is it that when the voltmeter is put over the resistor it shows a lower voltage? Shouldn't it show the same voltage as the supply?


texts: Is there any material from which lenses are made which are fine with IR signal? I mean really cheap ones

texts:
I am making a prototype where I need to direct the flow of the IR signal at some specific point. I found out that glass material doesn't work properly in combination with IR.

Is there any cheap lens which can do that with IR?

The main purpose is to not have wide range of the IR but directed one, like in laser, but wider.

It can be any LED which can work at 10m+- distance. But now I am having these:
5mm IR infrared 940nm LED
And sensor which receives 38kHz - TSOP4838 IR Receiver Module


texts: Connecting two dissimilar batteries in parallel

texts:
In my vehicle, I'm wishing to install a separate 12V/20Ah battery to power electronics (network gear, cb radio, etc).

I was told to not run two different sized batteries as they would overcharge the smaller.

My goal is to have the smaller / aux battery charged while the engine/alternator are running.  When the engine is off, the equipment of course would still be usable without killing my truck's main battery.

I have found a device (Automatic Charging Relay) that may help me.  Am I wrong? Is there a safe way to accomplish my goals?

Blue Sea Systems SI-ACR Automatic Charging Relay
https://amzn.com/B000OTIPDQ

ExpertPower EXP12200 12/20Ah Battery
https://amzn.com/B00KC39BE6

Thanks!


texts:
I'm hoping to get some help in searching the best timer switch that suits my needs. I've had a look around on the internet and still can't find something that is what I want:
I would like to find a timer switch that allows me to do the following:

Turn on for 10 minutes.
Turn off for 5 seconds
Repeat (on for 10 min/off for 5 sec)

All timer switches I can find only allow me either 15 minutes between them or only allow me 10/15 programs which is not enough as this will have to be on for at least 10 hours (I can manually pull the plug when I'm done).

Reason: I've read loads of studies on fleas and their behavior in attacking their hosts and it seems like the best way to capture them is not with a constant stream of light but with a little interruption (simulating an object obstructing the light). They'll jump straight onto where the light used to be on and eventually get stuck on a sticky sheet or drawn in soapy water.

I'm ok with either building something that's not too complicated or if you can point me to a product that exist already that will save me loads of time and I can just keep building the rest (lights, trays etc).

Extra credit: if you're interested, the project will work at its best when using a green light.


texts: Using a 5KVA step-down toroid transformer as a step-up transformer

texts:
I'm somewhat new to electronics, so please pardon the possibly stupid question.

I am building a variable speed pottery wheel for the wife for Christmas. I have the wheel assembly and 2HP 1725 RPM 3-phase motor. I also have a 3 phase motor controller, that needs 220V-240V input.

So the question is this, we just got a 5KVA step-down toroid transformer at work (I work at a scrap yard), from a server backup power supply.  I was wondering if I could use this as a step-up transformer.  The reason I ask is that I know toroid primary winding has to take frequency into account as well as everything else.  I don't know if the secondary takes this into account as well (or just does the simple 2:1 winding).

I will be making a soft start circuit for this (being that toroids can have a nasty inrush current problem).  I'm looking at this transformer because I can get it CHEAP ($21 is a decent deal).


texts:
I am trying to implement an RC integrator circuit in my design. The purpose of this circuit is to convert input pulse signals swinging between 0 to 2.5V into a ramp signal. The integrator circuit was designed with a time constant of 2ms. The circuit is as shown below:

simulate this circuit – Schematic created using CircuitLab

According to the simulation results and the theoretical calculations for output voltage, for a 10Hz input pulsed signal, the output ramp signal should rise up to the level of 2.48V. Whereas in the PCB, I am finding the output voltage rising only till 2.06V.
I tried one more experiment with R1 = 20kohm and C1 = 100nF (time constant still at 2ms). With this combination, I am seeing the output ramp signal rising till 2.5V (approx.).
Both capacitors used were of ceramic type with a voltage rating of 16V.

Does this behavior have anything to do with the capacitor's charging current? What could be the reasons for this behavior?


texts: Understanding a voltage multiplier circuit

texts:
I have a question about this circuit.
I don't really know what it does.
I have searched it up on google and I found something with voltage multiplier.
I don't know what it does or if it is even a voltage multiplier.
Can someone explain this to me?


texts: I'm working on a project the will use 20 white 3mm LEDs that I harvested from a 154 LED Christmas light string. I plan to use a 9 volt battery for power. What's the optimal wiring schematic? Series, parallel, or a combination? What type of resistor will work?


texts: Can you find the transfer function of two cascaded networks if you know their individual transfer functions?

texts:
If you have network N1 with transfer function H1 and network N2 with transfer function H2, is there a way to find the transfer function H3 for the network produced when cascading N1 and N2 (and assuming you cant see inside N1 or N2)?

At first I thought you could just multiply H1 and H2, but that doesn't seem to give me a right answer.
If we consider a simple LPF:

The transfer function is:
\$ H(s) = \left(\dfrac{1}{sC_{1}R_{1} + 1}\right) \$

Then if we cascade it with another LPF:

The transfer function is:
\$ H(s) = \left(\dfrac{1}{s^2C_{1}R_{1}C_{2}R_{2} + sC_{1}R_{1} + sC_{2}R_{2} + sC_{2}R_{1} +1}\right) \$

which is not the same as
\$ \left(\dfrac{1}{sC_{1}R_{1} + 1}\right) \$\$ \left(\dfrac{1}{sC_{2}R_{2} + 1}\right) \$

Is there a shortcut to get to H3 from H1 and H2 or would I just have to calculate H3 the long way using KCL or KVL? What about if I know \$R_1=R_2\$ and \$C_1=C_2\$?


texts:
I'm working on a more complex design, but noticed there's something strange going on so decided to test this simple circuit that turned out to behave unexpectedly.

For some reason the voltage on R1 never goes even close to 5V (below 0.2 V) when the switch is being closed. Does anybody know what is the cause of that?


texts: Remote device bluetooth device SCN and device address

texts:
I'm programming on my esp32 bluetooth with C but I have no idea what does "Remote device bluetooth device SCN" and "Remote device bluetooth device address" mean. I think "Remote device bluetooth device address" is the adress of the device to that I'll connect, does it? On the other hand I have no idea what does SCN mean. The only fing that I found out is that SCN could mean Software Calibration Number.
Edit: I figured out that scn means scan.


texts: Ok guys, I can't understand a thing, why a low pass filter will delay only a signal with an high frequency?If I have  a RC low pass filter, why the delayed band is only the band that has an high frequency though  the bass frequency as a Tau=R*C?Why the tau "don't work" in low frequency?


texts:
Im a newbie in designing a CPU external flash memory.
I've done the schematics and I want to ask all the expert there if my connection is correct specially the MISO and MOSI which confused me.
Flash Memory datsheet is below:
http://ww1.microchip.com/downloads/en/DeviceDoc/S71271_04.pdf

Flash Memory  Connection  CPU (SPI)
Serial Input Data ----> SPI_MISO
Serial Output Data ---> SPI_MOSI
Serial Clock      ----> SPI_SCK
Chip Select       ----> GPIO
Write ENable     -----> Pull High to VDD
Hold             -----> Pull High to VDD

Sorry I can't post the an image because this is my first post here.

Hope I explain clearly to you.
Thanks


texts: I’m struggling with six 11.5-watt LED cans wired in series. With a 75-watt incandescent at the end, the other five seem to function properly, though the incandescent is dull. With an LED in its place, it gets very bright and the other five LEDs get dull. And I can modify the intensity of the five LEDs by varying the wattage of the incandescent bulb. What’s going on here and more importantly, how do I fix it?


texts: Two-conductor or four-conductor wire CAN bus

texts:
Can someone explain this to me? I got confused between these two CAN bus cables. A typical CAN bus only consists of two wires.

Where and when do we use four wires?
Are CAN-PWR & CAN-GND the same with supply power & GND?
If I just pass the CAN-GND, will it affect my CAN bus network in the vehicle?