Jump to content
Daniel Wee

My little NAV/OSD project - under construction

Recommended Posts

Hi Wavess,

I'm not sure what you mean by "too heavy for the size"? Do you mean that the module is too big or heavy for the plane? Or do you mean the size of the WMV file? If it's the WMV file - I was also wondering why it was so big. I need to look at the settings again.

Daniel

P.S. I note that it's been about 6 weeks since I started designing and building this OSD/Navigation computer from scratch. That includes all hardware design and fabrication of several prototypes, writing of software, testing etc. Fortunately I've managed to keep my crash-free track record and that has allowed experimentation to progress smoothly. This isn't exactly rocket science and it's something I'm sure most of you can accomplish if you put your heart and mind into it.

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

What a guy you are Daniel, I'm delightfully impressed! There should more people in this world like you! I'm sure the name Daniel Wee just created a ripple in the fpv/rc world for both contribution and personality!!! Keep up the great work! :lol:

John Lee

Oh btw your software version 2.4 came up with a 404 error, broken link on my end here in Canada.

Share this post


Link to post
Share on other sites
Hi Wavess,

I'm not sure what you mean by "too heavy for the size"? Do you mean that the module is too big or heavy for the plane? Or do you mean the size of the WMV file? If it's the WMV file - I was also wondering why it was so big. I need to look at the settings again.

Yes I was reffering to the video size

Share this post


Link to post
Share on other sites

Okay, I've interfaced the Allegro current sensor and the software works but there seems to be a ripple on the line that I can't get rid of. A couple of unexpected issues cropped up as well. The sensor - ACS750-75 - is in fact a 200A sensor that ranges from -100A to +100A, although the linear range is from -75A to +75A. This, together with the 10-bit ADC in the controller translates to a best resolution of around 240mA per bit! When you take into account the jitter, we're looking at nearly 500mA precision (or rather - imprecision!). So now I have to try to solve this ripple issue, another 240mV p-p which translates to 50-bits error!

I've checked and the ripple is coming directly from the sensor - not good. I may have to average it out in the code.

Update: Okay, turns out that one of the capacitors was causing the ripple, not sure why but the problem is now fixed so we're down to 27mV p-p which is acceptable. The ADC output is still very jittery though and I'll have to look into that.

Edit: Thank God for oscilloscopes! As it turned out, it wasn't my software or hardware, but the current drawn by the ESC/motor is actually rather spiky. This becomes clear once I look at the scope. I may have to smooth this out with a capacitor I think and even do some averaging on the software side. We're getting there. I spent all night thinking that I configured the ADC wrongly or something. What a relief!

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Okay, for those who are interested, here's the (hand-drawn) schematic for my controller board. I may have left out a few de-coupling capacitors here and there. Also, I've not yet drawn the schematic for the current sensor since I'm still working on it. The +5V from the receiver goes through to the servos with no other connection to the controller, but the ground is shared. Hopefully you get the rough idea of what it's supposed to do. Some obvious connectios such as the power for the BOB-4SG board, and the ground connections to the various boards have been left out as well to keep it simple (I'm lazy to draw it nicely). Oh, and I got the battery symbol reversed but didn't want to redraw it - sorry about that. Also forgot to write in that AN1's divider goes to the external battery (ie. the one that powers the motor, ESC, servos, receiver ...) and AN3 goes to the current sensor.

NAVOSDschematic.jpg

Let me know if you have any questions about this.

Meanwhile, I think I have the current sensor working. It's not exactly very precise due to the reasons I've given above but it finally looks like it might be usable. I've not figured out how to calibrate it though. I'll be testing that later.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Okay, I got the current sensor working! Finally! As I mentioned before, it was a little more complicated than I had anticipated for a few reasons. First, the current sensor had a greater range than I originally thought it would have - basically a spread of 240A (-120A to 120A) over a 5V output range. We're talking about 234mA per bit! resolution for my 10-bit ADC. Secondly, there was a 240mV ripple going on the line which added to the jitter. The trickiest, however, was the current profile that was actually a series of high frequency spikes rather than a linear load as I had assumed. This made sense now that I've thought about it, but yesterday I thought my ADC was wrongly configured because the readings were jumping all over the place. I went over the settings with a fine-toothed comb and just could not figure out what I was doing wrong. As it turned out, there was nothing wrong with the code.

So, the question is - how do you get those spikes to register properly when sampled at a mere 4Hz rate? Well, the simplest way I could think of was to rectify the output and feed it to a r/c circuit - 3 components added to the sensor board and it works! Fantastic - took a bit of testing but the idea works. There's still quite a bit of jitter on the ADC output so I averaged the output over 8-samples (2-seconds worth) and that settled things down sufficiently. Okay, now I have to calibrate this thing but how do I do it? Well, I know my timebase is pretty accurate so I calibrated the mAh summing feature first. After some tests, I've got it pretty accurate. In my latest test, I ran the motor on the plane just like I would when flying - with a mix of throttle positions and servo action. The OSD indicated 300mAh used, and the charger put 299mAh back into the battery. I guess you could call it a success.

Now that I know the mAh is pretty accurate, it's a simple matter to work back the coefficient for the current readings. I've not actually measured that but to be quite frank, it's not that important to me. Actually I'm thinking of getting rid of the current reading altogether. Any feedback on whether a current reading is useful? Would you want to see it in or not? What about pack voltage?

Anyway - it's done! Whew! The only thing left to do now is the One-Wire interface (the code is mostly done but needs to be tested). This is a very low priority item for me as I like to keep things simple and as it is, there are too many wires in my plane already. I'll try to post the schematic for the current sensor once I get some time (and am not too lazy) and if there's any interest to see it. As for the releasing of the source code, I'm still thinking about it and am leaning towards releasing it. Guess I won't be making any money out of this project! Lol! That's why I'm an engineer and not a businessman!

Daniel

p.s. Software is now at Version 2.6, incorporating all the changes I made to get the current sensor working. I'll hold off posting all the revisions as it changes quite a lot. If any of you are really building this board, just let me know and I'll try to keep you updated with the latest software.

p.p.s. I'm using the MikroC for dsPIC30F/33F compiler but the code should fairly easy to port to MicroChip's C compiler for dsPIC.

Edited by Daniel Wee

Share this post


Link to post
Share on other sites
Well, the simplest way I could think of was to rectify the output and feed it to a r/c circuit - 3 components added to the sensor board and it works! Fantastic - took a bit of testing but the idea works.

Once you are satisfied with your solution, try it on several different motor/ESC combinations. I recommend this because some combo's have currents that are very "spikey."

For example, early on I was confident my Vizion OSD offered stable current readings (worked great on all the beta test models). Despite its analog and digital filtering, Terry later reported jumpy readings on his model. A more aggressive analog filter solved it for him (and so the design was changed to prevent the problem for others).

The analog filtering, when required, is affected by your A/D sample rate. At 30 hz sampling, very little external filtering is probably needed. But at your 4Hz rate, the aliasing will require it for sure. The easiest way to tame it is to experiment with your filter until all is well on worst case motor/ESC combos. With luck, your newest solution nailed it. :)

Share this post


Link to post
Share on other sites

Thanks for the comments. I can actually up the ADC sampling rate way beyond 4Hz if necessary (I think the ADC will handle up to 800ksps or more). However, I chose 4Hz to keep the overhead low. I do have a big capacitor (relatively speaking) on the filtering now so hopefully that will do the trick. Once the analog filter works well, the digital part is quite easy to handle, and actually, if it works well enough, the software should really have no trouble using that data since it will still be proportional. You're right though, I would want to test this with other platforms to ascertain accuracy with different configurations, given that different ESC's use different switching rates. Nevertheless, I'd expect the mAh data, especially, to be in the general ballpark.

Oh, and for the actual pinout diagram for the controller - see the link below for the datasheet:-

Datasheet for dsPIC30F4012

I'm using the BOB-4SG - the SIMM format BOB-4 board with my project. There are a number of connections that are needed on the BOB-4 to get it configured correctly and I've not indicated this as yet since they are mainly jumpers on the BOB-4 edge connectors. I will do so at a later stage (once I get some sleep and rest). Again, if you're already building this and need the info, just let me know and I'll make sure all the info is available here.

Daniel

Share this post


Link to post
Share on other sites

Great with all the updates :-)

What about a R/L+R/C filter +3.3V reg, also on power from ESC?

(I see thats how they do it on radio receivers)

Also got alot of noise coming out on my ESC!

Will see if i build it - need the BOB-4 OSD and its a little too expensive for now.

Also my plane have crashed! (Lost radio contact when doing some radio control switching stuff in midair..hehe)

But it will soon be working again :)

LoopForEver

Share this post


Link to post
Share on other sites

Just a minor update here - the board is pretty much done and I've not really messed with it just yet because I've been setting up my new plane and glider, both of which are contenders for my primary RPV position. The glider is the Cularis which is all done but awaiting the prop assembly which should arrive in a couple of days time. The plane is a Phoenix Trainer EP, a 1330mm wingspan high-wing trainer. I had to make some minor modifications to get it just right and today I managed to maiden the Phoenix in very gusty conditions. It was bumpy in the air due to the very strong wind but handled very nicely. I'm really starting to like this plane a lot but I'll give the Cularis a chance to make her statement once I get the prop. Unlike the Cularis, the Phoenix is spacious and has a lot of options for mounting your stuff. The only problem is that the ailerons are driven by one central servo so you can pretty much forget about flaperons.

In the meantime, I've measured the weight my FPV gear:-

2S 1050mAh Li-Po

Camera

Power-harness board

OSD/Navigation computer board

500mW TX with whip antenna

GPS module

Current sensor module

All kinds of cabling

comes up to around 250g! Wow, I had no idea it was that heavy. There isn't a lot I can do to reduce the weight except shorten the cables (have not included the ferrite chokes) and maybe run the whole setup off the main battery. Any of you running you FPV gear off the same battery as the motor? What were the results? Problems?

Meanwhile, I will be practicing on the Phoenix and will be decommissioning the Cessna from active service sometime this week. It served me well and has not seen a single crash.

Daniel

Share this post


Link to post
Share on other sites

Daniel,

You listed the DIL-24 PIC and IC socket, however, I believe it's a 28 pin chip you have shown in your pix. I'm just asking because I've put together my shopping list for this project and I want to order the correct parts.

Btw, I vote we call it the "WeeOSD". :D

Edited by docphi

Share this post


Link to post
Share on other sites

Hi docphi - my bad - it's a 28-pin socket, not a 24-pin socket. Great to know you're building the thing. Let me know what else you need and check with me before you etch the board. I'm still trying to improve the board layout a bit. Another thing about the component list - I missed out some parts for the updated board:-

Allegro ACS750SCA-75 current sensor (they give out free samples too)

0.1uF capacitor

1uF 10V electrolytic

1N4148 signal diode

15kohm 1/8-watt 5% resistor

Will post more details - just let us know where you are with the build.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites
Btw, I vote we call it the "WeeOSD".  :D

Or maybe "Dragon NAV" DW series 1 since the design origin is asian based ;)

BTW I'm still trying to figure out how to redirect those jumper wires to something implemented on the etching instead. :P

Edited by JMS

Share this post


Link to post
Share on other sites

Lol - Dragon :)

Yes, I'm also thinking of re-routing the jumpers but short of getting them onto the top side - I don't think there's a way to do that. I still can't figure out how to do the PCB top side properly with a groundplane.

In any case, I have just gone and got the parts for another board and I will be posting blow by blow photos of the assembly and component placements for the board so whoever is building it can just follow the photos.

Daniel

Share this post


Link to post
Share on other sites

I've got most of the parts ordered. I'm having difficulty locating 1/8w resistors and the 10v electrolytic cap. As for the board itself, I haven't decided to etch my own or send it out. Olimex and Sparkfun have good prices for PCB fabrication.

Share this post


Link to post
Share on other sites

Okay, the new layout is here:-

Latest PCB layout 0.4 - Eagle PCB

And as promised, the assembly photos (still need some documentation but this is a start I hope).

The board that I just etched:-

DSC_6418.jpg

Drilled and cut/filed down to size (Dremel helps a lot). Note that not all holes are actually used.

DSC_6420.jpg

The top side where you can see how I excavated a bunch of shallow holes to clear the hole from the ground plane. I used a tool that's basically a big drill bit with a handle to do this.

DSC_6422.jpg

DSC_6423.jpg

Initial component mounting (note that 0.1uF capacitor at the center - needs to be small as the socket goes over it. Also note that I soldered a through wire near the inside of one of the IC pins.

DSC_6426.jpg

Below, the capacitors and crystal is mounted:-

DSC_6429.jpg

DSC_6433.jpg

DSC_6435.jpg

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Resistors (I'm using some 1% resistors as I ran out of 5% ones), diodes (all pointing towards center of board) and transistor added:-

DSC_6436.jpg

DSC_6438.jpg

Now the connectors are added, also note that I've soldered more through wires for the ground plane:-

DSC_6439.jpg

The underside shows the jumpers:-

DSC_6440.jpg

DSC_6441.jpg

That's it. It's actually not too hard but I can imagine doing it the first time can be a little unnerving. Anyway if you are doing this and have questions, I'd be happy to answer them. I'll be doing up another current sensor soon.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Daniel,

Can you label the connectors on the board in your pic above? Also, where is the connection for the Bob-4? Thanks!

Share this post


Link to post
Share on other sites
Lol - Dragon :)

Yeah I chuckled over that too.... I can imagine the ads now... enter the DRAGON! etc etc etc... :lol::lol::lol:

Anyhow I will look and compare the new changes on your new board layout. I'm going to dig out my etching tank from my (full)hobby/work shop tomorrow :D That part will not be fun.

Share this post


Link to post
Share on other sites

Lol - corny!

As for the connectors:-

DSC_6439.jpg

As per the image above, they are:-

1. Lower left - 4-pin - Current sensor

2. Lower middle right - 6-pin - GPS

3. Top left - 2-holes - Power supply 6-15V

4. Top middle - 5-holes - BOB-4SG

5. Top right - 5-pin - ICSP programming header

6. Lower middle left - group of 9-pins - from receiver L-R - control, elevator, aileron

7. Top middle left - group of 12-pins - to servos L-R - elevator, One-Wire, aileron, aileron2

8. Top middle right - 3-pins - from receiver - aileron2

I think those are the connections but I might have mixed up the elevator/ailerons. Will need to check but you get the idea. The BOB-4 connector actually connects from the underside of the board.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

How much did you pay for etching this board?

ERDIT:

What kind of tools did you use?

Cheers

Geko

Edited by GekoCH

Share this post


Link to post
Share on other sites

I bought some pre-sensitized positive acting PCB - "Kinsten" branded. I had the board printed out onto transparency on my inkjet printer - you'll need special transparency for this purpose but I think it's quite common and easy to procure. I cut a piece of board slightly bigger than required (using Dremel cutting tool). Peeling off one side of the protective sticky backing, I placed the transparency (also cut down to size for ease of handling) over the exposed board. I used some clear tape to hold it in place and to prevent it from moving.

I then put a clear piece of glass on top of the transparency to press it down flat onto the board. I placed a small flourescent light about 2 inches above the glass and exposed the board this way for about 9 minutes or so. Then I removed everything from the board and developed it with a positive developer solution (usually some kind of soda but I have a specially made solution - again quite easy to procure). The developer will take some time to work so you fill a small tray and put the board exposed side up in it. Oh, and before you immerse the board, also remove the sticky backing for the other side if you're following my procedure exactly. As you swirl it around, eventually the exposed areas (as opposed to those protected by the transparency tracks) will get washed away, leaving you with exposed copper. You will see a green pattern on exposed copper.

At this point, if you have some Ferric Chloride of Ammonium Persulphate, it's pretty easy to etch the board - just mix some (water to crystals always) and put the board in. As I was unable to get any regular etchant (being that they're controlled substances here), I had to make my own etchant out of Hydrogen Peroxide and cleaning solution containing strong concentration of Hydrochloric Acid. This worked, but doesn't act as quickly as Ferric Chloride, for example. You keep moving the etchant over the board until all the exposed copper has been etched away. Make sure it's properly etched especially around the thin tracks passing through other pads.

Using lots of water, dilute the etchant and dispose accordingly (in an environmentally appropriate manner). The board should be ready for cutting down to actual size and drilling.

There are many different variations of this process including printing directly onto the PCB if you have a printer that's capable of that. Or some people print on paper (regular paper I believe) and iron the trace on like a transfer. You'll have to experiment and read up a bit to see what works best for you. The method I use is just what I've been used to doing years back so I stuck with the familiar. There is nothing to prevent you from trying other methods though. Of course, these methods are usually better suited for one off productions (very tedious and time consuming).

I'm looking at the possibility of getting someone to commercially make these board (proper dual sided so I can probably do away with the jumpers altogether) but I need to really do a proper schematic as opposed to the slightly simplified one I drew. Hope this helps.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...