Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Hardware design for 3.3V ProMini and 5v sensor

Hardware design for 3.3V ProMini and 5v sensor

Scheduled Pinned Locked Moved Hardware
20 Posts 5 Posters 8.7k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    esawyja
    wrote on last edited by esawyja
    #1

    Hi all,
    I'm trying to get a battery powered 3.3V MiniPro board working with a 5V JSN-SR04T Ultrasonic sensor, I'm using a DC-DC Step Up Boost Module 3v3 to power the ProMini and a 2N2222 transistor to switch on the DC-DC Step Up Boost Module 5V for the 5V JSN-SR04T, the 2N2222 switches with a 1K resistor on the base from PIN 5 on the ProMini. All this because the JSN-SR04T seems to stay on all the time, so to save some battery, I switch on the Step Up boost module, take the reading and switch it off again, but I'm getting strange readings, my questions
    a ) Must there be a level convertor on the Echo and Trig pins, seeing the ProMini is 3.3V and the Ultrasonic is 5V
    b ) I think it might be power related, as when I drive the Ultrasonic from an external supply, it seems to work ok, could it be that the 2N2222 is not powerful enough?
    c ) The Boost module is off all the time, except when I take the readings and I switch it ON with GND, should I rather keep it on all the time and just switch the +5V line to the Ultrasonic sensor using the transistor when I take a reading?

    In the drawing below, 1B5 <> 4B5 is the Boost module
    1B3 <> is the 3.3 Step up Boost module
    and 1U- <> 4U is the Ultrasonic sensor

    0_1493805192558_upload-0f2d3043-8f61-45a6-b266-2f2ddac9d97f

    Any help / suggestions would be appropriated please

    zboblamontZ 1 Reply Last reply
    0
    • E esawyja

      Hi all,
      I'm trying to get a battery powered 3.3V MiniPro board working with a 5V JSN-SR04T Ultrasonic sensor, I'm using a DC-DC Step Up Boost Module 3v3 to power the ProMini and a 2N2222 transistor to switch on the DC-DC Step Up Boost Module 5V for the 5V JSN-SR04T, the 2N2222 switches with a 1K resistor on the base from PIN 5 on the ProMini. All this because the JSN-SR04T seems to stay on all the time, so to save some battery, I switch on the Step Up boost module, take the reading and switch it off again, but I'm getting strange readings, my questions
      a ) Must there be a level convertor on the Echo and Trig pins, seeing the ProMini is 3.3V and the Ultrasonic is 5V
      b ) I think it might be power related, as when I drive the Ultrasonic from an external supply, it seems to work ok, could it be that the 2N2222 is not powerful enough?
      c ) The Boost module is off all the time, except when I take the readings and I switch it ON with GND, should I rather keep it on all the time and just switch the +5V line to the Ultrasonic sensor using the transistor when I take a reading?

      In the drawing below, 1B5 <> 4B5 is the Boost module
      1B3 <> is the 3.3 Step up Boost module
      and 1U- <> 4U is the Ultrasonic sensor

      0_1493805192558_upload-0f2d3043-8f61-45a6-b266-2f2ddac9d97f

      Any help / suggestions would be appropriated please

      zboblamontZ Offline
      zboblamontZ Offline
      zboblamont
      wrote on last edited by
      #2

      @esawyja Search for comments on earth connected first. These modules seem to glitch if ground is switched, but I think a sacrificial ping command corrected it. Could be wrong but it stick in my head not to ground switch the US units....

      1 Reply Last reply
      0
      • E Offline
        E Offline
        esawyja
        wrote on last edited by
        #3

        mmmh can't seem to find anything on the switching of GND, anyone else, could you comment please

        sundberg84S zboblamontZ 2 Replies Last reply
        0
        • E esawyja

          mmmh can't seem to find anything on the switching of GND, anyone else, could you comment please

          sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by
          #4

          @esawyja

          a ) Most likely no - but its quite easy to test using a simple voltage divider.
          b ) You are probably right about the power - how about trying power it seperatly with a stable 5v (another source) and see if the strange values remain. Boost modules is the worst when it comes to noice and to be hones, Ultrasonic sensors are kind of sensitive! Are us using capacitors??
          c ) Swithching the booster on and off will cause noice i think. Try the other option and see what happens but as said in B, theu are noicy and it might not be the cause. Are u using a cheap booster its ever worse.

          Sorry, im not an expert - just my thoughts.

          Controller: Proxmox VM - Home Assistant
          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

          1 Reply Last reply
          0
          • E esawyja

            mmmh can't seem to find anything on the switching of GND, anyone else, could you comment please

            zboblamontZ Offline
            zboblamontZ Offline
            zboblamont
            wrote on last edited by
            #5

            @esawyja If momory is still reliable it was on a thread specific to SRO4 but not sure whether here or elsewhere. As I said it is a recollection as I had considered using a sink transistor to ground for a 5v sensor on 3.3 node as you had but discarded the idea after reading this, hence my response. I ended up using a latching relay in my concept to completely disconnect +V and the minimal drain from any booster while retaining a solid ground... Trigger from 3.3 is not an issue for the unit I understood and @sunbergh84 is correctly stating the echo must be voltage divided to suit the 3.3v expected voltage at the pin. Surprised by his comment regarding noise from these converters, but had not considered it until now. OK, more digging :)

            1 Reply Last reply
            0
            • E Offline
              E Offline
              esawyja
              wrote on last edited by
              #6

              Hi all,
              Thanks for the info, did some more testing last night, even when I power from an external source, still not getting correct values, tried it on 2 of the sensors. Also connected my meter to the 5v pins on the SR04T and I'm getting a solid 5V, I've added a delay to the transistor switch and measured for about 5 seconds and took a reading during that time and the 5V stayed solid, so I guess the only other thing is the level convertor, shall try that over the weekend and give some feedback. Thanks again for the advice and help

              sundberg84S 1 Reply Last reply
              0
              • E esawyja

                Hi all,
                Thanks for the info, did some more testing last night, even when I power from an external source, still not getting correct values, tried it on 2 of the sensors. Also connected my meter to the 5v pins on the SR04T and I'm getting a solid 5V, I've added a delay to the transistor switch and measured for about 5 seconds and took a reading during that time and the 5V stayed solid, so I guess the only other thing is the level convertor, shall try that over the weekend and give some feedback. Thanks again for the advice and help

                sundberg84S Offline
                sundberg84S Offline
                sundberg84
                Hardware Contributor
                wrote on last edited by
                #7

                @esawyja - good work with excluding and narrowing down your problem!

                Controller: Proxmox VM - Home Assistant
                MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  esawyja
                  wrote on last edited by esawyja
                  #8

                  Hi all
                  Hope this will be of help to someone, I did connect the level convertor, did not make any change to the incorrect values, but then I saw that some off my JSN-SR04T are marked JSN-SR04T-2.0.
                  Eventually figured out that the JSN-SR04T-2.0 does not work with my design, there are some reports of other people not getting them to work either, see
                  http://forum.arduino.cc/index.php?topic=474759.0 , but no resolve.
                  So the circuit design above seems to be fine, except that it does not work with the JSN-SR04T-2.0,
                  The only differences I can see are the following
                  JSN-SR04T-2.0 - Crystal at 8,000 and the chip marked 7B499, 8S003F3P6, PHL703
                  JSN-SR04T - Crystal at 11,0592 but no markings on the chips
                  See some comparison pictures below
                  0_1494069439103_upload-3c793885-f086-4a34-98b7-ec8b48a04119

                  and the markings

                  0_1494069309883_upload-a95596c4-9c11-4174-9216-1f29028c01b5

                  zboblamontZ D 2 Replies Last reply
                  0
                  • E esawyja

                    Hi all
                    Hope this will be of help to someone, I did connect the level convertor, did not make any change to the incorrect values, but then I saw that some off my JSN-SR04T are marked JSN-SR04T-2.0.
                    Eventually figured out that the JSN-SR04T-2.0 does not work with my design, there are some reports of other people not getting them to work either, see
                    http://forum.arduino.cc/index.php?topic=474759.0 , but no resolve.
                    So the circuit design above seems to be fine, except that it does not work with the JSN-SR04T-2.0,
                    The only differences I can see are the following
                    JSN-SR04T-2.0 - Crystal at 8,000 and the chip marked 7B499, 8S003F3P6, PHL703
                    JSN-SR04T - Crystal at 11,0592 but no markings on the chips
                    See some comparison pictures below
                    0_1494069439103_upload-3c793885-f086-4a34-98b7-ec8b48a04119

                    and the markings

                    0_1494069309883_upload-a95596c4-9c11-4174-9216-1f29028c01b5

                    zboblamontZ Offline
                    zboblamontZ Offline
                    zboblamont
                    wrote on last edited by
                    #9

                    @esawyja My apologies if I am way off the beam here but I seem to recall something about two version of this, one where you measure the difference in time for the echo, the other which outputs a value on the echo pin according to the distance. Would this be the second type ?

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      esawyja
                      wrote on last edited by
                      #10

                      mmmh I have no idea, I'm struggling to find any info on the JSN-SR04T-2.0

                      zboblamontZ 1 Reply Last reply
                      0
                      • E esawyja

                        mmmh I have no idea, I'm struggling to find any info on the JSN-SR04T-2.0

                        zboblamontZ Offline
                        zboblamontZ Offline
                        zboblamont
                        wrote on last edited by
                        #11

                        @esawyja said in Hardware design for 3.3V ProMini and 5v sensor:

                        JSN-SR04T

                        Perhaps my memory is faulty, but I read somewhere of two types, and it was not a recent thread either. I was about to order some of these sensors, but will hold off doing so and watch for developments. Sorry, at least you have identified the problem, the question remains as to how the other version can be integrated.

                        1 Reply Last reply
                        0
                        • E Offline
                          E Offline
                          esawyja
                          wrote on last edited by
                          #12

                          Well it does make sense what you said, yes I'll be making sure that I order the correct one as well, very expensive exercise as I have 12 x JSN-SR04T-2.0 that I will not be able to use..
                          Thanks for all the help

                          zboblamontZ 1 Reply Last reply
                          0
                          • E esawyja

                            Hi all
                            Hope this will be of help to someone, I did connect the level convertor, did not make any change to the incorrect values, but then I saw that some off my JSN-SR04T are marked JSN-SR04T-2.0.
                            Eventually figured out that the JSN-SR04T-2.0 does not work with my design, there are some reports of other people not getting them to work either, see
                            http://forum.arduino.cc/index.php?topic=474759.0 , but no resolve.
                            So the circuit design above seems to be fine, except that it does not work with the JSN-SR04T-2.0,
                            The only differences I can see are the following
                            JSN-SR04T-2.0 - Crystal at 8,000 and the chip marked 7B499, 8S003F3P6, PHL703
                            JSN-SR04T - Crystal at 11,0592 but no markings on the chips
                            See some comparison pictures below
                            0_1494069439103_upload-3c793885-f086-4a34-98b7-ec8b48a04119

                            and the markings

                            0_1494069309883_upload-a95596c4-9c11-4174-9216-1f29028c01b5

                            D Offline
                            D Offline
                            Denverado
                            wrote on last edited by
                            #13

                            @esawyja in the top photo, what is the component in the top left hand side? Is it a variable resistor??

                            E zboblamontZ 2 Replies Last reply
                            0
                            • D Denverado

                              @esawyja in the top photo, what is the component in the top left hand side? Is it a variable resistor??

                              E Offline
                              E Offline
                              esawyja
                              wrote on last edited by
                              #14

                              @Denverado I think it is for the beam width, not to sure, I've never adjusted them

                              1 Reply Last reply
                              0
                              • rozpruwaczR Offline
                                rozpruwaczR Offline
                                rozpruwacz
                                wrote on last edited by
                                #15
                                This post is deleted!
                                1 Reply Last reply
                                0
                                • D Denverado

                                  @esawyja in the top photo, what is the component in the top left hand side? Is it a variable resistor??

                                  zboblamontZ Offline
                                  zboblamontZ Offline
                                  zboblamont
                                  wrote on last edited by
                                  #16

                                  @Denverado It is a variable inductor

                                  D 1 Reply Last reply
                                  0
                                  • E esawyja

                                    Well it does make sense what you said, yes I'll be making sure that I order the correct one as well, very expensive exercise as I have 12 x JSN-SR04T-2.0 that I will not be able to use..
                                    Thanks for all the help

                                    zboblamontZ Offline
                                    zboblamontZ Offline
                                    zboblamont
                                    wrote on last edited by
                                    #17

                                    @esawyja FYI - As I posted on a separate thread, there was a comment against the type 2.0 on one supplier's site which read "Note: Version 2.0 requires echo pin to be pulled up to VCC. A 4.7K to 10K resistor can be used as pull-up resistor." I tried the 5v supply of the ultrasonic board, I tried Vcc from the Pro-mini and 3.3v from the board, I tried every delay, exhausted every variable possible as far as sketches went but still could not get this device to work..... Waiting on delivery of a DYP device to see if it resolves the problem, if it does, I will throw this particular board in file 13 and order another DYP....

                                    1 Reply Last reply
                                    0
                                    • zboblamontZ zboblamont

                                      @Denverado It is a variable inductor

                                      D Offline
                                      D Offline
                                      Denverado
                                      wrote on last edited by
                                      #18

                                      @zboblamont Thanks! What is it used for on the sensor?

                                      zboblamontZ 1 Reply Last reply
                                      0
                                      • D Denverado

                                        @zboblamont Thanks! What is it used for on the sensor?

                                        zboblamontZ Offline
                                        zboblamontZ Offline
                                        zboblamont
                                        wrote on last edited by
                                        #19

                                        @Denverado If you mean the variable inductor, I don't know in this specific case...
                                        They are normally used in conjunction with other components to adjust frequency to target, my guess would be to tweak the ultrasonic frequency to keep it within specification (40kHz?), but perhaps someone can advise who has investigated these devices in detail.
                                        I would not advise tinkering with it unless you know the circuit and have the means to determine the effect.

                                        D 1 Reply Last reply
                                        0
                                        • zboblamontZ zboblamont

                                          @Denverado If you mean the variable inductor, I don't know in this specific case...
                                          They are normally used in conjunction with other components to adjust frequency to target, my guess would be to tweak the ultrasonic frequency to keep it within specification (40kHz?), but perhaps someone can advise who has investigated these devices in detail.
                                          I would not advise tinkering with it unless you know the circuit and have the means to determine the effect.

                                          D Offline
                                          D Offline
                                          Denverado
                                          wrote on last edited by
                                          #20

                                          @zboblamont Thanks for the advice. I have been looking for a circuit diagram of the sensor to determine how adjusting it could change the beam. I would love if the beam was not as wide.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          5

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular