Notifications
Clear all

New member

14 Posts
3 Users
0 Likes
278 Views
(@efisher)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

Hi, my name is Elam.

I am here because I need help with a project that I'm currently working on. I have virtually no experience in computer programming or writing code.

But I am very much a DIYer and have a good grasp on electrical function. 

I came across a video that really caught my attention. It was Arduino Masterclass. I had never heard of the Arduino but because I'm literally at the moment trying to get this project working, it looks like it might be exactly what I'm needing.

The project is a door slab display at my workplace. The function I'm trying to accomplish is basically like a CD changer. Normally it will have a slab displayed at all times. When a different one is desired I would like to press a numbered button and the system would take the current one to its storage location, slide the slab into its slot, then go to the slot selected, slide out that slab and bring it into the display position. The track setup is already in place, with a DC motor already able to do part of this. I was planning on using relays and position switches to control the motor. But because there are multiple storage slots I'm unable to get the level of automation I wanted.

So a detailed description of the steps needed.

Step 1: Motor A must move the carriage track to 1 of 8 possible locations. I'm thinking a stepper motor could do this. 

Step 2: Motor B would roll the slab to the side storage track. Positioned again via stepper motor? or stop switch?

Step 3: Motor C would unlatch the slab.

Step 4: Motor A would move the carriage track to the selected slot.

Step 5: Motor C would latch to the selected slab.

Step 6: Motor B would roll the slab onto the carriage track.

Step 7: Motor A would move the carriage track to the display position and stop.

Now the questions. Can the Arduino have 8 or more programs that can be selected individually each by their own button?

Also, because each slab must be put into its slot before the next can be loaded it means the display position is actually the middle of a complete cycle. Therefore when a new slab is selected the last half of the cycle must be completed first. Can the Arduino do this? Or would it simply start a new program when the next button is pushed?

Any help would be much appreciated!! Elam.


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher We need to move this Topic to the Help wanted section. We like to keep the introductions to a few posts, usually only one, but sometimes newbies get right into it. Since this project is doable, with your stated background it will take dozens or maybe even hundreds of posts to get you there. The forum is supposed to be for hobbyists, so if you are doing this as part of your job some including me will object.

Good luck.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@efisher)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

@zander 

Sorry. I am unfamiliar with the structure of this forum and how to navigate it.

As for my project, it is not what I do for work but merely a "one off", thing of its own, installation that I'm attempting to do. 

I have been bingeing on tutorial videos about programming the Arduino but have yet to find any that gave me answers for the questions I asked. 

Elam


   
ReplyQuote
(@efisher)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

@robotbuilder 

I thought my questions were clear enough. 

#1. Can the Arduino have at least 8 preprogrammed programs that can be individually selected by numbered button and run only the selected program?

#2. Can it be programmed to stop mid program (I assume yes) but it needs to complete the incomplete program when the next program is selected regardless which program is selected next? ( like a CD changer that must put back the current CD before it can get the selected one.)

I don't need help building the system, I just want to know if the Arduino is capable of what I'm wanting it to do. I have no experience with it. 

Also, being a new member, I can't yet attach anything.

Thanks, for your response!


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher No need for 8 programs, you just need one with 8 if statements. If you wish to go ahead, then yes any of the boards including Arduino (many boards) can work. Each board has limitations but since we know almost nothing about your project it is impossible to say which board may or may not work.

In system design work, the hardware is only picked after the design is done, but in this case, it is possibly simple enough that you could choose one of the many Arduino boards.

Since I no longer carry liability insurance for my professional work I can't comment on specifics but if/when you have a design I can give general comments (after checking with my lawyer first)

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@efisher)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

@zander 

Well I now have an Arduino Mega board and a knockoff Arduino Uno super starter kit on the way. Once I have them I'll get started with the programming. 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher Ok. One thing that will be useful to know is the type and size of the motors involved. If you don't know, take a picture of the spec label of each different motor; in other words if the specs are identical for four motors, only one picture is needed.

Another key point is whether you want to use WiFi or a cabled connection to the motors or controllers.

It will also be important to know how the motors are controlled now. If it's just an on/off switch or a contactor or something more sophisticated. A picture of the outside, at least and better if inside of the switch, will help. It is important to know if the motors are wired directly to the switches or do the wires go through some sort of electrical box.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@efisher)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

@zander 

The largest motor will probably be a Nema 17 stepper motor with a 20/1 or 50/1 gearbox. The stated current is 1.65amps. (I haven't bought any yet) They will not be controlled by wifi. I envision a numbered keypad would be the best option. 

The initial plan was to simply manually push everything  by hand. Then I was asked if I thought I could motorize at least part if it. I thought I could, using relays and position switches but that gets a little complicated because there are multiple storage tracks. I think a stepper motor might in some ways be easier. 

You said I wouldn't need 8 programs, just 8 different "if" parameters. That makes sense if those parameters are preset and are selected by the corresponding numbered button.

The other potential challenge will be that the last half of the program would be completed AFTER the next selection is made.

Once the parts arrive I'll put together a mockup of 3 motors and figure out the programming before I build the rest of the drive mechanisms. 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher Sorry, I thought this was an existing setup that needed some automation. Since you are not a programmer, that is the first thing you must learn. Depending on your learning skills, aptitude, and time to invest, that might take a few or many months to reach the level of newbie. 

The following is like comparing vegetables and trucks. Relays and position switches are 2 different things, one is for controlling a motor the other is a signalling device. Stepper motors are motors so your statement makes no sense.

I thought I could, using relays and position switches but that gets a little complicated because there are multiple storage tracks. I think a stepper motor might in some ways be easier. 

The following is the most troubling of all in that for a person who is not a programmer you are already telling us how the program will be organized.

The other potential challenge will be that the last half of the program would be completed AFTER the next selection is made.

How much do these 'slabs' weigh?

Tell us more about the track.

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher I just realized something else. You say you don't want to use WiFi, meaning everything is wired. Although it is not 'programming' per se, there is an assumption that a good programmer knows his customer's business and often spends a great deal of time learning the customer/client business.

In this case the 'customer/client' is the choice of DC line losses vs Wireless.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher Just another quick observation. You want 8 buttons, which will need 8 of something (servos, steppers) for a total of 16 pins. You mention 3 motors that need direction and speed controls. That is at least 2 pins for a total of 6. You also need limit switches. The UNO does not have enough pins, but the MEGA does.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@efisher)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

@zander 

The carriage track has a max travel distance of less than 3'.

But all that isn't important for now. And I do have a MEGA on the way.

What I will need to do with the main stepper motor is move the track a specific distance to align with 1 of 8 storage slots. I am of the impression a stepper motor can do this without a limit or stop switch.

This is really like a CD changer. Assuming a CD is playing, when you select a different CD, the changer must put the current CD back into its storage slot then get the selected one and place it into the player. 

This is why I said this;

"The other potential challenge will be that the last half of the program would be completed AFTER the next selection is made".

The first half of the program sequence is get the part to its display position. The second half is putting it back when a different one selected. Obviously the putting back must be completed before the newly selected one can be gotten.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6982
 

@efisher I will have to drop out of this discussion since it is clear you have not informed your company of its financial risk.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
 dw
(@dw)
Member
Joined: 3 years ago
Posts: 15
 

Elam:

Hi, my name is Elam.

dw:
Hello Elam and welcome!

Elam

Step 1: Motor A must move the carriage track to 1 of 8 possible locations. I'm thinking a stepper motor could do this. 

Step 2: Motor B would roll the slab to the side storage track. Positioned again via stepper motor? or stop switch?

Step 3: Motor C would unlatch the slab.

Step 4: Motor A would move the carriage track to the selected slot.

Step 5: Motor C would latch to the selected slab.

Step 6: Motor B would roll the slab onto the carriage track.

Step 7: Motor A would move the carriage track to the display position and stop.

dw:
If you don't already know this - you will need a HOME position sensor for each of these axis.

A HOME position sensor in this case would typically be an opto-interrupter

The first movement each motor would make is the HOME movement

The HOME position establishes ZERO as a baseline

A number of steps is then needed to move from ZERO to a given position

In order to maximize accuracy - the program would typically perform the HOME routine at the outset of every instance in which the motors are going to moved.

Elam

Now the questions. Can the Arduino have 8 or more programs that can be selected individually each by their own button?

dw:
Yes - these would typically be written in the form of FUNCTIONS

A MAIN program would be established - which would call a given FUNCTION whenever it is needed.

So the MAIN program would call a FUNCTION to move Motor A 

And when that FUNCTION is complete - the MAIN program would then call a different FUNCTION to move Motor B

 

Elam:

Also, because each slab must be put into its slot before the next can be loaded it means the display position is actually the middle of a complete cycle.

 

dw:

I am struggling to get a conception of this in my mind

I don't know where "the display" comes into the picture.

So it is unclear what is being described

 

What I suggest you do - is take this project in incremental steps which you plan out in advance

STEP 1: Write an Arduino program to respond to the buttons you will need

Instead of using stepper motors - use an LED as an indicator that your buttons are functioning as planned.

 

STEP 2 Write an Arduino program to move Motor A to its HOME position and then move X steps from there.

STEP 3: Now incorporate the button routine with the motor movement routine

If you follow this process of evolution in a sequential manner - I suspect many of your questions will become clear to you as you progress from one step to the next

 

But most of all

This is a wonderful project.

But it is also a BIG project!

So if you take it one step at a time - you be more likely to have success and fun in the process!  :-]

This post was modified 4 months ago by dw

   
ReplyQuote