SPST Arduino - Proteus

Hi

I am facing this issue the second time... I have used 4 SPST push buttons in proteus on A0 - A3 pins of arduino UNO R3.

When I run the simulation, the SPST are off and it works fine.

When I push the SPST (any one) it gets on, works fine...

But when I have released the SPST push button, it shows the off state but the switch isnt off. It still shows red (active or + voltage) on the other side of the switch which is supposed to be open.

Am I missing some resistors here which are a requirement?

What did the proteus forum say?

is this the right way? Link: Imgur: The magic of the Internet

Please see reply #1

AWOL:
Please see reply #1

I didn't ask them... to me it looked to be a matter of pull up / pull down resistors that are to be connected on some inputs outputs or something ...

To me it looks like a question of pull-down resistors only, but it also looks like a Proteus question, not an Arduino question.

The hint is that this is not the proteus forum and that you should ask there.

Although you're free to ask here, most of us don't have experience with it and the questions that I have seen here about proteus have never been resolved.

Hi,
I'm not a Proteus user but haven't you mislabeled R1 to R4 terminations on the Arduino input, thats is they are not in the proper format.

I would say don't be lazy, and wire the resistors R1 to R4 to A0 to A3.

Then get out your UNO and experiment, in the real world.
Do you have a DMM?

Tom.... :slight_smile:

In the real world, you would use the switches between analogue pins and ground (not 5volt).
And use INPUT_PULLUP in pinMode. No resistors.
Leo..

AWOL:
To me it looks like a question of pull-down resistors only, but it also looks like a Proteus question, not an Arduino question.

Possible possible, but you agree that there is no logic issue?

TomGeorge:
Hi,
I'm not a Proteus user but haven't you mislabeled R1 to R4 terminations on the Arduino input, thats is they are not in the proper format.

I would say don't be lazy, and wire the resistors R1 to R4 to A0 to A3.

Then get out your UNO and experiment, in the real world.
Do you have a DMM?

Tom.... :slight_smile:

TomGeorge:
Hi,
I'm not a Proteus user but haven't you mislabeled R1 to R4 terminations on the Arduino input, thats is they are not in the proper format.

I would say don't be lazy, and wire the resistors R1 to R4 to A0 to A3.

Then get out your UNO and experiment, in the real world.
Do you have a DMM?

Tom.... :slight_smile:

I am sorry but I don't think I have mislabeled, the only reason I did this is because this looks cleaner. Otherwise it would look too messy and it would be hard for people to see it.

Yes I have a DMM

Yes I would have to do it practically soon, I just like getting all done on softwares first.

Wawa:
In the real world, you would use the switches between analogue pins and ground (not 5volt).
And use INPUT_PULLUP in pinMode. No resistors.
Leo..

In the real world, there are 4 input pins whose volts vary digitally i.e. 0 or 3.6 or 0 and 5 . (Do I need level converters here ?)

I want to translate those 0 / 3.5 / 5V to High or Low of arduino. Like arduino should be able to guess whether a high is coming or a low is coming...

I have never worked with level converters but I have this wild guess.

Just needing advice in this regard, (to be more clear, the control signals that are being input to arduino, are signals sent to motors of an RC remote control car. (4 wires , 2 motors )

Abdul_Moeez:
In the real world, there are 4 input pins whose volts vary digitally i.e. 0 or 3.6 or 0 and 5 . (Do I need level converters here ?)

I want to translate those 0 / 3.5 / 5V to High or Low of arduino. Like arduino should be able to guess whether a high is coming or a low is coming...

I have never worked with level converters but I have this wild guess.

If you want digital signals, then use digital pins (analogue pins can also be used as digital pins).
Guaranteed switchpoints of digital input pins are 0.3VCC and 0.6VCC.

So if VCC is 5volt (5volt Arduino), then everything below 0.35volt = 1.5volt is seen as a logic LOW.
And everything above 0.6
5 = 3volt is seen as a logic HIGH.

Switches only 'pull' the pin one way (VCC or ground), so a resistor is needed to pull the pin 'the other way' if the switch is open (can't have a floating/undefined pin).
If the control signals are source and sink (pull both ways), then no resistors are needed.
Leo..

Wawa:
If the control signals are source and sink (pull both ways), then no resistors are needed.
Leo..

Thankyou so much for your comment, makes perfect sense. could you explain a bit more about the quoted statement?

My control signals are not source or sink but a controlled low or high coming from a wireless receiver ...

So I just use one resister per pin right?

Btw... Which pins do you prefer I should use for digital in? (as this is a simple function, so I want to use the appropiate useless pins which have no other function than reading digital input)

You need to read the specification of the receiver. If it can drive its output high and low as you say), you do not need resistors. If it can only pull down the output, you will need a pull-up resistor.

sterretje:
You need to read the specification of the receiver. If it can drive its output high and low as you say), you do not need resistors. If it can only pull down the output, you will need a pull-up resistor.

Consider an RC car, there is a remote, there is a car, car has 2 motors, 2 motors have 4 wires

4 wires go into arduino

arduino reads the 4 wires

arduino does some logic stuff

arduino outputs something

output goes to motor driver circuit

motor driver drives motor .......

Now nothing is floating in this because 4 wires are coming from the already made receiver of RC car.. they wouldn't be some floating points right? even if I do ground them its fine I guess, no issue should come.

If there are any other resistors I should be adding, let me know..

Hi,

Now nothing is floating in this because 4 wires are coming from the already made receiver of RC car..

You need a current return for the 4 wires, if your Arduino and RC receiver use the same gnd or battery negative, then you may be okay.

What @serretje and @Wawa are pointing out is, do the 4 wires from the RC Rx, go low enough and high enough to register as LOW and HIGH on the Arduino.

Tom... :slight_smile:
Time to forget Proteus and enter the real world.

TomGeorge:
Hi,You need a current return for the 4 wires, if your Arduino and RC receiver use the same gnd or battery negative, then you may be okay.

What @serretje and @Wawa are pointing out is, do the 4 wires from the RC Rx, go low enough and high enough to register as LOW and HIGH on the Arduino.

Tom... :slight_smile:
Time to forget Proteus and enter the real world.

Yes even with connected load (motors) when signal comes, the terminal voltage drops (if high) to 3.6V for forward reverse motor, and 5V for left right motor, so both of them should be good enough if arduino is 5V , thanks to @wawa ,

Yes once the hardware starts, same supply will power arduino and all. Thank you so much guys for this. Can I ask another question in the comments?

If I were to record the signal in the EEPROM of arduino or even an external SD card using a breakout, is there any arduino function that maps values against time?

or do I need to virtually code a signal based on high and low, ?