hybridfree/eevblog-posts huggingface dataset:
I want to make a PCB with ESP32-C3 + MPU9250, can you help with the schematic? - Page 1
Forum section: electronics / beginners

author: VMTG
author_rank: Newbie
timestamp: April 12, 2025, 07:48:31 pm
content: Hello everybody! I'm new to electronics and would like to ask for help creating a PCB circuit schematic for a personal project.I want to use an ESP32-C3 as the main microcontroller and an MPU-9250 sensor to measure acceleration and gyroscope in real time.Communication between the two will be done via I2C (SDA/SCL), and I intend to power the circuit with a 3.7V LiPo battery, with a wireless charging module incorporated into the PCB. I know it may be necessary to use a voltage regulator for 3.3V as the ESP32-C3 and sensor work at that level.I wish the schematic included:Decoupling capacitors for the ESP32-C3 and the MPU-9250 sensor;Pull-up resistors on the I2C bus (typical values ??of 4.7kΩ);Header with TX, RX, GND and 3.3V pins to be able to program the ESP32-C3 via UART;Basic circuit to charge the battery by induction (wireless), with protection if possible;Good design practices (separate power and data tracks, minimize noise on I2C, etc.).I have little experience with schematics or PCBs, so I would greatly appreciate any guidance, example or file you can provide me (for example for EasyEDA or KiCad).Thank you very much in advance!

author: Smokey
author_rank: Super Contributor
timestamp: April 12, 2025, 08:46:35 pm
content: Go to SparkFun and adafruit and find esp32c3 development boards. They have full schematics. Copy those. Schematics and add your sensor.

author: ahsrabrifat
author_rank: Regular Contributor
timestamp: April 19, 2025, 12:14:00 pm
content: Here is a design that you can see as a reference. It's a 2-layer PCB 78.185 x 49.05 mm FR-4, 1.6 mm, 1, HASL with lead, Green Solder Mask, White silkscreen. Minidrone based on ESP32 and MPU9250/6500. Schematic, layout, garber and code are given.https://www.pcbway.com/project/shareproject/W962131AS1M1_droninho_kicad_pcb_d2d8544c.htmlThis is an open-source hardware project designed to democratize access to drone technology. It is a custom-designed micro drone featuring a modular architecture built with KiCad, open hardware components, and accessible fabrication workflows. Whether you're exploring drone flight dynamics, embedded systems, or looking to integrate autonomy with computer vision and sensors, it provides the perfect launchpad. By making drone development transparent and replicable, it promotes education, innovation, and hands-on learning in STEM.
I was fixing an SMPS, and then this happened! - Page 1
Forum section: electronics / beginners

author: Drake122
author_rank: Contributor
timestamp: February 18, 2018, 02:54:16 pm
content: Hey guys!I work as a computer tech and I'm trying to get into chip-level repair and such. I was working on a Switch Mode Power-supply that had some issues, I was probin' around the parts (watched some vids, so I can identify them) and as I was probing voltage on a high-voltage transistor to see if its working, It blew. Arc over the probes, the fuse saved my ass that day. It was pretty scarry. I want to ask you guys, what might have happened. I ruled out the clearance between the probes, I didn't bring them too close, they have to be really close for an arc to happen. I guess I shouldn't test transistors in circtuit like that?ps.: I can post some pics about the parts and area I was working on tomorrow, when I get to work. I don't really have the schematics for that PSU, pretty cheap stuff

author: danadak
author_rank: Super Contributor
timestamp: February 18, 2018, 03:18:42 pm
content: Possibly ground related issues.Here is a discussion (and ap notes)https://www.eevblog.com/forum/beginners/differential-probes-or-'float-the-scope'/msg1427668/#msg1427668Regards, Dana.

author: madires
author_rank: Super Contributor
timestamp: February 18, 2018, 03:40:15 pm
content: As a beginner please disconnect the SMPSU from mains and discharge the main filter cap before checking components. Probing voltages in the primary side requires some experience and knowledge, also the right tools.

author: Mechatrommer
author_rank: Super Contributor
timestamp: February 18, 2018, 05:33:10 pm
content: maybe he got his lesson as a beginner. probing hot line with hand is bad idea as hand can moved around and moving probe into distance initiating arcs. next time turn off the mains. use probe clip and make sure attached firmly to circuit to be probed and then turn on the mains. never connect ground clip to anything (for non isolated scope).

author: Drake122
author_rank: Contributor
timestamp: February 18, 2018, 06:44:58 pm
content: Okay, I get it now. Don't probe live wires unless I know what to look forAs for SMPS repair, what usually goes bad, after the most obvious thing (capacitors)?

author: madires
author_rank: Super Contributor
timestamp: February 18, 2018, 06:50:58 pm
content: Switching MOSFET, switching controller, controller's filter cap, feedback (opto coupler), Schottky diodes in the secondary side...
i wish to figure out how the Kongsberg DCS system work - Page 1
Forum section: electronics / beginners

author: nyame
author_rank: Regular Contributor
timestamp: November 11, 2022, 06:06:32 am
content: Hello every.Pls i wish to figure out how the Kongsberg DCS system works, i was troubleshooting open & close feedback indicator with a senior colleague, i notice the feedback is having just two wire, that sends signal to the DCS indicating open and close. the feedback was faulty, so we had to replace a new one, which we did, but it was not working, when i measured voltage on the 2 wire from the dcs channel i saw 24dc but this could not power the feedback, then my colleague said the channel is faulty, he went and connect the two wires to another channel and it powered the feedback with same 24vdc.Please i wish understand the theory better, can some on tell me how the dcs work and what happened that that the was 24v but could not power the system in the first channel. the feedback indicator has a range of 4 to 20maany learning document for Kongsberg dcs i will appreciate.in same case but other model of indicator with just two wires, i noticed, when you connect the indicator to the 2 wire channel of Kongsberg, you see 24v, but when you take a magnet close to it you will see but zero volts can someone kindly help me with the theory as well ?Thanks

author: IanB
author_rank: Super Contributor
timestamp: November 11, 2022, 06:27:14 am
content: This is not Kongsberg specifically, this is about instrument circuits in general, it could be any DCS or PLC, for example.For 4-20 mA loops in particular, there is a power source in the loop with enough voltage to provide the 4-20 mA current. Commonly this will be at the DCS end of the loop since the DCS is powered. The instrument or sensor in the field acts like a variable resistor with a current regulating function. It varies the amount of current flowing in the loop in the range of 4 to 20 mA to indicate the measurement signal, for example 4 mA could be 0% and 20 mA could be 100% of range.If the power supply in the loop is not able to supply the proper current, then the loop will not work. It sounds like the first channel had a faulty power supply, but the second channel was working OK.

author: nyame
author_rank: Regular Contributor
timestamp: November 12, 2022, 04:23:05 am
content: Hello SirThank you for the good explanation
i wish to know more about deferential pressure transmitter  - Page 1
Forum section: electronics / beginners

author: nyame
author_rank: Regular Contributor
timestamp: November 12, 2022, 05:30:23 am
content: Hello everyone.Please what are the common faults differential pressure indicating transmitter can develop why in service and what are their troubleshooting technics or remedy ?Please same question goes for magnetic level transmitter, radar level transmitter, temperature transmitter, and ultrasonic flow meterwill appreciate any contributionThanks

author: SeanB
author_rank: Super Contributor
timestamp: November 12, 2022, 06:38:42 am
content: Normal things are overpressure, either the differential side, or common mode, causing either non linearity, or simply bursting the diaphragms or the silicon sensors. Also blocked with dirt on the ports, or they have been exposed to corrosive gases or liquids, and are destroyed.Otherwise if they use mechanical readout, wiper on a resistive track, very old units or very cheap ones, the mechanical parts wear out. Normally the electronics is reliable, mostly either potted or conformal coated, and most also have reasonable protection against reverse connection, but you can still blow the electrical side up connecting to wrong supply voltages or incorrect voltage due to cable faults.

author: SmallCog
author_rank: Frequent Contributor
timestamp: November 12, 2022, 10:16:08 am
content: All of the aboveIn my experience they tend to under read in the upper part of their measuring range as they age. We expect no more than 5 years life out of a pressure sensor.Problems with radar include false reading from thing like floating material. A log floating under a sensor in a flooded river can look like a tsunami to someone looking at very raw data.Even ducks can show up in raw data.I’ve heard hydrographers refer to radars as producing “noisy” data however they’re actually seeing all the ripples in the surface of the water.Which style of ultrasonic flow meter were you interested in?Fault finding is the same for all for our field staff, if the reading is incorrect swap it for a spare and let our instrument techs check it over unless there’s an obvious issue (eg fouling) that can be dealt with and the reading return to the expected number.99% of our sensors are “smart” sensors which we interrogate using Modbus or SDI-12 to get away from all the downsides of analogue sensors.
I would like to ask, which device is this - Page 1
Forum section: electronics / beginners

author: Benjam
author_rank: Regular Contributor
timestamp: April 05, 2022, 08:01:11 pm
content: I have been searching for a long time and have not found this device. The 3D model is as follows. Can anyone tell me which device this is? What is its model number?

author: free_electron
author_rank: Super Contributor
timestamp: April 05, 2022, 08:47:34 pm
content: some kind of MICTOR connector. most likely samtec or hirose

author: PartialDischarge
author_rank: Super Contributor
timestamp: April 05, 2022, 09:13:00 pm
content: Looks like a board to board connector similar to this one , AXK6S30547YG

author: Benjam
author_rank: Regular Contributor
timestamp: April 19, 2022, 12:22:19 am
content: Quote from: free_electron on April 05, 2022, 08:47:34 pmyou are right!
I would like to learn ... Advantech USB 4718 DAQ module - Page 1
Forum section: electronics / beginners

author: negativ3
author_rank: Regular Contributor
timestamp: November 28, 2016, 09:48:55 am
content: Hi all,I would like to learn how to capture and graph captured data using an Advantech USB 4718 DAQ module and a Windows 7 machine.The company I work for are upgrading a system and this module has become available.Ideally I would like to connect a force measurement device (Weight) to one input and a rotary encoder (speed) to a counter input. This would be attached to an exercise bicycle.I see there are two obvious paths to learning ... one is Labview, the other is C#. I have zero experience of either.So I am wondering if it's a good alternative to Arduino to which I have some experience, or do I need a lot of programming experience to begin this journey?).Experienced feedback really appreciated.Thanks

author: samofab
author_rank: Regular Contributor
timestamp: December 03, 2016, 01:32:48 pm
content: If you have some programming experience you can try with C#, if you're more comortable with block diagrams, then go for Labview.The module that you have is optimized for measuring temperature with thermocouples. It can be used for stated purpose though.Perhaps the most straightforward path where you'll be able google your way trough is Arduino.
I would like to route a PCB - Page 1
Forum section: electronics / beginners

author: PeterFW
author_rank: Frequent Contributor
timestamp: February 12, 2015, 02:33:35 pm
content: Hello!Circuit design, routing PCBs, building something and so forth, i do a for myself.Others play minecraft, i like to route PCBs and 90% of the time shelf the idea and move on to the next afer i am finished.I would like to know if my routing/layout is anny good but i think if i post a PCB to have judged by you, there will be not that much of interest in helping me out.Maybe the other way around could be interesting:You send me a egale schematic (that is the catch, i only use egale), rough guidelines and i route the board (100x80 2 layer) and you tell me how well i dit.Annyone interested?Greetings,Peter

author: PA0PBZ
author_rank: Super Contributor
timestamp: February 12, 2015, 02:42:53 pm
content: Quote from: PeterFW on February 12, 2015, 02:33:35 pmIt's been done a lot, and it's always followed by a lot of helpful comments. Just try!

author: lutkeveld
author_rank: Regular Contributor
timestamp: February 12, 2015, 04:12:19 pm
content: Post a PCB or 2 and we'll judge

author: zapta
author_rank: Super Contributor
timestamp: February 12, 2015, 04:26:46 pm
content: You can try routing my latest little board. Eagle schematic and footprints are already in place. It's ok to change the order of the TP pins but they should be on a 0.1" grid to fit a soldieries breadboard. The two buttons should be close to each other and not too close the the 2x5 header (which is the tallest part). Design rules per OSHPARK or elecrow rules.https://github.com/zapta/arm/tree/master/pro-mini/eagle_temp
Resolved: I2C and the case of the disappearing device... - Page 1
Forum section: electronics / beginners

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 04, 2019, 10:07:21 pm
content: ... let me tell you a story...I have a PCB which has two I2C devices on it and some pull up resistors from SCL to VCC and SDA to VCC. I picked 47k as a value for the pull-upsNow to test the set-up I have been using an Arduino UNO (effectively a AVR 328P) using the 'Wire' library which uses TWI and turns on the internal pull-ups which are around 20k.Testing (100kHz) shows that almost always I see the device nearest the UNO; the further device only appears sometimes.Now I am assuming this is because I was wrong in picking 47k? But why?

author: Dabbot
author_rank: Regular Contributor
timestamp: October 04, 2019, 10:26:18 pm
content: I don't see why it would be the resistors. Remove them, given the lib is using internal pull-ups? Can you disable the internal pull-ups? Try slower / faster operating frequencies?

author: hexreader
author_rank: Frequent Contributor
timestamp: October 04, 2019, 10:33:00 pm
content: I know little about I2C, but 4k7 seems to be the most common value for pull-up. I have seen 10K and 2k2, but never 47K.47K seems way too high to me.As to why - no idea. I just copy schematics of professional products that I trust.

author: rstofer
author_rank: Super Contributor
timestamp: October 04, 2019, 10:43:17 pm
content: 47k is way over the top. There is a specification by NXP that shows how to calculate the resistors but 2.2k isn't too small. I tend to use something around 4.7k. Never as high as 10k.Section 7 here:https://www.nxp.com/docs/en/user-guide/UM10204.pdf

author: NivagSwerdna
author_rank: Super Contributor
timestamp: October 04, 2019, 10:46:42 pm
content: Thanks all...I read the datasheet a bit more carefullyand found..." In typical applications, values of 1.8 kΩ to 4.7 kΩ are used, depending on the bus capacitance, I/O voltage, and the desired communication speed. "Which is consistent with your ideas above... looks like I was an order of magnitude out... I'll tweak it and see what happens.

author: Neilm
author_rank: Super Contributor
timestamp: October 05, 2019, 05:02:20 pm
content: When I am doing a design with I2C I always measure the rise times of the signals. The devices will all say what rise times they are expecting so you can then tweak the pull up resistors as required. Bare in mind that too low will mean the devices could struggle to pull the bus down as the devices also have a maximum current they can deal with.
I2C bus speed - Page 1
Forum section: electronics / beginners

author: Jane
author_rank: Frequent Contributor
timestamp: August 26, 2015, 04:55:16 pm
content: Is there defined a minimal I2C bus speed that must be used so that I2C device will work properly?I have MIPS CPU( 400Mhz) board . There is a program that works properly with that CPU board and I used it during a reverse engineering( I would like to write my own program to control that board).The frequency was about 299kHz.For my own program I would like to use a different usb/I2C bridge and it has only 100 kHz.And I can not send the data to i2c bus properly because the slave does not send acknowledge bit.Can it be because of a low i2c bus frequency( instead of 299kHz, only 100kHz)?

author: Chris C
author_rank: Frequent Contributor
timestamp: August 26, 2015, 05:12:30 pm
content: Officially, no. You should be able to use as low a bus speed as you want, even 10hz. And pause transfers for long periods at random, even for seconds at a time. I've done this with some I2C slaves from Phillips and Microchip.However, not every device adheres perfectly to the I2C specification. This seems to be the case more often when the slave is a CPU/MCU, as the programmers might have rolled their own software implementation, and not gotten it quite right.Some more details might be helpful. What slave device are you using? What USB/I2C bridge?
I2c clearance on flex pcb - Page 1
Forum section: electronics / beginners

author: OwenH
author_rank: Contributor
timestamp: December 28, 2022, 02:50:31 pm
content: Hi,I have a flex pcb design that is constrained for space and I still need to route the SDA and SCL lines of an SMBus (I2c 100khz) interface. I realise it's not ideal but could I route SDA and SCL parallel and directly above each other on a 2 layer flex pcb? The separation between layers on the flex PCB would be very small since the polyamide layer is only 25um thick. I would need to rout them 55mm in length. Will this work or am I asking for trouble?Thanks,Owen

author: wraper
author_rank: Unknown
timestamp: December 28, 2022, 02:54:34 pm
content: At such small length there should be no problem.
I2C commands & SMbus - Page 1
Forum section: electronics / beginners

author: ounsatn
author_rank: Newbie
timestamp: April 22, 2024, 09:47:49 pm
content: Hello, i hope to be in the right section, i apologize if notI would like to read an usb hub ( USB5537B) via i2c on my akai force , but i am in trouble on how to read registersI try to access the hub via i2c command under uboot and i am able to dump memory with command below :However i would like to read registers via an i2c read command, but i am a bit lost on how to do it.In the hub doc there is this indication :and theses commands :and an exemplei would like to know what is the right syntax to use i2c read as an example with "Get Hub info", or "Port Power status".I have found some indications there ,https://e2e.ti.com/support/processors-group/processors/f/processors-forum/385699/i2c-commands-in-ubootbut it's still confused.Thanks,

author: ounsatn
author_rank: Newbie
timestamp: April 22, 2024, 09:52:46 pm
content: ok, i'm replying on myself, i have found maye more indications therehttps://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/AN26.20.pdffrom the website of the datasheethttps://www.microchip.com/en-us/product/usb5537b#document-tablei'm going to read it, maybe it will help me :p
I2C enabled mosfet switch - Page 1
Forum section: electronics / beginners

author: bryce1
author_rank: Regular Contributor
timestamp: September 19, 2014, 11:53:15 am
content: Hi guys,I designed a low side n-mosfet switch that is controlled by an attiny48 (i2c slave). The idea was to have a couple of relatively generic relais alternatives that can also do pwm with 12V loads in a couple of different places.It works well, but I keep wondering if there is a better way. Do you know of any i2c enabled ICs that do this kind of stuff already and are cheaper or better suited?Thanks!

author: abaxas
author_rank: Regular Contributor
timestamp: September 19, 2014, 12:07:18 pm
content: http://www.adafruit.com/products/732or pick your favorite i/o expander of choice.

author: Precipice
author_rank: Frequent Contributor
timestamp: September 19, 2014, 12:20:01 pm
content: Quote from: abaxas on September 19, 2014, 12:07:18 pmAnd perhaps an optocoupler?i2c, multi-board design, currents high enough to be switched by relays, with FET-speed edges - not always a happy combination.Certainly take care.

author: bryce1
author_rank: Regular Contributor
timestamp: September 19, 2014, 12:25:00 pm
content: that is some valuable advice. can you elaborate?the attiny costs less then one dollar. this is more expensive and does less.

author: abaxas
author_rank: Regular Contributor
timestamp: September 19, 2014, 12:59:50 pm
content: Quote from: bryce1 on September 19, 2014, 12:25:00 pmTime to write software is not 'free'.

author: bryce1
author_rank: Regular Contributor
timestamp: September 19, 2014, 03:07:18 pm
content: that is true.but writing software scales better.

author: bryce1
author_rank: Regular Contributor
timestamp: October 03, 2014, 07:33:16 am
content: Quote from: Precipice on September 19, 2014, 12:20:01 pmhow do I take properly take care of fet speed edges?

author: Precipice
author_rank: Frequent Contributor
timestamp: October 03, 2014, 10:58:47 am
content: Quote from: bryce1 on October 03, 2014, 07:33:16 am'carefully'Slow them down with resistors, but not so much that unlucky circumstances (high load, edge-case FET) is at risk from thermal damage as it turns on or off. (I seem to recall you were doing relay-style switching, so is should just be individual edges you care about, rather than sustained heat from PWM turning it on and off all the time).You can also use current limiting, but that's harder.You might also want to put some capacitance in parallel with the gate, since you can't really trust the gate capacitance to be the same from transistor to transistor, batch to batch.Or/and you could also put a bit of resistance under the Source, to limit the current the load can take, especially at switch-on. Have a search for source degeneration.
i2c level shifting/ pull-up and signal intigrity - Page 1
Forum section: electronics / beginners

author: hsn93
author_rank: Regular Contributor
timestamp: January 28, 2019, 09:52:26 am
content: hello,in designing i was following the below two guides:https://www.nxp.com/docs/en/application-note/AN10441.pdfandhttp://www.ti.com/lit/an/slva689/slva689.pdfi've RTC chip that uses i2c, 5v, and mcu 3v3why level shifting?:note : The I2C-bus is 5 V tolerant.and you can see VIH = 0.7 * Vdd = 0.7*5 = 3.5V.you can see my design here from Tr  was for standard mode 100khz:and you can see that its not good at fast mode 400khz.although, the method for shifting inAN10441is applicable for fast mode i2c. but, if i do the calculations (assuming voltage drop at Q1 and Q2 is 0V):Rp (min) @ 5v = 5v - 0.4v /3mA= 0.92K ohmRp (max) @ 5v or 3v3 = 300nS / 0.8743 * Cb = 0.86K ohmRp (min) @ 3v3 = 3.3 - 0.4 /3mA= 0.96K ohmyou can see that maximum resistor is less than minimum....of course you the key is in IOL but i cant imagine that i put IOL more than 2mA !!!!or is it?!!!there is also me imagining that 3ma is devided into the two resistors (Rpull up) at 5v and 3v3 so i should assume it ~ 1.5ma ?! that makes it worse.so my question how do i calculate the right values of pull up resistors?and by the way, 400pF (bus capacitance) is the worst case? (the more devices or longer traces/wires the more capacitance?) so it could be less than 400pF?
I2C logic levels not reaching VCC - Page 1
Forum section: electronics / beginners

author: LoveLaika
author_rank: Frequent Contributor
timestamp: April 24, 2025, 11:29:58 pm
content: I'm troubleshooting a long circuit chain. I'm using a Raspberry Pi Zero to interface with anLIS3MDL magnetometer. The sensor is a long distance away. I'm using theseI2C extenderswith these500mm cablesand this150 mm cableto interface with the Pi. At this distance, the Pi does not recognize the sensor at all. I did some digging around, and I believe that there is a problem with the SCL and SDA lines. When not transmitting, SDA shows 3.3 volts while SCL shows ~1.7 volts. Without the extender and the long cables, with the sensor connected to the Pi, both lines read 3.3 volts when inactive. I'm thinking that there's too much capacitance or something that's causing this low voltage pull on the clock line to cause the Pi to not recognize it. I tried to add some pull-up resistors to fix the issue (with the header attached to the LIS3MDL sensor board, I place it on a breadboard and connect pull-up resistors there), but the resting voltage still won't go up to 3.3 volts. Should I just keep on adding more resistors, or is there something else I can do? I tried 10k, 2.2k, and 1.5k, but they still don't work.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: April 25, 2025, 03:00:22 pm
content: Case closed. After troubleshooting, turns out the problem was the second LTC4311 module. Removing it made the voltage issues go away. Huzzah.
I2C pullup in noisy environment - Page 1
Forum section: electronics / beginners

author: Duke
author_rank: Newbie
timestamp: March 13, 2017, 08:48:09 pm
content: hello, i've a (probably) dumb question.i'm building a simple circuit to control a DC motor (that will be driven in PWM)basically i've 4 wires to my circuit +VCC (~5.5 - 6 V), GND, i2C data. i2C clockthe power rail provide power for the motor driver and a voltage regulator that output VDD (~4.8 - 5 V) that in turn power the microthe problem is:VCC is quite noisy when the motor is actively driven back and forward, while vdd is much more quieter.i would like to connect many of these circuit on a sort of "bus"i2c needs pull-up resistor, and the question is: is it better to connect the pull-ups to +VCC (noisy) or to VDD (quiter)?the micro have a bulk capacitor and a diode in series to help to not reset it when i suddenly break the motor from full forward.it looks it help in this situation (micro doesn't reset), but the i2c appear a little more "erratic" when pullups are connected to +vdd and a little more stable when connected to +VCC, differently from what i've expected (due to the nosie on VCC)should i considering something wrong? what's the best practice in this situation?Thanks!

author: Duke
author_rank: Newbie
timestamp: March 17, 2017, 11:21:13 pm
content: i've figuired out a solution by myself.instead of putting pullup resistor on each of the "child" board (wich someone advices, to tell the truth) i'll put pullups only on the "motherboard" and i'll make sure the VCC reference will be regulated and quiteplus i've found some space left on my tiny "child" board to make this configurable via smd solder jumpers (and eventually leaving the pullups un populated)it was indeed a dumb question, but it is the first time i do something like this and everything is new for me

author: Ian.M
author_rank: Super Contributor
timestamp: March 17, 2017, 11:38:48 pm
content: Pulling up an I2C bus to a voltage greater than the supply voltage of the lowest voltage chip on the bus is *NOT* a good idea. If your Vcc rail is >5.5V its out of spec for feeding I2C pullups.

author: danadak
author_rank: Super Contributor
timestamp: March 18, 2017, 01:00:48 am
content: Motors create a lot of ugly transients in a system and take carefulrouting of power. Usually separate grounds that join at edge ofboard where power comes into the board.In additional not all bypass capacitors are equally good for a givenrating. Polymer Tantalums have the best bulk cap ESR performance.Paralleled with a good ceramic, usually in range of .01 to .1 uF, addto robustness of bypassing.Some usefull board layout recommendations -https://www.dropbox.com/s/ruaf9booe17jk8n/PCB%20Layout.zip?dl=0Also good diode clamps on motor windings for reverse emf transients amust.https://www.onsemi.com/pub/Collateral/TND384-D.PDFRegards, Dana.
I2C Question (with Arduino) - Page 1
Forum section: electronics / beginners

author: Chet T16
author_rank: Frequent Contributor
timestamp: April 07, 2012, 07:10:39 pm
content: I'm trying to send some data to an I2C slave from an arduino. Maybe a silly question but do i need to have the slave connected to test the output from the arduino? At the minute i have the arduino connected directly to my logic analyser.This is the data i captured between the master and slave earlier, its the radio and display in one of the cars.This is the arduino code, pin 2 is the MRQ lineCode:#include <Wire.h>void setup() {Wire.begin();pinMode(2, OUTPUT);digitalWrite(2, HIGH);delay (1000);}void loop(){digitalWrite(2, LOW);delay(20);digitalWrite(2, HIGH);Wire.beginTransmission(0x94);digitalWrite(2, LOW);Wire.send(0xB0);Wire.send(0x85);Wire.send(0xAB);Wire.send(0x62);Wire.send(0x40);Wire.send(0x40);Wire.send(0x40);Wire.send(0x73);Wire.send(0x62);Wire.send(0x67);digitalWrite(2, HIGH);Wire.endTransmission();delay(1000);}And this is what i'm capturing on the logic analyser (note the write to address isn't the one in the code) Any i2c code i try run gives the same output)So, yeah, i'm a bit confused. Is the arduino expecting a response from the slave? Even if it was i don't get why the address would be wrong. Is there different i2c protocols? IAny input appreciated!

author: Short Circuit
author_rank: Frequent Contributor
timestamp: April 07, 2012, 07:45:55 pm
content: Yes, you need a device to talk to. When addressed, it will acknowledge it's address and subsequent transfers. Now, the transfer quits because there is no ack on the address.

author: almoehi
author_rank: Contributor
timestamp: April 07, 2012, 07:53:48 pm
content: Your master ist telleing your slave that he wants to write to him and waits for the aknowledge signal from the slave that tells the master that the slave is listeneing and he can proceed sending data to the slave. As the slave does not send the ACK the master knows that the adressee is not listening and quits his attempmts talking to the lasve.

author: Chet T16
author_rank: Frequent Contributor
timestamp: April 07, 2012, 08:44:45 pm
content: That would explain the ACK thenI'll have to connect everything up to the car tomorrow then, i couldn't earlier because i only had 1 usb cable with me and it was either the arduino powered up or use the logic analyser!
I2C Question - Page 1
Forum section: electronics / beginners

author: thurstinn
author_rank: Newbie
timestamp: November 04, 2023, 07:51:57 am
content: I just want to verify if the way I intend to connect an I2C circuit will work correctly. I feel like I already know the answer but need verification. There is an I2C to USB board that I will be using to connect my own custom board to PC. The I2C-USB board has 3V3 output along with SDA/SCL. The chip on my custom board that I am connecting via I2C is already powered with several on board power supplies and must remain this way for my application. Should I just connect SDA, SCL, and GND between the two?

author: gamalot
author_rank: Super Contributor
timestamp: November 04, 2023, 08:20:41 am
content: Yes.

author: thurstinn
author_rank: Newbie
timestamp: November 04, 2023, 12:16:26 pm
content: Thanks!

author: ebastler
author_rank: Super Contributor
timestamp: November 04, 2023, 01:02:24 pm
content: Unless they are already provided by one of the boards you want to connect, you will also need two pullup resistors: One each from SDA and SCL to 3.3V. That's because I²C outputs drivers will only pull the line to GND, or leave it floating when they have nothing to say. (This enables multiple devices to talk on the same SDA line.)You can check for the presence of pullups with a multimeter (while the device is powered off). If SDA is connected to 3.3V via 4.7 kOhm or less, and SCL likewise, everything is fine. Otherwise, add 4.7 kOhm resistors. You can solder them to the connector on one of your two boards, for example, or wherever is convenient.
I2C Resistors Position - Page 1
Forum section: electronics / beginners

author: veryevil
author_rank: Unknown
timestamp: November 15, 2017, 12:27:03 pm
content: Having a brain fart moment.Should I2C Pull Up resistors be at the master end in a single master multi-slave design or at the furthest away?Only talking across a board not very long distances but have 6 peripherals on single bus line.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 15, 2017, 12:35:33 pm
content: R_pu >> Zo, so it doesn't really matter.Slew rate is supposed to be much slower than trace length, so that it also doesn't matter.It's designed to be easy to use. Keep it on the board, over a ground plane, and don't worry about it.Tim

author: danadak
author_rank: Super Contributor
timestamp: November 15, 2017, 12:35:59 pm
content: Recommendation for low speed I2C -https://electronics.stackexchange.com/questions/65538/i2c-pull-up-resistors-calculation-where-to-place-themRegards, Dana.
I2C RTC access from i2c masters without multi-master approach? - Page 1
Forum section: electronics / beginners

author: mortrek
author_rank: Contributor
timestamp: April 24, 2020, 02:13:44 pm
content: If I have a microcontroller and a Raspberry Pi, can they both access the same DS3231 RTC i2c module without utilizing a multi-master scheme if I *know* for a fact that they will never access the RTC at the same time? Also, to do this, generally do I need to make sure that the i2c bus is enabled on the micro only when actively reading from the RTC to avoid any conflicts?Thank you.

author: Manul
author_rank: Super Contributor
timestamp: April 24, 2020, 02:46:09 pm
content: If you prevent access collisions, then everything will work normally. Each master will not even know, that there is another one. No need to disable ever.
i2c voltage level conversion problem - Page 1
Forum section: electronics / beginners

author: mribble
author_rank: Regular Contributor
timestamp: April 09, 2012, 01:01:03 am
content: I'm trying to interface this I2C LCD (http://www.newhavendisplay.com/specs/NHD-C0216CiZ-FSW-FBW-3V3.pdf) with the Arduino.I'm using code that is basically from the data sheet, but it wasn't working. I hooked up a logic analyzer and can see that I'm geting an ACK on the 3.3 side of the bus (slave/lcd side). When I look at the 5V side of the bus (master/arduino) I don't get the ack and it fails.Here is my level conversion circuit:The only things that could possibly matter are the mosfets. This is what I'm using there:http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/FQN1N50CTA/?qs=sGAEpiMZZMsrr1kXJis%252bJwANxo1JtN8aMQxukBeGcxU%3dDoes anyone have an idea what's going wrong?

author: Rerouter
author_rank: Super Contributor
timestamp: April 09, 2012, 01:12:12 am
content: perhaps your mosfet is back to front? drain is to go on the higher voltage side,alternativly here are the mosfet specs you must meethttp://ics.nxp.com/support/documents/interface/pdf/an97055.pdfpage 13max gs voltage of 2V, your one reads 30V

author: mribble
author_rank: Regular Contributor
timestamp: April 09, 2012, 01:45:52 am
content: I've triple checked and if the datasheet is correct and mouser shipped me the part on the label (both of these seem highly likely) then I have the drain hooked up to the higher voltage.That said I think your point about the gs voltage makes sense. I'm not sure where you got 30V for mine. The datasheet seems to say mine is 2-4 volts. Based on the application note you sent me I think my max gs voltage needs be under 1.7 volts.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 09, 2012, 01:47:08 am
content: Your MOSFET has a worst-case Vgs(th)of 4V so that may be the problem. You might try a different one. Sparkfun has a level converter...http://www.sparkfun.com/products/8745that uses the same circuit you are using but uses a BSS138 which has a worst-case Vgs(th)of 1.5V. People say the circuit works for I2C.You might also read this app note:http://www.nxp.com/documents/application_note/AN10441.pdf

author: mribble
author_rank: Regular Contributor
timestamp: April 09, 2012, 10:54:33 am
content: Thanks! I've just ordered some new mosfets to try. I'm pretty sure this will fix my problem.
I2C - Page 1
Forum section: electronics / beginners

author: Riccardo_Tommasin
author_rank: Contributor
timestamp: June 10, 2020, 01:08:49 pm
content: Hi,can a slave device in the I2C communication, communicate with another slave device ??

author: nfmax
author_rank: Super Contributor
timestamp: June 10, 2020, 01:24:05 pm
content: No - communication can only be initiated by a master. However, any device can become the bus master at any time it chooses. If two or more devices try to become master at exactly the same time, there is a defined protocol to arbitrate between them. The arbitration is based on their addresses. The device with the most significant '1' bit in its address loses.

author: mikerj
author_rank: Super Contributor
timestamp: June 10, 2020, 05:44:32 pm
content: Quote from: nfmax on June 10, 2020, 01:24:05 pmAny device with multi-master capability...
I2C/SPI programmable edge triggered timer IC, options? - Page 1
Forum section: electronics / beginners

author: Infraviolet
author_rank: Super Contributor
timestamp: March 16, 2023, 09:06:01 pm
content: Can anyone suggests options for ICs which can be programmed (either with non-volatile internal memory or over I2C or SPI every time you power them on, and then also dynamically adjusted over I2C/SPI whilst on) so as to give an output pulse of a certain length whenever an incoming signal on another pin show an edge going in a specific direction. A bit like a 555 in monostable mode, but edge triggered without needing preceding circuitry, and where the timing can be set via an I2C or SPI command rather than via varying a resistance and/or capacitance. I'm looking at replacing some setups involving 555s, preceding edge triggers, and digital potentiometers to adjust the 555s' pulse lengths, with a single chip solution. Desired pulse output lengths could be from a few us up to around 1 second, depending on requirements of different places in various circuits where I've previously used 555+passive-based-edge-trigger+digital-potentiometer.Thanks

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 16, 2023, 09:12:47 pm
content: Most MCUs will have a peripheral that can do this, why use a seperate chip?

author: Infraviolet
author_rank: Super Contributor
timestamp: March 16, 2023, 09:45:20 pm
content: What a peripheral which can make one pin output a pulse of a given length upon sensing an incoming edge which doesn't require interrupting or otherwise affecting the timing of the main task the chip is doing? The important thing being sending out a pulse of the right length for use in other analogue and digital parts of a system, not in getting a software delay on the MCU when a pulse arrives.I'll have a double check of the datasheets of some MCUs I've made use of, hadn't thought of that method.Thanks

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 16, 2023, 10:20:06 pm
content: Pretty sure you could do it on a PIC32 by using DMA to enable a PWM/compare peripheral (an edge interrupt triggers a DMA to write a value into a control register to enable the PWM).Some PIC timers also have a gating facility that may be useable for this. I'm sure similar functionality exists in many other MCU families.May also be possible on the more modern 8 bit PICs with creative use of the CLC ( configurable logic cell) and other peripheralsIf your other tasks can't handle the delay of doing it with an interrupt you're possibly doing things wrong.
I2C/TWI Voltage Levels ATMega32U4 - Page 1
Forum section: electronics / beginners

author: frasdoge
author_rank: Contributor
timestamp: August 06, 2021, 07:28:17 am
content: Hi, I'm designing a board with an ATMega32U4 micro and using it to communicate over I2C/TWI to 3V3 devices. I'm supplying the ATMega32U4 with a 5V supply.In the datasheet features section it says all IO feature CMOS outputs and LVTTL inputs. In the DC characteristics section for Input High it has minimum 0.2Vcc+0.9 = 1.9 V, which is consistent with LVTTL.However, in the TWI section it has Input High as 0.7Vcc = 3.5 V. I assume this overrides what those previous 2 sections say.My question is: how do I connect up TWI for my devices then? I'm not sure whether I'm misreading the datasheet or if I'll need a buffer. Attached is the relevant part of my schematic.

author: magic
author_rank: Super Contributor
timestamp: August 06, 2021, 08:07:46 am
content: 0.3VCC and 0.7VCC are levels prescribed by the Philips spec. If the numbers were buried somewhere in the middle of the TWI chapter I would think twice, but if they are given in a dedicated table in "electrical characterisistcs" then it doesn't look like a mistake. The existence of some 50ns "spike filter" further suggests that TWI may use a separate input digitizer, independent from the normal I/O path.https://www.nxp.com/docs/en/user-guide/UM10204.pdf

author: Ian.M
author_rank: Super Contributor
timestamp: August 06, 2021, 08:27:37 am
content: What you should be looking for is the classic Philips I2C MOSFET Level Shifter circuit. Adafruit have a copy of the originalPhilips AN97055.NXP's AN10441is the same circuit but they've added some pretty colors and gutted the application note of nearly all the detailed design information that Philips originally provided!For optimum results at high speeds, locate it really close to the 5V ATmega so you can minimize the bus capacitance on the 5V side and use higher value pullups, saving available pulldown current to let you use lower value pullups on the 3.3V side to cope with the unavoidably more spread out bus with its correspondingly higher bus capacitance*. The time constants of the pullup with its own side's bus capacitance on either side of the level shifter should approximately match.* If you had more 5V devices than 3.3V ones, the optimum level shifter location would be as close as possible to the 3.3V device(s).

author: frasdoge
author_rank: Contributor
timestamp: August 06, 2021, 08:54:00 am
content: Thanks everyone, appreciate it!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 06, 2021, 03:38:19 pm
content: Don't overlook the option of running the AVR at 3.3V, and also check if the I2C inputs of the target devices have ESD diodes (pin abs max voltage Vdd+0.3 or so); if they are 5V tolerant (abs max >6V) you can just run the pullups from +5, no problem.Tim
I'm always getting a high impedance output in my Verilog Simulation!!! - Page 1
Forum section: electronics / beginners

author: Alberto
author_rank: Regular Contributor
timestamp: December 19, 2015, 02:05:55 pm
content: Hey all!I've just started to learn Verilog at home having purchased a DE0 Nano Development Board with a Cyclone 4 Series FPGA on it. I'm in the upper sixth form (the year before uni in england) and thus have no teachers to ask questions too, so the only research I've done is what I can find out on my own. To get started I've tried to right some simple behavioral level code for a flip flop that will drive the LED's on the development board. Press one button and one LED lights, press the other the second LED lights and the first goes off, etc. Here's the code:// This is the verilog code for a Flip Flop// It's output will be connected up to one of the eight LED's on the DE0 nano dev board!module flip_flop (// Defining Internal module Variablesin_a,in_b,clock,out_a,out_b);// Input Portsinput in_a, in_b, clock;// Output Portsoutput out_a, out_b;// Port Typesreg out_a, out_b;// Main Behavioural Codealways @ (posedge clock)if (in_a == 1'b0) beginif (out_a == 1'b0) beginout_a <= 1;out_b <= 1;endend else if (in_b == 1'b0) beginif (out_b == 1'b0) beginout_a <= 0;out_b <= 1;endend else beginout_a <= 1;out_b <= 0;endendmodule// Test Bench Code begins heremodule flip_flop_tb;reg in_a, in_b, clock;wire out_a, out_b;initial begin$monitor ("in_a = %b, in_b = %b, out_a = %b, out_b = %b", in_a,in_b,out_a,out_b);clock = 0;in_a = 1;in_b = 1;#5 in_a = 0;#10 in_a = 1;#10 in_b = 0;#10 in_b = 1;#10 $finish;endalways begin#5 clock = !clock;endendmoduleI put the test bench in the same file just to keep things simple. I am using the online system EDA playground to simulate the code as it keeps things simple. The code simulates and runs fine as far as I can tell, however when I look at the output levels after it has run they are always high impedance. Being new to verilog I have no idea what I'm doing wrong :S I've tried to compare it to an example to see what I might be doing wrong, but I just can't see it!Thanks very much for the help in advance!Alberto

author: lincoln
author_rank: Regular Contributor
timestamp: December 21, 2015, 07:38:23 am
content: Because nothing is driving the signals. You have not instantiated you module to test in the test bench. In the test bench you have defined signals but they don't go any where.add:flip_flop uut ( .in_a(in_a),.in_b(in_b),.clock(clock),.out_a(out_a),.out_b(out_b));This will create a flip_flop named uut and wire it up. Now, as far as your flop go, i'm not sure I see how it will behave as a flop but that is a different question. Also you can use @(posedge clk) in you test bench, like : @(posedge clk) in_b=1'b0; ect.

author: Alberto
author_rank: Regular Contributor
timestamp: January 05, 2016, 09:36:37 pm
content: Hey!Sorry for the late reply on this! Got carried away with other things! Thanks so much for your help, that makes much more sense now. The testbench is a little bit confusing when you've never seen it before!Thanks again,Alberto!
I'm bit clueless about purpose for reverse engineering of chip? - Page 1
Forum section: electronics / beginners

author: dds737
author_rank: Contributor
timestamp: May 26, 2016, 11:18:05 am
content: Hello,There is nice project likehttp://www.degate.org/- but what is significance of this for average Joe Reverse Engineer? You can copy functionality of chip maybe in VHDL, but you can't build another VLSI without bunch of money? Or maybe I misunderstood the whole thingThanks

author: rstofer
author_rank: Super Contributor
timestamp: May 26, 2016, 03:46:09 pm
content: Sometimes chips don't work. Other times, they worked for a while then failed. Sometimes people want to rip off the contents of flash memory. Maybe your competitor has better specs, how come?The really big application is failure analysis.Somewhere around here there was a link to a walk-through of a failure analysis lab at one of the big semiconductor houses. These folks have serious money tied up in the question of why chips fail. Multiples of millions of dollars.

author: ataradov
author_rank: Super Contributor
timestamp: May 26, 2016, 10:57:37 pm
content: Your typical MCUs include a lot of undocumented features, some of which are real nice to have, some are just for testing. Knowing them may be helpful in some cases.And also, just for fun.

author: Pack34
author_rank: Frequent Contributor
timestamp: May 27, 2016, 01:18:10 am
content: That is so cool. I loved working with this stuff in grad school.Thanks for sharing!
I'm brain dead right now and have a question.....a simple one at that..... - Page 1
Forum section: electronics / beginners

author: xwarp
author_rank: Frequent Contributor
timestamp: December 06, 2015, 07:54:36 pm
content: I'm dividing a square wave pulse that is +12vdc in half. This pulse is divided through a CD4013be. Is there any reason that I should not be able to run Q output into the "WHT_VSS" input without any further components other than those in the schematic shown below?VIGN is +12vdc

author: SeanB
author_rank: Super Contributor
timestamp: December 06, 2015, 08:01:04 pm
content: Why do you need the 5k1 resistor? The 100k and the input protection diodes will do the clipping fine, and if you use a 4049 inverting buffer the input will be happy with 12V input and a 5V supply in any case.

author: xwarp
author_rank: Frequent Contributor
timestamp: December 06, 2015, 08:07:14 pm
content: I forgot to add that the circuit shown above is fed by an open collector clock circuit. That circuit creates a pulse, but uses that 5.1k as 12 volt pull up.That circuit pictured above is also inside the ECM of my truck.