Announcement

Collapse
No announcement yet.

Simpleton needs help with FBv4

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

  • Simpleton needs help with FBv4

    I have a version 4 FB and this is the first time I'm able to hook it up and try to use it.

    In testing, I am using a laptop running Win7 32bit. Power to the brain is switched to USB. No LEDs lit on the brain when it is connected.

    If I run up the configurator it recognizes that I have one version 4 brain available. I went through the wizard and declared that I had one analog input on port zero. Having done that, I don't see how to run it and test the input so I switched to some code I wrote against the winusb library.

    Using my own code it connects to the first v4 brain it sees. If I unplug the brain it detects nothing. If I plug it back in, it gets detected.

    I then cycle through the first four analog inputs and get random values returned in the range 0-1023. I was not expecting that cos I only have one input connected. Could I be connecting to a virtual brain used for testing?

    The connection I'm trying is for steering wheel media controls. Max resistence is 4.7Kohms when nothing pressed. Min value expected is 22ohms.

    I have the power (+) line connected to a 4.7Kohm resistor and the other end of the resistor connected to the signal line. The signal line then goes to the + side of the SWC controls and the ground (-) goes to the other side of the SWC controls.

    The most confusing part is that I'm getting random signals on more than one port. The other confusing part is that it's not obvious how to use the fusion configuration file in the MDX program.

    Could the board be dead as there is no LED?

    Suggestions?

  • #2
    Hi,

    I doubt the signals are random. You should see a cascade of values. So if the port you have a sensor on shows X, then you will have Y on the next port where Y < X. The next port will have Z where Z < Y < X and so on. Floating nodes pick up the last sequenced channel. As soon as you connect a sensor, it goes away. So basically once you use the port it works as intended. If you just watch it there, it will do funny things. You can do the same thing by grabbing the two end pins on a channel and squeezing.

    LEDs are only for the outputs. Inputs have no LED status.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

    Comment


    • #3
      LED reference was to the USB power light. It looks to have burnt out.

      Comment


      • #4
        Originally posted by Petrie View Post
        LED reference was to the USB power light. It looks to have burnt out.
        Those LEDs won't burnt out even with 24/7 usage for years. Where and when did you buy your V4?
        Fusion Brain Version 6 Released!
        1.9in x 2.9in -- 47mm x 73mm
        30 Digital Outputs -- Directly drive a relay
        15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
        Buy now in the MP3Car.com Store

        Comment


        • #5
          Bought from the MP3 store about 6-9 months ago.

          When it arrived I plugged it into the laptop in USB power mode and made sure that the laptop could see it (which it could) and I remember a little blue light was on. It's been sitting in its bag and box until now because it took me forever to get all the pieces and finally do the car install.

          I'll post a project thread once I have the brain working as that's the final piece.

          1 x Prosport Gauges oil pressure sender (12V power, ground and 5V signal) - perfect
          1 x Prosport Gauges oil temperature sender 2-wire (resistor type) - wired and ready to test
          1 x Steering wheel control 2-wire resistor (type D in your thread about SWCs) - this is the first one I attempted to hook up
          1 x Illumination dimmer 2-wire resistor (type D)

          The brain is sensed and responding. I was just not expecting 5-6 ports to show results when only port #0 was connected. I'll ignore the other values for now and concentrate on what port #0 is giving me.

          Comment


          • #6
            Make sure you have both jumpers. So there is a 2x3 header (6 pins) to select power. You have to move both jumpers from left to right for the LED to work. Do you have both jumpers on and both in the same left/right position? It will look like a 2x2 square if you do.

            If you don't like the extra values, you can take another jumper and connect between the last used input and the respective ground pin. This will zero out that channel and the next ones in line.
            Fusion Brain Version 6 Released!
            1.9in x 2.9in -- 47mm x 73mm
            30 Digital Outputs -- Directly drive a relay
            15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
            Buy now in the MP3Car.com Store

            Comment


            • #7
              Both jumpers are on in the same position (closest to the USB connector). If it's only a light out - I can live with that no problem.

              Using a jumper is a great solution to faking out results. That'll make debugging the signals much simpler. Thanks.

              Comment


              • #8
                Originally posted by Petrie View Post
                Both jumpers are on in the same position (closest to the USB connector). If it's only a light out - I can live with that no problem.

                Using a jumper is a great solution to faking out results. That'll make debugging the signals much simpler. Thanks.
                Just be absolutely sure that you are shorting the input to ground, not supply to ground! You will still see noise on the floating inputs, but they will mostly be really low values.
                Fusion Brain Version 6 Released!
                1.9in x 2.9in -- 47mm x 73mm
                30 Digital Outputs -- Directly drive a relay
                15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                Buy now in the MP3Car.com Store

                Comment


                • #9
                  I've not tried the jumper setting but I configured the MDX to read only from port #0.

                  The resistor in the SWC is max 4.7K ohms when nothing pressed and less than that if a button is pressed. As expected I am reading voltages between 0.01 and 2.6.

                  When I press a button on the SWC the voltage "slides" towards it's expected value. That is, if it is going to settle around 0.2 volts I get a sequence of values getting smaller from 2.6 until it gets close to 0.2. I never get steady results. It can take up to 1/2 second to get close to the expected value and then it sways +/- 0.3 volts.

                  Should the signal be so volatile?
                  Could it be that the 5V from the USB connection is volatile and I need to overcome this by switching to 12V?

                  Because the voltage runs through a descending sequence from high value to expected value it often passes through a value that could also be true. For example, if mute is between volume up and nothing pressed, then occasionally MUTE will get triggered.

                  Comment


                  • #10
                    Originally posted by Petrie View Post
                    I've not tried the jumper setting but I configured the MDX to read only from port #0.

                    The resistor in the SWC is max 4.7K ohms when nothing pressed and less than that if a button is pressed. As expected I am reading voltages between 0.01 and 2.6.

                    When I press a button on the SWC the voltage "slides" towards it's expected value. That is, if it is going to settle around 0.2 volts I get a sequence of values getting smaller from 2.6 until it gets close to 0.2. I never get steady results. It can take up to 1/2 second to get close to the expected value and then it sways +/- 0.3 volts.

                    Should the signal be so volatile?
                    Could it be that the 5V from the USB connection is volatile and I need to overcome this by switching to 12V?

                    Because the voltage runs through a descending sequence from high value to expected value it often passes through a value that could also be true. For example, if mute is between volume up and nothing pressed, then occasionally MUTE will get triggered.
                    Sounds like you have averaging turned on. What is the "history" value set to?

                    And it will always sweep, just the speed will be much faster. That's why there needs to be some sort of settling algorithm for the best response.
                    Fusion Brain Version 6 Released!
                    1.9in x 2.9in -- 47mm x 73mm
                    30 Digital Outputs -- Directly drive a relay
                    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                    Buy now in the MP3Car.com Store

                    Comment


                    • #11
                      Thanks for that info. I fell like I am getting there. Once finished I'll post a thread about what I learned.

                      In the MDX, I have averaging switched off and the history value set to zero.

                      In my own code, which is a Centrafuse plugin, I'm going to implement settling algorithms for each of these types

                      Momentary - for things like volume, if I hold down then keep sending the signal
                      Switch - for things like mute, once pressed wait for nothing pressed until it is safe to send another signal
                      Value - just settle on a threshold (like mod 5) so that needles don't constantly twitch.
                      Scale - only send a signal if the value has switched range (like the illumination control which is a set of values and we only want to trigger on a value change)

                      I have a simple hardware question... The SWC resistance max is 4.7Kohms. I have used the same value resistor in my voltage divider. That gives me only a 50% range of numbers. If I switch to a lower value resistor then the range will increase and that should make the values more accurate. Is there a downside to using a lower resistor (i.e. draws more current and then USB power cannot support as many inputs)?
                      Last edited by Petrie; 01-25-2012, 02:35 PM.

                      Comment


                      • #12
                        Thanks again for the help. I've got the SWC controls working great.

                        1st thing is that I needed to wait for the nopress value to be detected because while Centrafuse is waking up the brain starts reading zeros first and then ramps up to the nopress which is the largest value. Only once I have received a nopress value do I start handing out signals.

                        The timer fires every 0.1 seconds and I only see values in 5s (5, 10, 15 etc.). That's my threshold setting for this port.

                        If the previously read value is not the same then I ignore the values because we are sliding to a value to settle on. Only once two consecutive values (within the threshold) have been detected do I update the actual signal value.

                        Once a Mute or Mode value has been handed out (not just detected) then I don't hand out any more signals until a nopress has been detected. That makes it real simple to handle those two buttons. The user has to release the button and press it again for it to have any effect.

                        Volume or Seek Up/Down keep handing out values if continually pressed.

                        It's working like a charm. The response to a press is fast enough, the continuous press is not too fast and for Mute & Mode the length of time pressed does not cause a problem.

                        Excellent.

                        Comment


                        • #13
                          Congrats!
                          Fusion Brain Version 6 Released!
                          1.9in x 2.9in -- 47mm x 73mm
                          30 Digital Outputs -- Directly drive a relay
                          15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                          Buy now in the MP3Car.com Store

                          Comment


                          • #14
                            Could you answer this for me?

                            The SWC resistance max is 4.7Kohms. I have used the same value resistor in my voltage divider. That gives me only a 50% range of numbers. If I switch to a lower value resistor then the range will increase and that should make the values more accurate. Is there a downside to using a lower resistor (i.e. draws more current and then USB power cannot support as many inputs)?

                            Comment


                            • #15
                              Originally posted by Petrie View Post
                              Could you answer this for me?

                              The SWC resistance max is 4.7Kohms. I have used the same value resistor in my voltage divider. That gives me only a 50% range of numbers. If I switch to a lower value resistor then the range will increase and that should make the values more accurate. Is there a downside to using a lower resistor (i.e. draws more current and then USB power cannot support as many inputs)?
                              If it is R1 then there will be more current. If it is R2, then no.

                              +VCC --> R1 --> Centre Tap --> R2 --> GND
                              Fusion Brain Version 6 Released!
                              1.9in x 2.9in -- 47mm x 73mm
                              30 Digital Outputs -- Directly drive a relay
                              15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                              Buy now in the MP3Car.com Store

                              Comment

                              Working...
                              X