Electrical and Computer Engineering

1177 readers
1 users here now

Electrical and computer engineering (ECE) community, for professionals and learners. Discuss ECE related topics here, for instance digital design, signal processing, circuit analysis, electromagnetics, microelectronics, power electronics, RF electronics, etc.

founded 2 years ago
MODERATORS
1
 
 

Hello once again everyone!

I've made considerable progress on my thesis thanks in part to you guys answering my previous post here. I'm already writing up the report, and have pretty much the entire system programmed through the Arduino.

However, I am still having difficulties figuring out how to initiate/force a disconnect of all BT devices connected to the HM-10 module (this is the one I got). You can refer to the post I made on the arduino forums (link in post) where I also searched for the solution but had no luck, but sadly its been almost 2 weeks and still no answer.

To cut a long story short, I have all the pins of the HM-10 wired except the BRK pin currently, even though I wired that up previously and tried sending LOW-HIGH-LOW and HIGH-LOW-HIGH pulses to try to disconnect. As far as I understand it, what I have is not exactly the HM-10 but an HM-10 mounted on a breakout board(?).

The data sheet on the website I got it from seems to be for the bare HM-10 so its a bit confusing for me. It talks about a specific pin (PIO0) which looks to be wired to a switch, but there is no switch or button on the actual module and that doesn't help me anyway as I want to initiate a disconnect from code.

So how can I make it disconnect from all devices when the user for example selects a certain option from the menu of my system?

As always, I will greatly appreciate any help, and of course if you need any more info let me know and I'll try to provide it.

2
 
 

Hello once again everyone!

I've made considerable progress on my thesis thanks in part to you guys answering my previous post here. I'm already writing up the report, and have pretty much the entire system programmed through the Arduino.

However, I am still having difficulties figuring out how to initiate/force a disconnect of all BT devices connected to the HM-10 module (this is the one I got). You can refer to the post I made on the arduino forums (link in post) where I also searched for the solution but had no luck, but sadly its been almost 2 weeks and still no answer.

To cut a long story short, I have all the pins of the HM-10 wired except the BRK pin currently, even though I wired that up previously and tried sending LOW-HIGH-LOW and HIGH-LOW-HIGH pulses to try to disconnect. As far as I understand it, what I have is not exactly the HM-10 but an HM-10 mounted on a breakout board(?).

The data sheet on the website I got it from seems to be for the bare HM-10 so its a bit confusing for me. It talks about a specific pin (PIO0) which looks to be wired to a switch, but there is no switch or button on the actual module and that doesn't help me anyway as I want to initiate a disconnect from code.

So how can I make it disconnect from all devices when the user for example selects a certain option from the menu of my system?

As always, I will greatly appreciate any help, and of course if you need any more info let me know and I'll try to provide it.

3
10
IC simulator (hackaday.com)
submitted 1 week ago* (last edited 1 week ago) by HootinNHollerin@lemmy.dbzer0.com to c/ece@lemmy.world
 
 

cross-posted from: https://rss.ponder.cat/post/180338

Semiconductor Simulator Lets You Play IC Designer

For circuit simulation, we have always been enthralled with the Falstad simulator which is a simple, Spice-like simulator that runs in the browser. [Brandon] has a simulator, too, but it simulates semiconductor devices. With help from [Paul Falstad], that simulator also runs in the browser.

This simulator takes a little thinking and lets you build devices as you might on an IC die. The key is to use the drop-down that initially says “Interact” to select a tool. Then, the drop-down below lets you select what you are drawing, which can be a voltage source, metal, or various materials you find in semiconductor devices, like n-type or a dielectric.

It is a bit tricky, but if you check out the examples first (like this diode), it gets easier. The main page has many examples. You can even build up entire subsystems like a ring oscillator or a DRAM cell.

Designing at this level has its own quirks. For example, in the real world, you think of resistors as something you can use with great precision, and capacitors are often “sloppy.” On an IC substrate, resistors are often the sloppy component. While capacitor values might not be exact, it is very easy to get an extremely precise ratio of two capacitors because the plate size is tightly controlled. This leads to a different mindset than you are used to when designing with discrete components.

Of course, this is just a simulation, so everything can be perfect. If, for some reason, you don’t know about the Falstad simulator, check it out now.


From Blog – Hackaday via this RSS feed

4
 
 

I just realized that I have never used an oscilloscope on anything over 50V DC. (There has never been a need, actually.)

The goal is to trace how noise generated by my PC GPU is propagating through the power circuit. As I don't want to start tossing in power filters at random spots, it would be nice to actually understand what is going on first.

TBH, measuring mains AC doesn't seem any different than any other measurement I would take, other than using a 1:100 scope probe. Are there any "gotchas" I should be aware of that would put my scope at risk?

5
 
 

Hello everyone! First off, I need to mention that my background is in Computer Science (this project is actually for my thesis) and not in Electrical or Computer Engineering. As such, everything I've learned has been largely on my own, within the past few months.

That being said, I would feel more confident if an experienced set of eyes could take a look at my schematic and let me know if anything pops out as wrong/bad practice. Furthermore, with regards to the decoupling capacitor on the DS3231M RTC module (C1 on the schematic) I have a question: Would there be any problem if I use an electrolytic capacitor instead of a ceramic one? I read some stuff about the topic and people recommend using ceramic capacitors most of the time (I think) but others say that there shouldn't be a problem to use an electrolytic capacitor. I'm asking because I've already placed an order for parts, and one of them is this assorted set of electrolytic capacitors.

Please if you notice any mistakes or things that are not done the best way let me know, and try to explain why as simply as you can. As I said, I don't have a background in EE, even though it highly interests me and I want to learn.

Here is the schematic:

Many thanks in advance!

6
 
 

I have an idea for a new kind of keyboard, i think the best way to test it would be to make one and get it to work with my computer. If i can get each button on it to send a keypress signal like any other keyboard, i can work out the details with software like Kanata.

I have access to a 3D printer and i can make models in Blender, but i have no idea where to start with the electronics. Should i look into Arduino? Contact electronics manufacturers? How do i get from an idea on paper to a physical prototype?

I should mention, this thing is actually supposed to be a TV remote, because i think it's bogus how little typing on a game console or smart TV has evolved since the '80s. I said keyboard because that's basically what i'm trying to prototype, but normal mechanical keyboard hardware is rather bigger than what i'm trying to make. Little buttons my computer can treat as a keyboard would be a good step toward making a good design for a remote controller. Also, i am not a programmer. I know a little HTML and have dabbled with Inform6/7, but C and Python are magic wizard stuff to me.

7
 
 

cross-posted from: https://lemmy.world/post/26244858

The 2 best Youtube vids re electricity for me –

y2u.be/bHIhgxav9LY

y2u.be/oI_X2cMHNe0

I graduated electrical engineering in 2015 and I didn’t know the energy flow and the surface charges that Derek explained. Maybe I didn’t listen closely when my electromagnetism mentor taught Poynting vector. But I'm sure no mentor of mine talked re surface charges. These wow me –

  1. In the Poynting vector simulation, the energy flowed outside the wire, not in the wire.

  2. The cross product of the electric and magnetic fields is the key thing. The electrons in the wire don’t carry the energy.

  3. Energy can flow even if we don't have a loop of wire.

  4. The 🔋 is the shepherd. The surface charges are the sheep dogs. The electrons are the 🐑. (The electric field accelerates the electrons.)

  5. Ohm’s law, mesh analysis and nodal analysis are 👍 but don’t cover all the cases. You must use Maxwell’s equations if you want or need a high level of accuracy. I wonder if using quantum electrodynamics is better. Or no since we’re not dealing with a quantum system?

8
 
 

The batteries in this UPS lasted less than a year. It was because those battery were "no name" batteries, or because they were connected in series directly to the AC after the transformer? Shouldn't they have a rectifier and condenser before that? It seems that in this way the battery is connected to AC 24/7

9
10
 
 

aloha y'all!

i am looking for a good, solid, well written book on digital signal processing. i passed a two-semester course for my bachelors and am well acquainted with the basics and theory (i should, at least) and am now looking for a resource to look up specific stuff. i've looked into the topic and there is a plethora of books, many of them specific to some application(s), some field, some technology and/or language implementation and many of them not that well written (e.g. books consisting of single papers written by different authors).

ideal would be a technology-agnostic textbook including exercises that allows to dive into the various depths of the field at will.

what is your DSP "bible", reference book, go-to resource? any and all pointers are welcome, i'll definitifely look 'em up!

11
 
 

Related, relevant advice on SSD reliability (dated 2015, still relevant? inquiring minds want to know): https://www.anandtech.com/show/9248/the-truth-about-ssd-data-retention

12
13
 
 

I have been attempting to extract the firmware from an HVAC controller board using my Pickit3 and MPLAB X.

It seems that many HVAC controllers are PIC based and most are kind enough to include debug/flash pins. Grabbing the firmware images should be trivial once the correct pins are traced out. MPLAB X will see my Pickit3 and the target MCU, but it fails to pull an image that isn't all zeros. (The "bin" file is a text file with each line noting the start address, followed by 16 byte values.)

I do get an occasional "Target device ID invalid message" but that is usually due to my janky wiring to the board. Once I get that issue cleared, MPLAB will always warn that the debug bit (byte?) is set on the MCU. (That doesn't make sense as the MCU should be running standalone on the board during normal operation.)

Is there some kind of read protection that may be enabled on the PIC? Do I just need to unsolder the PIC and put it in its own dedicated circuit for pulling the firmware?

14
 
 

Just working on my recent electronics project and I needed two temperature sensors for it. This time around I didn't feel like making a full PCB from KiCAD and wanted to keep things simple with a 1/2 size solderable breadboard.

As usual, I'm using an AVR DD (this time: a curiosity nano devboard) for simplicity. (I expect to need the 32768 Hz clock crystal, so a PCB with said clock would be nice. Otherwise, the DIP package is available). The overall circuit is pretty simple, but the topic of discussion today is the MCP970X series temperature sensor.

https://www.microchip.com/en-us/product/mcp9701a

At this point I do recommend people to read the documentation.

The gist is that you simply apply 3.1V to 5.5V between Vdd and Gnd. Vout will have some amount of startup time, and eventually output 400mV + (Temperature-in-C * 19.5mV). For example, my room temperature is ~24C right now and the voltage output is ~920mV.

(There's clearly errors in my ADC but I'm saving that for later... this device is supposed to be outputting 876mV given the room's temperature)


With a ~6uA expected current, this device is power-efficient enough to run from most MCU pins. AVR DD's 50mA-per-pin is overkill, but more importantly, a through-hole design like mine seemingly has substantial inductance on all wires.

The datasheets claim a startup time of 0.8ms. Alas, when I soldered on the MCP9701 and turned on the GPIO-pin, it took over 20ms (!!!) before the oscillating signal finally calmed down and settled upon the room temperature reading.

To counteract this parasitic inductance, I've added a 10kOhm resistor and a 10nF capacitor out of my through-hole kit. (E12 resistor kit and E6 capacitor kit). With 220us of startup time now on the GPIO pin and with only 500uA max current going to Vdd... there is no more "ringing" anymore and life is good!

EDIT: I should probably note that my goal was to return to 0.8ms startup time, like the documents suggest. 10kOhm was chosen as 500uA (5V) to 250uA (after charging to 2.5V) is a magnitude more current than I need and is a decent starting point. 10nF was chosen to pair-up with this to give me startup time in the 100us range but not over 800us (I don't want to be "slowed down" by the charging capacitor, so I want the Vdd charge to be faster than 800us claimed startup time). It should be noted that a 5V over 1000us curve was claimed as a 800us startup in the MCP970x documents if you read all the graphs.


Moving forward, my last task is that of calibration. The on-board ADC of the AVR DD is apparently quite accurate, but the Vref of the microcontroller is +/-4% (!!). With a +/- 2% accuracy of the temperature sensor, there is some calibration I should do.

The ADC errors + Vref errors are expected to just be linear. The temperature-sensor's error is quadratic however. In both cases, I don't want to overcomplicate things, so I'm planning on just adding a constant-offset to the mV reading to shift it to the correct spot.


All in all: pretty standard Analog-to-digital conversion issues here. But I figured it'd be a good discussion topic for beginners.

15
 
 

Modern AVR has a wide variety of Timers (TCA, TCB most commonly, but TCD, TCE, and TCF are uncommon and specific to particular AVR chips).

This can make choosing a AVR DD vs AVR EA vs AVR EB vs AVR DA a difficult choice, especially if you're trying to use timers to their greatest extent possible.

This blogpost covers a basic idea of what the different timers offer.


The blogpost is short enough. I feel like what I can add is to highlight the difference between:

  • Timers -- A background count++, a comparator of count vs some pre-configured values, and then likely an output pin that changes based off of these configurations. Consider this an MCU output. Almost everything listed can be used as a timer.

  • Counters -- Counter functionality is an MCU input. Many protocols, such as Servos, PWM, pulse-train decoding requires a variety of pulse-frequency-modulation, pulse-counting, or wide variety of other kinds of common tasks. "TCB" may be called a "Timer", but its really more of a counter-focused device which can more easily measure frequencies (for pulse-frequency-modulation). TCA and a few others can do some basic counting tasks, but usually not as well as TCB.

The other discussions in the blog are easy enough to understand IMO. This is all AVR specific, but some of the best material online are highly specialized articles like this, so I still feel like sharing.

16
 
 

1.5 c Microcontroller alert.

Very low-end, but 38kHz support is explicitly called out in its product manual. This means that this tiny uC is ideal for TV remote control (or other IR-blasters).

I wouldn't recommend anyone use this chip unless you were some kind of professional saving pennies. Typical $1 uCs are far easier to work with and have exponentially more power (even $1 8-bit uCs). Still, its an interesting thought experiment for what a 1.5 cent uC could be used to implement....

17
 
 

This blogger booted an F1C100s from scratch, even though they made a mistake buying 16MBit instead of 16MByte of Flash. (Requiring to be booted off of USB-bootloader / Allwinner's FEL Protocol instead of Flash).

So a few mistakes were made, but its still a custom booting Linux + blogpost that explains the steps.

18
 
 

What really interests me about this design is the ~~buck~~ Boost-converter

So this ~~buck~~ boost-converter is 100% core-independent. The Analog Comparator, TimerD, CCL, and Event-System are all active while the AVR DB sleeps, meaning that the microcontroller can run this simple ~~buck~~ boost-converter without any cost to CPU time.

An incredible design that demonstrates the flexibility of AVR DB's combined peripherals.

19
 
 

Hacker News discussion here: https://news.ycombinator.com/item?id=40560300

20
21
 
 

A random article talking about I2C on the NuttX RTOS.

I haven't heard of NuttX before, but the supported platforms (https://nuttx.apache.org/docs/latest/platforms/index.html) is quite impressive, including several chips I'm interested in. There's a number of 8-bit processors (albeit larger ones) on the list, though I'd assume this NuttX OS is best served on a microprocessor??

22
 
 

Edited the "I" for less confusion. The blogpost's title is "I made a...", but "I" (Dragontamer) didn't do this. I just found this blogpost and though it was relevant for this sublemmy.

23
 
 

I don't care what's it gonna take. I just want a connection. I guess I can connect the VCC to another voltage source, but I have the same thing happened to TX on another circuit board, although that one can "flip" (it is still attached marginally... at one end).

Board: T Deck Lilygo.

24
25
view more: next ›