HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 25, 2011, 02:34 PM
Team White Llama
Enthlapy's Avatar
United States, IL, Addison
Joined Dec 2010
500 Posts
Quote:
Originally Posted by Dennis Frie View Post
Sounds good. Have you received my PM regarding the current sensor?

Remember to use the right schematic and low capacitance on the low-pass filter
Yep, just picked up some 50k resistors and extra capacitors. I just noticed that Flytron has similar setup for 18. Wish i saw that before ordering mine up. Looks like he has it where the sensor powers the rest of the OSD. Should be picking that up for my second build.
Enthlapy is offline Find More Posts by Enthlapy
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 25, 2011, 03:12 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,082 Posts
Quote:
Originally Posted by Enthlapy View Post
Yep, just picked up some 50k resistors and extra capacitors. I just noticed that Flytron has similar setup for 18. Wish i saw that before ordering mine up. Looks like he has it where the sensor powers the rest of the OSD. Should be picking that up for my second build.
Yup, they are not very expensive, and so it have worked flawless (the current-sensor from flytron). I use the battery-wire from the (flytron) current sensor to measure battery-voltage and power SimpleOSD open.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 25, 2011, 11:00 PM
Team White Llama
Enthlapy's Avatar
United States, IL, Addison
Joined Dec 2010
500 Posts
Dennis,

I picked everything up but getting weird read outs. I think I missed something about voltage divider mentioned in the sketch.

Quote:
// Current-sensor
#define offset 0
#define current_cal 0.49
// These values should more or less be correct. Feel free to make a calibration (a few measurements and a linear approksimation) if you feel like it.
// 25 A sensor = 0.24
// 50 A sensor = 0.49
// 100A sensor = 0.98

// How to calculate it...
// Let's say we use a 25 A current sensor that outputs 1 volt for every 5 amps.
// Our microcontroller will have 0 v = 0 and 5 volt = 1024. This means 5 A (1 volt) will show as 1024 / 5 = 205
// We want to show the amps as xx.x A - but we don't want decimals, so we will keep it a factor 10 higher.
// The calibration should then be 205 * x = 50 A (in theory 5 A, but remember the factor 10). This gives 50/205 = 0.24
// You can also take measurements and make a linear approksimatioin in excel etc - a quick test gave me more or less the same result...

// Voltage divider
#define voltage_divider_cal 0.7787 // For SimpleOSD, I have used 1.82 - the formula gives 1.86. Test with a multimeter
// Calculated by (1024)/(50*divider)

//Altitude offset (automatic set to 0 when home-position is set)
//1 = on, 0=off.
#define altitude_offset_on_ 0

// Delay when setting home position. When GPS have GPS-fix the homeposition will automatically be set. For better accuracy a delay can be added. The delay is defined as GPS update-rate / value set.
// Example: 5 hz GPS with 25 delay will give 5 hz / 25 delay = 5 seconds delay.
#define set_home_delay 25
This is how i have it hooked up:





The quote is from my sketch thats uploaded onto the ProMini. I am a bit over my head here, and dont know where to even begin looking to solve this issue.

Sequence 01 (1 min 11 sec)



Here is a video of whats happening. (Please excuse the trippy video, i believe i fried the image sensor a while back.)
Enthlapy is offline Find More Posts by Enthlapy
Reply With Quote
Old Oct 25, 2011, 11:49 PM
Registered User
Yhdysvallat, CA, Irvine
Joined Nov 2007
230 Posts
I soldered a board today but i did not got to work.

When connect the arduino to my circuit the led on the board (pin 11) will go of is this normal or is there a mistake in my circuit ?
p3jpaavi is offline Find More Posts by p3jpaavi
Reply With Quote
Old Oct 26, 2011, 01:05 AM
Team White Llama
Enthlapy's Avatar
United States, IL, Addison
Joined Dec 2010
500 Posts
Quote:
Originally Posted by p3jpaavi View Post
I soldered a board today but i did not got to work.

When connect the arduino to my circuit the led on the board (pin 11) will go of is this normal or is there a mistake in my circuit ?
Not normal, best bet is to set it up on a bread board. Easier to visualize connections before soldering.

Here is my schematic i followed. It uses external power source (osd plugs into Rx for 5v).

Enthlapy is offline Find More Posts by Enthlapy
Reply With Quote
Old Oct 26, 2011, 01:16 AM
Registered User
Yhdysvallat, CA, Irvine
Joined Nov 2007
230 Posts
Quote:
Originally Posted by Enthlapy View Post
Not normal, best bet is to set it up on a bread board. Easier to visualize connections before soldering.

Here is my schematic i followed. It uses external power source (osd plugs into Rx for 5v).

I will try again tomorrow....
p3jpaavi is offline Find More Posts by p3jpaavi
Reply With Quote
Old Oct 26, 2011, 02:14 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,082 Posts
Quote:
Originally Posted by Enthlapy View Post
Dennis,

I picked everything up but getting weird read outs. I think I missed something about voltage divider mentioned in the sketch.



This is how i have it hooked up:





The quote is from my sketch thats uploaded onto the ProMini. I am a bit over my head here, and dont know where to even begin looking to solve this issue.

http://www.youtube.com/watch?v=wLVcxqfzSpI


Here is a video of whats happening. (Please excuse the trippy video, i believe i fried the image sensor a while back.)
It seems to be hooked up right. Have you checked with a multimeter to see if the current-sensor outputs the right voltage?

Later when you connect a voltage-divider you have to set/change the voltage-input pin, as default it's set to be the same as the current-input (which is off course not possible).

Please see around line 185
// Arduino
#if (controller == 0)

// Input from current-sensor and voltage-divider
#define voltage_divider_input 1
#define current_sensor_input 1

Instead of 1, just write the pin-number you wanna use.

Except for that, nice work
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 26, 2011, 08:21 PM
Registered User
Yhdysvallat, CA, Irvine
Joined Nov 2007
230 Posts
HI still does not work

Here is what i have done to the source code v15

L33 #define video_system 1
L117 #define dim_on 0
L130 #define reset_values 1

I measured the arduino pins with oscscope
A1 Video signal found signal varies from 0-1V
A0 Nothing comes out
MOSI Nothing comes out
All outher pins are also not giving anything out...

Can somebody check at least my pins arduino side ? If time my connection...
p3jpaavi is offline Find More Posts by p3jpaavi
Reply With Quote
Old Oct 26, 2011, 08:41 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,082 Posts
Quote:
Originally Posted by p3jpaavi View Post
HI still does not work

Here is what i have done to the source code v15

L33 #define video_system 1
L117 #define dim_on 0
L130 #define reset_values 1

I measured the arduino pins with oscscope
A1 Video signal found signal varies from 0-1V
A0 Nothing comes out
MOSI Nothing comes out
All outher pins are also not giving anything out...

Can somebody check at least my pins arduino side ? If time my connection...
I might be wrong, but you seem to be using the wrong pins. It uses the analog comparator, so you should use pin 6 and 7 for video and reference voltage as shown in the schematic:


As far as I can see you have connected the video-signal to the normal ADC input (named pin A0, A1, A2 etc).

Also, please see first 10 lines in the code for pin's:
// Notes on DIY hardware pins:;
// pin 6 = PD6 / AIN0 (Reference voltage)
// Pin 7 = PD7 / AIN1 (Video)
// Pin 11 = MOSI (SPI) used for pixel-generation.
// Pin 8 = Dimming (Optional)
// Pin 9 = Fast PWM (Optional)

Can I ask why you have used A0 and A1? If it's an error in a schematic I would like to fix it
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Oct 26, 2011 at 08:47 PM.
Reply With Quote
Old Oct 26, 2011, 08:45 PM
Team White Llama
Enthlapy's Avatar
United States, IL, Addison
Joined Dec 2010
500 Posts
Quote:
Originally Posted by p3jpaavi View Post
HI still does not work

Here is what i have done to the source code v15

L33 #define video_system 1
L117 #define dim_on 0
L130 #define reset_values 1

I measured the arduino pins with oscscope
A1 Video signal found signal varies from 0-1V
A0 Nothing comes out
MOSI Nothing comes out
All outher pins are also not giving anything out...

Can somebody check at least my pins arduino side ? If time my connection...
Have you played with the pot? I got luck on my first try and worked fine first time around. When i solder one up i couldnt get it to work. Found out the Pot was dead. replaced it with a new one and had to move it a bunch before i got video. Also Pin6,7,8 and arnt a0 a1. I think AIN0 and AIN1 are the actual micro proccesor pins. So it would be diffrent from a Arduino Nano / Pro Mini.
Enthlapy is offline Find More Posts by Enthlapy
Last edited by Enthlapy; Oct 26, 2011 at 08:50 PM.
Reply With Quote
Old Oct 26, 2011, 08:46 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,082 Posts
Okay, just to answer my own question...
I suppose you have found A0 and A1 from the names AIN0 and AIN1 on this schematic?


AIN0 and AIN1 is NOT the same as A0 and A1 on Arduino. AIN0 and AIN1 is the pin/input names used in Atmega datasheet.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 26, 2011, 08:49 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,082 Posts
Quote:
Originally Posted by Enthlapy View Post
Have you played with the pot? I got luck on my first try and worked fine first time around. When i solder one up i couldnt get it to work. Found out the Pot was dead. replaced it with a new one and had to move it a bunch before i got video.
@Enthlapy, anyway possible I can ask you to change the capacitor value to 0.1 uF in your schematic (I suppose it's just a typo).

And do you mind if I attach it to post #1?
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 26, 2011, 09:02 PM
Team White Llama
Enthlapy's Avatar
United States, IL, Addison
Joined Dec 2010
500 Posts
I gave up on the $7 current Sensor. Itís not giving me consistent readout on the voltmeter. I now know how they work but Iím afraid i messed mine up from following wrong schematic. No biggie, ordered one from Flytron. I Still havnt recieved my GPS from OHARARP and they are in OH. I normally get stuff from OH in 48 hours...........
Enthlapy is offline Find More Posts by Enthlapy
Reply With Quote
Old Oct 26, 2011, 09:03 PM
Team White Llama
Enthlapy's Avatar
United States, IL, Addison
Joined Dec 2010
500 Posts
Quote:
Originally Posted by Dennis Frie View Post
@Enthlapy, anyway possible I can ask you to change the capacitor value to 0.1 uF in your schematic (I suppose it's just a typo).

And do you mind if I attach it to post #1?
Yes use it, ill change to 0.1uF.
Enthlapy is offline Find More Posts by Enthlapy
Reply With Quote
Old Oct 26, 2011, 09:09 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,082 Posts
Quote:
Originally Posted by Enthlapy View Post
I gave up on the $7 current Sensor. Itís not giving me consistent readout on the voltmeter. I now know how they work but Iím afraid i messed mine up from following wrong schematic. No biggie, ordered one from Flytron. I Still havnt recieved my GPS from OHARARP and they are in OH. I normally get stuff from OH in 48 hours...........
Sorry to hear about the current sensor, but hopefully the new one will be plug-n-play

Remember voltage-divider if you want to read battery-voltage.
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Diy osd karl k FPV Talk 2 May 03, 2011 01:31 AM
Idea New DIY OSD? atari7202 FPV Talk 1 Mar 25, 2011 01:08 AM
Discussion see my own diy OSD video Passion Aerial Photography 7 May 27, 2010 02:28 AM
Discussion REAL homebrew DIY OSD - Check it out! jafoca FPV Talk 8 Jun 29, 2009 07:52 PM
Discussion picoOSD DIY PIC12F683 based OSD in C kbosak FPV Talk 6 Jan 31, 2008 08:47 AM