Composite TV out adapter

Show us your Gamebuino clone or the last module you made.

Re: Composite TV out adapter

Postby BurningSushi » Wed Jul 08, 2015 1:04 pm

That looks great, awesome to see it on the big screen!
User avatar
BurningSushi
 
Posts: 34
Joined: Tue Jun 02, 2015 10:33 pm

Re: Composite TV out adapter

Postby Myndale » Mon Jul 13, 2015 4:55 am

Awesomemario128 wrote:How big is the program? Will it fit on this?www.amazon.com/gp/aw/d/B00NLAMS9C/ref=mp_s_a_1_3?qid=1434937386&sr=8-3&pi=AC_SY200_QL40&keywords=arduino+mini&dpPl=1&dpID=51PlS70kajL&ref=plSrch


Yes, comfortably. It's only 4,030 bytes. It would also fit easily on a 168 Pro Mini, you can buy those on Ebay at the moment for less than $2.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Composite TV out adapter

Postby Awot » Mon May 01, 2017 11:11 am

Hello,
i d like to make this TV OUT Adapter but i not very good at electronics :
So i ask Myndale to confirm some points and i share the conclusion with you here :

- The diagram below is confirmed ok
- The Composite TV out adapter was made with an ARDUINO UNO

This is the text i interpreted for this diagram:

Code: Select all
== Gamebuino Hardware Interface ==
 Arduino Gnd            - Gamebuino ICSP GND
 Arduino Pin D11 (PB3)  - Gamebuino ICSP MOSI
 Arduino Pin D13 (PB5)  - Gamebuino ICSP SCLK
 
 == Video Hardware Interface ==
 Arduino Pin A0 --------> 1k resistor  (sync)  -----------+-------> Composite PAL Out
 Arduino Pin A1 --------> 470 ohm resistor (video) -------^


ICSPportGamebuino2.gif
ICSPportGamebuino2.gif (118.77 KiB) Viewed 11390 times


Please find here the .ino
TVOUT.zip
(5.19 KiB) Downloaded 814 times

this code was made by Myndale
Last edited by Awot on Sat May 20, 2017 1:05 pm, edited 3 times in total.
Awot
 
Posts: 39
Joined: Wed Jan 18, 2017 4:32 pm

Re: Composite TV out adapter

Postby Awot » Fri May 05, 2017 1:30 pm

Hello,
I just updated my post below with the code of the Coposite TV out adapter. (thanks to Myndale)
we may have everything here to make the adapter.
i ll try as soon as i receive my Arduino UNO..
Awot
 
Posts: 39
Joined: Wed Jan 18, 2017 4:32 pm

Re: Composite TV out adapter

Postby Awot » Thu May 18, 2017 3:51 pm

Hello,
i have just updated my post below with the TVOUT.zip > .ino and HEX of this TV OUT adapter
++
Awot
 
Posts: 39
Joined: Wed Jan 18, 2017 4:32 pm

Re: Composite TV out adapter

Postby Awot » Sat May 20, 2017 1:34 pm

I have just done it !
working fine :)

i didn't have 470 ohm resistor, so i did this :
2 serial 220 ohm : 220 ohm + 220 ohm = 440 ohm
and 2 100 ohm in parallel = 50 ohm
so 440 + 50 = 490 ohm ( it s not 470 ohm but it s ok i guess.. )

setupSMALL.gif
setupSMALL.gif (69 KiB) Viewed 11292 times


Here is what it s look likes with Thunder Shoot (it has grey scales and frame rate is set at 60 fps)


there is still a sync bug as shown on pic below :
when this bug appears just press the RESET button on Arduino until it s fine.
BUGGY2.gif
BUGGY2.gif (100.59 KiB) Viewed 11292 times
Awot
 
Posts: 39
Joined: Wed Jan 18, 2017 4:32 pm

Re: Composite TV out adapter

Postby ry755 » Mon May 22, 2017 12:45 am

This is so cool! Just wondering, is this NTSC or PAL?
ry755
 
Posts: 1
Joined: Mon May 22, 2017 12:16 am
Location: California, United States

Re: Composite TV out adapter

Postby Myndale » Mon May 22, 2017 1:41 am

ry755 wrote:This is so cool! Just wondering, is this NTSC or PAL?


PAL, there's a lot of good info on using microcontrollers to generate TV signals at Rickard Gunee's web site.

Congrats on a successful build Awot! As far as the resistor values go you can use any values that generate 0.3V (black) to 1.0V (white), if you're a bit off then the levels will be off as well but you won't notice it. The resistors in combination with the TV internal resistance of 75 ohms form a resistor ladder, so the formulas to calculate the voltages they can generate are:

Black voltage = 5 * 75 / (75 + R1)
White voltage = 5 * 75 / (75 + 1/(1/R1 + 1/R2))

So with R1=470 and R2 =1000 you get black=0.35V and white=0.95V...not perfect, but close enough. With the values you used (1000 and 490) the black level would be the same but the white would be 0.93V, so probably not enough to notice any difference. You could have just used a couple of 220 ohm resistors in series to create a white level of 0.98V. This is all academic of course, the tolerance of resistors makes this whole thing a crap-shoot anyway!

The synchronization bug occurs when the Uno's SPI shift register starts reading a byte when the Gamebuino is half-way through shifting one out. The two get out of sync and so the image corrupts. I was reading through the 328p datasheet the other day and spotted this:

The SS pin is useful for packet/byte synchronization to keep the slave bit counter synchronous
with the master clock generator. When the SS pin is driven high, the SPI slave will immediately
reset the send and receive logic, and drop any partially received data in the Shift Register.


So in theory all I should need to do is figure out where in my original code I've detected the end of the screen packet and then drive the SS pin high for a cycle to reset the shift register and keep the adapter in sync with the Gamebuino.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: Composite TV out adapter

Postby Awot » Tue Jul 11, 2017 12:46 pm

Hello,
It would be so great if you could fix the synchronization bug..
(this is too complexe for me to do)

i plan to make a integrated arduino in a box, with composite out, maybe a led ect something clean.
It is nice to be able to show your gamebuino program on a big tv screen.
Awot
 
Posts: 39
Joined: Wed Jan 18, 2017 4:32 pm

Re: Composite TV out adapter

Postby Awot » Mon Aug 07, 2017 1:20 pm

Hello,

juste a little update of the diagram with the idea of :
"just used a couple of 220 ohm resistors in series to create a white level of 0.98V"

CompositeTVOUT_Gamebuino_v3.png
CompositeTVOUT_Gamebuino_v3.png (253.45 KiB) Viewed 10965 times
Last edited by Awot on Tue Aug 08, 2017 9:19 am, edited 1 time in total.
Awot
 
Posts: 39
Joined: Wed Jan 18, 2017 4:32 pm

PreviousNext

Return to Hardware Gallery

Who is online

Users browsing this forum: No registered users and 3 guests

cron