Announcement

Collapse
No announcement yet.

Connecting external relay

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connecting external relay

    Is it possible to connect a external 3Vdc relay straight on the gpio ports?
    how much current can a gpio port handle?

  • #2
    Hi,

    On a Picaso display, the maximum current that can be sourced from an output pin is 4.0mA.
    On a Diablo display, the maximum current that can be sourced from an output pin is 10.0mA

    It wouldn't be good practice to connect a relay directly to the GPIO pin. There are several inexpensive relay modules that have an opto-isolater circuit available that take power from the main power supply and the GPIO is just used as a signal to the opto-isolator.

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      I searched a whole day but i can't find a relais which operates <10mA.
      Do you have some suggestions?

      Comment


      • #4
        Hi,

        A relay like this would be ideal for connecting to GPIO pin.

        https://www.amazon.co.uk/XCSOURCE-Ch...=arduino+relay

        I hope it helps

        Best regards

        Paul

        Comment


        • #5
          Originally posted by pauleilio View Post
          Hi,

          A relay like this would be ideal for connecting to GPIO pin.

          https://www.amazon.co.uk/XCSOURCE-Ch...=arduino+relay

          I hope it helps

          Best regards

          Paul
          Thanks Paul !

          Comment


          • #6
            For my project i need 2 relais.
            Relais 1 will act as a on/off switch between the battery and a voltage regulation board.



            Relais 2 can switch on/off for charging the battery.

            My question is: is it possible to assign 2 event at a button?
            When i press a button it should do 2 things when i want to charge the battery:
            - set PAx in state (it should switch relais 1 in the "off" state),
            - set PAx in a state (it should switch relay 2 in the "on" state).

            Is this possible?

            if it is i can also set other states, like when i switch on power, it should set relais 1 in the "on" state and relais 2 in the "off" state.

            Comment


            • #7
              Hi,

              There is a way where the event of one output could set another output and the initial state of the output could be altered to acheive the states you have in the above diagram. The event of button0 can trigger output0 which has an initial state of low and the event of output0 can trigger output1 which you can set to have an initial state of high.

              Button0 Event --> Output0 Event--> Output1

              Again with Workshop4 Pro and magic code there would be more control.

              I hope this helps

              Best regards

              Paul

              Comment


              • #8
                Ok, i think i will have to look at the PRO version for more control, because this is what i have in mind:




                Other question, or maybe i should make another thread, but is it possible to use the ADC of the gen4-pa5 to trigger a input voltage higher then 3,3V (i think at least 7V) ?

                Comment


                • #9
                  Hi,

                  Yes it is possible but you would have to use a potential divider circuit or some other method of reducing your peak 7v down to 3v3 before going into the ADC.
                  A reading of 3v3 at the ADC input would then actually mean 7v.

                  I hope this helps

                  Best regards

                  Paul

                  Comment


                  • #10
                    Thanks Paul,

                    I think i will made indeed a voltage divider, so i can trigger if the charger is charging or idle (1/0).
                    I'll take the highest voltage when the charger is charging and lower it to 2,5V (for secure reason), just to see if there is a voltage or not.

                    Great stuff, looking forward to receive my components to test it.
                    In the mean time i will order the Pro version.
                    Do i have to pay each time when there are updates of the pro version or is it free after i bought the pro version?

                    Comment


                    • #11
                      Hi,

                      After you buy the license for the Pro version it will still be Pro even after a Workhsop4 Update.

                      Best regards

                      pauls

                      Comment


                      • #12
                        Hello Paul,

                        Could you confirm if the following calculations are correct (i don't want to blow up my device )



                        Reference voltage = 3,3V which i want to assign as the 10V (so i can set a gauge 0-10).
                        2S lipo max voltage will be 8,4V

                        Comment


                        • #13
                          Hello,

                          Yes that seems to be correct and it does give a bit of room before you reach the maximum of the ADC, knowing that the LiPo max/peak output voltage is 8.4v.

                          Good luck

                          Best regards

                          Paul

                          Comment


                          • #14
                            OK, thanks. Now the "hard" part .. programming the input ...
                            Do you have a link or example how i can do that in Visi-Genie or do i just define a gauge 0-10 and it automaticly asigns 3,30V to 10 and 2.77V as 7,4?

                            Comment


                            • #15
                              Hi,

                              The analog input range is 0 to 4095 so really if you had a gauge of 0 to 100 then each frame would equal roughly 41 from the adc or adc divided by 41. Or if it is 0 to 10 then it would be adc divided by 409.

                              Your gauge ideally needs to be numbered 1 to 10 but have 100 steps.

                              Best regards

                              Paul

                              Comment

                              Working...
                              X