1° Forum di Astronomia Amatoriale Italiano

Il primo forum di astrofili per astrofili, nato nel 2000!
Oggi è venerdì 18 luglio 2025, 22:17

Menu

* Home
* Iscriviti
* La Bacheca
* F.A.Q.
* Cerca
* Login/Logout 

Login

Nome utente:
Password:

 Ho dimenticato la password

In Linea

Visitano il forum: Nessuno e 7 ospiti

Regolamento

regolamento

Links

*
Astrocafè

Segnala bolide
* Meteoblue.com
* Previsioni seeing
* Il Meteo.it
Help Forum
 

Tutti gli orari sono UTC + 1 ora




Apri un nuovo argomento Rispondi all’argomento  [ 2 messaggi ] 
Autore Messaggio
 Oggetto del messaggio: Flat Field con Monitor + Arduino
MessaggioInviato: mercoledì 13 gennaio 2016, 12:13 
Non connesso
Avatar utente

Iscritto il: lunedì 28 dicembre 2009, 9:52
Messaggi: 68
Per chi avesse la fortuna di avere una postazione fissa ( :twisted: io purtroppo no) e volesse installare un monitor (funzionante e senza necessità di alcuna modifica hardware) per effettuare i flat field, è possibile farlo utilizzando un arduino collegato alla VGA..

Ispirato dal progetto in questo sito http://www.pyroelectro.com/tutorials/arduino_basic_vga/index.html , ho modificato alcune righe di codice per fare in modo che all'accesione di arduino il monitor emettesse luce bianca.

Per chi avesse voglia di smanettare con ASCOM, si potrebbe controllare l'accensione tramite script..

Codice:
/*
  VGA
 
  Author: Chris @ PyroElectro.com
  Description:
  This project is meant to be an example source for anyone
  interested in outputting VGA signal's from a standard
  Arduino UNO development board. The goal is to output VGA
  800x600 @ 60 Hz.
 
  Full project details:
  http://www.pyroelectro.com/tutorials/arduino_basic_vga/
*/

#include <avr/io.h>

//Quickly Turn VSYNC On/Off
//Or You Can Change The VSYNC Pin..
#define VSYNC_LOW    PORTD &= ~_BV(6)
#define VSYNC_HIGH   PORTD |= _BV(6)

//Quickly Turn HSYNC On/Off
//Or You Can Change The HSYNC Pin..
#define HSYNC_LOW    PORTD &= ~_BV(7)
#define HSYNC_HIGH   PORTD |= _BV(7)

//RED
#define RED_ON       PORTB |= _BV(4)
#define RED_OFF      PORTB &= ~_BV(4)

//Green
#define GREEN_ON     PORTB |= _BV(3)
#define GREEN_OFF    PORTB &= ~_BV(3)

//BLUE
#define BLUE_ON      PORTB |= _BV(2)
#define BLUE_OFF     PORTB &= ~_BV(2)

void setup() {
}

void loop() {
//Initializations
int i = 0;
cli();
DDRB = 0xFF;
DDRD = 0xFF;
 
//Loop Over-And-Over Again
  while(1){
        //Clear The i counter
      i=0;
        //VSYNC Low
      VSYNC_LOW;
        //200 Lines Of Red
      while(i < 600){
            //Red Color High
          RED_ON;
            //Green Color High
          GREEN_ON;
            //Blue Color High
          BLUE_ON;  //Low               
            //2.2uS Back Porch
          delayMicroseconds(2); 
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
         
            //20uS Color Data
          delayMicroseconds(20); // 1uS       

         
            //Red Color Low
          RED_OFF;  //Low
           
            //1uS Front Porch
          delayMicroseconds(1); // 1uS
          i++;
         
            //3.2uS Horizontal Sync
          HSYNC_HIGH;  //HSYNC High
          delayMicroseconds(3);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
          HSYNC_LOW;  //HSYNC Low
         
          //26.4uS Total

          RED_ON;
            //Green Color High
          GREEN_ON;
            //Blue Color High
          BLUE_ON;  //Low         
           
            //2.2uS Back Porch
          delayMicroseconds(2);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
         
            //20uS Color Data
          delayMicroseconds(20); // 1uS       
         
            //Green Color Low
          GREEN_OFF;  //Low
         
            //1uS Front Porch
          delayMicroseconds(1); // 1uS
          i++;
         
            //3.2uS Horizontal Sync
          HSYNC_HIGH;  //HSYNC High
          delayMicroseconds(3);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
          HSYNC_LOW;  //HSYNC Low
         
            //26.4uS Total

          RED_ON;
            //Green Color High
          GREEN_ON;
            //Blue Color High
          BLUE_ON;  //Low   
         
          //2.2uS Back Porch
          delayMicroseconds(2);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
         
            //20uS Color Data
          delayMicroseconds(20); // 1uS       
         
            //Blue Color Low
          BLUE_OFF;  //Low
         
            //1uS Front Porch
          delayMicroseconds(1); // 1uS
          i++;
         
            //3.2uS Horizontal Sync
          HSYNC_HIGH;  //HSYNC High
          delayMicroseconds(3);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
          HSYNC_LOW;  //HSYNC Low
         
            //26.4uS Total
      }   
        //Clear The i counter
      i=0;
        //VSYNC High
      VSYNC_HIGH;
   
        //4 Lines Of VSYNC   
      while(i<4){         
            //2.2uS Back Porch   
          delayMicroseconds(2);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
         
            //20 uS Of Color Data
          delayMicroseconds(20);// 20uS
         
            //1uS Front Porch
          delayMicroseconds(1); // 1uS
          i++;
         
            //HSYNC for 3.2uS
          HSYNC_HIGH;  //High
          delayMicroseconds(3);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
          HSYNC_LOW;  //Low 
         
            //26.4uS Total
      }
     
        //Clear The i counter
      i=0;
        //VSYNC Low
      VSYNC_LOW;
        //23 Lines Of Vertical Back Porch + 1 Line Of Front Porch
        //This is very, very flexible...I'm setting it to 22 Lines!
      while(i < 22){
            //2.2uS Back Porch
          delayMicroseconds(2);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
   
            //20uS Color Data
          delayMicroseconds(20);// 20uS
           
            //1uS Front Porch
          delayMicroseconds(1); // 1uS
          i++;
         
            //HSYNC for 3.2uS
          HSYNC_HIGH;  //High
          delayMicroseconds(3);
          __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
          HSYNC_LOW;  //Low 
         
            //26.4uS Total
      }   
  }
}


Allegati:
20160113_112004_resized_1.jpg
20160113_112004_resized_1.jpg [ 512.24 KiB | Osservato 1649 volte ]
20160113_111926_resized_2.jpg
20160113_111926_resized_2.jpg [ 863.97 KiB | Osservato 1649 volte ]

_________________
CGEM DX | TS APO65Q | GSO RC 8" | ATIK 383L+ | SX Lodestar | SX USB filter wheel | SX Off Axis Guider | Baader LRGB 36mm | Canon EOS 50D
http://www.astrobin.com/users/Michele74/
“Per aspera ad astra”
Top
  Profilo    
 
 Oggetto del messaggio: Re: Flat Field con Monitor + Arduino
MessaggioInviato: giovedì 14 gennaio 2016, 15:37 
Non connesso
Avatar utente

Iscritto il: giovedì 12 ottobre 2006, 9:32
Messaggi: 4322
Località: Veneto
Tipo di Astrofilo: Fotografo
Bello spunto a nuove idee ....

Interessante davvero. Si potrebbe pensare anche altri utilizzi sempre pilotabili ASCOM/Arduino.

Carlo

_________________
Carlo Martinelli - IW3GIK

Osservatorio: StarNavigator Astronomical Observatory (Masi-PD)
Montatura GM2000 QCI 10 Micron Comec Tec.;
Telescopi: Meade LXD55 S/N 1016/254 Schmidt/Newton F4; Takahashi FS102 820/102 F8 612/F6; Takahashi FS60C 355/60/ f5.9 - 264/F4.4; TS 60/228 F3.8; Celestron C11 Carbon 2800/F10 1764/F6.3; OTA MTO 1000/100 F10 SkyQualityMeter: SQM-L / SQM-LE Wheather: AAG-CloudWatcher LaCross WS55 SkyCam: AllSkyCam-MoonGlow Tec. Observatory Automation System :Voyager / Viking


Top
  Profilo    
 
Visualizza ultimi messaggi:  Ordina per  
Apri un nuovo argomento Rispondi all’argomento  [ 2 messaggi ] 

Tutti gli orari sono UTC + 1 ora


Chi c’è in linea

Visitano il forum: Nessuno e 7 ospiti


Non puoi aprire nuovi argomenti
Non puoi rispondere negli argomenti
Non puoi modificare i tuoi messaggi
Non puoi cancellare i tuoi messaggi
Non puoi inviare allegati

Cerca per:
Vai a:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Traduzione Italiana phpBBItalia.net basata su phpBB.it 2010