How to get the SX-28 to run on another project board.
I for some reason cannot get the SX-28 to run on a separate project board other than the actual programming board. it is like the chip gets no power or something. can someone help me please.
Comments
Your voltage divider does not look like it's doing what you want. You don't seem to have the 10K connected to ground, so I'm guessing you have +12 into MCLR\ and probably Vdd too -- check with a meter. Let me suggest you run to your local RadioShack and get a 7805.
Post Edited (JonnyMac) : 1/16/2008 3:37:06 AM GMT
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
I'm not sure what you doing with +12 to 14 through a resistor to Vdd ???
P.S. You might also try adding BOR26 to the device line. This will help if you have a supply that doesn't rise quickly.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
From your posts it still isn't quite clear how you are powering the SX28 chip. It appears that you are trying to use the 22K resistor to drop the 12v down to 5v. Is that what I am seeing in the picture?? If so I would expect it not to work so it is doing what it should.
You should have a clean 5V supply for the SX28 chip. That is already present on the programming board for the SX28. When you put the SX28 on the protoboard can you temporarily take the ground and 5V connections from your programming board and connect those to your breadboard. If that makes the difference then the power supply is the first problem. If it works then get at least a 7805 voltage regulator and a couple filtering caps.
If Radio Shack doesn't have those on hand then look for some electronics gadgets headed out to the trash. You'd be surprised to see just how many will have a 7805 regulator that you can pull out for free.
It's often difficult to get started but once you successfully get through a few projects it does get easier. There are a lot of people on this forum of all levels of experience and they are very helpful.
Are you going to run everything off of a single battery or is it a 12v wall supply? Please post how what you are using to power your circuit and what voltages you want it to supply. Since you mention motors it is also useful to determine the current requirements of those. If you are powering the motors through a smaller regulator that could cause you problems down the road.
Good luck,
Robert
Also, where is your clock? Did you setup the chip to run on the internal RC oscillator? If so, you do know that runs at something between 3 and 5 KHz, not the standard Mhz right? If you want fast, you must also supply the clock.
Read the datasheet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!
There is no timing in the programming. just if's then's and else's and a few goto's. The chip is getting 5v DC!!!! It is NOT getting 12v. The 12 volts is cut down by the 22k resistor dropping it to 5v. I don't even think there is a pause statement in there now.
Post Edited (eagletalontim) : 1/16/2008 4:26:47 AM GMT
With the regulator, can I use it to drop the power down from 12 - 14v to 5v, then control the output to be 12 - 14v to the motor using transistors without causing problems with the regulator? I have never used a regulator before and am still learning as much as I can.
Yes, you can use transistors or MOSFETs to control your high current devices using the SX to provide the control input to them.
Ok, can you explain to me exactly how you are getting 5V to the SX28 chip through a 22K ohm resistor?? I just don't see how that is possible. Please post a schematic. Even if you measured 5V at some point if you are relying on a resistor to bring down the power to 5V it would be completely unstable and jump all over the place. From everything i've read so far this is the most likely thing that is causing the problem.
Can you at least try to use to 5V from your programming board as a test to confirm or deny that the power is or is not the problem?? Until you do that all the other troubleshooting will be a waste of time. Stable power to the chip is one of the basics.
Running everything off a single 12v source (or battery) is not a problem at all. For any other voltages you just derive them from the 12v source. Some of the options you can use (There are others):
- Small DC/DC convertor
- Voltage regulator (780x series are very common)
- Several large rectifier diodes in series (I would not recommend this for your application)
- A couple low ohm (hi wattage) resistors setup as a votlage divider with a Zener diode as a reference. (I would not go this route either)
In any of the cases above you'll want to add some filtering caps on both the input and output of the circuit to generate your 5V. Caps are cheap and you will need them if you are going to put them in your car.
I think your best bet is to just use a 5v regulator with some caps to power the SX processor.
Good luck,
Robert
The answer to your question above is yes! It is one of the most common ways to handle this.
To control your motor there is a variety of options. First, how do you need to control your motor?? Do you need just a simple on/off control? Do you need to be able to vary the speed? Also, do you need to control the direction?
If you just need simple on/off control then you might just want to use a relay. There are quite a few examples of this for use with the BASIC Stamp. You would control them with the SX chip the same way. An example can be found at:
www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf
Also, be sure to read through the old Nuts&Volts articles on the Stamps and SX. They are very helpful. You can get them at:
www.parallax.com/Resources/NutsVoltsColumns/tabid/272/Default.aspx
For variable speed control in one direction you can consider MOSFET's. If you need variable control in both directions then start looking at H-Bridge circuits.
Hope these help,
Robert
Yes, I just need to turn the motors on/off I think i figured out that circuit using an NPN and a PNP. The PNP is rated at 15A so i should not have any problems with it i hope
One more thing. does anyone know a company that can print boards for a reasonable cost? It is a pain in the butt to have to solder all those wires to where they need to go
Glad to hear that you've been able to get your project going. Instead of using a 1K resistor to feed the voltage regulator you might want to use a few 1N5401 diodes in series to bring the voltage down a bit before going into the regulator. Each one of those diodes will give about a .7V drop. Four of those diodes in series will drop the 12v to something closer to 9V which is just fine for most 5V regulators. Make sure to add some sort of filtering on the power lines too.
Good luck,
Robert
The LC filtering that JonnyMac mentioned is another step above this. It would entail adding an inductor in series with one of the power input lines and then a cap across the power going into the voltage regulator. You may or may not need to go this route.
Some searches on Google on power filtering, LC circuits, etc should turn up more detailed info about this.
Robert
www.expresspcb.com/
A schematic will help illustrate just how you have things connected and make it easier for others to comment and help.
Some other links that may help are:
http://www.windmeadow.com/node/4
http://hades.mech.northwestern.edu/wiki/index.php/Driving_using_a_single_MOSFET
As far as your transistor setup your base resistors are way to high and·should be·based on the transistor specs. If you had a schematic so we could see what you are trying to do·and would·help. NPN transistors are for current sink(switching ground) and PNP transistors for switching positive voltages. The one thing you have to watch with a PNP transistor is the fact that there will be a postive voltage on the base and if you are running 12volts through the transistor you·will end up with that voltage back at the SX this is a bad situation. It is always best to have positive trigger out of the SX to a NPN then to a PNP or just NPN only for current sink to the motor.
Kevin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Note :
The NPN transistor is a small switching transistor.
The PNP is a TIP42 rated at 40V, 10A
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Maybe I should have waited to do that......
No 10K on the MCLR pin.
The PNP transistor has the emitter and base connected together ???
I would look at using a FET or relay for motor control. The TIP42 has pretty low gain.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.iElectronicDesigns.com
·
R1 is limiting the current to the chip. The collector of the PNP is connected before the 1k so that there is no resistance except for the resistance of the PNP transistor.
There is a 10k going to the MCLR, i just forgot to put that in the schematic.
I am trying to build this circuit to not have moving parts and want to keep it as small as possible so I don't want to use relays. Would radioshack have an FET that can handle 10A? I am still learning about more about transistors so I have limited knowledge on what to use. I was under the impression that transistors were kind of like switches with no moving parts.