HELP! CASH PAID! I need code written for a stepper motor!

Hi Guys,

Im Andy, a product designer based for Studio Make Believe in London, UK. I am currently attempting to build a miniature Trivision display board for a global energy drink company. The idea is that by using a stepper motor, an Arduino, an RTC module and a stepper motor driver the motor will turn once every 6 hours and in-between the arduino will sleep. Unfortunately despite my best efforts I have not got to grips with coding and cannot work out how to write successful code for this.

Is anyone available for some freelance work to write this code for me? You will be paid for your time.

Many thanks,

Andy

Unfortunately despite my best efforts I have not got to grips with coding and cannot work out how to write successful code for this.

What code do you have? What does it not do that you want?

Stepper motors require a lot of current. The current used by the Arduino is nothing by comparison. It seems pointless to save a few microamps by sleeping while using a couple amps for the stepper motor.

To you really need that arduino to “sleep”, to go into power-saving mode? Or did you simply mean that when it’s not running the stepper, it just does nothing?

The whole system will be running from a battery, so by putting the arduino to sleep I am hoping it will stop sending power to the stepper motor (the stepper motor is powered directly from the arduino). This should ultimately mean that the system can run much longer than if the arduino and stepper motor are powered at all times.

The RTC module is in the system to acurately keep time and to enable to power down and up of the arduino when required.

I have all of the parts assembled and wired up (I know how to connect everything physically). I am a product designer and have not coded anything before so not entirely sure where to even start.

Stepper motors do not have to be held on

Studiomakebelieve: The whole system will be running from a battery, so by putting the arduino to sleep I am hoping it will stop sending power to the stepper motor (the stepper motor is powered directly from the arduino).

Stepper motors don't have to be held on. You can step them and turn off the current. Of course, this means that if something external moves the stepper, the arduino doesn't "know" about it - but that happens anyway if you put the arduino to sleep. Your display board - whatever the moving part on it may be - will need some sort of reference marker that can be picked up by a sensor … although I suppose you could zero it and just rely on the stepping, or have some kind of "lock" solenoid. If the stepper connects to a gear train (eg, worm and gear), the friction in that will probably be enough to keep things in the right spot.

But seeing as you want to use a real-time-clock anyway (correct choice, BTW), that clock can generate a "wake up" pulse every so often. The arduino wakes up, checks the time, goes straight back to sleep.

Generally, you don't run any kind of motor "directly off the arduino". First, they draw too much current. Second, the inductance of the coils generates back EMF when the coil is switched on and off, which tends to fry logic electronics. Easiest solution is to buy a steeper motor shield, or to use a driver board. You can make your own - I've done it, it's not that difficult for a small motor. I used a ULN2003, which will happily switch 24v - 12 was enough for my application.

the stepper motor is powered directly from the arduino

No, it isn't. Stepper motors need a lot of current - far more than an Arduino output pin can supply.

What is the stepper motor doing? If you cut power to the stepper, it will not hold position, so a stepper motor is probably the wrong choice.

PaulS: What is the stepper motor doing?

https://en.wikipedia.org/wiki/Trivision

Cool project.

What RTC module do you have? The details on how to talk to them varies - I have two, and they are different. It might be worthwhile incorporating some sort of "lock this in place" catch that's opened with a solenoid.