Power Supply of FEZ Cobra through Vin6V pin

Hi,

We want to run a program on the GHI FEZ Cobra Board without the USB cable being connected. For power supply, we have 12V connected to the “Vin6V” pin (in the brochure it says that even 12V would be ok).
Unfortunately, this does not work. The power LED is on but the program is not being executed. When we plug in the USB cable in addition, the program works correctly. The program also works when only the USB cable is connected (without our additional power source).
My question is now, how can we power the board without the USB cable? Is it supposed to work with the Vin6V pin? Does it make any difference when we use the 6V power supply connector next to the mini-USB instead of the Vin6V pin?
We found out that there is one pin on the EMX module that is powered only when the USB cable is connected. Maybe this is the problem?

Thanks in advance for your answers!
Christian

Cobra has a power connector where you can plug in a power pack. The schematic of the board is public if you like to take a look to understand the connections.

Ok, you mean the power connector next to the USB connector?
The thing is we did some soldering and it will not be so easy to change the power supply from the Vin6V pin to the power connector.
We checked the schematic of the board and we thought that using the power connector has the same effect as using the Vin6V pin.
Looks like we have been wrong… so powering the board only via this pin is not possible, is that correct?

Honestly, I am not sure what you mean when you say Vin6V but we provide the schematics so you should be able to wire cobra however your application needs.

@ csukl - Are you connecting to pin 24 on JP2? From the circuit diagram jp2 pin 24 is connected to the power connector, so either one will do, but what mods have you done, I cant see that you need to do any modifications to the power.

EDIT:
Depending on the current load on the 5v regulator it maybe going in thermal shutdown or its dead due to an overload. Or you have disconnected the 12v to the 5v regulator.

Gus, if you keep the cobra in front of you with the pins down (and thus the ethernet, usb, sdcard etc upwards), it’s the 2nd pin from the right csukl is talking about: Vin 6-12V

Yes, thats the pin :wink:
We also think that there should be no modification needed… We already had a look at the schematics and we think it should work. From the schematics we saw that there is one pin active on the EMX module only when the USB connector is plugged into the Cobra Board… maybe this is the problem? But we have read in the documentation that this pin indicates to the EMX module that USB is connected - thats fine. I suppose that EMX also starts to work when there is no signal on this pin.
Hm ok could be that the 5V regulator is dead… but in the Cobra brochure it says that voltages around 12V should normally work.

We see many people talk about devices that “don’t work” when only powered through a power adapter and without USB connected. The only way to prove that your app does not run is to have a VERY BASIC, flash-a-LED type application loaded - if your “regular app” is loaded, you may have a dependence on the USB cable you’re not aware of, in particular a common issue is using serial ports incorrectly will give you this symptom. If your VREG isn’t cactus, make sure you test with a blinky-LED only and then report back :slight_smile:

Hi,

I have tried a very simple example (beeping with the on-board piezo) and this does work when the Cobra Board is powered through the 6V pin.
Then I tried to get to the point where my program gets stuck when the board is powered through the 6V pin.
I found out, that the problem has something to do with the wireless module. In my program, I try to connect to an access point. Here is the interesting part, where it gets stuck when powered through the 6V pin:

// set WiFi settings
            Wireless80211 wifiSettings = null;
            NetworkInterface[] netif = NetworkInterface.GetAllNetworkInterfaces();
            for (int index = 0; index < netif.Length; ++index)
            {
                if (netif[index] is Wireless80211)
                {
                    wifiSettings = (Wireless80211)netif[index];
                }
            }

            if (wifiSettings == null)
            {
                this.isConnectedToAP = false;
                return;
            }

            wifiSettings.Ssid = this.ssid;
            wifiSettings.PassPhrase = this.password;
            wifiSettings.Encryption = Wireless80211.EncryptionType.WPA;

            // without USB-connection: Execution gets until HERE

            Wireless80211.SaveConfiguration(new Wireless80211[] { wifiSettings }, true);

            // without USB-connection: Execution gets NOT until HERE

            ManualResetEvent NetworkAvailablityBlocking = new ManualResetEvent(false);
            if (!WiFi.IsLinkConnected)
            {
                this.isConnectedToAP = false;
                NetworkAvailablityBlocking.Reset();
                while (!NetworkAvailablityBlocking.WaitOne(500, false))
                {
                    if (!WiFi.IsLinkConnected)
                    {
                        Debug.Print("WiFi link is not available yet! Wrong AP settings?");
                        this.isConnectedToAP = false;
                    }
                    else
                    {
                        Debug.Print("WiFi link established!");
                        break;
                    }
                }
            }
            this.isConnectedToAP = true;

When powered through the USB cable this code is successfully executed and the connection to the Access Point is established.
Has someone an idea what could be the problem?
Thanks in advance!

There are numerous threads here about the RS21 wifi module and it’s power consumption. You’re going to have to tell us about your power supply more, because it seems that this is your most likely issue. You only mention it is a “12v” supply, you need to tell us about it’s current capacity. Why that might work “better” when connecting with USB is a great question, because typically USB doesn’t have a great current capability, but that seems to be what you are seeing. (and I am assuming you have the RS21 UEXT module, confirm that too!)

Having said that though, I still think you should try to diagnose more about what is going on at the processor, by blinking the LED in a separate thread so that you can see if it stops or continues. You should also tell us WHY you think the app gets to those points in your code; what are you checking, or what are you displaying that leads you to say this? Explicitly, why do you think the SaveConfiguration does not execute?

Unfortunately the on-board LED is broken. So I used the on-board piezo to generate a sound. I inserted the line

Microsoft.SPOT.Hardware.Utility.Piezo(frequency, duration);

before and after the SaveConfiguration method. In both cases the sound was there, when using the USB cable. When using our power supply, the sound was only there when I placed this line in front of the SaveConfiguration method.
I could try to continuously generate sound in a separate thread to check if the processor stops working.
Details about the WiFi module and our power supply will follow!

Ah I used 4000 for the frequency and 500 for the duration!

Fix the LED, or wire up another LED on a GPIO. Don’t use PWM, just use thread.sleep(500) between toggling it between true and false so you can see it continuing to work

Hi I’m a co-worker of csukl. We use 2 battery packs connected in series to Vin. The modification we did is just layouted an adapter and soldered it to the long pinhead, so we can easily use a 2x5 connector to connect our additional sensors.

Battery pack is a 5-cell Eneloop with 6V and 2000mAh, each. So in sum we have round about 12V with 2000mAh (24W) to power up the cobra (USB: 2.5W).

WiFi-Module is a NETMF-WiFi Exp 2.1 from GHI.

Here is the schematic http://www.ghielectronics.com/downloads/FEZ/Cobra/FEZ%20Cobra_sch.pdf

Please explain how you have power connected on that schematic.

Are tehy new batteries? AA size? Batteries are NOT a good way to prove something works. Do you have a 1A USB phone charger? They’re an awesome way to use the regulated USB power in a pinch.

The device has to be mobile, so a charger is not applicable! Battery packs are freshly charged.

(Pin 25 of JP2) [- Battery Pack 1 +] [- Battery Pack 2 +] (Pin24 of JP2)

this way we have approximatly 12V and 2000mAh. We also tried a parallel assemble, but voltage drops to hard over time so we can’t use the full charge of the packs.

As I can see in the EagleCAD-Files this should work. As it does. The only problem seems to be the WiFi-module for some reason …

It’s about instantaneous current draw, not about battery capacity. Have you checked the discharge rating on your battery packs?

We’re trying to debug what is claimed as an issue when not connected to USB for power.

You need to solve this problem before you go “mobile”. Seems to me that testing off batteries is your best avenue to move this forward.

We’ve said that the WiFi module is current hungry, but you don’t seem to hear that.

Blink an LED, that will show you your app is still working or not.

I checked with a datalogger (for serveral minutes) the current draw. It never draws more than 200 to 500 mA (1s measure period is the smallest period I could select). Also the battery pack should be able to deliver really high currents of serveral ampere continuous due to it’s cells are NiMH. Runtime wouldn’t be that high but, actually that’s not a problem so far.

To prevent voltage drop the battery packs are connected in series, as I already mentioned one or two times. Actually the LED is working from the electrical side of view. Don’t know if there is a software problem with this, but csukl claims that he can’t control the LED from software. Maybe the EMX-Module is broken.

What exactly you mean be “current hungry”? Do you mean that there are current spikes of 2A like a GSM-module or just continuous high current less than 1A? It is unlikly to recognize spikes with a 1s-measure-period …

All I’m saying is that the diagnosis we’re asking for is to flash a LED, to make sure that the app still continues to run. The reported failure is that the app appears to stop running when it is not connected to USB, and flashing an LED in a particular way will help to make sure that the app is actually stopping, not just percieved as doing so.

The Wifi module isn’t as current-hungry as the GPRS modem, admittedly. The reported stats are: 3.3V Consumption : 40mA. That isn’t onerous and should be able to be handled by your batteries. Again, I am just suggesting things to eliminate to help identify where the fault lies.

One more question though about the use of the Wifi module. Are you by any chance using DHCP? There’s another discussion thread that talks about the fact that DHCP is blocking.