Welcome! Log In Create A New Profile

Advanced

Generation 7 Electronics Development

Posted by Traumflug 
Re: Generation 7 Electronics Development
December 27, 2012 12:49AM
Liking the ARM one in front, but as interim the one behind it with onboard USB interests me more... (not the usb expansion or ftdi)... details? Mc2200? Board?
Re: Generation 7 Electronics Development
December 27, 2012 12:04PM
For pricing and purchase details, see [reprap-diy.com]

The USB adapter is a MCP2200. While SMD, it comes with a pin spacing of 1.2mm, so its easily hand-solderable. I hope I can add a few more pictures on how to do it on the wiki page, soon.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Generation 7 Electronics Development
December 28, 2012 10:36AM
Traumflug Wrote:
-------------------------------------------------------
> There's a new child in the Gen7 family:

Looking awesome, as always!

I am just working on next iteration of sango-bc. I was using a Cortex M0 from STM, but I think it would make sense to switch to LPC1114. Hopefully identical software would run on Gen7-ARM or sango-bc. There is an upgrade path to Cortex M3 and USB (e.g. LPC1343), although the peripheral registers in LPC111x and LPC134x are not directly compatible.

> Now I'm wondering how Arduino IDE responds to an
> ARM Cortex-M0 ...

I imagine it says "what the heck is that?" winking smiley Teensy 3.0 which is a Cortex M4 has some compatibility wuth Arduino IDE, not sure how they did it. I admit I have only used the Arduino IDE once so don't know much about it.
Re: Generation 7 Electronics Development
December 28, 2012 04:12PM
I see the mcp2200 does not have DTR? Can i still upload firmware with it?

Peter
Re: Generation 7 Electronics Development
January 01, 2013 06:39AM
Quote

I see the mcp2200 does not have DTR? Can i still upload firmware with it?

Auto-reset is connected to RTS and works just fine.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Generation 7 Electronics Development
January 01, 2013 06:46AM
Awesome! Etched 4 of the new 1.5AVRs to replace my gen7 1.3, ramps, gen7 1.4 and sanguinololu... time for my botfarm to standardise, and I am picking the Gen 7 1.5...

Each of the 4 bots will run my lcd/sd expansion too.

Ps Traumflug, you are more than welcome to add them to your stocklist if you wish... see at as my donation to all the wonderful work you do and the help you have given me on the forums this past year
Re: Generation 7 Electronics Development
January 02, 2013 09:17AM
Okay so bought MCP2200s but cannot get it to work

Using all parts from the BOM I exported off gEDA, exact same values

When I plug it in: enumeration errors in dmesg:

[418285.137040] hub 5-0:1.0: unable to enumerate USB device on port 1
[418292.410034] usb 5-1: new low-speed USB device number 47 using uhci_hcd
[418292.524024] usb 5-1: device descriptor read/64, error -71
[418292.739026] usb 5-1: device descriptor read/64, error -71
[418292.942034] usb 5-1: new low-speed USB device number 48 using uhci_hcd
[418293.056024] usb 5-1: device descriptor read/64, error -71
[418293.271039] usb 5-1: device descriptor read/64, error -71
[418293.474034] usb 5-1: new low-speed USB device number 49 using uhci_hcd
[418293.884020] usb 5-1: device not accepting address 49, error -71
[418293.986032] usb 5-1: new low-speed USB device number 50 using uhci_hcd
[418294.395020] usb 5-1: device not accepting address 50, error -71
[418294.395046] hub 5-0:1.0: unable to enumerate USB device on port 1
[418442.656370] ehci_hcd 0000:00:1d.7: remove, state 4
[418442.656378] usb usb1: USB disconnect, device number 1
[418442.661275] ehci_hcd 0000:00:1d.7: USB bus 1 deregistered
[418449.711020] usb 5-1: new low-speed USB device number 51 using uhci_hcd
[418449.825029] usb 5-1: device descriptor read/64, error -71
[418450.040100] usb 5-1: device descriptor read/64, error -71
[418450.192047] hub 5-0:1.0: unable to enumerate USB device on port 1
[418457.910021] usb 5-1: new low-speed USB device number 53 using uhci_hcd
[418458.024026] usb 5-1: device descriptor read/64, error -71
[418458.188048] hub 5-0:1.0: unable to enumerate USB device on port 1
[418458.410030] usb 5-1: new low-speed USB device number 54 using uhci_hcd
[418458.473056] hub 5-0:1.0: unable to enumerate USB device on port 1
[418458.910025] usb 5-1: new low-speed USB device number 55 using uhci_hcd
[418459.023028] usb 5-1: device descriptor read/64, error -71
[418459.237025] usb 5-1: device descriptor read/64, error -71
[418459.440030] usb 5-1: new low-speed USB device number 56 using uhci_hcd
[418459.553028] usb 5-1: device descriptor read/64, error -71
[418459.767029] usb 5-1: device descriptor read/64, error -71
[418459.970034] usb 5-1: new low-speed USB device number 57 using uhci_hcd


Checked soldering twice...

Peter
Re: Generation 7 Electronics Development
January 02, 2013 08:30PM
I think the MCP2200 should be a full speed device, but the log suggests it has found a low speed device. Full speed is indicated by a pullup on the D+ line. That suggests to me that the MCP2200 is not being powered or has no clock.

I would check for 5V on VDD and 3.3V on vbus initially, maybe you have done that already. A scope on the clock, and D+ / D- might be useful too.
Re: Generation 7 Electronics Development
January 03, 2013 01:26AM
VDD=4.93v
VUSB=3.22v
D+=0.44v

Unfortunately I do not have a scope...
Re: Generation 7 Electronics Development
January 03, 2013 05:23AM
VDD and VBus look ok, D+ suggests the USB connection is in a reset/disconnected state which we already suspected. I would expect that D- also measures around 0V.

Normally I would look at the data lines with a scope, even without decoding the bits, the general pattern can tell you how far it is getting. It looks to me like the PC is detecting the USB device, but is never able to read any data from the MCP2200. AFAIK, the MCP2200 is ready configured with the right device descriptors etc and should be plug and play.

I guess also your system has the cdc_acm driver [ww1.microchip.com]
Re: Generation 7 Electronics Development
January 03, 2013 03:55PM
Yes, driver is working, been playing with AVR-CDC (recursion.jp) on ATTiny2313 for a while - sadly it tops out at 38400bps

[peter@IT-LDAP ~]$ lsmod | grep cdc
cdc_acm 28704 0
[peter@IT-LDAP ~]$

Using the same batch of 12Mhz crystals I was using with the ATTiny's too, so know they are correct.

checked the reset pin too.. pullup of 10k to 5v..

The top side of the resistor in respect to ground is 4.94v, after the 10k at the MCP2200s reset pin it's 4.89v

small differences from this morning, D+ at 0.48v and D- 0.72v

do not have access to a scope to check crystal swing or USB signals, unfortunately.. will try replacing crystal with another

peter
Re: Generation 7 Electronics Development
January 03, 2013 07:55PM
The voltages seem to check out ok, as far as it goes.

I have been looking at the data sheet for MCP2200 and PIC18F14K50 (MCP2200 is a pre-programmed PIC), and consulting the googleweb. I can't see how the self-powered mode is supposed to work, there seems to be some functionality missing. There also seems to be some reports of unreliable behaviour, host not detecting the MCP2200.

Bus-powered mode is easy, when the device is connected it gets power, pullup on the data line signals the mode, and the host chats to the device. As far as I can see, most people are using this mode.

In bus powered mode, the device should not back feed power to the host if the host is off (VBUS is low). So the device should only enable the pullup when it detects VBUS is high. Additionally, if the device detects no activity from the host, it should go into suspend mode, with D+ and D- inactive.

The MCP2200 has internal pullup, but in the recommended schematic there is no way for the MCP2200 to detect VBUS, it is not connected. So I can't see how it is supposed to work! Either Microchip have goofed, or more likely something is not documented in the datasheet. Or maybe I am stupid winking smiley

You could try putting an external pullup on the D+ line, it needs to be 1.5k to VDD. That is probably not the right solution, but might at least get the chip talking. Otherwise, I would try powering the MCP2200 from VBUS, disconnecting the external 5V. That might take a little hacking of the board.
Re: Generation 7 Electronics Development
January 04, 2013 02:33AM
Thanks for all the help... the magic smoke came out around midnight last night... so must have been a etching or soldering goof on my side

Soldered up the second one - enumerated immediately. now time to test this Gen 7 v1.5 for reliability!

Peter
Re: Generation 7 Electronics Development
January 04, 2013 06:37AM
Quote
bobc
I can't see how the self-powered mode is supposed to work, there seems to be some functionality missing.

Well, you simply feed the chip from a voltage source different than the USB connector. The 5V wire on the USB connector isn't connected to anything. I've choosen this because I want the device to go away when the printer is turned off (not even standby).

For my part, I can't see how this _doesn't_ work, because this 5V on the bus is just a wire providing 5V. Not more, not less. Maybe I'm missing something.

Quote
peter 6960
Soldered up the second one - enumerated immediately.

Glad to see you have the same experience as me, at least this time. I made three of these adapters and all of them worked on the spot.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Generation 7 Electronics Development
January 04, 2013 11:05AM
Traumflug Wrote:
-------------------------------------------------------
> Well, you simply feed the chip from a voltage
> source different than the USB connector. The 5V
> wire on the USB connector isn't connected to
> anything. I've choosen this because I want the
> device to go away when the printer is turned off
> (not even standby).

Sure that's fine, you have followed the datasheet.

> For my part, I can't see how this _doesn't_ work,
> because this 5V on the bus is just a wire
> providing 5V. Not more, not less. Maybe I'm
> missing something.

Yes, I think I already explained it earlier. It isn't just a source of 5V, it also tells the device that the host is powered on. Maybe this will help:

Quote

Back-power: “Self-powered” USB devices can also have their own power problems. Since self-powered devices have their own independent power supplies, they can be ON while the host is turned OFF. This causes a potential problem where the small pull-up voltage applied to D+ to enable USB device detection slowly charges up the entire host system and interferes with startup. Self-powered USB devices (including battery-powered devices) must either drive this pull-up directly from VBUS or turn it off via software control using a VBUS sensor.

The device may not conform to the letter of the USB spec in some rare cases, but if Microchip are ignoring VBUS and it works anyway I guess it doesn't matter!

This is a great chip though, really useful addition. Next time we implement USB at work, I think I will recommend this and save myself a lot of work winking smiley
Re: Generation 7 Electronics Development
January 05, 2013 08:11AM
Hmm. OK, with this back-power you make a point. Let's hope PC side USB electronics is protected against such things. smiling smiley


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Generation 7 Electronics Development
January 05, 2013 08:30AM
Finished quite a few prints... I'd say its more reliable than I had with the 1.4.1 and a Spark fun FTDI breakout. Had CRC issues if the adapter moved on the header pins of the gen7 ..

Liking the fact that I can change device descriptor so easily. Now less guessing to know if I just plugged in bot1/2 or 3.

Also the enumerate on power on takes some getting used to, but once used to it not too bad.A Reenumerate button that resets the chip might be a good addition, my big PSUs take a while to discharge caps so if I have to its a process of power down wait power on, dmesg to check enumeration...

But so far no failed connects etc. Neat!
Re: Generation 7 Electronics Development
January 06, 2013 08:30AM
As you apparently have this microchip configuration tool running, did you manage to get the Rx and Tx LEDs working? I admit I didn't try on my own so far, as this tool doesn't run on Linux with Wine.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Generation 7 Electronics Development
January 06, 2013 08:33AM
Yes...

I ticked Enable RX/tax LEDs
Untucked enable CTS/RTS - with it ticked auto reset did not work.

Circuit spot on. Works out of the box...
Re: Generation 7 Electronics Development
January 11, 2013 01:47PM
Like the v1.5 with USB built in. Now if I can just figure out geda.
Re: Generation 7 Electronics Development
January 11, 2013 09:24PM
Quote
Annirak
For the cost of two resistors, an LED and a transistor, you can have 100% resolution across the measurable range. All you need is a current source to feed the thermistor.

The graph of resistance against temperature is logarithmic, i.e. very non linear. The effect of measuring with a potential divider actually makes it more linear, so using a constant current source is a bad idea. I.e. you don't want a linear measurement of resistance, you want a linear measurement of temperature. See [hydraraptor.blogspot.co.uk].

Quote
Traumflug
But how would we convice the hotend makers to put a diode into their work instead of a n thermistor?

Max junction temperature for1N4148 is 200C, so hopefully you wont. It would work for a bed though.


[www.hydraraptor.blogspot.com]
Re: Generation 7 Electronics Development
January 15, 2013 04:10AM
nophead Wrote:
-------------------------------------------------------
> > For the cost of two resistors, an LED and a
> transistor, you can have 100% resolution across
> the measurable range. All you need is a current
> source to feed the thermistor.
>
>
> The graph of resistance against temperature is
> logarithmic, i.e. very non linear. The effect of
> measuring with a potential divider actually makes
> it more linear, so using a constant current source
> is a bad idea. I.e. you don't want a linear
> measurement of resistance, you want a linear
> measurement of temperature. See
> [hydraraptor.blogspot.co.uk]
> g-temperature-easy-way.html.

Hmm. I would say exponential, but that's only a matter of axis translation.

I looked into it more after I posted that. It appears I never posted any of my results, which probably means that I never finished the job. I concluded that the optimal solution is probably a log-amp. Still not expensive, but now it's up to two actives and about 4 discretes. This doesn't seem necessary, since the two-resistor circuit does the job well enough. I might build it into my electronics eventually anyway, just for fun.
VDX
Re: Generation 7 Electronics Development
January 15, 2013 04:23AM
... the biggest problem with current temperature measuring/controlling is the poor resolution of the analog inputs.

For a special gas sensor, that measures the concentraton of binary gas mixtures with resoultions/accuracies upt to some single ppm's (='Parts Per Million' or accuracies of 0.0001 percents!) we developed the electronics around a C-51 core with 24Bit-ADC's and Ni200 as quasi-linear or PT100 as linear sensors.

Then we could measure and PID-control the temperatures of a heated housing and the sensor membrane with accuracies of 0.001 degC!

When interested, I can search the specs, schematics and software-snippets of the temp.-circuitry and PID-algorhytms ... should have it somewhere in my backups ...

*** EDIT: found an image showing the temperature controlling of the sensor housing (block of steel, 40x30x20mm big) to 60degC with a gas flow changing regularly (the peaks), so the PID had to adjust the heating to the varying 'cooling' effect ...



Edited 2 time(s). Last edit at 01/15/2013 04:50AM by VDX.


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Generation 7 Electronics Development
January 15, 2013 07:45AM
Quote

... the biggest problem with current temperature measuring/controlling is the poor resolution of the analog inputs.

That's right. Luckily, we need stable temperatures in a pretty small range only.

Looking at [reprap.org] one can see the non-linearity can be a positive property. It can be adjusted to enhance resolution in the critical ranges while keeping other ranges still functional. Simple change of a resistor.

The simple reason I didn't change the 4k7 resistor for a smaller one is, this also requires an adjusted thermistor table. Not a mechanism for making the tables or praise about the enhanced accuracy would be the result, but loud cries like "temperatures on Gen7 don't work".

Sorry, we're RepRap here. Before enhancing anything one has to convince the RepRap gods and make things look like it's their idea.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
VDX
Re: Generation 7 Electronics Development
January 15, 2013 08:01AM
... uhmmm ... because of this pretty small 'critical ranges' i've dropped the nonlinear TC's and use linear sensors and higher measuring resolution ...

I'm using totally different temperature settings for the heaters and ambient - e.g. 60-80 degC for glue-dispensers, 150-300 degC for FDM/FFF or 200-500 degC for SLS and ambient or heat-curing/sintering.

With a ceramic PT100 I can use the same sensor and software from room-temp to 800 degC, with only adjusting the calculation when needing higher accuracies in the range from 300-800 degC (rising nonlinearity with PT).


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Generation 7 Electronics Development
January 15, 2013 03:10PM
@Traumflug,
The best resolution is where the thermistor equals the resistor value. In my example with 10K thermistor and 470R it was at 125C, bang in the middle because I chose the resistor to equal the thermistor's resistance at 125C. In my graphs the slope looks like it only changes about 2 or 3 : 1 and is symmetrical. Why is your example of 100K and 4K7 skewed to the bottom end? Which thermistor is it based on?

Marlin over samples the ADCr, so the actual resolution is only a fraction of a degree even with a 4K7. If I put a thermocouple inside the nozzle and set the temperature in Marlin it agrees to about within about 1C, so it seems more than adequate to me.


[www.hydraraptor.blogspot.com]
Re: Generation 7 Electronics Development
January 16, 2013 04:06AM
VDX Wrote:
-------------------------------------------------------
> ... uhmmm ... because of this pretty small
> 'critical ranges' i've dropped the nonlinear TC's
> and use linear sensors and higher measuring
> resolution ...

@VDX,
Given that I have a reel of 500 ft. of type K thermocouple wire, would you suggest using thermocouples instead of RTDs?
VDX
Re: Generation 7 Electronics Development
January 16, 2013 04:20AM
... thank you for the offer! - I'm happy with the PT100's sensing range, linearity and achievable accuracies, so no actual needs for TK's winking smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Generation 7 Electronics Development
January 16, 2013 06:11AM
Quote

The best resolution is where the thermistor equals the resistor value.

Exactly.

Quote

In my graphs the slope looks like it only changes about 2 or 3 : 1 and is symmetrical. Why is your example of 100K and 4K7 skewed to the bottom end? Which thermistor is it based on?

It's based on a 100k thermistor. Not sure what you mean with "skew". To me, your graphs look pretty much like mine. The blue line matches your first graph, the green line the other two graphs. The pink line shows the resolution, which is the steepness of the green line.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Generation 7 Electronics Development
January 16, 2013 07:18AM
By skew I mean your best accuracy is at 100C instead of 125C and the slope goes much flatter at the top end than the bottom, whereas mine was centred at 125C and the slopes at the top and the bottom ends are the same and less shallow. I.e. there is less change in resolution.


[www.hydraraptor.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login