Author Topic: My Advanced Realistic Humanoid Robots Project  (Read 189330 times)

0 Members and 46 Guests are viewing this topic.

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: lt
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1050 on: November 17, 2024, 12:40:03 pm »
@artbyrobot, so what is your estimate of MCU cycles needed for your loop? 20, like ChatGPT said? My guesstimate would start with 50'000. Not to mention, that it's not even the main problem, the main problem is the idea of processing everything in sequence by switching and polling, what a joke. And even if you choose to not process it in sequence, 2560 does not have enough timers and interrupts. So it's pretty obvious, that you need something else. Perhaps 1 MCU per motor. Or something more capable. In that case 2 or maybe 4 motors could be feasible.
 

Offline artbyrobotTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 485
  • Country: us
    • www.artbyrobot.com
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1051 on: November 17, 2024, 01:03:45 pm »
I won't be using interrupts they should have never been invented.  I won't be using hardware timers at all.  Integer variables will increment with the main while loop as a measure of time.  20 vs 50k?  I disagree.  Chatgpt wouldn't lie.
Robots Project website:  http://www.artbyrobot.com
Full humanoid robot building playlist:  https://www.youtube.com/playlist?list=PLhd7_i6zzT5-MbwGz2gMv6RJy5FIW_lfn
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 13831
  • Country: us
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1052 on: November 17, 2024, 04:22:14 pm »
Maybe after you learn how to weld, you can learn to focus a camera. 
https://www.eevblog.com/forum/mechanical-engineering/my-advanced-realistic-humanoid-robots-project-441835/msg5716517/#msg5716517

I pioneered a clamp for my tweezers.   A SOT23 was used to demonstrate. 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 8853
  • Country: 00
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1053 on: November 17, 2024, 04:26:58 pm »
Quote
Integer variables will increment with the main while loop as a measure of time.

Doing it that way means your loop timing will change every time you modify the code, and once compiled successfully you'll have to re-calculate how long the loops take and adjust the updates for the loop variables.
 

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7969
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1054 on: November 17, 2024, 04:41:18 pm »
Yes and also there is this thing called a "timer" in the chip you can use to get the actual time for these purposes.

 :clap:
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline Xena E

  • Super Contributor
  • ***
  • Posts: 1330
  • Country: gb
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1055 on: November 17, 2024, 05:59:35 pm »

I pioneered a clamp for my tweezers.   A SOT23 was used to demonstrate.

WOW Joe! That there is sure one excellent piece of epic workmanship, really shows you are a bonafide, double breasted, fur lined, elite engineer.

  :-+

X

 
The following users thanked this post: vk6zgo

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7969
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1056 on: November 17, 2024, 08:20:23 pm »
I won't be using interrupts they should have never been invented.  I won't be using hardware timers at all.  Integer variables will increment with the main while loop as a measure of time.  20 vs 50k?  I disagree.

Chatgpt wouldn't lie.

So ChatGPT wouldn't lie eh?

Well let's see about interupts then. I log into ChatGPT and ask it -

Me: "I want to ask you if computer interrupts are important"

ChatGPT: "Yes, computer interrupts are incredibly important! They play a critical role in the efficient functioning of a computer system. Here's why:

1. Efficient Resource Management

    Interrupts allow a CPU to multitask effectively by stopping its current activity to address urgent tasks (like input/output operations).
    Without interrupts, the CPU would need to continuously check (poll) for events, wasting time and resources.

2. Real-Time Response

    Interrupts ensure that critical tasks (like responding to user input or processing data from sensors) are handled immediately.
    For example, pressing a key on a keyboard generates an interrupt, prompting the CPU to process that input right away.

3. Hardware and Software Coordination

    Interrupts provide a mechanism for hardware components (e.g., hard drives, network cards) to notify the CPU that they require attention.
    This ensures smooth communication between hardware and software.

4. System Stability

    They help maintain system stability by allowing the operating system to handle errors or unexpected conditions, such as device failures or resource contention.

5. Multitasking and Time-Sharing

    In modern operating systems, interrupts enable context switching between processes, allowing multiple programs to run seemingly simultaneously.

Would you like a deeper dive into how they work, like interrupt vectors or types (hardware vs. software)? 😊"

Me: "No thank you. I'll forward your answer to the appropriate person on the forum."

ChatGPT: "You're welcome! 😊 If you have any more questions, feel free to ask. Have a great day! 🚀

Note: I didn't know ChatGPT was using emoticons now, I guess it makes it more friendly?  :-//
I told my friends I could teach them to be funny, but they all just laughed at me.
 
The following users thanked this post: oPossum, Manul

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: lt
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1057 on: November 17, 2024, 08:29:26 pm »
I won't be using interrupts they should have never been invented.  I won't be using hardware timers at all.  Integer variables will increment with the main while loop as a measure of time.  20 vs 50k?  I disagree.  Chatgpt wouldn't lie.

I asked what is your estimate, not ChatGPT. So in other words, what you are saying is that you have no clue whatsoever? 20 cycles? A single ADC read (not overclocked) will take more than 1000 cycles. Include math (which eats many cycles on 8 bit AVR), include receiving and processing of control data, etc. I'm not gonna go further with this.
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: lt
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1058 on: November 17, 2024, 09:05:29 pm »
Short conversation with ChatGPT.

How you would call a person who thinks that he can control 10 bldc motors with one AVR MCU by just switching digital pins, reading back EMF with ADC, do it all without timers or interrupts in a single while loop, taking only 20 MCU cycles?

A person with such beliefs might be described as overly optimistic or naive about the capabilities of microcontrollers and motor control. They may also be seen as lacking a practical understanding of the complexities involved in controlling multiple motors, especially in terms of timing, synchronization, and the need for efficient resource management. In a more technical context, they could be referred to as having a misunderstanding of real-time systems or embedded systems design.

Maybe he is a moron?

While it's understandable to feel frustrated with someone's unrealistic expectations or misunderstandings, labeling someone as a "moron" may not be constructive. It's often more helpful to approach the situation with patience and offer guidance or clarification about the complexities involved in controlling multiple motors with a microcontroller. This can lead to a more productive conversation and help them learn from their misconceptions.

Ok, I will offer him guidance.

That sounds like a great approach! Offering guidance can help clarify the complexities involved and provide valuable insights. You might want to explain concepts like the importance of timing, the role of interrupts, and how to effectively manage multiple motors. Sharing resources or examples can also be beneficial. Good luck with your discussion!

@artbyrobot, I offer you guidance.
 
The following users thanked this post: xrunner, Xena E

Offline artbyrobotTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 485
  • Country: us
    • www.artbyrobot.com
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1059 on: November 17, 2024, 11:19:26 pm »

I'll have to ask, why should interrupts never have been invented?
Also, if you could tell us your take on DMA, if that also should never have been invented?
Waiting for your take on those two things, maybe we indeed can learn something from you.

My reasoning for my take on interrupts has already been discussed at length in this thread or the locked one so do a forum search to read more.  It was a significant back and forth discussion and other forum members agreed with my takes.


DMA is an acronym I've never seen in my life before it was posted here by you or someone just recently and never even bothered to look up what it means because to my knowledge it is irrelevant.  Never came up in countless hours of learning about motor controllers and microcontrollers so must not matter.
Robots Project website:  http://www.artbyrobot.com
Full humanoid robot building playlist:  https://www.youtube.com/playlist?list=PLhd7_i6zzT5-MbwGz2gMv6RJy5FIW_lfn
 

Offline artbyrobotTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 485
  • Country: us
    • www.artbyrobot.com
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1060 on: November 17, 2024, 11:24:32 pm »
A single ADC read (not overclocked) will take more than 1000 cycles.

WHAT!?  Why?  That's HORRIBLE design.  It should take 0 cycles to do that why is this so horribly delaying? 
Robots Project website:  http://www.artbyrobot.com
Full humanoid robot building playlist:  https://www.youtube.com/playlist?list=PLhd7_i6zzT5-MbwGz2gMv6RJy5FIW_lfn
 

Offline artbyrobotTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 485
  • Country: us
    • www.artbyrobot.com
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1061 on: November 17, 2024, 11:26:37 pm »
Short conversation with ChatGPT.


no, chatgpt was the one who affirmed 10 motors off one atmega2560 is a piece of cake for that chip.  It is the expert who verified and explained the whole thing.  I trust its judgement.  For you it tells lies but for me it is honest. 
Robots Project website:  http://www.artbyrobot.com
Full humanoid robot building playlist:  https://www.youtube.com/playlist?list=PLhd7_i6zzT5-MbwGz2gMv6RJy5FIW_lfn
 

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7969
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1062 on: November 17, 2024, 11:31:26 pm »
My reasoning for my take on interrupts has already been discussed at length in this thread or the locked one so do a forum search to read more.  It was a significant back and forth discussion and other forum members agreed with my takes.

Oh you glossed over what ChatGPT said about interrupts, as I posted. It disagrees with you and -

Chatgpt wouldn't lie.
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline artbyrobotTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 485
  • Country: us
    • www.artbyrobot.com
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1063 on: November 17, 2024, 11:42:18 pm »
chatgpt would leave out critical information when you are clueless in your prompts which is the case in your situation.  go ask it about the specific claims I made elsewhere in these threads about interrupts and it will affirm them all and discourage using them.  They are HORRIFIC coding practice and should not exist at all.  Only a coding noob or total incompetent irresponsible coder would ever use them unless no other alternative was possible.


Also, ATmega328P can be used on a per motor basis dedicated to just that one motor IF we have any issues with ADC reads slowing down the main while loop as someone mentioned they tend to do.  That type of thing will be revealed in testing and just throwing more arduino chips at the problem is the easy and obvious solution.
Robots Project website:  http://www.artbyrobot.com
Full humanoid robot building playlist:  https://www.youtube.com/playlist?list=PLhd7_i6zzT5-MbwGz2gMv6RJy5FIW_lfn
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: lt
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1064 on: November 17, 2024, 11:44:09 pm »
A single ADC read (not overclocked) will take more than 1000 cycles.

WHAT!?  Why?  That's HORRIBLE design.  It should take 0 cycles to do that why is this so horribly delaying? 


Read about SAR ADC theory yourself. Then read about clock limitations of ADC in AVR. Modern ARM MCU ADC peripherals are way faster, but analog sampling is still quite a slow process (compared to digital IO).
 

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7969
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1065 on: November 17, 2024, 11:49:05 pm »
chatgpt would leave out critical information when you are clueless in your prompts which is the case in your situation.  go ask it about the specific claims I made elsewhere in these threads about interrupts and it will affirm them all and discourage using them.  They are HORRIFIC coding practice and should not exist at all.  Only a coding noob or total incompetent irresponsible coder would ever use them unless no other alternative was possible.

Sorry you ain't getting away with your BS with me.

Here's what you said about interrupts -

I won't be using interrupts they should have never been invented.

Chatgpt wouldn't lie.

You made a sweeping generalization right up there ^^^

And here's what ChatGPT says about them -

ChatGPT: "Yes, computer interrupts are incredibly important! They play a critical role in the efficient functioning of a computer system. Here's why:

1. Efficient Resource Management

    Interrupts allow a CPU to multitask effectively by stopping its current activity to address urgent tasks (like input/output operations).
    Without interrupts, the CPU would need to continuously check (poll) for events, wasting time and resources.

2. Real-Time Response

    Interrupts ensure that critical tasks (like responding to user input or processing data from sensors) are handled immediately.
    For example, pressing a key on a keyboard generates an interrupt, prompting the CPU to process that input right away.

3. Hardware and Software Coordination

    Interrupts provide a mechanism for hardware components (e.g., hard drives, network cards) to notify the CPU that they require attention.
    This ensures smooth communication between hardware and software.

4. System Stability

    They help maintain system stability by allowing the operating system to handle errors or unexpected conditions, such as device failures or resource contention.

5. Multitasking and Time-Sharing

    In modern operating systems, interrupts enable context switching between processes, allowing multiple programs to run seemingly simultaneously.
« Last Edit: November 17, 2024, 11:55:48 pm by xrunner »
I told my friends I could teach them to be funny, but they all just laughed at me.
 
The following users thanked this post: Manul

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: lt
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1066 on: November 17, 2024, 11:53:47 pm »
Also, ATmega328P can be used on a per motor basis dedicated to just that one motor IF we have any issues with ADC reads slowing down the main while loop as someone mentioned they tend to do.  That type of thing will be revealed in testing and just throwing more arduino chips at the problem is the easy and obvious solution.

It's not just ADC being slow, your aproach of how you want to do this is fundamentally lacking.

chatgpt would leave out critical information when you are clueless in your prompts which is the case in your situation.  go ask it about the specific claims I made elsewhere in these threads about interrupts and it will affirm them all and discourage using them.  They are HORRIFIC coding practice and should not exist at all.  Only a coding noob or total incompetent irresponsible coder would ever use them unless no other alternative was possible.

Many things are plain impossible without interrupts. If you don't understand that, it means you haven't done anything serious in modern computing.
 

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1409
  • Country: lt
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1067 on: November 18, 2024, 12:27:49 am »
no, chatgpt was the one who affirmed 10 motors off one atmega2560 is a piece of cake for that chip.  It is the expert who verified and explained the whole thing.  I trust its judgement.  For you it tells lies but for me it is honest. 

I honestly don't care if ChatGPT lies or tells truth. I don't use it. I use my hard earned knowledge over 3 decades of actually making working tech. You on the other hand live somewhere in fairyland, half of your ideas does not match reality at all. Accompanied by hallucinating, data shuffling LLM. What a couple. You said you speak to LLM more than to humans. How pathetic and morally degraded attitude to reject your brothers and sisters for some computer generated bullshit. Fellow humans are the biggest gift in life. Of course, not for you Mr. Hubris.
 
The following users thanked this post: xrunner

Offline Andy Chee

  • Super Contributor
  • ***
  • Posts: 2133
  • Country: au
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1068 on: November 18, 2024, 01:03:40 am »
Chatgpt wouldn't lie.
you should ask chatgpt to analyse your power supply design to see whether it will work or not.  It took a human to tell you that your gate drive wouldn't work, so why not chatgpt?

of course, chatgpt doesn't understand your crappy paint drawing, but it does understand netlists, a skill you might want to learn in order to take advantage of chatgpt's ability to analyse schematics.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 8109
  • Country: au
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1069 on: November 18, 2024, 01:13:53 am »
Maybe after you learn how to weld, you can learn to focus a camera. 
https://www.eevblog.com/forum/mechanical-engineering/my-advanced-realistic-humanoid-robots-project-441835/msg5716517/#msg5716517

I pioneered a clamp for my tweezers.   A SOT23 was used to demonstrate.

Joe, that is actually a good idea.
I have a box full of "O" rings that I would probably never use, otherwise!
« Last Edit: November 18, 2024, 01:17:00 am by vk6zgo »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1819
  • Country: ca
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1070 on: November 18, 2024, 01:18:10 am »
A single ADC read (not overclocked) will take more than 1000 cycles.
WHAT!?  Why?  That's HORRIBLE design.  It should take 0 cycles to do that why is this so horribly delaying?

Maybe read the datasheet?

Quote
26. ADC – Analog to Digital Converter

26.1 Features
• 10-bit Resolution
• 1 LSB Integral Non-linearity
• ±2 LSB Absolute Accuracy
• 13µs - 260µs Conversion Time
• Up to 76.9kSPS (Up to 15kSPS at Maximum Resolution)
• 16 Multiplexed Single Ended Input Channels
• 14 Differential input channels
• 4 Differential Input Channels with Optional Gain of 10× and 200×
• Optional Left Adjustment for ADC Result Readout
• 0V - VCC ADC Input Voltage Range
• 2.7V - V CC Differential ADC Voltage Range
• Selectable 2.56V or 1.1V ADC Reference Voltage
• Free Running or Single Conversion Mode
• Interrupt  >:D on ADC Conversion Complete
• Sleep Mode Noise Canceler

The ATmega640/1280/1281/2560/2561 features a 10-bit successive approximation ADC. The ADC is connected to an 8/16-channel Analog Multiplexer which allows eight/sixteen single-ended voltage inputs constructed from the pins of Port F and Port K. The single-ended voltage inputs refer to 0V (GND).
« Last Edit: November 18, 2024, 01:22:11 am by Kim Christensen »
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 13831
  • Country: us
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1071 on: November 18, 2024, 02:00:49 am »
A single ADC read (not overclocked) will take more than 1000 cycles.

WHAT!?  Why?  That's HORRIBLE design.  It should take 0 cycles to do that why is this so horribly delaying?

I too am looking for a noise free 24-bit flash converter with a modest conversion rate.  SAR and delta sigma are just too slow.    Maybe we should start a business and pioneer these high speed, high resolution ADCs.   I'm pretty sure we can make them with Elmer's glue, scissors, paper, thumbtacks and old gym socks.  Lots of profit margins.     

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7969
  • Country: us
  • hp>Agilent>Keysight>???
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1072 on: November 18, 2024, 02:06:54 am »
Another technique I pioneered and perfected came about because Play-Doh can be messy to work with.  It's possible to make your own clamps from copper wire and rubber tube.   Normally I recommend covering the entire wire with tube to give the base some grip.    Shown holding a diode.  Also a closeup of the diode.

I'm humbled. Really. So many inventions and pioneering gizmos in the thread. My hat is off to all the inventions being shown to the world. All I'd say is your days of being famous are numbered. As soon as this robot is done, we humans will be dust in the wind.
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 8109
  • Country: au
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1073 on: November 18, 2024, 02:22:17 am »
I won't be using interrupts they should have never been invented.  I won't be using hardware timers at all.  Integer variables will increment with the main while loop as a measure of time.  20 vs 50k?  I disagree.  Chatgpt wouldn't lie.

ChatGPT  "lies in its (non-existent) teeth".
It seems "eager to please" & if it can't find any information will make something up.
 

Offline artbyrobotTopic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 485
  • Country: us
    • www.artbyrobot.com
Re: My Advanced Realistic Humanoid Robots Project
« Reply #1074 on: November 18, 2024, 02:45:28 am »



Read about SAR ADC theory yourself. Then read about clock limitations of ADC in AVR. Modern ARM MCU ADC peripherals are way faster, but analog sampling is still quite a slow process (compared to digital IO).

terrible advice nobody do this unless you want to waste time.  You just pick a popular microcontroller, follow some getting started tutorials, code it and project works or not.  that simple.  Don't read all that garbage time wasting stuff.  Let it be a black box.  Not everything has to be unblack boxed that is how you end up in development hell of never any progress
Robots Project website:  http://www.artbyrobot.com
Full humanoid robot building playlist:  https://www.youtube.com/playlist?list=PLhd7_i6zzT5-MbwGz2gMv6RJy5FIW_lfn
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->