Hello all, im looking for a bit of help with a project im currently in the middle of.
Im in the process of creating an automatic cash draw tester that will be powered through an ardunio Mega2560.
This will control the release of the solenoid of the cash draw and detect the signals.
This is the process cycle i want it to do but im not sure how I could code this into the arduino set up
a) Reads cash draw status ( Open or Closed)
If cash draw open activates cash draw solenoid
If cash draw open detects switch A
b) Reads Switch A = True activates the actuator to close the cash draw
c) Reads cash draw status (if correct increase count by 1)
d) Loops process cycle (x10)
If error detected programme halts and produces a solid RED LED
blodwin123:
If the draw is shut Switch B which is located within the cash draw will be activated.(for the signals)
When the draw is released it will hit a plate which will knock switch A which will trigger the actuator.
Am I correct to understand it this way ...
When the drawer is shut Switch B will be closed and Switch A will be open,
When the drawer is open Switch B will be open and Switch A will be closed,
And, presumably, when the drawer is shut the solenoid allows the lock to close so that the drawer cannot be opened.
What I don't understand is {A} what tells the Arduino to activate the solenoid so as to release the lock. And {B} what is the purpose of the switches A and B.
My guess is that something sends a message to the Arduino when it is OK to activate the solenoid.
Then if someone pulls the drawer open it will allow Switch B to open.
What is supposed to happen when Switch B opens?
What is supposed to happen if the solenoid is activated and the drawer is NOT opened?
Can the drawer be closed when the solenoid is NOT activated?
You will note that I have not yet got as far as thinking about Switch A.
Robin2:
Am I correct to understand it this way ...
When the drawer is shut Switch B will be closed and Switch A will be open,
When the drawer is open Switch B will be open and Switch A will be closed,
And, presumably, when the drawer is shut the solenoid allows the lock to close so that the drawer cannot be opened.
What I don't understand is {A} what tells the Arduino to activate the solenoid so as to release the lock. And {B} what is the purpose of the switches A and B.
My guess is that something sends a message to the Arduino when it is OK to activate the solenoid.
Then if someone pulls the drawer open it will allow Switch B to open.
What is supposed to happen when Switch B opens?
What is supposed to happen if the solenoid is activated and the drawer is NOT opened?
Can the drawer be closed when the solenoid is NOT activated?
You will note that I have not yet got as far as thinking about Switch A.
...R
The purpose of Switch B is the interal switch which is found with in the cash drawer(As is the solenoid) . The purpose of this switch is that when it is used in the POS set up it will give the correct signal to the till.
Switch A is there to detected if the drawer has been released properly.
The concept is that before the programme is started to solenoid will be deactivated, then when the programme begins it will activate the solenoid to release the drawer. Which will then the the process cycle begin.
blodwin123:
The purpose of Switch B is the interal switch which is found with in the cash drawer(As is the solenoid) .
I did not know there are switches inside cash drawers - nobody was silly enough to let me near one of them. And if A is a solenoid why call it a switch.
Anyway, I had hoped that my Reply #5 would have prompted you to write down the sequence of events in the style that I used. If you do that the program code will be much easier to write.