Go Back   IceInSpace > Equipment > ATM and DIY Projects
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average.
  #241  
Old 13-05-2014, 01:23 AM
netwolf's Avatar
netwolf
Registered User

netwolf is offline
 
Join Date: Jan 2005
Posts: 2,943
Thanks Alistair Brendan looking forward to this unit. Appreciate your efforts in getting this built for me can't wait to try it out. I just need to now work out the motor And mounting side of this.
Reply With Quote
  #242  
Old 13-05-2014, 05:29 PM
alistairsam's Avatar
alistairsam
Registered User

alistairsam is offline
 
Join Date: Nov 2009
Location: Box Hill North, Vic
Posts: 1,837
Quote:
Originally Posted by dtrewren View Post
Good afternoon guys,

Ok, I have made a few modifications to the SharpSky firmware. To be honest one of these changes should already have been in but somehow slipped through the revision net. I have enhanced the way the temperature probe is being read by the PIC micro to make the read less invasive. The current V4.0 has an issue whereby reading of the temperature sensor interrupts the motor move (this should have been fixed). Also the sensor read was disturbing the operation of the manual control.

The new V4.1 firmware load fixes the motor interruption issue and makes the manual control much more responsive.
Hi Dave,

Tried to send you a PM but your inbox is full.
I can confirm that the firmware ver4.1 has fixed the pauses and the manual control is a bit more responsive.
I will add two micro switches in parallel to the encoder though. not sure if it'll work. would that cause issues with too many interrupts raised to the PIC?

I was testing CCD Autopilot with focusmax and the sharpsky ascom driver and couldn't get the temperature reading. maybe its because focusmax isn't passing that through since you can't choose the ascom focus driver from ccdap direct.
CCDAP does temperature compensation so it applies corrections between subs and can refocus between filters, after a meridian flip and so on.
I will do some tests and post results.

Cheers
Alistair
Reply With Quote
  #243  
Old 13-05-2014, 07:50 PM
wasyoungonce's Avatar
wasyoungonce (Brendan)
Certified Village Idiot

wasyoungonce is offline
 
Join Date: Jul 2006
Location: Mexico city (Melb), Australia
Posts: 2,338
Quote:
Originally Posted by dtrewren View Post
.....

Good to go you are now running V4.1 and this will be displayed in the ASCOM setup page for the driver.

Any questions or problems with the reflash please fire at will Cheers & clear skies,Dave
Hi Dave..Just flashed my 2 controllers with ver 4.1 and noticed they appear more responsive, many thanks. Noticed that the new firmware revision number is not immediately displayed when you open "client.exe, properties". Still listed as ver 4.0. Then once I connect it changes to ver 4.1 so not a biggie, just mentioning this for others as I initially thought, "hey the flash failed"?

Also noticed that I got a firmware flash verify fail using an older bootloader? No matter downloading and using the latest works ok.

Keep up the great work

Brendan
Reply With Quote
  #244  
Old 13-05-2014, 08:22 PM
dtrewren's Avatar
dtrewren (Dave)
Above the equator ...

dtrewren is offline
 
Join Date: May 2012
Location: Bristol UK
Posts: 134
Hi Alistair, Brendan et al,

Good stuff !

Alistair I sent a PM regarding CCD autopilot now I have purged my inbox, SharpSky stuff had filled it up

I connected CCD autopilot to SharpSky via FocusMax and it appears to read the temperature once on connect but then fails to update even though FocusMax is reporting temperature changes about once a second. Not completely clear to me how CCD is supposed to function in this area. Tried changing various settings but CCD is not picking up temperature changes from FoxusMax no matter what I change ? I will have another play later.

You shouldn't have a problem with the switches although I have not tried stand alone switches - let me know how you get on.

Hi Brendan,
The version number will not update until you connect, it is only at this point that any information is exchanged between the driver and controller. So as you say once you connect and open the setup window the new version V4.1 will be displayed and refreshed every time you connect.

I have upgraded the bootloader application on the website to V1.2 (this was an oversight and should have been done before). The flashing did work despite the error. The error was only a verification error due to a modification I made to some securing data in the bootloader.

You should now notice (with V4.1) smoother motor movement with no pausing and a much more responsive manual control. Also the heatbeat LED used to tend to pause sometimes during a temperature read - this is also now fixed and the LED flash is steady.

Cheers & clear skies (not here) ,

Dave
Reply With Quote
  #245  
Old 22-08-2014, 05:15 PM
alistairsam's Avatar
alistairsam
Registered User

alistairsam is offline
 
Join Date: Nov 2009
Location: Box Hill North, Vic
Posts: 1,837
Hi Dave, Brendan,

I had an issue last night where the controller doesn't have the status led flashing anymore and I cant connect.not sure if its completely dead. I checked input voltage, its 12.1

Any suggestions on troubleshooting, voltages on pins of the pic etc?

Thanks
Alistair
Reply With Quote
  #246  
Old 22-08-2014, 06:21 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 644
I'm not sure entirely on what schematic you're using. Brendan showed me one recently but if it's the same there's a few things you could check:

On the DB9 connector for the motor:
Pin 5 - 12V - This would rule out problems with the internal power connection.
Pin 7 - 5V - This would rule out problems with the internal regulator.

Pin 9 is ground. Take care not to short between any of the pins as it doesn't look like the power supply has any decent short circuit protection.
Reply With Quote
  #247  
Old 23-08-2014, 02:39 AM
dtrewren's Avatar
dtrewren (Dave)
Above the equator ...

dtrewren is offline
 
Join Date: May 2012
Location: Bristol UK
Posts: 134
Hello Alistair,

Sorry to hear you are having an issue. As has been suggested check the power rails to see if the PIC is getting juice. The design does have reverse polarity protection but not short circuit protection. A DB9 connector generally ensures against pin shorting.

If you do have power the only other thing that can halt the PIC (assuming it is not damaged) is a problem with the crystal or associated capacitors. Power the board on while depressing the manual control button - this will put the PIC into boot mode and the manual control LED should rapid flash. If this does not happen that suggests the PIC has no power or the clock is not running. If the LED does rapid flash the PIC is alive and well but for some reason the application code has become corrupted. This is not likely but is possible so you could download the .HEX file from my website and reflash the PIC.

Report back and let us know how you get on.

Cheers,

Dave
Reply With Quote
  #248  
Old 23-08-2014, 03:10 AM
alistairsam's Avatar
alistairsam
Registered User

alistairsam is offline
 
Join Date: Nov 2009
Location: Box Hill North, Vic
Posts: 1,837
Thanks Dave, Chris,

Very strange, it actually worked today.
I had it setup at home yesterday, didn't work. I did measure voltage in the power input connector.
I packed up and setup tonight at a dark site, it just worked.
not sure if it was the dew or cold as its right on top of my scope, but i will save the troubleshooting tips if it happens again.

Dave, do you have a link for the temp compensation section, I'm not clear on how to log changes through the night and use it when connected via Maxim.
I'm not using focusmax at the moment.

Thanks
Alistair
Reply With Quote
  #249  
Old 23-08-2014, 05:54 AM
dtrewren's Avatar
dtrewren (Dave)
Above the equator ...

dtrewren is offline
 
Join Date: May 2012
Location: Bristol UK
Posts: 134
Hello Alistair,

It is a little tricky to say for sure but my hunch would be condensation around
the crystal and tank circuit. The crystal has 33pF caps hanging off it and it wouldn't
take much condensation to stop the crystal or pull it off frequency. Pulling it off
frequency wouldn't kill the heart beat LED but might kill the USB comms. The 4MHz
from the crystal is input to a PLL with a 96MHz ouput, then a /2 post scale to 48MHz
which forms to base clock for the USB module. If the 4MHz is off frequency or has
significant phase noise the PLL may not lock as required.

I am currently on holiday in Venice, will be back in a few days and will get back to you
in more detail regarding the temp compensation. The basic idea is you log the temperature versus position over a nights session while focusing manually at
intervals. This data allows you to work out the coefficent of expansion of the scope
in units of steps/degree. The expansion coefficent is then input to your software of
choice to perform compensation automatically.

Cheers,

Dave
Reply With Quote
  #250  
Old 23-08-2014, 10:58 AM
wasyoungonce's Avatar
wasyoungonce (Brendan)
Certified Village Idiot

wasyoungonce is offline
 
Join Date: Jul 2006
Location: Mexico city (Melb), Australia
Posts: 2,338
Alistair...did you conformal coat the PCB?

I coated the bottom with spray and used touch-up brush around the top coating all exposed component legs etc.

Just good practice to do so. Oh don't get it in your connectors and just check your DC socket and jack have the same sized centre pins. That said...I have seen a new range of DC jacks that can accept 2.1 and 2.5mm centre pin DC plugs...nice!

Dave...Venice....oh some people have all the luck slumming it!
Reply With Quote
  #251  
Old 30-08-2014, 01:06 AM
ernesto
Registered User

ernesto is offline
 
Join Date: Jul 2014
Location: Buenos Aires, Argentina
Posts: 3
Problem with Bootloader feature

Hello, this is my first post here. My name is Ernesto and I live in Buenos Aires, Argentina.

First of all, I would like to say thanks to Dave for this very, very nice project (the best project I saw at this point related with my astro gear….) and all of this forum members for share your experiences.

I have built a controller based on the PIC18F4550 schematic found in the http://www.dt-space.co.uk/SharpSky/ page.
It is working very well, running with my setup (by the way: GSO 200 F4 OTA, Cooled Canon 400 XTi with IR filter removed, Lodestar for OAG guiding, NEQ6 mount with EQmod, MaximDL for acquisition).
I’m using a very cheap stepper motor attached to the reduction shaft of the focuser (shaft adapter made on a piece of aluminum) and it is working (unexpectedly for me!) very well, even autofocus and temperature compensation.

The only problem I have is with the PIC Bootloader function: when I follow the instructions (power up the controller with the pushbutton pressed) the PIC doesn't go to the bootloader state.
The LED attached to the PIN 20 lights and remains steady, and the controller is recognized as a HID device.

I noticed there are two .HEX codes on the page: one named ShapSky_4550.hex and other named SharpSky_3.1.hex (the last one from the ShapSky.zip file).
I tried with both hex codes on my board, but both of them are showing the same behavior.
I have also noted that the ShapSky_4550.hex code apparently starts at position 1000, while the SharpSky_3.1.hex code apparently starts at position 0800 (both addresses are related with the bootloader function…).

Other concern I have is that when I compile the project SharpSky.mcp, I don’t obtain neither the ShapSky_4550.hex nor the SharpSky_3.1.hex codes, but other different hex code.
My intention is to work with the right .mcp project and have the bootloader function working OK because I would like to introduce some additional features to the PIC code to control some of the functions of my camera cooler and the usb bootloader feature makes things easier.

It is important to say that I’m not an expert programmer, I’m not a young guy and this is my first try with PIC programming, but all of that is part of the fun for me…..

I’m sure that I’m doing something stupidly wrong, but I have tried different things and, so far, the bootloader function doesn't work.
Despite of this, everything is working very well.

Once again: thank you for this great project and thank you in advanced for your help.

My best regards,
Ernesto.
Reply With Quote
  #252  
Old 30-08-2014, 09:32 AM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 644
I don't have any specific knowledge of this project but the PIC18F4550 has a protected boot address from 0000-07FF if the code you are writing starts at 0800 then you're not writing anything to the bootloader. You will need a program that runs in the 0000-07FF space if you currently don't have a working bootloader, and that's kind of the point, 2 programs running on the same chip where one can program the other.

Also of note is that it is incredibly difficult to get the same hex output when compiling code on a different platform. Different versions of the compiler or different compile time flags will product very different code which may still work exactly the same.
Reply With Quote
  #253  
Old 30-08-2014, 01:12 PM
alistairsam's Avatar
alistairsam
Registered User

alistairsam is offline
 
Join Date: Nov 2009
Location: Box Hill North, Vic
Posts: 1,837
Quote:
Originally Posted by wasyoungonce View Post
Alistair...did you conformal coat the PCB?

I coated the bottom with spray and used touch-up brush around the top coating all exposed component legs etc.

Just good practice to do so. Oh don't get it in your connectors and just check your DC socket and jack have the same sized centre pins. That said...I have seen a new range of DC jacks that can accept 2.1 and 2.5mm centre pin DC plugs...nice!

Dave...Venice....oh some people have all the luck slumming it!
Thanks Brendan, Dave, I havent used the spray. that must be it. Got it from jaycar, will give it a go.

Cheers
Alistair
Reply With Quote
  #254  
Old 30-08-2014, 05:23 PM
mill's Avatar
mill (Martin)
sword collector

mill is offline
 
Join Date: Oct 2006
Location: Mount Evelyn
Posts: 2,922
I have just finished making the sharpsky focusser so it can handle 6Amps instead of 500mA by using 4 tip 41C's and 4 4001 diodes as spike protection.
The tip41 base of each is connected to the respective output of the uln2003.
All four emitters are connected to ground and the collectors to the coils of the motor.
See picture below.
just use the right bit of the schematic so only the transistors and diodes are necessary.
Attached Thumbnails
Click for full-size image (stepper.gif)
6.7 KB32 views
Reply With Quote
  #255  
Old 31-08-2014, 08:54 AM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 644
What's the benefit of that? Are you maxing out the torque on the stepper?
Reply With Quote
  #256  
Old 31-08-2014, 09:40 AM
mill's Avatar
mill (Martin)
sword collector

mill is offline
 
Join Date: Oct 2006
Location: Mount Evelyn
Posts: 2,922
I am running nema17 steppers and they pull 1Amp per coil, the ULN2003 can only have 500mAmp and will fail when doing a focusing run.
Also this way i can take any stepper without problems.
The steppers that are sold with autofocus systems are normally pulling about 300-400mAmp max.
I also have changed my GC-usb stepper controller so it now controls a L298N board and can deliver 2Amps continuously.
By using about $10.00 in parts i will save two focus controllers in case something goes wrong with the motors.
To use the L298N board, i had to make the unipolar stepper into a bipolar stepper.
See here for the board --->>> http://www.ebay.com.au/itm/161340669...84.m1439.l2649
Reply With Quote
  #257  
Old 31-08-2014, 11:04 AM
ernesto
Registered User

ernesto is offline
 
Join Date: Jul 2014
Location: Buenos Aires, Argentina
Posts: 3
Hello Chris, thank you for your comments.
You are right about how the bootloader and the protected boot addresses work.

It is also correct that two different versions of the same compiler (even the same compiler, because some things like the optimization features can be enabled or not) will produce different hex codes and both of them will work as intended. My initial doubt was about if the mcp project was the source used to build the SharpSky_4550.hex or if it was used for other firmware release.
I believe that this .mcp doesn’t correspond to the SharpSky_4550.hex, because compiling that project doesn’t produce (at least for me) a .hex code that works properly with my board, as the SharpSky_4550.hex does.

Anyway, before going to do any modification to the code (that job will be a long trip for me…), my first two problems are that I can’t make the bootloader function works as intended (pressing the pushbutton and turning on the controller) and that I’m not sure if the .mcp file reflects the current firmware code or not.

When I program the PIC 18F4550 with the SharpSky_4550.hex file, all things work perfectly (manual control, usb communication to an ASCOM enabled program like MaximDL and Focusmax, temperature compensation) and only the bootloader function doesn’t work.
I’m not sure if the SharpSky_4550.hex supports the usb bootloader or not or if I’m doing something wrong.

So, summarizing my very long (and surely confusing comment, remember that I don’t speak English…) my two questions are:
_ Does the SharpSky_4550.hex support the usb bootloader feature?
_ Was the .mcp file the project file used to build that .hex code?

My best regards,
Ernesto.
Reply With Quote
  #258  
Old 02-09-2014, 06:17 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 644
I don't know enough about the project to say anything conclusively but it appears as though the SharpSky_4550.hex file is designed to be flashed via the bootloader software. If this is the case then it can not possibly include a bootloader itself because the entire principle of a bootloader is that it can write program memory not assigned to itself.

Anyway a bit of searching and it looks like you need to get MCHPUSB flashed on your chip first. What I don't know is if there was any customisation done to MCHPUSB or if you can simply follow any of the online guides of how to do it. It would depend on the hardware (specifically the pushbutton to fire up the bootloader). Then once the bootloader is working you should be able to use the bootloader software to flash SharpSky_4550.hex

Hopefully someone more familiar with the project can chime in. This is about where my knowledge with PIC comes to an end.
Reply With Quote
  #259  
Old 02-09-2014, 08:36 PM
wasyoungonce's Avatar
wasyoungonce (Brendan)
Certified Village Idiot

wasyoungonce is offline
 
Join Date: Jul 2006
Location: Mexico city (Melb), Australia
Posts: 2,338
Quote:
Originally Posted by Garbz View Post
......Anyway a bit of searching and it looks like you need to get MCHPUSB flashed on your chip first. .......
Yep this. I believe the PIC18F2550 uses a HID boot loader and the PIC 18F4550 used MCHPUSB boot loader. I believe the MCHPUSB is the generic Microchip one.

Dave Trewren might be best to ask about this.
Reply With Quote
  #260  
Old 04-09-2014, 12:34 PM
ernesto
Registered User

ernesto is offline
 
Join Date: Jul 2014
Location: Buenos Aires, Argentina
Posts: 3
Quote:
Originally Posted by wasyoungonce View Post
Yep this. I believe the PIC18F2550 uses a HID boot loader and the PIC 18F4550 used MCHPUSB boot loader. I believe the MCHPUSB is the generic Microchip one.

Dave Trewren might be best to ask about this.
Yes, you and Garbz are right.
Last weekend I was able to make the bootloader works and load a simple program that I wrote. But, when I try loading the SharpSky code something fail. I believe that I'm missing some details with the configuration bits or something similar....I need to study a bit more .

My best regards,
Ernesto.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time is now 08:45 PM.

Powered by vBulletin Version 3.8.7 | Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Advertisement
Bintel
Advertisement
Testar
Advertisement