Maker Pro
Maker Pro

Digital Pot setup

Why did you rush to buy ten of them?

Hi Chris

I wanted to get on with it, by ordering these components I can at least get on with understanding the theory and having a go. Its no big deal, the price of a coffee!

Anyway, please can you elaborate on your Picaxe theory, especially with what am I going to need! As soon as you can tell me exactly what I need to get then I will order the parts. They will take a couple if days to arrive.

I think the Picaxe looks like the way to go. I have had a quick look on the net.. As for my programming skills, I was the proud owner of a ZX81, a ZX Spectrum , a Commodore Amiga and a BBC Micro back in the 80`sand I also did some Quick Basic programming back in the 90`s so BASIC is my middle name!

Justin
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
You need to take a closer look at the datasheet. The 600ms is the wait time to start the autoscan, not to debounce. Debounce time is listed as 10ms. So any push time more than the debounce time will advance the counter, no problem to advance 6 times for each push.

Did a closer check on the numbers. The debounce time is 12ms(min) for a low(active press) and 1us(min) is needed between activations, so a clock of 50-60Hz for the pulsing would be more than slow enough. This would get you from zero to full speed in less than a second, depending on the debounce circuit you make for the logic.


Justin, You CAN use the AD5228 chips you have.

I'll be happy to design the logic for you, if you want. You'll have to build it yourself. Send me a PM if this is intersting.

TOK ;)

Yup, I read the data sheet again and, as you say, the time required for repetitive pulsing of the Up-Dwn inputs is not related to the 600mS (hold time) required for auto-increment, So, providing a pulse train from a 555 appears to be doable. It won't give Justin the defined 5 speed steps that he wants but it's certainly better than holding buttons down for 8 seconds. Perhaps two 556's would work. The PB connected to 1/2 of the 556 running monostable who's output gates the other half (pulse gen) running astable. That said, a Picaxe would be sooo much better and far more elegant. With a Picaxe it would also be trivial to provide 5 LEDs indicating what speed setting is currently in use.


BTW, why do you want to assist Justin via PM? :confused: Imagine that you're a neophyte. Further imagine that you've been googling forever but you finally found this thread. You read from post 1 to the end, where the information you need disappears into PM oblivion. :eek:

This is an educational forum and PM-ing circuit details off the board is not conducive to furthering the goals of Electronics Point or the education the membership. ;)

JMHO
Chris
 
Ok,

Im still in the dark as what to do next and how.

Chris should I order a PICAXE program card and if so how many pins do i need on the PICAXE ie which type.

Gordon, I cant PM you as I am not able to send PMs to you.

Thanks everyone for the help.


Justin
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
Ok,

Im still in the dark as what to do next and how.

Chris should I order a PICAXE program card and if so how many pins do i need on the PICAXE ie which type.

Gordon, I cant PM you as I am not able to send PMs to you.

Thanks everyone for the help.


Justin

Justin, I'm on my way to get a new cell phone and make a pit stop at my watering hole. Hopefully, my head will be clear enough to respond when I get home later. Actually, I always respond after the watering hole but sometimes I shouldn't have. :D :rolleyes:

Chris
 
I have not used PICAXE, though I use PICs programmed either in C or assembly. I think the idea of using a PICAXE is very good though. Less hardware actually than messing around with an oscillator and counters, and much more flexible in the long run. Basically, all you would need is the PICAXE, the digital POT and two buttons.

Bob
 
On second thought, you don't even need the digital POT with the PICAXE. If it has PWM output, you can produce the 0-5V signal just by filtering a PWM with varying duty-cycle through a simple RC filter. And newer PICs even have a 32 level D/A, which would do this ever more easily. Don't know if the PICs have made it into PICAXE yet though.

Bob
 
Every time my Pc goes ding I run over to it with excitement that an email has come from electronics point with the answer to my question. Each time I am disappointed and I am left even more confused than I was before. An RC filter, Bob? I went over to Google and had to research the RC filter before I thought "hang on!" Ill try once more...

Is there anyone out there who can tell me how to do this in simple layman`s terms,,,,,Like the Knee bone connects to the Shin bone and the Shin bone connects to the foot bone and so on.

Id be really appreciative.

Thanks

Justin:(:confused:
 
Last edited:
Sorry, I got carried away. The point is that once you are using a microctroller, the digital POT becomes an unnecessary part of the equation. There are multiple ways to create a 0 to 5V signal from a microcontroller. And you said your motor controller could be controlled by such a voltage.

The second one I mentioned is the easiest. Some microcontrollers have a D/A with is a digital to anlog converter built in. This lets you set the output on a pin to be one of several analog voltages. For example, the latest PIC microcontrollers (which PICAXEs are built on) contain a D/A that allows 32 voltage steps between 0 and the power supply voltage of the PIC, which can be 5V, so that would work just fine for your application. You just let the pushbuttons select 5 of these voltage steps.

The other way, the first one that I mentioned, is using a feature in the PIC called Pulse Width Modulation or PWM. This puts out a square wave at at specific frequency, while allowing you control what percentage of the time the signal is on, which is called the duty cycle. If you put that waveform through an approprriate resistor and then have a capacitor to ground, the junction will stay at a voltage that is the same fraction of the supply voltage as the duty cycle. I.e. if the duty cycle is set to 50% and the suppply voltage is 5V it will output 2.5V. So this is a poor man's D/A.

You could also use the digital POT chip with the microcontroller, but that would make the hardware more complex than it needs to be.

In any case, the microcontroller solution requires much less hardware than anything you could do without it.

Bob
 
The second one I mentioned is the easiest. Some microcontrollers have a D/A with is a digital to anlog converter built in. This lets you set the output on a pin to be one of several analog voltages. For example, the latest PIC microcontrollers (which PICAXEs are built on) contain a D/A that allows 32 voltage steps between 0 and the power supply voltage of the PIC, which can be 5V, so that would work just fine for your application. You just let the pushbuttons select 5 of these voltage steps.

HI Bob

Thanks for your reply. I like the sound of this. Not only will it do the job for me but it will also mean I get to have a go at playing with programmable chips...

I`m going to be really lazy now, (well not really as I don`t know where to start), can you tell me which chip I need to get.. Ill go Google and try and find it but it only means coming back and asking you guys "is this the one?"

Respectfully

Justin
 
BTW, why do you want to assist Justin via PM? :confused: Imagine that you're a neophyte. Further imagine that you've been googling forever but you finally found this thread. You read from post 1 to the end, where the information you need disappears into PM oblivion. :eek:

This is an educational forum and PM-ing circuit details off the board is not conducive to furthering the goals of Electronics Point or the education the membership. ;)

JMHO
Chris

Sure, but due to all the flak around this, I just wanted to be certain that the solution was wanted. It does take some time to do it, and I had the impression that simple logic was off into the woods. More like, if you can't do it with a microcontroller it's not worth doing.

BTW I was planning to post it here anyway. :D

And I agree, the PM thing got a bit off on the wrong foot, I'll give you that.

TOK ;)
 
Ok, I`ve just spent over an hour on micrchip.com, Now I'm really confused. I joined their forum hoping to post a request for help,,,,,,,,,I could not even find out which discussion group to post in!!!

So Bob, Chris, Gorgon I really need some guidance.

Justin
 
Is there anyone out there who can tell me how to do this in simple layman`s terms,,,,,Like the Knee bone connects to the Shin bone and the Shin bone connects to the foot bone and so on.

Id be really appreciative.

Thanks

Justin:(:confused:

I've done a predesign and come up with a solution using 2x 4017, 2x 4013, and a 74hc132, for both channels(up/down). I need to redraw it and I'll post it tomorrow evening. For this you can use both the AD5228 and the buttons you posted above. Depending on the supply voltage I would think you can use a simple 7805 to power the circuit, since the current draw should be minimal.

TOK ;)
 
I've done a predesign and come up with a solution using 2x 4017, 2x 4013, and a 74hc132, for both channels(up/down). I need to redraw it and I'll post it tomorrow evening. For this you can use both the AD5228 and the buttons you posted above. Depending on the supply voltage I would think you can use a simple 7805 to power the circuit, since the current draw should be minimal.

TOK ;)

Hi Gorgon

That sounds great, I've taken a look at the components you have mentioned and It looks like it may not be rocket science.

I will look forward to tomorrow, I`m off to bed also.

To Bob, I would also be very interested in your design as although the site looks complicated the PIC chip looks like it could have other great features as you mentioned; A LED light to indicate how far up the power scale you were would be brilliant!

Thanks

Justin
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Well, thanks to Bob I was saved from suggesting a larger Picaxe chip than necessary. The attached schematic uses the last generation 08M Picaxe chip. It's an 8 pin DIP and the smallest in their line. It has been replaced with the 08M2 in the same 8 pin DIP. As you can see on the schematic, there were no pins left to provide you with a Down button. I may have been able to get around this by eliminating one of the output pins with clever coding, which would have left it open to be used as an input for the Down button. However, the only reason I posted this schematic and plot is because I drew it before I set out for the watering hole and I wasn't about to just discard my time and effort. Besides, it demonstrates how a "Staircase" ramp works. R2 through R6 form a voltage divider and form the staircase voltages. When the the Up switch is pressed U1-3 goes high and U1-4 goes low. Out=1V. The next press switches U1-4 high and U1-5 low. Out=2V. This sequence is repeated until we reach U1-7. When U1-7 goes high Out= 5V because R2 through R6 are now floating. This circuit was intended to be used with your 0-5V input on your motor controller, thus does not use the AD5228 at all.

Now, getting back to what Bob said about the new 08M2. Yes, it has Digital To Analog (DAC) outputs which I completely forgot about. It will make this staircase circuit unnecessary and free up a sh!t load of pins. I'll draw up what the circuit will look like tonight. I would like to tell you to order a 08M2 but please wait until I've worked out any unforeseen pitfalls that might require the 14M2 14 pin DIP. I want to provide you with 5 LED's that indicate what the voltage/speed setting is at any time.

Chris
 

Attachments

  • AxeStaircase.JPG
    AxeStaircase.JPG
    71.3 KB · Views: 172

CDRIVE

Hauling 10' pipe on a Trek Shift3
Ok, I`ve just spent over an hour on micrchip.com, Now I'm really confused. I joined their forum hoping to post a request for help,,,,,,,,,I could not even find out which discussion group to post in!!!

So Bob, Chris, Gorgon I really need some guidance.

Justin

And don't let anyone tell you that an Arduino or other uC family is as easy to learn and use as a Picaxe, cause it ain't so! But, of course, this is just my opinion ,,,,and anyone else that's used a Picaxe! :D:D

Justin, did you think I was just blowing wind or that I just like to type???? :rolleyes:
If you're going that rout say so now so I don't waste my time. I can tell you with absolute certainty that anything not Picaxe is going to be a h*ll of a harder road to travel.

Justin, are you in the UK? If you are, so is Picaxe. It was born there with the intent of getting young electronics students involved with uC's .
 
Justin, did you think I was just blowing wind or that I just like to type???? :rolleyes:
If you're going that rout say so now so I don't waste my time.

I`m with you all the way Chris and looking forward to your new design. At present, I understand how using the Picaxe seams to be the simplest method with the shallowest of learning curves. However, I can also see that Cocacola as a valid point in terms of using the PIC as there seams to me an endless numbrer of possible designs and actually taking the time to develop the skills initially could prove fruitful in the future.

I think Godgon is also going to come through with a design later today and I can see that Cocacola also has made some great points so it will be fantastic if we also getting an offering from him!

Bob to has mentioned some solutions!

As you mentioned in an earlier post its an educational forum and I can see that ending up with four different ways to do this would be a great finale to what is proving to be a popular question!

As in the past thanks to everyone for their valued contributions.

PS to add a smile to the mix, My AD5228 chips arrived this morning and they are about 3mm * 2.5mm, I think I`m going to have to get on a soldering course!;)
 
Last edited:

CDRIVE

Hauling 10' pipe on a Trek Shift3
<snip> PS to add a smile to the mix, My AD5228 chips arrived this morning and they are about 3mm * 2.5mm, I think I`m going to have to get on a soldering course!;)

Justin, don't practice your soldering technique on the chips. Poor soldering skills can kill them dead.

Chris
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
TSOT-23-8 are pretty small for beginners. Have you soldered surface mount devices previously?

0.65 pitch isn't too bad, but combined with a small package, you need to be careful!
 
In 1979 my group at Digital Equipment Corporation got one of the first VAX-11 780s. It only cost about $1M and had an entire 1Mbyte of that new-fangled semiconductor memory! I worked on the COBOL compiler.

Bob
 
Top