Need some help with a program! Greetings from Norwegian students

Hey folks!

We are three students who are working With a Project in mechatronics. We are going to make a magnetstirrer.

We have three buttons in the front, start, stop and reset buttons. The start button is going to start a timer and a relay for the fan, the stop button is going to stop the timer and the fan and the reset button is going to reset just the timer.

We have arduino nano and a ITC 1602 LCD display.

Thank you for tips and tricks!

So,you want to do this- Magnetic stirrer - Wikipedia
Can you tell us what you have done until this point ? any code ? circuitry ?


Hey MalharD!

We made a curcuit (See Picture)

Yes, just like link from wikipedia. But we need some help With the program.

Our idea is:

1)When you press the on/off button, the display will show a logo (H.E.E enginering)
2) When you press the start button, the logo will disepear and the timer will start (starting the relay for the fan)
3) When you press the stop button, the fan will stop, and the timer will stop
4) If you press the reset button, you will reset the timer, but nothing happening to the relay for the fan

Do you think this is possible?

Thank you so much!!

Greetings Eirik Hatland

That is perfectly possible. Are you sure that the LCD has only two data connections,D0 and D2 ? What is J1 and J2 ?Arduino ? Can you add arduino to your PCB package,otherwise,use Fritzing,even if it's not used on this website frequently.


Great! We are excited!

Yes, the LCD display has only to data Connections.

J1 and J2 is the ardunio socket. We can not add the ardunio, instead we are using female headers to Connect the arduino later.

We have all the Components for testing out the Circuit later today, but we need to make the program and check before we are making the PCB.

Greetings Eirik

Why don't you control the speed of the stirrer from the Arduino, but by hardware?

Switiching a preselected speed only on and off via relais is very oldschool...

Adding a feedback would be nice, so you could detect changes in the speed or at least display RPM... Adding a cheap piezo would allow audible alarms.

That is a good idea! Our teacher suggested the same. But we havent done so much arduino before, and I think we are going for the old School, hehe. It might be difficult!

Greetings Eirik

Nope. It's easy. google PWM. Changing speed is easy use analogWrite(pin,speed); pin is any one from 3,5,6,9,10,11 ; speed ranges from 0-255.