I started looking at the distance sensors on my project and followed a tutorial on Arduino's website. The algorithm for sensing distance with HR-SC04 modules is straightforward. The example didn't include a timeout, so the program could lock up for approximately three minutes if I pointed at something beyond the sensor's capability. The IDE let me initialize a serial port, but the serial monitor wouldn't pick up anything. I've worked with controllers like this, and sometimes they have a proprietary terminal-like program, but they're finicky. I thought about attaching a display, but that would probably be overkill and exceed the controller's memory. The best bet I have for monitoring the distance sensors is the servos, which is the program's point.
Servos are also easy to control, but I confused myself with milliseconds and microseconds, which meant that I wasn't sending valid pulses. There is a library, but when I used that before, I couldn't get the full range of movement, so I opted to write a function that will also make teaching it more valuable. Once I used the correct values, I witnessed peculiar behavior as the servos struggled to behave, and the controller spontaneously locked up on me. I hypothesize that the onboard voltage regulator wasn't sized to supply motors. Whenever I run the servos fast, they draw so much current that the processor browns out and falls into its boot cycle. Until I can solve this power issue, this project is on hiatus.
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2022-02-12
Servos are also easy to control, but I confused myself with milliseconds and microseconds, which meant that I wasn't sending valid pulses. There is a library, but when I used that before, I couldn't get the full range of movement, so I opted to write a function that will also make teaching it more valuable. Once I used the correct values, I witnessed peculiar behavior as the servos struggled to behave, and the controller spontaneously locked up on me. I hypothesize that the onboard voltage regulator wasn't sized to supply motors. Whenever I run the servos fast, they draw so much current that the processor browns out and falls into its boot cycle. Until I can solve this power issue, this project is on hiatus.
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2022-02-12
Comments
Post a Comment