Welcome! Log In Create A New Profile

Advanced

New to Gen7, not to Microcontrollers

Posted by majic79 
New to Gen7, not to Microcontrollers
November 12, 2013 04:48AM
Hi,

I've mainly been involved with PIC development (etched a few boards) and as I've just built a Foldarap, I decided to have a go at driving it with Gen7 with Marlin firmware. I've redone the design in KiCad (it's what I'm familiar with) and used molex headers everywhere (it makes it easy to manage) and screw terminals for the power (using a 250W fixed 12V power supply). I'm using an ATMega1284P at 20MHz, and I can load a bootloader with my programmer (Avrdude 6 supports using a Pickit2 to program AVR's, awesome!), but I cannot then use the onboard bootloader to program the firmware (I've tried optiboot, Gen7 support bootloaders + others, just refuses to talk - fuses are right, so at a loss there). No big deal, I can use a command line (linux user) and drop the hex file onto the chip without issue. So I've compiled Marlin (best guess) and it talks quite happily to my PC. I suspect there's an issue with the pin configuration though, as it's not driving the hotend (LED doesn't light up) and the bed's permanently live. Is there a guide of any sort out there? I've googled and looked, but not very much information out there.

TIA
Re: New to Gen7, not to Microcontrollers
November 12, 2013 08:18AM
Happy to see you like Generation 7 Electronics.

Regarding your issue, check the voltage on the ATmega pin. If this does change between M104 S0 and M104 S200, you have a short or a missing connection somewhere. Typically, electromagnetic radiation in the environment is sufficient to drive a MOSFET pin, so having the MOSFET open can also mean the gate pin is disconnected.

If the pin doesn't change, it's a Firmware issue (wrong pin configuration) and I'd change forum section and title of the post accordingly.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New to Gen7, not to Microcontrollers
November 12, 2013 09:24AM
Hi Traumflug,

I'm primarily a software engineer (hardware is more of a hobby!) and I couldn't identify any issues looking at the pins.h file in marlin firmware (I've used "#define MOTHERBOARD 13" which should select Gen7 V1.4+ configuration and the diagrams I've seen for arduino pin configuration match that of my schematic and board) I'll have a closer look at the pin configuration for 1284p when I get home - I wonder if there's a mismatch somewhere in the code

A question about the resistors driving the pins of the MOSFETs, do they need to be there? I would have thought that a direct connection from the ATMega to the MOSFET control pin with a 10k pulldown would work fine, this way it's never floating and only comes on when voltage is applied? I can do a quick hack to my board and link the pin directly (no resistors to drive the pin) and have a 10k SMD pulldown with ease - but I've not worked with MOSFETs much (I've usually only used BJT's) and don't want to pop them (I have spares, but I've already smoked one MCP2200 when I managed to reverse the polarity of a 7805 - I don't want to waste too much money!)

Edited 1 time(s). Last edit at 11/12/2013 09:24AM by majic79.
Re: New to Gen7, not to Microcontrollers
November 12, 2013 02:54PM
Well, I checked the electronics, it's good (continuity between pin on the chip and the resistor, plus the right resistance through that and onto the gate pin) and the firmware seems right (pin configuration looks good as far as I can tell). The pin doesn't get driven when I give it the command, so I suspect either the AVR is goosed or there's something wrong with the underlying pin configuration for the 1284p
Re: New to Gen7, not to Microcontrollers
November 12, 2013 06:54PM
Ahh, never mind, I found a tiny solder bridge to earth that was preventing it coming on, I went over my joints with an inspection glass and fixed a couple more that I'd missed on first inspection - all good now, would be nice to have some solder mask, but hey ho!

It works and moves and heats up the head, just a reduced size hotbed to finalise for my foldarap and I'm a happy maker
Re: New to Gen7, not to Microcontrollers
November 13, 2013 05:43AM
Quote

I'm a happy maker

That's what we want to hear smiling smiley Glad you got it worked out.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New to Gen7, not to Microcontrollers
November 13, 2013 10:53AM
Quick question: Is there a reason for a lack of fan control pins? I'm thinking of adding it into my own customisation just so that I can turn on and and off a cooling fan on my hot end and perhaps add some cooling fans to my steppers (although I may just see if heatsinks alone will do)

Starting to realise the benefit of this machine now, I may have to do a quick hack to the print head so that I can add a dremel to it and mill my hot bed with it grinning smiley
Re: New to Gen7, not to Microcontrollers
November 14, 2013 02:12PM
Quote

Is there a reason for a lack of fan control pins?

There is no lack, just no dedicated connector. Ideally, always-on fans are connected directly to the power supply, which is turned on and off by software. Controlled fans are connected to the extension board header, typically with a SevenSwitch in between to allow more than 5V and 20 mA.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: New to Gen7, not to Microcontrollers
November 15, 2013 05:23AM
Ahhh, ok, I'll add the extension board headers into my KiCad design and cut a new board - I think I have space on the board to hack something in temporarily (using a seven switch or similar) but this was attempt no1 and I've laid things out a little different (I think I'll put my KiCad design on github) trying to save as much space as possible
Re: New to Gen7, not to Microcontrollers
November 17, 2013 05:55PM
Well, have had a successful weekend calibrating and testing my machine - I'm now happily printing in plastics, I've made my own heatbed to go with it (had some serious trouble with your maths Traumflug, decided it was better to do my design without beer, then it worked!)



this was plain copperclad FR4, I have a Seno Phenolac applicator that covers the board in a light sensitive chemical, I printed my design onto transparency and developed it as normal - some problems where the covering was uneven, but I was able to get a useful heatbed out of it

Tests with some prints went very well



Edited 1 time(s). Last edit at 11/17/2013 05:56PM by majic79.
Sorry, only registered users may post in this forum.

Click here to login