Using a 3D Hall Sensor (Video#81)

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • НаукаНаука

Комментарии • 28

  • @petrikoskela6258
    @petrikoskela6258 2 года назад +1

    You can possibly avoid the "slipping" error by installing a LGB ball bearing wheelset (e.g. item 67403) where wheels have independent bearings and axle is rigid. Those are used in wagons fitted with lighting and are available as spare parts. Naturally you have to install magnet differently and count only one wheel adjusting the distance accordingly, in a circle format layout this is easily done but for other geometries rotation of both wheels have to be measured and average calculated, however, no errors due to slipping.

    • @IoTT
      @IoTT  2 года назад

      Ball bearings are certainly a good thing, but have nothing to do with the problem of locking the wheel to the inner or outer rail based on the car being pushed or pulled.
      For a general understanding for the wheel - rail interaction this might be a helpful video: ruclips.net/video/rT6Qh8b-3Ks/видео.html
      On the 60cm radius the axle will experience what is called a "sharp curve" in the video, hence the flange will lock with the rail when being pushed. When pulled, the pulling force is braking the lock and friction between the inner wheel and the rail increases, therefore the difference in trajectory length.

  • @donaldkormos5529
    @donaldkormos5529 2 года назад

    Will the axle-mounted magnets work with standard track magnets used for coupling/decoupling cars?

    • @IoTT
      @IoTT  2 года назад

      Hmm, there are all kind of magnets being used for uncoupling, I don't know what the standard would be. For G scale, I am using 10mm round Neodymium from Home Depot. For smaller scales I have 2mm and 3mm diameter ones I bought on Amazon. Around a cent per piece, but package size is 200 or so. Plenty for a whole layout ;-)

  • @steenrudberg
    @steenrudberg 2 года назад

    Hi Hans. When you did the axle counter test di you try to run a loco over it?

    • @IoTT
      @IoTT  2 года назад

      No, I did not. Possible that you get some strange feedback from the motor magnets you have to filter out. But I am pretty sure the signal would be quite different from a permanent magnet floating over the sensor, so it should not be too difficult.

    • @steenrudberg
      @steenrudberg Год назад

      @@IoTT OK - But most motors have permanent magnets around the rotor. There will naturally become a mixture of fields from the two sources. 🙂

  • @walidkhier
    @walidkhier 2 года назад

    Not all Hall effect sensors are switches. Some of them are ratiometric.

    • @IoTT
      @IoTT  2 года назад

      ... as explained just one minute into the video.

  • @pierrelambert446
    @pierrelambert446 2 года назад

    WoW, I love this. One usage I see for me is to have a speed measurement car and adjust locomotive speed. I normally speed match all my locomotive to prototypical speed on my N scale layout. This is really interesting feature. Wonder what you have in mind with the other chip.

    • @pierrelambert446
      @pierrelambert446 2 года назад

      Did a quick search on the web. If you can make the other two chips work it will be interesting to see the possibility and practical utilisation. Your always full of surprises.

    • @pierrelambert446
      @pierrelambert446 2 года назад

      I would love if it if you display the speed in the different scale. And in mph and kph.

    • @IoTT
      @IoTT  2 года назад

      That's really easy to do. Right now it is measured in real world meters per second. Multiply by 3.6 to get km/h and then multiply by the scale factor. And most likely I will do a drop down selector once the software is somewhat finalized.

    • @IoTT
      @IoTT  2 года назад

      The best way to do speed measuring is using a full revolution of the axle as a distance base and then divide by the time. The reason is that there is a slight non-linearity between axle position and magnetic field strength as you can see in the monitor screen shots in the video. But a full revolution is always a precise indicator.

  • @chillphil967
    @chillphil967 11 месяцев назад

    awesome 🎉

    • @IoTT
      @IoTT  11 месяцев назад

      Thanks 🤗

  • @ozgur280
    @ozgur280 2 года назад

    wow , it it so good. I am trying to do similar thing with TMAG5170. May you share code please with some wiring. There are lots of error in current library actually, and I am almost newbie. Best regards.

    • @IoTT
      @IoTT  2 года назад +1

      I have not released it yet, but you can get a copy from the prerelease repo on my Github page: github.com/tanner87661/IoTTStick/tree/Prerelease/Sketchbook
      Check the libraries directory for TMAG5170-main
      You can also have a look at the RailTracker sketch to see how I use the library for my sensor.

    • @ozgur280
      @ozgur280 2 года назад

      @@IoTT Thank you so much for code snippet sharing. Actually I have no TMAG5170 IC yet. While I have try to build of code what you share on video and github, I realise some of function didnot exist on current library such as getAngledataRaw()... And there is no function declared at the header file of tmag that is getFieldData(buffer,int,int) at regConfig.... Will them be caused problem ? Best regards.

    • @IoTT
      @IoTT  2 года назад +1

      As mentioned in the video, I was not able to make the official TI library work. Luckily I found a paper from a student who did a program using the chip (fab.cba.mit.edu/classes/863.20/CBA/people/davepreiss/weeks/11.html )
      Unfortunately he did not do a proper library, but just a sketch with everything in it, so I used it to fix the TI lib. If I remember right, it was mainly timing problems in the initialization of the chip.
      And yes, I added a few functions to make adapt it to my form of usage. But it is still incomplete. And of course, if you find a function in the code that is not declared in the header, you can always add the declaration to the header.

    • @ozgur280
      @ozgur280 2 года назад

      @@IoTT Thank you so much, It will open new gate for my hobby project. And I have already subscribed to follow your interesting works. Best regards

    • @ozgur280
      @ozgur280 2 года назад

      After many many attempt I have no idea why I have no communication to Arduino Uno. I have connected pins like CS->10, SDO->12 , SDI->11,SCK->13 which is shown at spı library document . May you give some tips please. I am so sorry to bother you while asking so easy thing forgive me