Am LM317 voltage regulator and a pot will provide the same functionality for a buck or two. See an LM317 data sheet for the configuration as a constant current source.
Agreed, I don't think a buck is appropriate here.
Unfortunately the LM317 has a minimum output voltage of 1.25V and a minimum load current of 10mA so isn't suitable.
The LM317
L will do for the constant current source, as it can reliably work down to 4mA.
There is a workaround for the minimum voltage but I doubt it's worth it in this case.
A lm317 wastes lots of power.
How do you plan to power this circuit?
Unless it's a small battery I can't see power dissipation being a problem. A linear regulator may waste power but even at 24V 20mA is only 480mW which is nothing. Not only is a switching regulator more complicated it's also more noisy. I think linear is the best way to go here.
My plan is to.connect a 500ohm resistor across the output. Apparently it gives you something like 0-20mA. Those professional units cost two or three hundred dollars and even if it costs 40 dollars to make one, im still going to be a happy teen.
The problem with that is the current will vary depending on the load resistance. Change the cable length or device at the end and the current will also change.
What's the maximum load impedance for the 4mA to 20mA current source? Is that it 500 Ohm plus the cable run.
What's the maximum current requirement for the 0 to 10V voltage source? Assuming it's low current (i.e 20mA). An op-amp buffered voltage reference is probably a better option."