Hi, is there a schematic somewhere out there for very low noise adjustable power supply? Something like Walt Jung super regulator (but adjustable) with only a few microV output noise?

You get good results with two LM317, one configured as a tracking preregulator, forcing a constant voltage (something like 4 V) over the second regulator. The principle is in the LM317 datasheet, but you need to add the parts for the "improved ripple rejection" (also in the datasheet) to both of the regulators. You could even think about adding LC filtering to both regulators.

Anyone actually had any practical experience with Arduino serial comms using the internal oscillator?Looks like I could make my current project Arduino compatible as-is, the only issue is the use of the internal oscillator.

Why do you need to do this (the serial comms)? You can use the Arduino IDE and program using the USBtinyISP via the 6 SPI pins, which you can break out or get at one way or another (even if you have to program the chip before inserting it onto the board).

It's still "Arduino compatible" - you just need to be aware if you are running at 8 MHz rather than 16 (which is done by a #define in the library) in places that matter, like timing code.

Dave, is this going to be an arduino programming based project or are you going to write the C yourself?

If you program in the Arduino IDE you are "writing C yourself". It just saves you mucking around with a lot of configuration options, Make files etc.

Dave, you should easily be able to fit your project onto the Atmega328 family of chips. Personally I would go for the top of the range: Atmega328 (sold by Element14 for $4.33 in lots of 25+) compared to the Atmega48 ($3.62). For 71 cents difference you get a lot more flash memory, RAM and EEPROM.

If you are running out of interface ports, you can hook up 119 lots of I2C devices to the two I2C pins. Devices like LCD drivers, ADC, IO expanders for keypresses, etc. Even a single 16-port I2C IO expander gives you 16 extra ports which can be individually configured for input or output.

Because that's the "normal" way to program an Arduino board, is it not?

Quote

You can use the Arduino IDE and program using the USBtinyISP via the 6 SPI pins, which you can break out or get at one way or another (even if you have to program the chip before inserting it onto the board).

I didn't know you could do that.That would work on the current board because I have the ISP header on the board.

Quote

It's still "Arduino compatible" - you just need to be aware if you are running at 8 MHz rather than 16 (which is done by a #define in the library) in places that matter, like timing code.

Yes, easy fix.

Quote

If you are running out of interface ports, you can hook up 119 lots of I2C devices to the two I2C pins. Devices like LCD drivers, ADC, IO expanders for keypresses, etc. Even a single 16-port I2C IO expander gives you 16 extra ports which can be individually configured for input or output.

Of course.The only issue is that the board is done.If it happens to need a re-spin, then I can change things however I want, but if I want to run as-is, then I'm stuck with the internal oscillator.Might still be an issue actually because I still have that optional serial interface using the internal oscillator. I've used that no problem with PIC's factory calibrated internal osc before, but not with AVR.

Actually yes, you can use Arduino IDE to compile your program and load the hex file to the target mcu using ISP and whatever programmer you wish. With this way you can save the space the bootloader needs.

The downside is that someone will need a programmer to load it.

My opinion though is that if the frequency shifting doesn't produce baud error bigger than 1% it will be ok. So, now need for changes.

On the 328 the bootloader takes around 2kb of memory, you still have 30k for programing. on the 48 you do not have enough memory. You could use 168 or 238 for the board. The chips are also pincompatible.

Actually yes, you can use Arduino IDE to compile your program and load the hex file to the target mcu using ISP and whatever programmer you wish. With this way you can save the space the bootloader needs.

Of course. I did know that, somewhere up there Shows how much I use Arduino

Quote

The downside is that someone will need a programmer to load it.

Not a huge deal I suspect. Given that the serial interface is an optional board anyway.

Quote

My opinion though is that if the frequency shifting doesn't produce baud error bigger than 1% it will be ok. So, now need for changes.

Yes, 1% is usually enough for reliable serial comms.

I suspect the best solution is to simply re-spin the board and add the 16MHz crystal.With any luck I've goofed something anyway and it'll need a re-spin

Will the design be physically divided into the analogue and uC part ? i.e., separate boards ?

Something tells me, I could use the analogue part as learning experience - but when it comes to uC - I have few things I want to do to make it work for me, something tells me it will differ from whatever someone else will do. Even such a brilliant guy like yourself.

One thing I want, is to have few buttons (3-4) with predefined voltage that I could just bring in with one touch. Likewise for current settings.

Plus, having separate analogue board would mean that you could have few of them not just one

Will the design be physically divided into the analogue and uC part ? i.e., separate boards ?

Something tells me, I could use the analogue part as learning experience - but when it comes to uC - I have few things I want to do to make it work for me, something tells me it will differ from whatever someone else will do. Even such a brilliant guy like yourself.

One thing I want, is to have few buttons (3-4) with predefined voltage that I could just bring in with one touch. Likewise for current settings.

Plus, having separate analogue board would mean that you could have few of them not just one

No, one board, sorry. The serial is separate though. Yes, there are 4 buttons, two of which I was going to use for pre-defined voltages/currents.Everyone will have different needs of course, it's an open design so you can change it any way you like.

I never experienced any problems with the internal clock and serial io. For those who think it is a problem just test it in your oven and deep freezer. Again, no problem on the other side of the planet...

Dave, will the analogue part differ much from what you already designed ?And can you tell us where exactly the serial io and clocks really matter ? I thought this is strictly either PWM, or DAC (some PICs have internal DAC). I do agree that arduino makes things easier. The way I would do it, I would use arduino nano, or arduino pro - and just have pins that will accommodate it.

Can't wait to see what you'll come up with - I'm sure it will be better then our best imagination

Dave, will the analogue part differ much from what you already designed ?And can you tell us where exactly the serial io and clocks really matter ?

The analog core is basically the same, but I have added real 12bit DACs and better current sensing.The serial I/O and clock only matters if I make it Arduino compatible.

Quote

I thought this is strictly either PWM, or DAC (some PICs have internal DAC). I do agree that arduino makes things easier. The way I would do it, I would use arduino nano, or arduino pro - and just have pins that will accommodate it.

That would just increase the cost over just having the micro on it's own.

That would just increase the cost over just having the micro on it's own.

Indeed, but will make programming it and so on so much easier. These things come with usb port, and loader on it already. You can buy arduino nano off ebay for £8. Personally I don't own any uC programmers anymore, arduino and TI MSP LP board do things for me. Design pins for arduino pro, or nano on your board - stick it on - et voile, job done. Nice and simple.

Sure, writing code for the arduino is C, but you have to write code for the arduino. If I can just write C and have to think about all the config options (I don't have to mess with make files with AVR Studio), I can write code for the Tiny10 up to the mega2560. Sure, if you want to hack together an experiment, an Arduino is probably a good idea. But for a finished project, an installed uC running straight code (I mean no bootloader) is, in my humble opinion, a proper solution.However, given that this going to be an open source project, I suppose considering an Arduino software environment might be better for the masses.

Indeed, but will make programming it and so on so much easier. These things come with usb port, and loader on it already. You can buy arduino nano off ebay for £8. Personally I don't own any uC programmers anymore, arduino and TI MSP LP board do things for me. Design pins for arduino pro, or nano on your board - stick it on - et voile, job done. Nice and simple.

AU$17 vs <$4 one-off price difference.That translates to a very significant base cost increase on the kit, unless I supply the kit without the Nano or at-cost.

The only difference is that anyone who wants to reprogram must have an ISP programmer of some kind instead of just straight USB. That's not a big deal I suspect. The majority won't want to play with the firmware.

I presume your design doesn't currently have a USB interface, so to program it you either need to use a bootloader with a custom FTDI cable ($20) or via the ISCP header using a custom programmer ($22). Clearly the difference, for people that want to reprogram it, is minimal.

The Optiboot loader, currently used on the Uno (Atmega328) is 512 bytes, not 2Kb. The overhead, out of 32 Kb of program memory is minimal. Particularly since you were talking about using a chip with less memory to start with. Add 70 cents to the chip price and you can afford lots more "bells and whistles" in terms of the onboard code.

You don't need to muck around with hex files, I have personally programmed my "bare bones board" project just using the IDE. You edit the preferences file (once off) to tell it to use the USBtinyISP programmer rather than the bootloader, and then just hit Ctrl+U to compile and upload. Couldn't be simpler.

I would be tentatively planning to go through a calibration phase (to compensate for slight differences in resistor values) and store compensation data in the EEPROM. That way each unit should be pretty accurate. You might also have default "turn on" settings.

Quote

The serial I/O and clock only matters if I make it Arduino compatible.

As I said before, it's Arduino compatible even without that. In fact, if you are using the Atmega48 chip, and have an ICSP header, you would be hard-pressed to not have it Arduino-compatible. The only difference might be the way you write the software. And honestly, why not use the Arduino IDE? The compiler is g++, an industry standard. It generates tight, efficient code. The linker optimizes away stuff you don't need. You don't have to use any of their libraries if you don't want to. But things like the ports are already defined in header files. Interrupts are easy to do.

I presume your design doesn't currently have a USB interface, so to program it you either need to use a bootloader with a custom FTDI cable ($20) or via the ISCP header using a custom programmer ($22). Clearly the difference, for people that want to reprogram it, is minimal.

Yes, but if you use an external programmer then you can use that for other stuff, instead of adding $10+ to the cost of every project you do.If everyone designed kits based around Arduino modules instead of bare chip, then every kit and every project will be at least $10 more expensive. Do people really want that?To me it seems like a waste of cost, in this case a large chunk of the project cost that I'll have to either pass on to buyers, or eat it.

Quote

The Optiboot loader, currently used on the Uno (Atmega328) is 512 bytes, not 2Kb. The overhead, out of 32 Kb of program memory is minimal. Particularly since you were talking about using a chip with less memory to start with. Add 70 cents to the chip price and you can afford lots more "bells and whistles" in terms of the onboard code.

You don't need to muck around with hex files, I have personally programmed my "bare bones board" project just using the IDE. You edit the preferences file (once off) to tell it to use the USBtinyISP programmer rather than the bootloader, and then just hit Ctrl+U to compile and upload. Couldn't be simpler.

I would be tentatively planning to go through a calibration phase (to compensate for slight differences in resistor values) and store compensation data in the EEPROM. That way each unit should be pretty accurate. You might also have default "turn on" settings.

As I said before, it's Arduino compatible even without that. In fact, if you are using the Atmega48 chip, and have an ICSP header, you would be hard-pressed to not have it Arduino-compatible. The only difference might be the way you write the software. And honestly, why not use the Arduino IDE? The compiler is g++, an industry standard. It generates tight, efficient code. The linker optimizes away stuff you don't need. You don't have to use any of their libraries if you don't want to. But things like the ports are already defined in header files. Interrupts are easy to do.

Yes, relax, I'm sold on making it "Arduino compatible", because I don't have to do anything extra to do that.

But no one has yet convinced me that using an existing Arduino module is worth the extra cost.

The "development board" version has a USB port, so yes, it is designed to be as easy as possible for beginners. The bootloader is a program residing in upper memory which is allowed to change the flash memory (various fuse bits configure this). So one way of updating the flash is for the bootloader to kick in at reset time, check for data on the serial port, and if it passes various tests, update the main program memory.

However the hardware also is designed to respond to ICSP programming (using SPI via the ICSP port), and boards like the USBtinyISP convert data from the USB port into the appropriate SPI sequences. The nice thing is that you can still use all the Arduino libraries and (so-called) sketches whether or not you use the bootloader.

So really, the prototyping board is useful for quickly testing a concept, and then you can move to just the chip and whatever support components you need, but still use the development environment.

Yes, but if you use an external programmer then you can use that for other stuff, instead of adding $10+ to the cost of every project you do.If everyone designed kits based around Arduino modules instead of bare chip, then every kit and every project will be at least $10 more expensive. Do people really want that?To me it seems like a waste of cost, in this case a large chunk of the project cost that I'll have to either pass on to buyers, or eat it.

I think we are at cross-purposes here. I am not suggesting using the Arduino board as such. That's $30 compared to $5 for the chip. But you can test out your ideas (as I did with the power supply) by using the board. Quick and easy. But then you take the bare chip, add a resonator maybe, and a few resistors and capacitors, and you are down to a cheap and simple solution.

And you are quite right, using the external programmer, you get to keep the programmer and use it for dozens of projects. That's where buying lots of Arduino "development boards" falls down. You are paying multiple times for the USB interface, which you need once.

I supposed it depends what you mean by "normal". There are quite a few Arduinos ...http://arduino.cc/en/Main/HardwareThe "development board" version has a USB port, so yes, it is designed to be as easy as possible for beginners. The bootloader is a program residing in upper memory which is allowed to change the flash memory (various fuse bits configure this). So one way of updating the flash is for the bootloader to kick in at reset time, check for data on the serial port, and if it passes various tests, update the main program memory.

Yes, "normal" means the development board version, so the user can program with a USB cable in stead of requiring an external board.

Quote

However the hardware also is designed to respond to ICSP programming (using SPI via the ICSP port), and boards like the USBtinyISP convert data from the USB port into the appropriate SPI sequences. The nice thing is that you can still use all the Arduino libraries and (so-called) sketches whether or not you use the bootloader.

So really, the prototyping board is useful for quickly testing a concept, and then you can move to just the chip and whatever support components you need, but still use the development environment.

I think we are at cross-purposes here. I am not suggesting using the Arduino board as such. That's $30 compared to $5 for the chip. But you can test out your ideas (as I did with the power supply) by using the board. Quick and easy. But then you take the bare chip, add a resonator maybe, and a few resistors and capacitors, and you are down to a cheap and simple solution.

That is exactly what I have already done.In my case I have jumped straight to the final design PCB, I'm not just "testing" things, so I have designed with the bare chip with the standard ISP port. So as it stands with the boards I will get in few days, it is "arduino compatible", but you need an external programmer board to program it if you want to modify it.

Quote

And you are quite right, using the external programmer, you get to keep the programmer and use it for dozens of projects. That's where buying lots of Arduino "development boards" falls down. You are paying multiple times for the USB interface, which you need once.

Bingo.Greg suggested I stick on a footprint for an existing Arduino module, and that's what I can't see any sense in doing, it's an expensive solution for a little bit of extra convenience for those who want to play with the firmware.