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

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average.
  #61  
Old 09-05-2014, 11:16 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Definitely the only thing missing from making this an Arduino is loading the Arduino bootloader. But the question is what would that really bring?

The ATMEGA32U4 comes pre-loaded with the DFU bootloader from Atmel. So there's already an easy way to program the thing (this tripped me up at first because I connected my usual programmer to it and it complained that the program lock fuses were set which I thought was strange out of the box). In the end I ended up loading LUFA onto the chip though as with minor code change it allows me to use a single button on the PCB for reset and programming. Tap the button initiates a microcontroller reset, hold it down for 2 seconds drops it into the bootload waiting for a new program.

avr-gcc and avr-cpp already offer a full library for programming and compiling in both languages so the only thing the Arduino system would bring is the associated functions that make Arduino so friendly to the user, but they are bloated to all heck.
For example on an arduino: digitalWrite(1, HIGH); takes 55 clock cycles to complete.
On the other hand in C: PORTD |= (1<<PIN1); or __asm__("sbr portd,1"); both take 2 cycles to complete. There's no arguing though the former is easier to understand for the novice.
Reply With Quote
  #62  
Old 10-05-2014, 08:08 AM
rcheshire's Avatar
rcheshire (Rowland)
Registered User

rcheshire is offline
 
Join Date: Apr 2010
Location: Geelong
Posts: 2,617
I guess that's why the Teensy is primarily geared to C++. I was thinking toward a small SMD version of the cooling circuit and how I might load the right bootloader, without the preloaded factory stuff. Another project....
Reply With Quote
  #63  
Old 11-05-2014, 11:43 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
I don't have any experience with the Teensy but it looks like it has preloaded a bootloader called HalfKay. Unless you want to turn the Teensy into an Arduino it shouldn't matter which bootloader you use. The key differences is the Arduino bootloader and platform are designed to run over a serial port or virtual serial port. HalfKay, and Atmel's own DFU bootloaders are designed to run straight over USB.

Ultimately it changes what utility you can use to upload something, though if you want to use the Arduino platform I think you need to load the Arduino bootloader on the chip.

You can't change the bootloaders without an In-System-Programmer the whole purpose of the bootloader is that is loaded as No-Read-While-Write memory, meaning that the chip shuts down if the bootloader attempts to write itself. So don't count on changing bootloaders unless you have the programming hardware to do it.
Reply With Quote
  #64  
Old 27-05-2014, 11:45 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Circuit boards are in and they are a beauty! Looks like I have some soldering to do.
Attached Thumbnails
Click for full-size image (2014-05-27-21.16.02-1.jpg)
227.6 KB95 views
Reply With Quote
  #65  
Old 22-06-2014, 10:15 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Smoke test today. Everything passed so far. 12V and 5V sections appear to be working, as is the battery backup system. The USB hub comes up on the PC as do both micro-controllers.

Hoping to have at least the dew heater components of this board going before astrofest otherwise it's going to be a very annoying astrofest .
Attached Thumbnails
Click for full-size image (DSC_4144.jpg)
210.6 KB110 views
Reply With Quote
  #66  
Old 22-06-2014, 10:23 PM
h0ughy's Avatar
h0ughy (David)
Moderator

h0ughy is offline
 
Join Date: Apr 2005
Location: NEWCASTLE NSW Australia
Posts: 33,378
hope you get it going chris
Reply With Quote
  #67  
Old 23-06-2014, 08:36 AM
wasyoungonce's Avatar
wasyoungonce (Brendan)
Certified Village Idiot

wasyoungonce is offline
 
Join Date: Jul 2006
Location: Mexico city (Melb), Australia
Posts: 2,357
Already looks a million dollars Chris...well done

Brendan
Reply With Quote
  #68  
Old 23-06-2014, 07:20 PM
bert's Avatar
bert (Brett)
Automation nut

bert is offline
 
Join Date: Mar 2008
Location: Bathurst
Posts: 667
When can I buy one?

Brett
Reply With Quote
  #69  
Old 24-06-2014, 05:55 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Getting ahead of yourself aren't you Brett? We're not even at the stage where I'm 100% sure I won't melt this one into a small puddle of silicon on my desk yet

Actually if all things go well I may consider selling a couple as I have 2 spare boards. But don't hold your breath unless you can do without oxygen for at least 6 months. There's a lot of programming still to do, and I need to design a case. And an interface. And some software.
Reply With Quote
  #70  
Old 03-07-2014, 10:33 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,735
I'm in awe of your electronics skills Chris.
Hey, are you going to hoist a flag with NAND gate circuit or something so we can find you at Astrofest? I guess they won't be much to see other than a black box anyway?
Reply With Quote
  #71  
Old 06-07-2014, 04:52 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
At the rate I'm going what you'll see is a circuit board nailed to a piece of wood with a plastic bag over it.

A flag may be a good idea. Failing that you can probably find me during the day either flying a quadcopter around, or I'll be the guy hanging around the laptops who's not editing my pictures from the night before (my laptop is slower than molasses left outside on an astrofest night).
Reply With Quote
  #72  
Old 08-07-2014, 10:19 PM
RobF's Avatar
RobF (Rob)
Mostly harmless...

RobF is offline
 
Join Date: Jul 2008
Location: Brisbane, Australia
Posts: 5,735
Good plan. I'll be the fellow drinking beer near my mate who will likely be hugging and stroking his EQ8 and new RC12 all week
Reply With Quote
  #73  
Old 15-09-2014, 06:50 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Well it's been a while since an update, but really I've had so many other things to do. Hypertune and beltdrive an EQ6, modify an ED80 for autofocus, who has the time for all this crap

So a quick update on where we're at and my astrofest experience:

Recent mods:
- Replaced top right external 5V regulator with an internal one. It was originally external because I didn't know what load I was going to apply to it and didn't have any parts to make it internal, and extending the boardspace would have cost a fortune. Fortunately I came up with a bolt on regulator which is shown in the top right of the picture below. It still needs a heatsink.
- Also working on the AF module. Firmware is mostly complete. Software is mostly complete. And now I'm writing an ASCOM Focuser driver for it.

Astrofest what worked what didn't:
- It all worked Well mostly worked. But it got me through a treat. We tested the battery fail over with a tripped circuit breaker on the third night. It worked an absolute treat. Except ...
- The "PWR FAIL" alarm was red on windows grey colour scheme. The problem with that is that when you put a red gel over the screen you can't see the alarm. Fixed that it's now a dark red.
- The environmental monitor was picking up internal heating as was the focuser temperature. Both registered about 4deg above the actual temperature so I'm revisiting the mounting locations of these.
- The controller locked up when I fired up my camera once. I then realised the only time it did so was when I didn't have a battery connected. Turns out turning on the TEC on the camera draws a sudden inrush current which is enough to drag the main powersupply down to the drop out voltage of my microcontroller causing it to reset. I resolved this issue by turning off brownout detection, however I still have an issue where if I don't have a battery connected and I turn on the TEC I get a brief power fail alarm. So brief that it really is just a log that power did fail at one point. I'm tempted to configure it to ignore the power fail if it doesn't activate for more than 200ms or something.

Otherwise my little creation did not miss a beat. Even when I tried to accidentally short it out it survived miraculously after sparking a bit.

Anyway back to visual studio. ASCOM awaits.
Attached Thumbnails
Click for full-size image (P9154062.jpg)
193.3 KB123 views
Reply With Quote
  #74  
Old 16-09-2014, 03:23 PM
wasyoungonce's Avatar
wasyoungonce (Brendan)
Certified Village Idiot

wasyoungonce is offline
 
Join Date: Jul 2006
Location: Mexico city (Melb), Australia
Posts: 2,357
Hi Chris...looks great....you must be really hammering the DEW control cct with that test load!

Meant to ask...soldered by hand?
Reply With Quote
  #75  
Old 18-09-2014, 08:04 AM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Hahahaha, yes that test load was a visual indicator that the timing circuit was working. :-)

Yes soldered by hand, a lot of people couldn't believe it but it is actually very easy to do using nothing other than flux, a soldering iron, and some solder wick. Put the component down, load it with solder, then wick as much off as you can, cover in flux and heat one final time. That makes a very clean connection with all solder under the pads and nothing on top.

The hardest part about it is to line up the components, especially the USB chips on the left which didn't line up properly with the footprint.
Reply With Quote
  #76  
Old 20-09-2014, 10:10 PM
RickS's Avatar
RickS (Rick)
PI cult recruiter

RickS is offline
 
Join Date: Apr 2010
Location: Brisbane
Posts: 10,584
So you didn't use lead free solder, Chris?
Reply With Quote
  #77  
Old 21-09-2014, 08:40 AM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Quote:
Originally Posted by RickS View Post
So you didn't use lead free solder, Chris?
Hell no. That stuff is a home manufacturing nightmare. I have trouble even with some RoHS compliant components which come with pre-tinned leads. Nothing surface mount thankfully but it happened a lot with through-hole components. At low temperatures the solder wouldn't stick and at high temperatures you kill the part. Not cool.
Reply With Quote
  #78  
Old 21-09-2014, 04:01 PM
wasyoungonce's Avatar
wasyoungonce (Brendan)
Certified Village Idiot

wasyoungonce is offline
 
Join Date: Jul 2006
Location: Mexico city (Melb), Australia
Posts: 2,357
Quote:
Originally Posted by Garbz View Post
Hell no. That stuff is a home manufacturing nightmare. ....
Amen to that.
Reply With Quote
  #79  
Old 21-09-2014, 04:47 PM
RickS's Avatar
RickS (Rick)
PI cult recruiter

RickS is offline
 
Join Date: Apr 2010
Location: Brisbane
Posts: 10,584
You're lucky you don't have to comply with RoHS 2, REACH, WEEE and USA Conflict Minerals regulations (not to mention FCC, CE, PTCRB and a dozen others...)
Reply With Quote
  #80  
Old 21-09-2014, 09:43 PM
Garbz (Chris)
Registered User

Garbz is offline
 
Join Date: May 2012
Location: Brisbane
Posts: 646
Indeed. But one thing I did need to comply with is...ASCOM Conformity.

And my Focuser driver has just past all the test .

Finally have the focuser working including:

Relative / Absolute positioning, selectable in the settings.
Position Limits.
Temperature Feedback.
Works with FocusMax and with manual Jog controls.

This is something very new to me, but it turns out coding ASCOM drivers is actually very easy.
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 01:24 AM.

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