bathini | 1 Mar 01:11
Picon
Picon
Favicon

[PIC] RS232 to PIC16F628 to DC Motor


Friends

I am having a hard time programming in assembly. 

I am going to send a packet via PC serial port to control a small DC motor
via the PIC16F628 microcontroller. The packet is going to be 4 bytes(4 X
8bit).

Byte 1 is preamble and should all be 8 ones(11111111)
Byte 2 is address of motor(Can make up any number)
Byte 3 is data byte, 4 bits for speed and 1 bit for direction
Byte 4 is for error detection, if the address of the motor is not the one
mentioned on Byte 2, or preamble is not all ones, then drop the packet. So I
imagine you will OR the packet.

If the packet passes the above conditions (Byte 1 and Byte 2, byte 3), RA0
pin will go high and the motor will spin in one direction, if RA0 is a low,
the motor will spin in the other direction

Byte 3 will utilize the CCP/PWM module of the PIC16F628 to alter speed, so
that is pin 9 on the PIC.

This is quite tricky for me. Any help? Here is a code I got from
www.piclist.com

;-----------------------------------------------------------------------;
; ALPHABET.ASM        Send and Receive serially at 1200 baud to PC      ;
;-----------------------------------------------------------------------;

(Continue reading)

Marcel | 1 Mar 01:17
Picon
Favicon

Re: [PIC] Recommendations for a good gang programmer for PIC24H

Vitaliy wrote:
> We're shopping for an industrial-strength gang programmer for the 24H 
> series. Preferably stand alone, and fast. 
> 

You are in a position best suited to know what you need but your 
emphasis on fast brings up questions like what package are your pics 
going to be?  I have found that smd pics take longer to carefully insert 
and remove from the socket and replace back in the tube they came out of 
than the time it takes to program them - sometimes anyway.

A few now and then probably isn't worth the cost of a gang programmer. 
If you are doing 100 or more, it might be worth looking at getting them 
delivered to you already programmed.  This may not work if you need to 
put different data in each.  For some '876 chips I get Digikey to 
program them at something like 50 cents or something in 100 quantity. 
They add a nice label with a legible program name as well.

I need to program about 50 of 8 pin soics once or twice a year so I do 
it by my self.  Programming takes around 4 seconds; getting them out of 
the tube, into the socket, out of the socket, back into the tube, 
correctly oriented for the assembly house takes around 15 to 20 seconds. 
  Having a gang unit won't speed this up.

Dip packages are better in this regard but not much.  Many years ago, I 
did benefit from a gang unit that took around 5 minutes to burn 2708's. 
  That definitely was worth plugging 8 parts into, hit "burn" and do 
something else.

--

-- 
(Continue reading)

Jinx | 1 Mar 02:33
Picon

Re: [EE] Getting 15-ish volts from 5V

An option that may work for you, together with boosting the 5V, is

http://www.piclist.com/techref/io/relay/LVwHVcoil.htm

Take note of the comments

The relay is energised with a higher voltage pulse (energy supplied by a
cap) and held at a lower voltage

I've used this with 10V relays on 5V and they hold reasonably well. 12V
relays are sometimes not so well held. If V+ was 10V they'd probably be
OK, but you have to experiment with the particular relay to make sure
what the hold limit is, to your specifications

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

M. Adam Davis | 1 Mar 01:55
Picon

Re: [EE] DIY inkjet head

As Bill pointed out, the techology used to make modern inkjets depends
on the physics of very small droplets.  It won't easily scale up to
50dpi.

You might look at a cheap airbrush:

http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=47791

Figuring out how it works (blowing air across the ink nozzle pulls the
ink into the airstrem) might give you some ideas on how you can create
very small air-compressor powered, solenoid controlled inkjet heads.

If you need it to be small, you might look at little disposable CO2
cartridges rather than the compressor, and scale it down so it uses
very little air to paint a dot.

Good luck!

-Adam

On Sat, Feb 28, 2009 at 12:05 PM, Ricardo de Azambuja
<ricardo.azambuja <at> gmail.com> wrote:
> Hi!
>
> I am trying to find some info on how to build a inkjet head, but I got
> nothing :(
>
> My idea is make a low res (50dpi?) to print direct on the walls. I
> had seen one made of spray cans, but its just too big.
>
(Continue reading)

jim | 1 Mar 03:59

Re: [PIC] RS232 to PIC16F628 to DC Motor

Bathini,

Do you have an "H" bridge or "Half H" bridge to control the motor?
Or are you going to use the PIC and some pass transistors?
If you want to control direction with just one pin, you'll have to have
some sort of switching arrangement to be able to switch direction.

The remaining details are nothing more than receiving the byte, doing
a comparison to see if it is what you expect, and then sending the
correct portion of the byte to the respective place to be acted upon.

I can work on this a little bit tomorrow.  I don't have time right now 
though.
If someone else doesn't already have it figured out for you by tomorrow,
I'll send you what I come up with then.

Regards,   Jim

----- Original Message ----- 
From: "bathini" <wozamfethu <at> yahoo.es>
To: <piclist <at> mit.edu>
Sent: Saturday, February 28, 2009 6:11 PM
Subject: [PIC] RS232 to PIC16F628 to DC Motor

>
> Friends
>
> I am having a hard time programming in assembly.
>
>
(Continue reading)

Rolf | 1 Mar 04:00
Favicon

Re: [EE] Getting 15-ish volts from 5V

Jinx wrote:
> An option that may work for you, together with boosting the 5V, is
>
> http://www.piclist.com/techref/io/relay/LVwHVcoil.htm
>
> Take note of the comments
>
> The relay is energised with a higher voltage pulse (energy supplied by a
> cap) and held at a lower voltage
>
> I've used this with 10V relays on 5V and they hold reasonably well. 12V
> relays are sometimes not so well held. If V+ was 10V they'd probably be
> OK, but you have to experiment with the particular relay to make sure
> what the hold limit is, to your specifications
>
>   
Just when I think I am getting a good grasp on simple things, someone 
throws a curve-ball like that circuit.

I just don't understand how the circuit puts -5V at the base of the coil 
when the transistor initially conducts.

When the input is deactivated the cap will have a 5V potential through 
it giving +5V on the resistor side, and 0V on the coil side.

Activating the input causes the transistor to conduct, and the only 
thing I see happening is that the cap will discharge to ground without 
any change on the coil side? Does the inductor-like nature of the coil 
play a part?

(Continue reading)

peter green | 1 Mar 05:05

Re: [EE] Getting 15-ish volts from 5V


> Activating the input causes the transistor to conduct, and the only 
> thing I see happening is that the cap will discharge to ground without 
> any change on the coil side? Does the inductor-like nature of the coil 
> play a part?
>   
When the input is sitting low the transistor side of the cap will be at 
5V (the cap seems to be in backwards BTW) and the coil side of the cap 
will be at ground. The other end of the coil will also be at ground 
(since the input is low) so the relay is off.

When the input goes from low to high the transistor switches on and the 
transistor end of the cap is pulled to ground. Since a capacitor resists 
change in voltage (remember I=C(dV/dt) ) the voltage accross the 
capacitor will remain roughly the same dragging the other side of the 
capacitor down to a negative voltage.

Gradually the capacitor will discharge through both the coil and the 100 
ohm resistor but by this time the relay has already switched on so it 
doesn't matter that the voltage accross it gradually decays.
--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Jinx | 1 Mar 06:11
Picon

Re: [EE] Getting 15-ish volts from 5V

> I just don't understand how the circuit puts -5V at the base of the coil
> when the transistor initially conducts

Rolf,

Bearing in mind that the cap should be the other way around ..... 

....because with 5V supplied, it charges up through the 4k7 and 100R (or
diode with cathode to ground)

Now, when 5Vin is 5V, this turns the transistor on, connecting the cap's
+ve terminal to 0V. Therefore, relative to the rest of the circuit, the cap's
-ve terminal is -5V. The voltage across the relay coil is thus 5Vin (5V) to
cap -ve terminal (-5V), or 10V

The energy is enough to pull the relay in, and 5Vin holds it after the
capacitor has discharged
--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
gardenyu | 1 Mar 05:57
Picon

[EE] Switcher got dead after working for hours


Hi:

  I made a power factor corrected (PFC) switching power supply before. For prototype, I ran a half hour test
and seems like everything works fine and delivered it. Then the customer came back and told me it failed
their 5 hour battery charging test.

  I re-did their test and put thermocouples in, I found out that after 1 to 2 hours of safe driving, the PFC stage
got dead and the whole switcher acts like a normal non-PFC flyback converter. 

  I opened it up and found that the MOSFET used in the PFC stage was behaving weird. It's measuring some 500k
from gate to source, while a normal one measures nothing. But other things seem fine like the reverse
diode. 

  Also the PFC IC (FAN7529) was dead, it sees low Vcc and not making any meaningful output, I replaced the IC and
the FET, and it was fixed and behaves as normal. all other stuff seem healthy, diodes, resistors.....

  Since I noticed that the thermocouple on the dead MOSFET body shows about 100C when that stage stopped
working, I doubt that this failure was a result of thermal issue related to that FET. But I had no idea why the
IC was killed as well (should be far from other heating components), maybe some voltage spike when the FET
stopped working?

  The datasheet is attached, my design was similar to it from page 14. Any opinions are very welcomed.

http://www.fairchildsemi.com/ds/FA/FAN7529.pdf

_________________________________________________________________
讲述中国特色文化,体验不同的节日习俗,快来微软春节搜索!
http://chunjie.live.com/?form=PANER01
(Continue reading)

cdb | 1 Mar 08:40
Picon

[AD]Freeby'ish Borland programming books

 I have gathering dust - a complete set of Borland Turbo Pascal for 
Windows reference and user books.

These date back to Win3.11 (Wot's that then) /W95 and are free to 
anyone who may just want the set. Postage would need to be at cost - 
the set is heavy.

Comprises:

Users Guide
Programmers guide
Windows Ref - 3.11 & W95
Windows programming
Turbo Debugger guide
Resource workshop
Help Compiler

No software available - all on 3.5" floppy thingies and have sulked in 
the Australian heat!

Also available the above set but for Borland C++ 4.5 which does 
include the installation CD and the resource CD.

I suddenly failed to remember how to install this CD, but can tell you 
that on the beta version of W7, the debugger loads, sysinspector 
works, the visio demo works and the walker works - the commandline C++ 
compiler loads, couldn't remember what the IDE was called (suspect 
BWC32.exe) I think all the DLL's might need to be installed in the 
system32 directory, didn't try this as it would interfere with the 
beta install of W7. People brainier than I may get it to work in XP or 
(Continue reading)


Gmane