Help for FEZ Cerb40 II with RF433 Module

Hi I am using a FEZ Cerb40 II to control a RF433 wireless module.
This module needs 5v power and can be controlled by UART.

I use a 3.7V 18650 Utrafire 3000mAh Li Battery, convert it to 5V by using a LM2577 DC-DC Converter. Then supply 5V to FEZ Cerb40 II and RF433 wireless module.

The sending end is FEZ Cerb40 II +RF433 wireless module and the receiving end is a Spider+ Extender Module+ RF433 wireless module.

The code in FEZ Cerb40 II end is simple :

public static void Main()
        {
            SerialPort UART = new SerialPort("COM3", 9600);
            int counter = 0;
            UART.Open();
            while (true)
            {
                
                string counter_string = counter.ToString() + "\r\n";
                // convert the string to bytes
                byte[] buffer = Encoding.UTF8.GetBytes(counter_string);
               
                UART.Write(buffer, 0, buffer.Length);
            
             
                // increment the counter;
                counter = counter + 1;
                //wait...
                
                Debug.Print("Send:" + counter_string.ToString());

                Thread.Sleep(1000);

            }
            
        }

The code in Spider:

 void rf433_DataReceived(GT.Interfaces.Serial sender, SerialData data)
        {
            var font = Resources.GetFont(Resources.FontResources.NinaB);
            int read_count = 0;
            //rf433.
            int btr = rf433.BytesToRead;
            byte[] bytes = new byte[btr];
            read_count = rf433.Read(bytes, 0, bytes.Length);
           
                string Text = new string(System.Text.Encoding.UTF8.GetChars(bytes));
                Debug.Print(btr.ToString());
                Debug.Print(Text.ToString());
                display_T35.SimpleGraphics.Clear();
                display_T35.SimpleGraphics.DisplayText("Date Receiving....", font, GT.Color.White, 50, 50);
                display_T35.SimpleGraphics.DisplayText("Date Receivingbyte:" + btr.ToString(), font, GT.Color.White, 50, 80);
                display_T35.SimpleGraphics.DisplayText("Node:" + Text, font, GT.Color.Orange, 50, 100);

            // Debug.Print(bytes.Length.ToString());
           
        }

The test application is simple but FEZ Cerb40 II seems not work well.
The display_T35 should display the the data every second. But it is not and twinkling.

So I deploy the same code to FEZ Cerbuino Bee+ RF433 wireless module.
It works well. So I don;t know what problem in the FEZ Cerb40 II.

Could any one help me ? I have fallen in this problem last 2 weeks.
Couldn’t find the solve.

Thanks.

If you set a breakpoint at this line and then single step it, what does it show for the read_count variable?


read_count = rf433.Read(bytes, 0, bytes.Length);

The twinkling indicates that the data received handler is being fired but nothing is being read. The breakpoint above should help you narrow it down.

read_count=4 when I set breakpoint.

And the Debug.output also strange.
Program Started
3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

3
0

Below is the Debug.out for FEZ Cerbuino Bee+ RF433 wireless module. It is ok…

I don’t know whats the problems with FEZ Cerb40 II.

3
0

The thread ‘’ (0x3) has exited with code 0 (0x0).
3
1

3
2

3
3

3
4

3
5

3
6

3
7

3
8

3
9

4
10

Still not working, I am getting craze.
What’s wrong with the FEZ Cerb40 II.

This will depend on the specifications of the wireless module, but in most cases, unless connecting device to device (ie mainboard to mainboard) TX from the module should go to TX on the board, and RX from the module should go to RX on the board.

It is possible however, that the specifications call for how you have it hooked up, but I would switch the pins and see if the behavior changes.

I found a issue, when I use my hand to touch the FEZ Cerb40 II board. it works.
So what is the problem? any suggestion?

Thanks

solder joints. inspect them all, and re-do them.

Take a photo and post that, you might also get other suggestions.

Thanks,
I use another FEZ Cerb40 II connect all using breadboard.
TX stop sending. very strange.

and the new one, does that also work if you touch it? I’d be suggesting the breadboard might be suss - perhaps you can try moving it along the board some ?

If I power the FEZ Cerb40 II by USB cable with power bank, does the USB pin can supply the 5V power to my wireless module?

I see “This is the VBUS (power) coming from USB cable. This is used internally only if added 3.3V regulator to the board.” Don’t really understand by my poor English.

The Cerb40 II has the regulator already added. So, you should get both 5V & 3V3. Where does the text come from that you quoted? That sounds like it applies to the original Cerb40.

https://www.ghielectronics.com/docs/44/fez-cerb40-developer

I don’t see the document fez-cerb40II.

I connect the usb pin to power my wireless module, not works.
Does the usb pin can be used for output?

https://www.ghielectronics.com/docs/185/fez-cerb-40-ii

EDIT: That doc isn’t really equivalent to the one your referenced. The important line that I was referring to comes from the Cerb40-II product page.

They shows little information.
I almost give up my FEZ Cerb40 II.

Could anyone tell me the best way to power both the 5V Radio and FEZ Cerb40 II?

If you are powering it off of USB alone, what are the power consumption demands of the wireless module? Remember, you have a maximum of 500mA from each USB BUS, unless using a powered hub. If you do not use a powered hub, then the current output would max out at 500mA / (number of USB ports on the USB Bus with devices attached).

As James mentions, you’re probably hitting the limit of your USB connection to provide the necessary power for the radio. It’s possible that the USB battery bank is only providing you with the specification 500mA, perhaps less. Even though a PC is also subject to the same specification, often they’ll provide more power than that, so I’d try connecting to a PC USB cable and checking. And I’d also try a higher current source like a modern phone charger that typically can provide around 1A or more.

I’ve only tested this a few times, but I bought a USB tester with OLED backpack from https://www.tindie.com/products/FriedCircuits/usb-tester-oled-backpack-with-display/ and it works pretty well to view the change in current draw over time, for example during start up of your full setup, and would be a great tool for this scenario. Of course you can do the same checks manually but this does make it very easy.

Thank you all, more clear about the power.
The peak current of my wireless module is 600mA.
This is a 500mW module.

I change to other RF433 module, which is 3.3V powered module.
The current of this module is 30-100mA.

I use a power bank to Cerb40 and connect 3.3V, TX , GND to RF module.
The Cerb40 Randomly stop sending.
I change many power banks, change Cerb40, the same…
Very frustrated for the Cerb40, almost throw it away…