/r/LearnEngineering

Photograph via snooOG

Have a simple or even complex question about engineering? Ask it here! Did you learn something new about engineering you didn’t know before? Share it with everyone here!

This is a place for anyone wanting to know more about an engineering concept, anyone to ask for help, or to maybe post a cool new concept you just learned that you think others may enjoy.

RULES

  • Rule 1: Posts must be engineering related This one is self-explanatory
  • Rule 2: No career related posts This is exactly the problem with r/AskEngineers. If you do have a post that is somewhat career related but you think is still a necessary question that belongs here, message the mods!

If you want to initiate an AMA, or post a question that technically breaks rule 2 but you think it's a necessary question, ask the mods!

Most engineering students need a little bit of help when it comes to suggested problem sets and almost all of the problems can be found on two expensive websites: CourseHero and Chegg. For a cheaper service, we recommend CourseHeroUnlocker.com

/r/LearnEngineering

5,259 Subscribers

1

Need help understanding how to encode SPDIF / IEC958 frame synchronization preambles

I'm trying to make a Raspberry Pi transmit audio through HDMI from bare metal, and apparently its hardware only accepts data in the form of IEC958 subframes. After two days reading about the subject from various sources including ChatGPT and the source code of the Linux kernel, I believe that I have wrapped my head around how to craft most of a subframe except for one aspect: the 4-bit field for the synchronization preamble.

What I don't understand specifically is how to encode the 8 bit synchronization preamble in a field that is just 4 bit wide. Wikipedia states that it's not Biphase Mark Coded, but it doesn't seem to explain how to interpret it. A stackOverflow answer seems to mention that it's Manchester Coded, but it doesn't seem to be because, as I understand it, it is not possible to transmit more than 2 highs or lows in a row using the Manchester Code, and the 8 bit preambles have 3 in some cases

To test my generated frames without having to deal with other potential issues from going straight to bare metal, I'm using aplay on a Raspberry Pi 4 running Linux to which I'm piping a stream with two synthesized square waves with different pitches each one of them mapped to one of two channels. This works and sound comes out, but both tones are played simultaneously on both channels at half the pitch, which is why I believe that I need to encode the synchronization preamble.

The following is my code that synthesizes audio encapsulated in IEC958 frames (the synchronization preamble is set to 0x0 in all subframes):

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>

// Channel status values taken from https://github.com/raspberrypi/linux/blob/rpi-6.6.y/include/sound/asoundef.h
uint8_t cs[24] = {
    0x4, // Consumer, PCM audio, no copyright, no emphasis.
    0x50, // Software original source.
    0x0, // Channel (filled in later).
    0x22, // 48khz, 50ppm clock.
    0xd2, // 16 bit word length, 48khz original sample rate.
    0x0, // Copying always allowed.
};

int compute_parity(uint32_t val);

int main(void) {
    for (uint64_t count = 0; 1; ++ count) {
        int frame =count % 192;
        uint32_t val0 = ((count / 120) & 0x1) ? 0x3fff << 12 : 0xc000 << 12;
        uint32_t val1 = ((count / 80) & 0x1) ? 0x3fff << 12 : 0xc000 << 12;
        size_t byte =frame >> 3;
        size_t bit = count & 0x7;
        uint32_t csbit = (cs[byte] >> bit) & 0x1;
        val0 |= csbit << 30;
        val1 |= csbit << 30;
        // Fill in the channel information for channel 1.
        if (frame == 20) val1 |= 0x1 << 30;
        val0 |= compute_parity(val0) << 31;
        val1 |= compute_parity(val1) << 31;
        write(STDOUT_FILENO, &val0, sizeof val0);
        write(STDOUT_FILENO, &val1, sizeof val1);
    }
    return EXIT_SUCCESS;
}

int compute_parity(uint32_t val) {
    int parity = 0;
    for (int i = 4; i < 31; ++ i)
        parity += (val >> i) & 0x1;
    return parity & 0x1;
}

And this is how I run it on a Raspberry Pi 4 with Linux:

./wa | aplay -r 48000 -c 2 -f iec958_subframe_le -D hw:CARD=vc4hdmi0

Turns out that the problem is actually in the receiver, a Mac with an HDMI capture dongle. For reasons that I don't understand, MacOS is registering the dongle as having a single audio input whereas it actually has two, but is still mixing the audio coming from both channels which is weird. The same dongle on Linux works correctly and I get stereo audio from it without filling in the .synchronization preamble, so I guess that the hardware does that.

0 Comments
2024/04/18
21:10 UTC

1

What lock system do I use for my foldable basket self-project?

I am not an engineer but I want to make this basket that I could fold when I want to. It's gonna be made of several panels that could be folded. But I don't know what system I would use to make it lock or how to make them not slide against one another.

For more context, the idea is kinda like the pangolin bag

1 Comment
2024/03/31
12:54 UTC

2

Jet Set Go: Nicole Gui Explores VR Field Trips in Engineering Education

0 Comments
2024/03/19
12:17 UTC

1

Simulating Inverting Amplifier circuit in Multisim simulation software (Free Online sowtware)

0 Comments
2024/02/24
23:55 UTC

4

Multi-Dimensional Calculator... bring accuracy, efficiency and ease to your unitised calculations.

1 Comment
2024/02/23
08:38 UTC

1

Seeking Peer Input: What do YOU Need in Excel Templates for Energy, Sustainability, and Healthy Spaces for buildings?

Hello! I am an Engineer and small business owner looking to give back to the community through my business. While I have my own experience and assumptions, I'd like to get more data on Excel templates I am creating and the process improvement service I provide. I am looking to hear from professionals in Energy, Sustainability, and Healthy Spaces for buildings, ranging in knowledge from learning to expert.

If you are wondering who I am...The name of my company is itty bit Better. Our slogan is "If you make buildings better, we make you an itty bit Better." which we do through education and process improvement. (https://ittybitbetter.com/).

These questions will help me better understand what my target audience is looking for and if there are any gaps in the research I've done so far.

Below are 12 questions I came up with but please feel free to go off-script here. Anything and everything is helpful.

Thanks in advance!

  • How often do you use Excel templates in your work? What are their main purposes?
  • Have you tried creating your own Excel templates for building audits or sustainability reports? How time-consuming is this process for you?
  • Are there specific calculations, analyses, or data management tasks within energy, sustainability, and healthy spaces that you think are lacking effective Excel tools?
  • When you create your own Excel templates, what challenges do you face in making them user-friendly and shareable with others in your team or organization?
  • Given the choice between dedicating time to create standardized templates and focusing on other core engineering tasks, how do you prioritize? What factors influence this decision?
  • Are there specific calculations or analyses related to energy and sustainability in buildings that you find challenging to perform in Excel?
  • What value do you see in using a professionally designed Excel template for energy and sustainability projects, as opposed to creating one yourself?
  • Under what circumstances would you consider paying for an Excel template? What factors (like complexity, customization, support) would justify a purchase for you?
  • What are your main concerns when evaluating the cost versus the perceived benefits of paying for a process improvement service in Excel and Power BI?
  • What doubts do you have about the quality and effectiveness of external Excel and Power BI solutions compared to in-house developed tools?
  • Do you worry that externally developed tools might not be adequately customizable to meet your specific engineering needs?
  • Would you be interested in participating in the development of these tools, such as through beta testing or providing feedback on prototypes?
0 Comments
2024/01/16
00:59 UTC

0

Engineering 101 video series, thoughts on the format?

0 Comments
2024/01/13
21:07 UTC

1

It is worth pursing?

My question isn't if it is worth it for me to pursue engineering in terms of my interest, I know I have to answer that for myself.

My question is if it is worth pursuing engineering in terms of things like job security, practicality of obtaining a job, the demand for engineers, etc.

Would like to hear from everyone (college students all the way from people who have been in the field for many decades)

Top 3 disciplines for me are: Aerospace, Mechanical, and Electrical, if that helps with giving any good advice.

Also, what are some colleges with good engineering programs. Not limited on location

3 Comments
2024/01/03
00:33 UTC

20

Engineering-based YouTubers with good, educational content?

So, I'm imaging kind of a channel like Sam Sulek, where I can just listen to someone ramble on and teach me about the different things that come with engineering. Since that's kind of specific, though, I'm open to finding just other engineering channels in general.

Thank you!

9 Comments
2023/12/23
07:01 UTC

3

Recent Computer Engineering Graduate

Hi everyone! I have just graduated with an undergraduate degree in Computer Engineering. I had a relatively good GPA and a passion for engineering and programming. Now that I have graduated I am looking for opportunities in the field.

Given the fact that I love all the science involved in this field, I would love to get into tutoring. There are a lot of courses I can be of help. The courses are:

  1. Linear Algebra
  2. Calculus I
  3. Calculus II
  4. General Physics I
  5. General Physics II
  6. Discrete Mathematics
  7. Electric and Electronic Circuit
  8. Fundamentals of Probability
  9. Digital Design
  10. Numerical Analysis

This is just the list of science courses I am comfortable teaching. Then there are the course that are related to programming:

  1. C/C++ Programming
  2. Java Programming
  3. Object Oriented Programming
  4. Computer Organization
  5. Database Management Systems
  6. Data Structures
  7. Computer Networks
  8. Web Technologies and Programming
  9. Parallel Programming
  10. Data Mining
  11. Software Engineering
  12. Operating Systems
  13. Artificial Intelligence
  14. Digital Multimedia

Considering the projects I have developed and the papers I have been part of, I can get into more details privetaly if you are interested in anything I am offering.

I have also several projects and course notes I would like to sell. Do not get me wrong, I want to get a masters degree and I am saving to avoid debt and student loans. I would really appreciate it if you can at least read this post and maybe recommend this to someone who needs help in university.

0 Comments
2023/12/11
02:36 UTC

2

How do I look at a differential equation and then transform it into something 3D software can approximate?

I'm interested in running simple simulations of reaction-diffusions on various, often simple smooth surfaces like spheres or cubes to model corrosion or accretion. So I googled reaction diffusion-equations and found this: https://en.wikipedia.org/wiki/Reaction%E2%80%93diffusion_system .

Then I found a youtube video https://www.youtube.com/watch?v=COMvgTLTw6g

which gives me two sets of time-step looking equations or iterative-looking equations which allegedly approximate reaction-diffusion behavior.

This leaves me with a big conundrum: how am I supposed to look at the reaction-diffusion equations, then come up with a plan for how a 3D software program can simulate them? How did the person in that video know or come up with that approximation method, starting from the differential equations?

0 Comments
2023/11/16
20:26 UTC

1

Rubber band stretching based on length, how to approximate or model?

I don't know much about the engineering or physics of strain and rubber-ness, I'm wondering is someone might offer insights, starting with a basic scenario.

Let's say I have a rubber band, or rubber rope, and it's rest length is 7 centimeters, and let's assume it's incapable of breaking if you stretch it too much.

Now, let's then say by some mechanism, it gets stretched to 15 centimeters.

1.) What then is the math behind calculating how much force that it tries to pull back with along each point of the band? Does the force pull uniformly across each point? Or, is the pullback force greater at the very end, where your hand would be pulling it from? What are the input parameters based on the type of rubber material?

2.) To an outside observer, let's say after it's stretched 15 centimeters, you attach a rock or something to the end of it just for fun, or if you're a masochist or something like that. Well, how much is that rock going to accelerate as the band contracts? Is the added mass of the rock going to slow down the speed the rubber band contracts? By how much?

1 Comment
2023/11/14
00:27 UTC

9

A 3-year journey to develop a robotics learning tool for everyone

I'm a PhD student in robotics. For the past 3 years, I've been pursuing the journey of developing a learning kit that makes robotics a less frightening and easy field to get started. Throughout this journey, my colleagues and I have been talking to hundreds of students and Professors while continuously iterating the kit design and learning materials. Now that it's finally coming together, I'm thrilled to introduce this project to you.

https://preview.redd.it/54c8skamdnxb1.png?width=1834&format=png&auto=webp&s=00006f5318e9cecd2c85e2cad3c79f38c5b639c7

The kit is a quadruped robot, that can shape-shift to humanoid and other forms. It has most peripherals commonly found in robotic projects, and enough for beginner to advanced-scale applications: WiFi, Bluetooth, motor controller, battery charger, speaker, microphone, inertial measurement unit, RGB LED matrix display, micro SD card, etc.

Some other advantages of this robot includes:

🔩 Modular Design: Easy to assemble and modify, easy to extend electronically and mechanically while still looking awesome (source all included).

đź“š Educational Resources: Tutorials, docs, and online support for a smooth learning journey. We are targeting 200 lessons, and already at 20%. We also provide different engineering tracks to choose from: (1) robot kinematics and dynamics, (2) machine learning/AI and (3) Internet of Things.

🤖 Convenience: The bot comes with a coding portal embedded, simply connect via WiFi and the portal will load up on any device, any browser. You can then go ahead and code your application (in Python or block programming).

With the vision to make STEM education more accessible, we decided to open-source (OSHWA certified) the entire design, including blueprints, design source files, source code and example learning materials. If you're excited, check out the GitHub repository here for more details.

In addition, we also decided to launch a Kickstarter campaign for this robot to put in a bulk order for the electronics, making it even more affordable for students and educators. Your support means the world to us, and I hope that we can continue this journey through your help.

Thank you and I hope that robotics will gradually become a field that's not too hard to get started for everyone! 🤖🚀

https://preview.redd.it/y0xknfrndnxb1.png?width=3138&format=png&auto=webp&s=f1da5b73607d24b82d18d9f1b04506e2b4a3c17f

https://preview.redd.it/a2pct0ipdnxb1.jpg?width=2048&format=pjpg&auto=webp&s=70a4e4eb6430fa597b6b9f6851c4d0e9cf06cc64

7 Comments
2023/11/01
02:29 UTC

2

What would you recommend for a "MacGyver" reading list/curriculum?

I'm not an engineer, don't think I'll ever be one, either. I do like the idea of being MacGyver-esque, though - knowing how things work, being the kinda guy who'd be able to pull off stuff like what Frank Morris did in that Alcatraz film, etc. Think "handy, but a level up." I'm well aware that I'll need to do a lot of hands-on tinkering & messing around, but there's two issues there:

  1. Costs money to mess around - you need tools, things to mess around on, etc. I'm real low on funds right now, so while like I said, I realize hands-on tinkering is a necessity for my goal, some "directed" tinkering would be in order.
  2. From googling for similar reddit posts to to this one before asking, I've learned two things everyone seems to agree on:
  3. Welders/fab guys can make pretty much whatever they want.
  4. The fundamentals of engineering are there for a reason - they help you make sense of the on-the-job learning you'll do. So with that in mind, and remembering that I probably won't need quite as much theory & math as real engineers - although feel free to correct me if I'm wrong there - what kinda theory/meta stuff should I look at?

In an effort to be proactive, I've included some books that I think might be good for my purposes. Note I have no criteria past a gut feeling when it comes to selecting this stuff, and I also don't know what order I should read anything in. So, here we go:

That's all I got, so far. I look forward to any and all help you guys can give me, I kinda doubt this sorta "teach me how to be a capable protagonist like in L'Île mystérieuse" thing isn't what the sub is for.

0 Comments
2023/09/29
16:46 UTC

1

Learn English through Story | Very Interesting Story | Short Story #le...

0 Comments
2023/09/16
15:29 UTC

7

Relearning physics, pre calculus, calculus 1, calculus 2 and calculus 3.

Hello. I would like to go back to school for mechanical engineering. I stopped due to a car crash I was in and having to recover physically, financially and mentally from it. And I would like to ask for help on the best way for me to relearn/review and remember and be decent enough to go back to school.

2 Comments
2023/09/15
06:35 UTC

2

What is Embedded Systems Engineering? (Answered)

What's up everyone! My team and I crafted a So You Want to Be an Embedded Systems Engineer video, detailing a super popular engineering career path in the Electrical-Computer Landscape! We discuss what the field is, most useful university classes, give an in depth look at how a GoPro works as an embedded system, and finish with their healthy salaries. Watch it if you’re interested and let me know what you think and if you think it's accurate! https://youtu.be/m8w2FzqU5jg?si=kRycKTdxTWLV7CgB
Thanks all!

0 Comments
2023/09/10
20:08 UTC

2

Homework Help - calculating stress, bending moment, etc.

Hi everyone,

I'm running into this problem in my statics class and I'm having a hard time understanding why we're doing what we're doing. The problem is:
There is a horizontal beam of length L and cross sectional area A that is cantilevered on the left side. The right most side of the beam has a downward vertical force of magnitude F. Keep all your answers variable, show your work.

  1. What is the stress in the beam?

  2. What is the bending force in the beam?

  3. If we increase the cross sectional area of the beam to A_1, where A_1 > A, what happens to the stress in the beam?

  4. If we increase the length of the beam to L_1, where L_1 > L, what happens to the stress in the beam?

​

So I think I get the problem ... here's my answers:

  1. F/A
  2. M*L / (moment of inertia) ... I don't understand this equation. Why multiply the moment by the length of the bar. I get the divide by the moment of inertia since th emoment of inertia is the measure of how resistant something is to a change, but I'm having a hard time grapsing the numerator. Is it because we can treat the (M*L) term as integrating the Moment over the whole bar and we are essentially collapsing the moment of the beam to a single point source? Please help me on this one.
  3. The stress in the beam decreases to F/A_1. This one is also confusing to me, would the stress change? It's hard to tell which stress the problem is talking about or if it is even subject to change since what i"m calculating here is the axial stress ... someone please help me here.
  4. The stress in the beam is unchanged. I'm like 85% confident in this answer. the length of the beam would not change the stress right? It would just be F/A still? Am I thinking about this correct?

​

I would appreciate help on this!

Thanks

1 Comment
2023/09/06
01:08 UTC

1

How can I find personal projects to work on as an upcoming design engineer ?

0 Comments
2023/09/04
21:18 UTC

2

University

Hello guys! I am 29 years old and from Hungary. I live in a small town and I was working as a CNC machinist for 9 years at a small workshop. (35 people work here.)Now I have been working as a shift manager at the same workshop for almost a year. My duties are: making CAM programs and CAD models, designing some appliances, sending some e-mails, doing some paperwork, and helping the people in my shift if it is necessary. Besides I have a part-time job as a personal trainer.

I want to know more about machines, materials, and so on and I also want to work in an even higher position so I'm thinking about applying for a correspondence course at a university(on the weekends). I also have a graduation as an electrician so I'm interested in the way how machines work I mean Plc for example. Do you think is it worth it to get a bachelor's degree as an engineer? I want to make this choice this year. Thanks, guys for reading this and have a good night!

0 Comments
2023/09/03
18:25 UTC

2

Shear-moment diagrams, question in comments.

0 Comments
2023/08/27
04:21 UTC

2

Learn engineering, but its fun and gamified!

Hi all,

I have been working on a platform called "Skillflow" to help me learn any topic matter I am interested in, while hacking my dopamine system with awards and a gamified interface. Would love to hear your thoughts on it! Will link below:

https://skillflow.xyz/

0 Comments
2023/08/08
15:34 UTC

2

Hi, I'm making a Batman XE (Extreme Conditions) Suit how can I make the mask mechanism?

2 Comments
2023/08/04
22:39 UTC

2

3 Tips for Changing Careers to Embedded Systems Engineering

1 Comment
2023/07/29
14:53 UTC

3

Hi there ... How is the bio-medical engineering field

Hi I'm 18 (female) and going to college next week in electrical major cs minor course. We have bio medic related electives that i can take. i did not do biology in high school because i did not want to go through the medical path and also since it wasn't easy for me.

I plan to try for masters in a reputed university in bio medical engineering. My course is a electrical major so how well should i prepare for this ... ... i want to do hardware and equipment design and manufacturing .....

How should i plan my 4yrs for this... what courses or requirements should i complete .... interships?

im so confused... any help is appreciated THNK UUUU

0 Comments
2023/07/27
11:07 UTC

3

Scissor Lift Dynamics Problem. For Desired Height Find Reduction of Span at Base Needed.

0 Comments
2023/07/26
02:12 UTC

Back To Top