Thanks Forrest that was an extensive reply! Yes I agree I don't want the PC in this in the long run for obvious reasons of power consumption... What I figure by now it must be extremly easy to make a PIC program that serial port receives the register number and the value to be written to it and maybe have a few predefined routines such as for reading analog inputs or writing eeprom locations So basically the program wont even have to change much, I can have a routine in C that says write register, and in the PC to Pic version it will write the data to the serial port, later the code can be compiled with small changes to run directly on the PIC. I think that tracking through cloudy hours is a good idea because it may clear up at any time, besides I noticed that even when the sun is hardly recognizable in the sky some heat is being concentrated! Anyhow I think it is such an easy and obvious project to make a universal Serial Software to Hardware Interface, it was probably already done and if not it could probably be done within a few hours even when using assembly language! For me being slightly serial port phobic I remain wondering will I be able to do it without any expensive level converters? (MAX232 etc) On 7/16/07, Forrest W Christian wrote: > > I'm having a hard time understanding exactly what you are looking for, > but I think the gist is that you're trying to figure out if there is an > easy way to make a PIC work for your application... and whether or not > it is easy enough (or has enough capabilities) that the PIC can run the > whole show. > > I would point you in a couple of directions: > > 1) If you want to get a jumpstart on developing the software without a > lot of hardware development, I would recommend you look at one of the > development boards available. I recently purchased a MikroElectronika > EASYPIC4 and have been very happy with it. I also purchased the > EasyConnect boards which provide screw terminal attachment to all of the > ports, and also the boards which connect to a proto board (I think > EasyProto). They also have a PICPLC8 and PICPLC16A which may or may > not be better suited to what you are doing since they have some > additional input/output filtering (Optoisolated inputs, relay > outputs). Other boards also exist. > > 2) In relation to trying to develop this first on a PC (via the parallel > port) and then migrating it to a PIC, I personally haven't ever really > wanted to do this. There isn't really any easy way to port the code, > and with the C, Basic, Pascal and Other compilers available for the > complete PIC range, I really haven't found any benefit of doing this > since it's now really easy to develop for the PIC since you can pick > your language and run with it. With a good ICD which is integrated > with your development environment, it doesn't really gain you anything > to do it on the PC itself since the PIC development board really becomes > more or less a peripheral to your PC. That said, if you do find > yourself in a situation where you need the capabilities a PC offers > (better interface, lots more processing power, etc), but need to > interface with the real world, it is fairly common to find a PIC setting > between the PC's Serial or USB port and the interface. I doubt this > would be ideal for your situation. > > 3) In regards to your idea regarding the sunny/cloudy day algorithm, > this might be workable, but knowing what I know about solar (and the > effectiveness of the passive (hot water) trackers), I'm not 100% sure > that the cloudy day algorithm would be needed if your sensors were set > up correctly. Ideally, they should determine if the hottest sun is > left, right, up, or down from the currently pointed direction - and > should work whether cloudy or not. Plus, you may not want to move the > tracker at all if it is too cloudy - if it costs more watts to move the > panel than you would gain by moving it, then why move it? That said, > I'm not about to discourage you from trying it at all, since sometimes > the complicated solution works better. You may also want to consider a > simple algorithm which does some math based on sunrise, sunset and > latitude or similar. The whole point of this point is that you should > think about effort versus wattage gain. This is why solar trackers are > rare for those applications with constant wattage needs (engineer the > system and point the panel for winter solstice and forget it since > everything else is better watt hours/day), and also the reason why the > passive tracking using water temperature effects is so popular (don't > burn any watts moving the panel). > > 4) In regards to the rewrite cycle (flash durability) issue, you are > correct in some cases that with newer pics with lower flash durability > that there's a development issue with # of write cycles (other people > might be able to be more specific). However, that's what a socketed > processor is for. If you do exceed the write cycles, yank the PIC and > put a new one in. > > 5) One last thing. You really probably don't want to deal with a PC for > this long term, since the PIC circuit is a lot lower power than a PC. > Plus the newer PICs have a very low power technology (Nanowatt), which > would allow you to look at the position of the tracker, move if > necessary, and then sleep for minutes until it is time to make another > decision about the position of the panel. > > -forrest > > Tobias Gogolin wrote: > > >Hello everybody, an enjoyable weekend! > > > >being a PIC virgin and not even having a PIC programmer yet I am facing > the > >challenge now to make the intelligent parts of my Parabolic 2 Axis Solar > >Tracker > >I mean the parts that read the sensors and decide when and how to > energize > >With other words I got the rest of the hardware up that is the dish the > >actuators and the sensors (photo resistors) > >And I even made up a circuit in my head with accessible components to > read > >the data into a computer over the parallel port... > >I am alarmed by the extensiveness and amount of soldering involved I > realize > >I could be replacing all those more complex chips with a PIC! > >But I do want the ease of developing the more complicated parts on the PC > >first! > > > >I'm thinking to have a C program that tracks by sensors and learns dish > >coordinates (as given by pulse counts from those linear actuators) > relative > >to time. > >This way type of tracking (closed loop) on sunny days and apply the > learned > >to cloudy days (open loop) > >So for example it will know at what position to expect the sun, then > correct > >if sensors provide better information and its not an overly unusual > sensor > >input and position for the time of day. > >I think it should be a fuzzy type of program that averages sensor > readings > >for a while before turning motors on, and even then I may consider to > >gradually increase from the minimal PWM % to get the linear or rotary > >actuator motors moving! > > > >So I am concerned that I would use more cycles redoing this program than > my > >PIC would have rewrite cycles :) > >Therefore the idea about a minimal circuit that I could load into the > 16F676 > >(or even a bigger chip I may have) that would just allow me to read the > ADC > >values and to read inputs and set outputs on the other pins that I could > >activate easily from a PC for example over a software interface and the > >serial port! That would reduce a lot of soldering for me, and eventually > >when I like the program I am hoping adapt the interfaces and just compile > it > >to run on the PIC autonomously... > > > >So does any kind of Project exist that I could use to have this generic > >hardware software interface? > > > >Thanks in Advance! > > > > > > > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Tobias Gogolin cel. (646) 124 32 82 skype: moontogo messenger: usertogo@hotmail.com You develop an open source motor controller at http://groups.yahoo.com/group/GoBox -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist