Bitten off more than I can chew!

Hi - my name says it all - I am working on prototyping a new product I have designed that is similar in design to an inkjet printer - It is used for packing powders into small plastic cups and then heat sealing the cup with a foil lid… I have spent the last four weeks studying Arduino and am starting to crank out some basic working code. However, the more I do the more I realize how far over my head I am for a 1st project…!

I basically figured out the operating sequence (attached) and a few friends have given me a few outline code files though I really am going to struggle here. My specialty is CAD design, prototyping and 3D printing (I have my own 3D printer at my office) - be happy to swap some of my services (or cash) for some assistance from an Arduino geek! (I too would love to be a geek as well - Arduino is truly an amazing and awesome world) though I just don’t have the time to do all the programming as I need to complete the prototype within the next month or so.

For a slick programmer i think not too difficult a task. Even if somebody has done something similar where I can modify the code for my application would also be a huge help! I see “severalthingsatthesametime.ino” on this forum and I guess this is pretty much what I need to do?

Anyhow - any suggestions are most helpful!

thanks heaps in advance.

JG

powder packing maching.txt (7.06 KB)

You have not started yet with code ? Do you have programming experience ?

I see a very large state machine. The code will become large, but you can see every step and you can debug every step. A state machine use a variable that holds the current state. You have already given numbers to the different operation states. For example when the variable is 25 it means extend cup holder.

The large state machine is not the problem, but all the exceptions and interrupts and bouncing buttons and switches are a problem. I don't know if all that can be fixed in a month. You might need someone on site to make it for you.

For a slick programmer i think not too difficult a task.

How would you know what if you're not a "slick programmer". At the very least it is very time consuming and has many details. I'm not a "slick programmer" but I could see that job taking weeks.

This is beyond the scope of a post. You need to post on the Gigs & Collaborations topic .

yes - I see now - thanks Raschemmel- I think you are correct

"This is beyond the scope of a post. You need to post on the Gigs & Collaborations topic"

Also to Peter - I agree - with you as well - somebody onsite would be useful though with my limited knowledge, I should be able to do the local parts (I am based in Asia) Thanks for suggestions!

Something you can do (if you haven't already) which won't need such a high level of programming ability is to write a bunch of little sketches that exercise your hardware. It'll verify that everything's connected up and that moving parts move as they should.

Some snippets from your testing suite will probably be quite useful to whoever you find to do the coding.

wildbill: Something you can do (if you haven't already) which won't need such a high level of programming ability is to write a bunch of little sketches that exercise your hardware. It'll verify that everything's connected up and that moving parts move as they should.

Some snippets from your testing suite will probably be quite useful to whoever you find to do the coding.

Yes agree - am already making some headway - I have the bipolar stepper working with the carriage motor and am now working on the sequencing code.

I am a little vexed however with the overall structure - so many paths it seems to go down. I know I gotta figure out interrupts and Booleans some more that I will work on next. I am looking through a whole lot of code to get some starting points. If I can t find someone to assist will have to nut it out regardless.

Have you generated an algorithm yet ? You don’t need to know how to code to do that. All you need to know is what needs to take place , when and under what conditions. The algorithm is really step -1 and it can only come from you because you are the only person (at the moment ) who can answer those questions. The programmer writes the code based on an algorithm he is given (usually by Engineering Dept, or Process Control)

No - I haven't done the algorithm as yet - I have been talking to a programming friend over here (c++) who also said the same thing - so I guess (after your advice as well) that's the next thing I should do. I take it you are talking of a flow chart of some kind?

A "Flow Chart" is the term used for a process control flow diagram. An "Algorithm" is specific to programming. It is the "Design Criteria" per se of the program. It is the basis upon which the code is written.

DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

Duplicate thread deleted.

I guess I have that pretty much covered tho for the prototype I expect the timing of operations will have to slow down a little - I can for sure work out the timing of all operations and I have a target cycle time of 10 seconds or thereabouts for the complete operation. The only math will really be the timing of steps and nothing more complicated than that.

sorry HAL

Unless I am misunderstanding your list:

On the h-bridge controllers you only allocate one pin to control direction of the motors, but the L298 requires two pins to properly control one DC motor (one pin for direction, the other pin for on/off/pwm) - while for a stepper motor, you need all four pins.

Also note that on the L298, you can configure it to either operate two DC motors, or one DC motor in "parallel" mode, or a single bipolar stepper motor (one h-bridge per coil).

Most of your control flow seems laid out in that list; you basically just need a bunch of functions for the motors and sensors, then other functions for the interrupts, checks, and operations - plus the menu selection and such (btw - you don't list the menu requirements - which would be important to scope out a better time and cost estimate for your programmer).

I think this project will take some time ultimately; between coding the initial pieces, running individual tests and checks, the passing of the code back and forth (so it can be checked on a real machine - instead of just LEDs and such that the coder would have - btw, what kind of LCD display? most use more than one pin; even one for SPI) - I think 80-120 hours might be in the ballpark for everything needed of the project (that would be for a final debugged and polished firmware), unless you are just looking for some quick-n-dirty coding to get things rolling that you can polish afterward.

It would probably have to be broken into stages anyway - something like 8-12 hours for all of the base functions, 4-8 hours each for each "operation", 8 each for the checks, etc; note that I am approaching this from an experience level of 20+ years in software development (but nothing embedded) - I might be high on my estimates, or way too low (I would probably err on the latter - as I imagine that there would be weird debugging sessions where the code seems to work ok, but fails on the real machine, possibly due to weird power glitches or any number of other possibilities).

This sounds like a fun project, though. I wish I had the time - I would probably offer my services on it.

**** Thanks cr0sh - great comments and suggestions...

cr0sh: Unless I am misunderstanding your list:

On the h-bridge controllers you only allocate one pin to control direction of the motors, but the L298 requires two pins to properly control one DC motor (one pin for direction, the other pin for on/off/pwm) - while for a stepper motor, you need all four pins.

Also note that on the L298, you can configure it to either operate two DC motors, or one DC motor in "parallel" mode, or a single bipolar stepper motor (one h-bridge per coil).

*** Yes, you are right - I initially did not allocate enough pins - fixed this now

Most of your control flow seems laid out in that list; you basically just need a bunch of functions for the motors and sensors, then other functions for the interrupts, checks, and operations - plus the menu selection and such (btw - you don't list the menu requirements - which would be important to scope out a better time and cost estimate for your programmer).

**** Good suggestion - will do -

I think this project will take some time ultimately; between coding the initial pieces, running individual tests and checks, the passing of the code back and forth (so it can be checked on a real machine - instead of just LEDs and such that the coder would have - btw, what kind of LCD display? most use more than one pin; even one for SPI) - I think 80-120 hours might be in the ballpark for everything needed of the project (that would be for a final debugged and polished firmware), unless you are just looking for some quick-n-dirty coding to get things rolling that you can polish afterward.

**** Quick and dirty coding is going to be OK for now as the prototype is only for proof of concept to show investors and manufacturers (already assigned) for this product. Later can smooth out the rough parts.

It would probably have to be broken into stages anyway - something like 8-12 hours for all of the base functions, 4-8 hours each for each "operation", 8 each for the checks, etc; note that I am approaching this from an experience level of 20+ years in software development (but nothing embedded) - I might be high on my estimates, or way too low (I would probably err on the latter - as I imagine that there would be weird debugging sessions where the code seems to work ok, but fails on the real machine, possibly due to weird power glitches or any number of other possibilities).

***** I think I am looking at about 80-120 hours even to get the basics done by myself - progress sloooww! :(

This sounds like a fun project, though. I wish I had the time - I would probably offer my services on it.

***** what would it take to convince you? This is a very cool product... big industry! Hope to be in production by Q3 this year. Can disclose more under NDA to tempt u?

When you are responding to quotes from someone, it really is easier to follow if you use separate quotes and put your comments in between the sets of quotes instead of inserting your comment inside someone else's quote. It's easier to follow who is saying what than looking at "*****" at the beginning of your response to the person's quote.

[u]Tell me if you see the difference:[/u]

Unless I am misunderstanding your list: On the h-bridge controllers you only allocate one pin to control direction of the motors, but the L298 requires two pins to properly control one DC motor (one pin for direction, the other pin for on/off/pwm) - while for a stepper motor, you need all four pins. Also note that on the L298, you can configure it to either operate two DC motors, or one DC motor in "parallel" mode, or a single bipolar stepper motor (one h-bridge per coil).

Yes, you are right - I initially did not allocate enough pins - fixed this now

Most of your control flow seems laid out in that list; you basically just need a bunch of functions for the motors and sensors, then other functions for the interrupts, checks, and operations - plus the menu selection and such (btw - you don't list the menu requirements - which would be important to scope out a better time and cost estimate for your programmer).

Good suggestion - will do -

I think this project will take some time ultimately; between coding the initial pieces, running individual tests and checks, the passing of the code back and forth (so it can be checked on a real machine - instead of just LEDs and such that the coder would have - btw, what kind of LCD display? most use more than one pin; even one for SPI) - I think 80-120 hours might be in the ballpark for everything needed of the project (that would be for a final debugged and polished firmware), unless you are just looking for some quick-n-dirty coding to get things rolling that you can polish afterward.

Quick and dirty coding is going to be OK for now as the prototype is only for proof of concept to show investors and manufacturers (already assigned) for this product. Later can smooth out the rough parts.

It would probably have to be broken into stages anyway - something like 8-12 hours for all of the base functions, 4-8 hours each for each "operation", 8 each for the checks, etc; note that I am approaching this from an experience level of 20+ years in software development (but nothing embedded) - I might be high on my estimates, or way too low (I would probably err on the latter - as I imagine that there would be weird debugging sessions where the code seems to work ok, but fails on the real machine, possibly due to weird power glitches or any number of other possibilities).

I think I am looking at about 80-120 hours even to get the basics done by myself - progress sloooww! :(

This sounds like a fun project, though. I wish I had the time - I would probably offer my services on it.

What would it take to convince you? This is a very cool product... big industry! Hope to be in production by Q3 this year. Can disclose more under NDA to tempt u?

I am a little vexed however with the overall structure - so many paths it seems to go down. I know I gotta figure out interrupts and Booleans some more that I will work on next. I am looking through a whole lot of code to get some starting points. If I can t find someone to assist will have to nut it out regardless.

If you had an algorithm it would be much easier. It is a common misconception by non-programmer types that writing the algorithm is more work and it is easier to skip it. Would you like the pilot of the jetliner you are flying in to skip the pre-flight checklist because it is easier ?

ur right - I am trying to get all the separate functions working now though I will tackle algorithm soon.

I see plenty of info on algorithm online so clearly need to do more research.

Think I need a pilot to fly me through this one!

thanks!

Go back and look at Reply#14