Thanks! I've been thinking that a highly modularized kit (not lots of skill needed to assemble, maybe just time) might be good. Once a program is written and works well for the controller, the ATMega8 chips are only about $1 each, and the STK500 programmer takes less than a second to program the chip, and software is free, but don't tell Microsoft that. Maybe if I assembled a bunch of logic boards (the low power half), and cut the bus bars (the heavy copper B-, B+, and M-) for the controller, and etched the heavy 4 ounce (per square foot) copper PCB that will be bolted to those bars, and maybe soldered the mosfets and capacitors to the heavy board, the rest would be maybe a couple hours of work assembling that someone without a lot of tools could do?
Update: Some anger! I programmed the chip, built the low power half of the circuit, and the dang LED didn't come on! It's hard to use a $2.99 volt meter to measure voltages that are going from 0 to 5 volts thousands of times a second. My oscilloscope will probably be here really soon, since the probes and power cord came yesterday! I need that thing to see what's going on!
Update 2: I found a mistake in the assembly of the circuit. I hope this fixes the problem.
__________________ As I watch the old man walk on the sidewalk below my window, I think "Some day old man, I will be like you. So why not give me your coat?" Then I go downstairs to get his coat, but he's gone. Hey, maybe he was Zorro.
There were more than a few mistakes in both the circuit AND the program! It took HOURS to fix them all. ANGER! My beautiful oscilloscope came today. No plug that fit, but I had a spare computer plug that fit. With it, I could enter the world that I had been blind to until now.
So, I hooked up a throttle, and could control my pwm signal. Next, I need to send the pwm signal to a driver to amplify it, and then use the driver to turn on a few mosfets. Next step, 72v 40amp bike controller! Hold me back! Hold me back!
The picture of the oscilloscope with the green lines shows the pwm. It was about 80% of full throttle.
I think I'll install this version in my car and see what sort of acceleration I get. I'm guessing about the same as the forkenswift.
__________________ As I watch the old man walk on the sidewalk below my window, I think "Some day old man, I will be like you. So why not give me your coat?" Then I go downstairs to get his coat, but he's gone. Hey, maybe he was Zorro.
I'm sensing an EcoModder Open Source Car Project™ coming on here.....
Paul, maybe you wanted to keep around the "baby PWM driver".
You could put it on your dashboard so that as you spin the engine up and down, the LEDs get brighter to indicate your power. Might be a cool motor indicator!
Hello! OK, so I have carefully tested the small controller, and watched the results on the oscilloscope. Finally, the software appears to be without any errors, and is much simpler and easier to read now. I think I'll run the bike controller at 4kHz. It may irritate dogs in the neighborhood, but it will keep switching losses down, and it's just a first draft. Well, second draft if you count the 5v 0.01amp one.
To compile this program, download the FREE Atmel AVR Studio!
Atmel AVR Studio
To compile the program, change the file name to end with .c instead of .txt
It wouldn't let me upload it here unless it was in ".txt" format.
There are a lot of page references in PWMAndInputTest.txt. They refer to the PDF of the documentation for the ATMega8. It can be found HERE!
Also, the code assumes you are using the PDIP version of the chip (28 pin version).
__________________ As I watch the old man walk on the sidewalk below my window, I think "Some day old man, I will be like you. So why not give me your coat?" Then I go downstairs to get his coat, but he's gone. Hey, maybe he was Zorro.