Cant get openxsensor to work @ 3.3V 8Mhz arduino

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
Juhani
Posts: 5
Joined: Fri Mar 29, 2019 1:28 pm
Country: -

Cant get openxsensor to work @ 3.3V 8Mhz arduino

Post by Juhani » Fri Mar 29, 2019 6:51 pm

Hi.

To begin with I must say that I am a big fan of openxsensor.
My problem is that i cant get it to work on 3.3V 8Mhz arduino.
I have tested it on 3 different layout 3.3V arduino clone boards without success.
And I konw many people do get it to work, they even have ebay links in the part list for clone boards.

On the plus side, everything works on 5V 16Mhz boards.
But since frsky receivers, gps-s and barometers use 3.3V logic, I really need to get it work on 3.3V.

Ive made 2 sensors, one is gps with protection resistors between arduino and gps and voltage divider on sport to get to 3.3V.
Second one is 4 cell battery voltage meter with divider on sport.

Do I need to flash 8Mhz arduinos differently or what I am doing wrong?
With DSO oscilloscope I can see that RX communicates with arduino but does not get a response.
If I use 16Mhz arduino, RX gets response from arduino no matter if it runs on 5v or externally fed 3.3V and sensors work in taranis transmitter.

Im not really sure is swaping out 16Mhz arduino regulators to 3.3 is a way to go or not, because I have only tested it on the table.

Many thanks in advance!
Attachments
2019-03-29 20.03.32.jpg
RX communication and 3.3V 16Mhz arduino response
2019-03-29 19.47.40.jpg
RX communication and 5V 16Mhz arduino response


jtaylor
Posts: 142
Joined: Fri Nov 01, 2013 1:31 am
Country: -
Location: Wexford (Pittsburgh), PA

Re: Cant get openxsensor to work @ 3.3V 8Mhz arduino

Post by jtaylor » Sat Mar 30, 2019 12:22 am

I think people will need a little more information to be able to help.
What arduino board are you using?
What receiver are you connecting it to?
What transmitter and firmware are you using?
And exactly what is the problem? Can't get the Arduino to flash, or openxsensor flashes but the transmitter doesn't see the sensor?

I just today built a Frsky sport GPS/vfas sensor using a 3.3v 8 Mhz pro mini and it worked fine connected to a X8R receiver and Taranis x9d running openTX 2.2.3. Didn't do anything special because it was a 3.3 v part, it just worked.

Configured openxsensor and flashed the pro mini.
Connected sport + to pro mini raw
Connected gps + to pro mini vcc
Connected sport, pro mini, and gps grounds together
Connected gps tx to pro mini rx and gps rx to pro mini pin 6 (no resister because they are all 3.3v parts)
Connected sport signal to pro mini pin 2 (changed from the default pin 4 because I had used that pro mini to test MikeB's sportanalog code, which worked great, and already had the servo cable soldered on there.)

I may not be of much help because I connected mine to the receiver sport, discovered sensors and everything just worked.

Jim

mstrens
Posts: 1231
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Cant get openxsensor to work @ 3.3V 8Mhz arduino

Post by mstrens » Sat Mar 30, 2019 8:31 am

In arduino IDE, are you sure to select a board which is specified for 8mHZ.
If you select a board for 16mhz, the compiler will get a parameter saying it is a 16 MhZ clock and oXs will use internal delays to fit with 16 MHZ. If your CPU is really a 8mHz, then OXs can't recognise the signal sent by the RX and it will not reply.

Note: even with a Frsky receiver and with a GPS running 3.3V, I never had an issue using an Arduino at 5V 16Mhz. For safety, I put a resistor between oXs and GPS as explained in oXs_config_description.h.

User avatar
jhsa
Posts: 18850
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Cant get openxsensor to work @ 3.3V 8Mhz arduino

Post by jhsa » Sat Mar 30, 2019 10:33 am

I use the oXs at 5V, and the only problem I could possibly have is that the DIY receivers that I build work at 3.3V. But it hasn't been a problem so far, I think because the receiver is also based on an Atmega328P, and it is 5V tolerant?

João


Sent from my BLN-L21 using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Juhani
Posts: 5
Joined: Fri Mar 29, 2019 1:28 pm
Country: -

Re: Cant get openxsensor to work @ 3.3V 8Mhz arduino

Post by Juhani » Sat Mar 30, 2019 10:46 am

Wow, was that a rookie mistake I made.

Many thanks to Jim and mstrens for taking the time to help!
mstrens you were correct, I needed to specify 8Mhz.

Since I just started with arduinos I forgot the board to nano and it worked with nanos and 5V pro minis.
After choosing pro mini and 328P 3.3V 8Mhz, everything works now.

Again, many thanks!
Juhani


Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”