Forums » Support

Back To Topics

Technical questions

    • 3 posts
    August 3, 2015 1:55 PM CEST
    Hi. Can i connect lego mindstorms motor to sbrick?
  • June 6, 2015 9:50 PM CEST

    [blockquote]Marc Jaouen said:

    Jean-Christian, the Social Login is the Id+Password you use on this site. The same Id is used for the website, the profile designer and the app on your device.

    Marc

    [/blockquote]thank you

    • 99 posts
    June 2, 2015 6:31 AM CEST

    Jean-Christian, the Social Login is the Id+Password you use on this site. The same Id is used for the website, the profile designer and the app on your device.

    Marc

  • June 2, 2015 2:06 AM CEST

    hi

    now i have the good tablet ,but i need knowledges about the "social login"

    thanks

    • 1 posts
    April 29, 2015 6:02 PM CEST

    Why I can't install the App on my tablet? (Samsung Tab 3 Android 4.4.2)

    • 340 posts
    April 21, 2015 12:27 PM CEST

    [blockquote]Andrzej Szerszeń said: Hi, I use in my Lego projects Battery box with LiPo 11.1v battery without bracket For Classic AA - it is lighter, more powerful and rechargable , can I use this voltage with Sbrick?[/blockquote]

    Yes, you can use it! :)

  • April 21, 2015 1:23 AM CEST
    Hi, I use in my Lego projects Battery box with LiPo 11.1v battery without bracket For Classic AA - it is lighter, more powerful and rechargable , can I use this voltage with Sbrick?
    • 95 posts
    April 8, 2015 12:31 PM CEST

    [blockquote]jean-christian rey said:

    hello

    what is the best tablette to use sbrick ?

    [/blockquote]

    As Android and Windows are still beta I think the answer is for the moment iPad 2 min

    (https://social.sbrick.com/wiki/view/pageId/12/slug/application-device-compatibility)

     


    This post was edited by Frederic Ayrault at April 8, 2015 12:31 PM CEST
  • April 7, 2015 9:32 PM CEST

    hello

    what is the best tablette to use sbrick ?

    • 23 posts
    February 10, 2015 9:28 AM CET

    When I visit social.sbrick.com on my Sony Z3 Android-phone, I cannot scoll down. Works fine in Safari on iPod though

    • 5 posts
    February 1, 2015 1:04 AM CET
    Matlab has come a long way in the last 20 years. It is a full blown development system these days. I have used it professionally, but it was becoming price prohibitive. Student versions were available, but I am no longer a student.

    I may look into the raspberry pi route. I bought one when the first came out, powered it up and played with it a bit but got frustrated when I could not get a schematic or even a data sheet on the CPU.

    OT and speaking of schematics, is the schematic available for the sbrick? Would I get in trouble for publishing one?
    • 87 posts
    January 31, 2015 10:31 PM CET

    Last time I used Matlab was some 20 years ago at college so can't help you.

    Raspberry Pi Foundation has made an agreement with Wolfram Mathematica so it is available (I think) free for use with the Pi and there are people using it with the PiCam or common USB webcams. And Raspberry Pi can talk with the SBrick, I had already done it. But is linux-based and I understand that is difficult to start with.

    Good luck for your project, keep us informed of your progress.

    • 5 posts
    January 31, 2015 4:46 PM CET
    I have used Octave, it is available for both Window and Linux. Octave is a fine product for what t does, but it not seem to support things like building GUIs, image capture and processing, and communications with external instruments. It may be possible to implement a lot of this if you are very familiar with Linux, but I am not. The home version of Matlab with a the tool boxes I want will run about US$400. I think that is reasonable.

    The EV3 would be fine but somewhat bulky and expensive solution for controlling a switch yard, but going the EV3->IR ->PF route to control trains has serious limitations.

    Reed switches and other sensors along the layout would certainly work, but I would really like to have a wireless solution. A cheap webcam seems like a nice solution.
    • 87 posts
    January 31, 2015 4:13 PM CET

    If you are considering Linux you may also consider some open source alternatives to Matlab like GNU Octave and a few others: http://www.linuxbsdos.com/2013/07/14/2-free-software-alternatives-to-matlab/

    GNU Octave claims "The Octave language is quite similar to Matlab so that most programs are easily portable." But I don't know if it can answer your image capture and processing needs.

    If your goal is specifically multi train controlling there are other less computer demanding options (i'm beggining a simple Mindstorms EV3 setup with RFID sensors before switching tracks and RFID tags in the trains but others are using reed switches or hall effect sensors in hot spots of the track path and magnets in the trains, color sensors, etc)

    • 5 posts
    January 31, 2015 3:50 PM CET
    Thank you for the information. Yes, I am still using Window, but 8.0 has further tempted me to move to Linux.

    The image capture / image processing capabilities of Matlab coupled with the sbrick would be idle for controlling multiple trains on the same track and doing other complex tasks. Matlab has recently released a 'home' license in the US that is affordable. I really want to get Matlab working with sbrick. I suppose I could also wait for Matlab to support BLE if they do not already.

    Yet another possibility would be to build my own external BLE dongle.
    • 87 posts
    January 31, 2015 11:45 AM CET

    Hi Charles.

    You are using Windows, right? I've been using Linux but this week I joined the Dark Side for a moment. I plugged my USB BT4.0 dongle in a Windows 7 laptop, it recognized it and promptly installed several drivers from Windows Update. After that I had several virtual devices, including 3 virtual COM ports. But I don't know how to talk with SBrick through those COM ports (if possiible at all).

    ButMatlab supports calling external (shell) commands: http://blogs.mathworks.com/community/2010/05/17/calling-shell-commands-from-matlab/

    In Linux, you could use this to invoke the gatttool command (or better invoke some shell scripts that use the gatttool command) to achieve what you want. But in Windows there is no gatttool so you will need to access the SBrick with .Net. Can't help you on that but there is someone in the forums who created a Windows Mobile app, perhaps he can help you.

    There are also two possibilities: invoking Python from Matlab and invoking Matlab from Python: http://www.mathworks.com/help/matlab/getting-started_buik_wp-3.html As there is some progress in creating python libraries for BLE, you might try investigate this.

    Or wait for Vengit to release a SDK for Windows.

    • 5 posts
    January 31, 2015 6:19 AM CET
    I am very new to BTLE. I have some very basic questions. If someone can suggest a good reference, I would like to read it.

    I want to be able to control My sbrick through programs like Labview and Matlab. I do not believe these programs directly support BTLE yet. Obviously, they would have a hard time directly supporting BTLE without native OS support, which is sparse. They do support COM ports. It seems I can buy USB BTLE dongles with drivers that make them virtual COM ports. Is this a viable path? Are there any specific hardware recommendations?
    • 87 posts
    January 22, 2015 11:11 PM CET

    (Tamás was faster)

    You can use the old 9V battery box. You just need a Power Functions extension cord. You can even use just the light grey plug, not the whole cable - you plug the light grey plug on top of the 9V battery box and the SBrick on top of it.

    You can use it only in one way - the 2 studs side of the plug to the inside the battery box and the cable side of plug to the outside.

     


    This post was edited by Jorge Pereira at January 22, 2015 11:27 PM CET
    • 178 posts
    January 22, 2015 11:04 PM CET

    NO.

    SBrick does not have reverse polarity protection in general. It doesn't even have full short-circuit protection.

    SBrick was built to be used with LEGO's Power Functions devices. An SBrick, a PF battery box and a number of motors together as a system IS short-circuit protected (because the battery box provides the protection), and is impossible to connect in reverse. This is why we omitted reverse polarity and short-circuit protection between the ground (GND) and power (VBAT) pins.

    If you look at a PF connector (or the SBrick) from above, you can see four pins. The lower left (LL) is the ground, the upper-right (UR) is the VBAT pin. The upper-left (UL) is the "C1", the lower-right (LR) is the "C2" pins.

    So starting from down and left, counter-clockwise:

    LL - GND
    LR - C2
    UR - VBAT
    UL - C1

    On the PCB (printed circuit board) all GND pins are connected with a solid sheet of copper, so as VBAT pins. In this regard, SBrick is nothing more than power strip with one input and four output connectors. Just sheets of metal.

    On this metal sits the electronics that takes the power from the GND / VBAT lines. It does not protected against reverse polarity, since the PF connectors cannot be reversed by accident (and it is also arguably challenging to do so by force), and LEGO batteries and power supplies can NEVER reverse these lines. These lines are only for power. IR receivers and servo motors get their power from here for example.

    However there IS short-circuit and quite intelligent overcurrent protection between the OUTPUT C1 / C2 pins. These are the pins PF motors are drawing their power, and the servo motor gets the SIGNAL in the form of different voltage levels. Actually even in the case of PF (non-servo) motors these lines serve a dual purpose of being POWER and SIGNAL sources at the same time: larger voltage means higher RPM and/or torque, reversed voltage means a different direction.

    SBrick too can get power from the INPUT C1 and C2 pins. Since these pins are easy to reverse literraly by the flip of a switch, between INPUT C1 and C2 pins there IS a reverse-polarity protection, but there is NO diode bridge. Because of this SBrick DO WORK with old 9V battery boxes and train power supplies, but ONLY in one direction, meaning that you can only use your SBrick with these if their switch is at the right (as the opposite of wrong) direction.

    So:

    • Yes, SBrick will work. If it looks it doesn't, try reversing the power on the power supply with it's switch. (This is only meaningful with old battery boxes. New PF battery boxes have GND and VBAT lines, and these don't reverse if you slide the switch to it's opposite position.)
    • Yes, SBrick cares, and does so by frying if being connected with the wrong polarity.
    • And no, motors don't reverss if you reverse the voltage on SBrick's GND/VBAT pins. They just stop :P

    All of the above are a result of conscious decisions.

    Omitting general reverse-polarity protection allows SBrick to handle giant currents. To deliver 3 amperes per channel you need to take semiconductor our of the way. For that, you need copper. Lots of it.

    The same copper can take the heat away from the chips. Of course, the heat has few places to go inside a plastic box that starts to do funny things above about 80-90°C. Even if the heat cannot be taken away, it will be transferred under and eventually into the BLE module, where the temperature can be monitored, and (a tunable) temeprature lock could shut the device down if things would go awry. (Since this feature is not implemented in the factory firmware, you will need to perform an OTA when the 4.2 firmware gets released.)

    So while dropping overcurrent and reverse polarity protection on GND and VBAT does not affect normal use, it has certain benefits for power users.

    If you start using different batteries and motors, you are considered to be a power user, a person who their stuff, and can be careful enough not to wire up a connector in reverse AND plug it in without testing it twice. In return you get amps and some nice fetures to keep them in line.


    This post was edited by Tamás Fábián at January 22, 2015 11:04 PM CET
    • 6 posts
    January 22, 2015 8:30 PM CET

    Can I use the old 9 volt battery box to power my SBrick? Does SBrick care about polarity or just the voltage difference accross the terminals on the bottom of the brick right? Operation between 0 and minus 9v is same as operation between 0 and plus 9v is same but the motors rotate different directions right?

    • 178 posts
    January 20, 2015 9:36 AM CET

    Hello folks,

    the PWM frequency change has been implemented and tested. Expect a demo video soon ;)

    [blockquote]Tamás Fábián said:

    First of all, there's no need to worry.

    Both the SBrick and the IR receiver drives the motors with PWM or Pulse Width Modulated voltage.

    Both devices work by turning the voltage on and off once in about every thousandth of a second, so in each cycle the motor is on for some time, and off for some. The more the motor is on, the more torque and power it can deliver.

    Certain parts of a motor can vibrate, and give off a tweeting sound that is the loudest when the motor is driven with 50% duty cycle e.g. it is on for 50% of the time.

    We did our best to support LEGO's M motor, and we did great, since we can drive more M motors per channel than the IR can, and the overall current carrying capacity of the SBrick is much higher than the same figure in case of the IR receiver.

    This alsomeans that SBrick might turn on the motors more quickly than the IR recever, and therefore the noise might me louder.

    Moreover, the IR receiver only applies PWM duty cycles other than 0 and 100% (where there's no noise, but this is the case with SBrick too) if you use it with a 8879 remote.

    Additionally, SBrick can utilize 255 PWM levels. The first 20-30 levels are not really useful with PF motors, since they won't even start. At these levels, there is no motor noise to cover the beeping. Once the motors are running at a reasonable rate, their noise usually masks the tweeting.

    If you're really annoyed by the noise, I can do a few experiments to either lower the PWM frequency (lower sounds are harder to radiate, and are masked better by the motors), or increase it (with a bit of luck, above the ~20 KHz limit of the human ear). Since this can affect power efficiency (higher the frequency, higher the switching loss, there's more heat), such parameter should be allow tweaking (let the user to override it).

    (Hm, I've looked at the code, and the lowest frequency is about 490Hz, the highest is well above 100KHz. DRV8833's rise and fall time is 160 & 180ns, so it might be able to work at that frequency.)

    [/blockquote]

    • 4 posts
    January 19, 2015 10:12 PM CET
    [blockquote]Tamás Fábián said:

    This alsomeans that SBrick might turn on the motors more quickly than the IR recever, and therefore the noise might me louder.

    Moreover, the IR receiver only applies PWM duty cycles other than 0 and 100% (where there's no noise, but this is the case with SBrick too) if you use it with a 8879 remote.

    Additionally, SBrick can utilize 255 PWM levels. The first 20-30 levels are not really useful with PF motors, since they won't even start. At these levels, there is no motor noise to cover the beeping. Once the motors are running at a reasonable rate, their noise usually masks the tweeting.

    If you're really annoyed by the noise, I can do a few experiments to either lower the PWM frequency (lower sounds are harder to radiate, and are masked better by the motors), or increase it (with a bit of luck, above the ~20 KHz limit of the human ear). Since this can affect power efficiency (higher the frequency, higher the switching loss, there's more heat), such parameter should be allow tweaking (let the user to override it).

    (Hm, I've looked at the code, and the lowest frequency is about 490Hz, the highest is well above 100KHz. DRV8833's rise and fall time is 160 & 180ns, so it might be able to work at that frequency.)

    [/blockquote] Hi If a silent sBrick is possible I'd be happy. It is somewhat annoying tho hear all the current noise. Especially when multiple engines run at the same time. Just done my Excavator and when it drives an turns upper part and crane arm it sounds more like a space thing rather than an excavator. However I like the idea of sound control. That would be a great next product: a controlable LEGO loke loudspeaker giving the "s" a whole new meaning.
    • 87 posts
    January 15, 2015 3:23 PM CET

    Thanks Stefan.

    We are just starting this little community but it's very important for all of us to know that someone can take some kind of benefit.

    • 4 posts
    January 15, 2015 2:33 PM CET

    Thank you Jorge for the additional Info.

     

    Great thing you do all these Tests and electrical measurements so that we others can benefit from your knowledge.

    I really appreciate your help.  

    For now I´m fine with the Information I received from you guys,  thanks forum community.

     


    This post was edited by Stefan H. at January 15, 2015 2:40 PM CET
    • 178 posts
    January 15, 2015 11:36 AM CET

    Aaaaaaaaand it's done. :)

    Needs testing of course, but the first impressions are positive :)